$options['footer'], 'address' => '
' . "\n" . ' ' . "\n" . '' . "\n" . '© [blog name]', 'contact_me_via_email' => ' ' . "\n" . ' ' . "\n" . '' . "\n" . '© [blog name]', 'contact_me_via_contact_form' => ' ' . "\n" . ' ' . "\n" . '' . "\n" . '© [blog name]', 'general_info' => ' ' . "\n" . ' ' . "\n" . '' . "\n" . '[blog description]', ); class AestheteOptions { function getOptions() { $options = get_option('aesthete_options'); if (!is_array($options)) { $options = array ( 'portfolio_category'=> '', 'portfolio_works_per_page'=> 10, 'portfolio_thumb_width'=> 190, 'portfolio_thumb_height'=> 143, 'catalogue_category'=>'', 'catalogue_thumb_width'=> 100, 'catalogue_thumb_height'=> 100, 'catalogue_items_per_page'=> 10, 'hide_post_info'=> false, 'catalogue_image_number'=>1, 'use_graph_header'=>false, 'footer'=>' [blog description]', 'top_menu' =>'' ); update_option('aesthete_options', $options); } return $options; } function add() { if(isset($_POST['aesthete_save_options'])) { $options = AestheteOptions::getOptions(); // meta $options['portfolio_category'] = stripslashes($_POST['portfolio_category']); $options['top_menu'] = stripslashes($_POST['top_menu']); $options['portfolio_works_per_page'] = (int)($_POST['portfolio_works_per_page']); $options['portfolio_thumb_width'] = (int)($_POST['portfolio_thumb_width']); $options['portfolio_thumb_height'] = (int)($_POST['portfolio_thumb_height']); $options['catalogue_category'] = stripslashes($_POST['catalogue_category']); $options['catalogue_thumb_width'] = (int)($_POST['catalogue_thumb_width']); $options['catalogue_thumb_height'] = (int)($_POST['catalogue_thumb_height']); $options['catalogue_image_number'] = (int)($_POST['catalogue_image_number']); $options['catalogue_items_per_page'] = (int)($_POST['catalogue_items_per_page']); $options['hide_post_info'] = ($_POST['hide_post_info'])?true:false; $options['use_graph_header'] = ($_POST['use_graph_header'])?true:false; $options['footer'] = stripslashes($_POST['aestheteFooter']); update_option('aesthete_options', $options); } else { AestheteOptions::getOptions(); } add_theme_page("Aesthete Theme Options", "Aesthete Theme Options", 'edit_themes', basename(__FILE__), array('AestheteOptions', 'display')); } function option_footer_templates() { global $aestheteFooterTemplates; $options = get_option('aesthete_options'); foreach ($aestheteFooterTemplates as $k=>$v) { echo ''; } } function test_php_thumb_cache() { $fc=''; $message =''; $thumbCache = $_SERVER['DOCUMENT_ROOT'].'/phpThumb/cache'; if (!is_writable($thumbCache)) { $cacheDir=get_option( 'upload_path' ).'/phpThumbCache'; if (!is_dir($cacheDir)) { if (!is_dir(get_option( 'upload_path' ))) @mkdir(get_option( 'upload_path' ), 0777); $rs = @mkdir($cacheDir, 0777); } if (!is_writable($cacheDir)) { //if (!@chmod($cacheDir, 0777)) { //$message = "The dir is not writable: $cacheDir"; $cacheDir = get_option( 'upload_path' ); if (!is_writable($cacheDir)) { if ( is_file($_SERVER['DOCUMENT_ROOT'].'/phpThumb/phpThumb.config.php')) $fc = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/phpThumb/phpThumb.config.php'); if (!preg_match('`^[^\/]*\$PHPTHUMB_CONFIG\[\'cache_directory\'\] = null;.*$`m',$fc,$m)) { $message = "post_excerpt?>
get_bloginfo('name'), '[blog description]' => get_bloginfo('description'), '[blog home]' => get_option('home'), '[admin_email]' => hide_email(get_bloginfo('admin_email')), ); $footer = $options['footer']; foreach ($shortcodes as $k => $v) { $footer = str_replace($k, $v, $footer); } preg_match_all('/\[email (.*)\]/',$footer, $matches); if (is_array($matches)) foreach ($matches[0] as $k=>$v) { $footer = str_replace($v,hide_email($matches[1][$k]), $footer); } return $footer; } /**************************************************** START *****************************************************/ if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) { echo "message"; } add_filter('img_caption_shortcode', 'fix_caption_width', 10, 3); add_filter( 'comments_template', 'legacy_comments' ); add_action ('init', 'theme_init'); add_action('admin_menu', array('AestheteOptions', 'add')); if( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'index_sidebar', 'before_widget' => ' ', 'before_title' => '