"Welcome", "type" => "title"), array( "type" => "open"), /*array( "name" => __('Layout settings', 'Luno'), "id" => $shortname."_layout_settings", "options" => array(__('Original','Luno'), __('Wider','Luno')), "std" => __('Original','Luno'), "desc" => __('','Luno'), "type" => "select"),*/ array( "name" => __('Cufón settings', 'Luno'), "desc" => __('Show some texts in your blog using Cufón¹ (blog title, tagline, post titles, page titles, etc.).

Select Extra² (or Disabled) for languages with accents and special characters.','Luno'), "id" => $shortname."_cufon_settings", "options" => array(__('Enabled','Luno'), __('Disabled','Luno'), __('Extra','Luno'), __('CSS3 Font-face (lightweight)')), "std" => __('Enabled','Luno'), "type" => "select"), /* array( "name" => __('Christmas Joy','Luno'), "desc" => __('Because its Christmas! Happy Holidays and thanks for downloading Luno theme','Luno'), "id" => $shortname."_christmas_joy", "type" => "checkbox", "std" => "false"),*/ array( "name" => __('Disable comments on pages','Luno'), "desc" => __('Check this box if you would like to DISABLE COMMENTS on pages','Luno'), "id" => $shortname."_disable_comments", "type" => "checkbox", "std" => "false"), /*array( "name" => __('Custom image header', 'Luno'), "id" => $shortname."_top_header_image", "options" => array( __('Disabled','Luno'), __('Enabled','Luno') ), "std" => __('Disabled','Luno'), "desc" => '', "type" => "select"), array( "name" => __('Header image height in pixels','Luno'), "desc" => '', "id" => $shortname."_top_header_image_height", "type" => "header_image_height", "std" => "56"), array( "name" => __('Header image width in pixels','Luno'), "desc" => '', "id" => $shortname."_top_header_image_width", "type" => "header_image_width", "std" => "600"),*/ array( "name" => __('About author feature', 'Luno'), "desc" => __('Add information about post author','Luno'), "id" => $shortname."_post_author", "options" => array(__('Disabled','Luno'), __('Main page','Luno'), __('Single page','Luno'), __('Both','Luno')), "std" => __('Disabled','Luno'), "type" => "select"), array( "name" => __('Enjoy this post feature','Luno'), "desc" => __('Check this box if you would like to ACTIVATE Enjoy this post feature','Luno'), "id" => $shortname."_enjoy_post", "type" => "checkbox", "std" => "false"), array( "name" => __('Use basic wordpress pages/categories in front menu','Luno'), "desc" => __('I don\'t want those awesome WP3 features.','Luno'), "id" => $shortname."_use_wp_menus", "type" => "checkbox", "std" => ""), array( "name" => __('Show categories on front menu','Luno'), "desc" => __('Check this box if you would like to SHOW CATEGORIES instead pages on front menu','Luno'), "id" => $shortname."_show_categories", "type" => "checkbox", "std" => "false"), array( "name" => __('Exclude pages from front menu','Luno'), "desc" => __('Type the pages id in the box below. Example input: 5,19,24','Luno'), "id" => $shortname."_exclude_pages", "type" => "exclude_pages", "std" => ""), array( "name" => __('Exclude categories from front menu','Luno'), "desc" => __('Type the categories id in the box below. Example input: 5,19,24','Luno'), "id" => $shortname."_exclude_categories", "type" => "exclude_categories", "std" => ""), array( "name" => __('Remove home button','Luno'), "desc" => __('Remove home button from front menu','Luno'), "id" => $shortname."_remove_homebtn", "type" => "checkbox", "std" => "false"), /*array( "name" => __('Remove search box','Luno'), "desc" => __('Remove search box and expand space for front menu','Luno'), "id" => $shortname."_remove_searchbox", "type" => "checkbox", "std" => "false"),*/ array( "name" => __('Remove tags from posts','Luno'), "desc" => __('Show only categories in post footer','Luno'), "id" => $shortname."_disable_tags", "type" => "checkbox", "std" => "false"), /*array( "name" => __('Remove RSS badge','Luno'), "desc" => __('Remove RSS badge from blog header','Luno'), "id" => $shortname."_remove_rss", "type" => "checkbox", "std" => "false"),*/ array( "name" => __('Google Custom Search Engine','Luno'), "desc" => __('Find name="cx" in the Search box code of Google CSE, and type the value here.','Luno'), "id" => $shortname."_google_search_code", "type" => "text", "std" => ""), array( "name" => __('Sidebox settings', 'Luno'), "id" => $shortname."_sidebox_settings", "options" => array(__('Enabled','Luno'), __('Disabled','Luno'), __('Show only date','Luno'), __('Show only in posts','Luno'), __('Last two options together','Luno')), "std" => __('Enabled','Luno'), "desc" => '', "type" => "select"), /*array( "name" => __('Sidebar settings', 'Luno'), "id" => $shortname."_sidebar_settings", "desc" => __('Two sidebars option is available on Wider layout only','Luno'), "options" => array(__('One sidebar','Luno'), __('Two sidebars','Luno')), "std" => __('One sidebar','Luno'), "type" => "select"),*/ array( "name" => __('Custom CSS', 'Luno'), "desc" => __('Put your custom css code here','Luno'), "id" => $shortname."_custom_css", "type" => "textarea", "std" => ""), array( "name" => __('AdSense', 'Luno'), "desc" => __('Copy your AdSense code or any other ADS service and paste it here.
Usually 468x60 text or image ad but you can use anything ad format you want.','Luno'), "id" => $shortname."_adsense_spot", "type" => "textarea", "std" => ""), array( "name" => __('Additional header content', 'Luno'), "desc" => __('Additional header content, including scripts, etc','Luno'), "id" => $shortname."_header_content", "type" => "textarea", "std" => ""), array( "name" => __('Additional footer content', 'Luno'), "desc" => __('Additional footer content for Google Analytics or any other service','Luno'), "id" => $shortname."_footer_content", "type" => "textarea", "std" => ""), array( "type" => "close") ); // ADMIN PAGE FUNCTIONS function Luno_admin() { global $themename, $shortname, $options; if ( nullit($_GET['page']) == basename(__FILE__) ) { if ( 'save' == nullit($_REQUEST['action']) ) { foreach ($options as $value) { update_option( @$value['id'], Luno_stripslash_check(@$_REQUEST[ $value['id'] ]) ); } foreach ($options as $value) { if( isset( $_REQUEST[ @$value['id'] ] ) ) { update_option( @$value['id'], Luno_stripslash_check($_REQUEST[ $value['id'] ]) ); } else { delete_option( @$value['id'] ); } } header("Location: " . admin_url( 'themes.php?page=functions.php&saved=true' )); } else if( 'reset' == nullit($_REQUEST['action']) ) { foreach ($options as $value) { delete_option( @$value['id'] ); } header("Location: " . admin_url( 'themes.php?page=functions.php&reset=true' )); } } add_theme_page(__('Luno Settings','Luno'), __('Luno Settings','Luno'), 'edit_themes', basename(__FILE__), 'Luno_admin_page'); } // ADMIN PAGE LAYOUT function Luno_admin_page() { global $themename, $themeversion, $shortname, $options, $lw_top_header_image, $top_header_image_height, $lw_show_categories; if ( nullit($_REQUEST['saved']) ) { echo '

'.$themename.' '; _e('settings saved','Luno'); echo '.

'; } if ( nullit($_REQUEST['reset']) ) { echo '

'.$themename.' '; _e('settings reset','Luno'); echo '.

'; } ?>


" />   
     " />    " />    " />    " />    />   



300kb js file): Basic latin, uppercase, lowercase, numerals, punctuation, Latin-1 Supplement, Latin Extended-A, Cyrillic Alphabet, Russian Alphabet, Greek and Coptic; usefull for some accents and special characters.','Luno') ?>

slow loading).','Luno') ?>

ID; if ( !$post_id ) return; if ( !isset($cjd_comment_count_cache[$post_id]) ) { $p = get_post($post_id); $p = array($p); Luno_fb_update_comment_type_cache($p); } ; if ( $type == 'pingback' || $type == 'trackback' || $type == 'comment' ) $count = $cjd_comment_count_cache[$post_id][$type]; elseif ( $type == 'pings' ) $count = $cjd_comment_count_cache[$post_id]['pingback'] + $cjd_comment_count_cache[$post_id]['trackback']; else $count = array_sum((array) $cjd_comment_count_cache[$post_id]); return apply_filters('Luno_fb_get_comment_type_count', $count); } if ( !function_exists('Luno_fb_update_comment_type_cache') ) { function Luno_fb_update_comment_type_cache($queried_posts) { $post_id_list = ""; global $cjd_comment_count_cache, $wpdb; if ( !$queried_posts ) return $queried_posts; foreach ( (array) $queried_posts as $post ) if ( !isset($cjd_comment_count_cache[$post->ID]) ) $post_id_list[] = $post->ID; if ( $post_id_list ) { $post_id_list = implode(',', $post_id_list); foreach ( array('', 'pingback', 'trackback') as $type ) { $counts = $wpdb->get_results("SELECT ID, COUNT( comment_ID ) AS ccount FROM $wpdb->posts LEFT JOIN $wpdb->comments ON ( comment_post_ID = ID AND comment_approved = '1' AND comment_type='$type' ) WHERE (post_status = 'publish' OR (post_status = 'inherit' AND post_type = 'attachment')) AND ID IN ($post_id_list) GROUP BY ID"); if ( $counts ) { if ( '' == $type ) $type = 'comment'; foreach ( $counts as $count ) $cjd_comment_count_cache[$count->ID][$type] = $count->ccount; } } } return $queried_posts; } add_filter('the_posts', 'Luno_fb_update_comment_type_cache'); } /** Added by Steven L from ISomehowHate.com | Fixes an issue that can occur when a user has magic_quotes switched to on. | This ensures no \'s are added to the code which causes Google Adsense and perhaps other things to fail. | Changes Made to Existing Code: Added stripslash_check to the update_option functions **/ function Luno_stripslash_check($variable) { $stripped = stripslashes($variable); return $stripped; } // FRONT MENU / LIST PAGES OR CATEGORIES function Luno_wp_list_pages(){ global $lw_show_categories, $lw_exclude_pages, $lw_exclude_categories; if ($lw_show_categories == "true") { $top_list = wp_list_categories("echo=0&depth=2&title_li=&hide_empty=0&exclude=".$lw_exclude_categories.""); $top_list = str_replace(array('">','','','','','','','','

\n\n"; if($cufon_extra == 1) $cufon_header_script = str_replace("vera.font.js", "vera_extra.font.js", $cufon_header_script); if($cufon_enabled == 1) echo $cufon_header_script; if($fontface == 1) echo "\n\n"; } function Luno_cufon_footer(){ global $cufon_enabled; $cufon_footer_script = "\n\n"; if($cufon_enabled == 1) echo $cufon_footer_script; } // HOME BUTTON function Luno_homebtn($homebtn_value){ global $lw_remove_homebtn; $selected = ""; if($lw_remove_homebtn == "false") { if(is_front_page()) $selected="s"; ?>
  • 1 ) : echo "\n"; echo "\n"; endif; } // SEARCH BOX / WORDPRESS BASIC SEARCH OR GOOGLE CSE function Luno_searchbox(){ global $lw_remove_searchbox, $lw_google_search_code; $lw_google_search_code = trim(str_replace(" ","",$lw_google_search_code)); if($lw_remove_searchbox != "true") if(!empty($lw_google_search_code)){ ?>
    ".get_the_time('j')."".get_the_time('M/y').""; echo ""; if(!comments_open()) _e('Off','Luno'); else echo Luno_fb_get_comment_type_count('comment'); echo "
    \n"; break; case "Disabled": break; case "Show only in posts": if(is_single()){ echo "
    ".get_the_time('j')."".get_the_time('M/y').""; echo ""; if(!comments_open()) _e('Off','Luno'); else echo fb_get_comment_type_count('comment').""; echo "
    \n"; } break; case "Show only date": /* START ONLY DATE */ echo "
    ".get_the_time('j')."".get_the_time('M/y').""; echo "
    \n"; /* END ONLY DATE */ break; case "Last two options together": /* START LAST TWO */ if(is_single()){ echo "
    ".get_the_time('j')."".get_the_time('M/y').""; echo "
    \n"; } /* END LAST TWO */ break; } // end switch } // end function function Luno_sidebar(){ global $lw_sidebar_settings, $lw_layout_settings; if($lw_layout_settings=="Wider"){ switch ($lw_sidebar_settings) { case "One sidebar": default: break; case "Two sidebars": include (TEMPLATEPATH . '/sidebar-child.php'); break; } // end switch }// end if } // end function function Luno_simple_date(){ global $lw_sidebox_settings; if($lw_sidebox_settings == "Disabled"){ echo "
    ".__('Posted on','Luno')." ".get_the_time(__('F j, Y','Luno'))."
    "; } } // LEGACY COMMENTS / FOR OLD VERSION OF WORDPRESS function Luno_legacy_comments($file) { if(!function_exists('wp_list_comments')) : // WP 2.7-only check $file = TEMPLATEPATH.'/legacy.comments.php'; endif; return $file; } // SPAM PROTECT function check_referrer() { if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == "") { wp_die( __('Please enable referrers in your browser, or, if you\'re a spammer, bugger off!','Luno') ); } } // RSS FEED BADGE OPTIONS function Luno_rss_feed_css_false(){ echo "\n"; } function Luno_rss_feed_css_true(){ global $lw_layout_settings; if($lw_layout_settings == "Wider"){ echo ""; }else{ echo ""; } } function Luno_rss_feed(){ global $lw_remove_rss; if($lw_remove_rss == "false"){ ?> \n"; } // THREADED COMMENTS function Luno_nested_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="li-comment-">
    __('( REPLY )','Luno'), 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    comment_approved == '0') : ?>
    \n/**/\n\n"; } } // ADSENSE function Luno_adsense_spot(){ global $lw_adsense_spot; if($lw_adsense_spot){ echo "
    "; echo $lw_adsense_spot; echo "
    "; } } // LOCALIZATION load_theme_textdomain('Luno', get_template_directory() . '/lang'); // CHRISTMAS JOY function Luno_christmas_joy(){ global $lw_christmas_joy, $lw_top_header_image; if($lw_christmas_joy == "true" && $lw_top_header_image == "Disabled") echo "\n\n"; } function nullit(&$varin) { //must pass by reference, so there is no explicit copying of var data //if undefined variable, then returns ’’ without doing an error, otherwise just returns the var. //this is done so we don’t get warning if (isset($varin)) { return ($varin); } else { return (''); } } // SIDEBAR WIDGETS if ( function_exists('register_sidebar') ) { register_sidebar(array('name' =>'Sidebar','before_widget' => '','after_widget' => '','before_title' => '

    ','after_title' => '

    ')); } if ( function_exists('register_sidebar') && $lw_sidebar_settings == "Two sidebars") { register_sidebar(array('name' =>'Sidebar Child','before_widget' => '','after_widget' => '','before_title' => '

    ','after_title' => '

    ')); } // WORDPRESS 2.9+ FEATURES if ( function_exists( 'add_theme_support' ) ) add_theme_support( 'post-thumbnails' ); if ( function_exists( 'add_theme_support' ) ) add_theme_support( 'menus' ); if ( function_exists( 'add_theme_support' ) ) add_theme_support( 'automatic-feed-links' ); // WORDPRESS 3.0+ FEATURES if ( function_exists( 'register_nav_menus' ) ) register_nav_menus( array( 'Luno_top_menu' => __( 'Luno Navigation Bar', 'Luno' ), ) ); function register_custom_menu() { register_nav_menu('Luno_top_menu', __( 'Luno Navigation Bar', 'Luno' )); } add_action('after_setup_theme', 'register_custom_menu'); $commenter = wp_get_current_commenter(); global $req; // TODO does this do anything? function Luno_comment_fields ($fields) { foreach ($fields as $name => $field) { $fields[$name] = preg_replace('/((?:.*?)<\/label>)\s*(\*<\/span>)?\s*()/', '\3\1\2',$field); $fields[$name] = str_replace("*", "(required)", $fields[$name]); } return $fields; } add_filter('comment_form_default_fields', 'Luno_comment_fields'); // CUSTOM HEADER require_once(TEMPLATEPATH."/custom_header.php"); // Include CSS in WP head if ( !is_admin() ) { $theme = get_theme( get_current_theme() ); wp_register_style( 'Luno_stylesheet', get_bloginfo( 'stylesheet_url' ), false, $theme['Version'] ); wp_enqueue_style( 'Luno_stylesheet' ); if($lw_layout_settings == "Wider") : wp_register_style( 'Luno_stylesheet_wider', get_template_directory_uri() . "/wider.css", false, $theme['Version'] ); wp_enqueue_style( 'Luno_stylesheet_wider' ); if($lw_sidebar_settings=="Two sidebars"): wp_register_style( 'Luno_stylesheet_newsidebar', get_template_directory_uri() . "/new_sidebar.css", false, $theme['Version'] ); wp_enqueue_style( 'Luno_stylesheet_newsidebar' ); endif; else: wp_register_style( 'Luno_stylesheet_original', get_template_directory_uri() . "/original.css", false, $theme['Version'] ); wp_enqueue_style( 'Luno_stylesheet_original' ); endif; } // ENABLE FUNCTIONS add_action('admin_menu', 'Luno_admin'); add_action('wp_head', 'Luno_cufon_header'); add_action('wp_head', 'Luno_custom_css'); add_action('wp_head', 'Luno_ie_png_transparency'); add_action('wp_footer', 'Luno_cufon_footer'); add_action('wp_footer', 'Luno_comment_tabs'); add_action( 'wp_head', 'Luno_canonical_for_comments' ); add_filter('comments_template', 'Luno_legacy_comments'); remove_action('wp_head', 'wp_generator'); remove_filter('the_content', 'wptexturize'); ?>