'Left Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name'=>'Right Sidebar', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } ?> '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude) ); if ( !empty( $out ) ) { ?>


150, 'width' => 300 ); $class = array('classname' => 'widget_pages'); register_sidebar_widget('Pages','widget_pages', $class); register_widget_control('Pages','widget_pages_control', $dims150); $class['classname'] = 'widget_search'; register_sidebar_widget('Search','widget_search', $class); $class['classname'] = 'widget_meta'; register_sidebar_widget('Meta','widget_meta', $class); register_widget_control('Meta','widget_meta_control', $dims150); ?> post_title; $top_permalink = get_permalink($top_page->ID); (!empty($options['sort_column']))? $sort_column = $options['sort_column'] : $sort_column = 'menu_order'; $sub_pages = wp_list_pages('sort_column=' .$sort_column. '&title_li=&echo=0&child_of=' .$top_id); if ($sub_pages <> "" ){ echo $before_widget; # echo $before_title . '' .$top_title. ' »' . $after_title; echo $before_title . '' .$top_title. ' »' . $after_title; ?>  ' . "\n"; } } } function widget_subpages_top_parent_page(){ global $post; $widget_subpages_post = $post; $topparentpageid = $widget_subpages_post->ID; $widget_subpages_post_parent_id = $widget_subpages_post->post_parent; while ($widget_subpages_post_parent_id) { $widget_subpages_post = &get_post($widget_subpages_post_parent_id); $topparentpageid = $widget_subpages_post->ID; $widget_subpages_post_parent_id = $widget_subpages_post->post_parent; } return $topparentpageid; } // This registers the widget so it appears with the other available // widgets and can be dragged and dropped into any active sidebars. register_sidebar_widget(array('Subpages', 'widgets'), 'widget_subpages'); function widget_subpages_options(){ // Get our options and see if we're handling a form submission. $options = get_option('widget_subpages'); if ( !is_array($options) ) $options = array('divider'=>'', 'divider_style'=> ''); if ( $_POST['widget_subpages-submit'] ) { // Remember to sanitize and format use input appropriately. $options['sort_column'] = $_POST['widget_subpages-sort_column']; $options['divider'] = strip_tags(stripslashes($_POST['widget_subpages-divider'])); $options['divider_style'] = strip_tags(stripslashes($_POST['widget_subpages-divider_style'])); update_option('widget_subpages', $options); } // Be sure you format your options to be valid HTML attributes. if(!empty($options['sort_column'])){ if($options['sort_column'] == 'post_title'){ $menu_order_checked = ''; $post_title_checked = ' checked="checked"'; } else { $menu_order_checked = ' checked="checked"'; $post_title_checked = ''; } } else { $menu_order_checked = ' checked="checked"'; } if($options['divider'] == 1) $checked = ' checked="checked"'; $divider_style = htmlspecialchars($options['divider_style'], ENT_QUOTES); echo '

' . "\n"; echo '


(Adds a visual divider beneath the subpages sidebox.)

'; echo '

'; echo ''; } register_widget_control(array('Subpages', 'widgets'), 'widget_subpages_options', 400, 200); function delete_widget_subpages_options(){ /* hooks submitted upon deactivation*/ delete_option('widget_subpages'); } } add_action('widgets_init', 'widget_subpages_init'); ?> max_num_pages > 1) ? TRUE : FALSE; } ?> \n"; } add_action('admin_head', 'bfa_add_stuff_admin_head'); ?> "Homepage Meta Description", "id" => $shortname."_homepage_meta_description", "std" => "", "type" => "textarea", "info" => "Type 1-3 sentences, about 20-30 words total. Will be used as Meta Description for (only) the homepage. If left blank, no Meta Description will be added to the homepage. Example: Comprehensive real estate and property listings. Includes information on buying and selling, tips on building, an auction timetable and other helpful information."), array( "name" => "Homepage Meta Keywords", "id" => $shortname."_homepage_meta_keywords", "std" => "", "type" => "textarea", "info" => "Type 5-30 words or phrases, separated by comma. Will be used as the Meta Keywords for (only) the homepage. If left blank, no Meta Keywords will be added to the homepage. Example: real estate, property listings, buying, selling, tips, building, auction, information"), array( "name" => "Meta Title Tag format", "category" => "seo", "id" => $shortname."_add_blogtitle", "type" => "select", "std" => "Page Title - Blog Title", "options" => array("Page Title - Blog Title", "Blog Title - Page Title", "Page Title"), "info" => "Show the blog title in front of or after the page title, in the meta title tag of every page? Or, show only the page title?"), array( "name" => "Meta Title Tag Separator", "category" => "seo", "id" => $shortname."_title_separator_code", "type" => "select", "std" => "1", "options" => array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"), "info" => "If you selected to include the blog title in the meta title (the option above), choose here what to put BETWEEN the page and the blog title (or vice versa): 1( « ), 2( » ), 3( : ), 4(: ), 5( > ), 6( < ), 7( - ), 8( ‹ ), 9( › ), 10( • ), 11( · ), 12( — ) or 13( | )."), array( "name" => "Noindex Date Archive-Pages?", "id" => $shortname."_archive_noindex", "type" => "select", "std" => "Yes", "options" => array("Yes", "No"), "info" => "Include meta tag \"noindex, follow\" into date based archive pages? The purpose is to keep search engines from spidering duplicate content from your site. Default is Yes"), array( "name" => "Noindex Category & Tags pages?", "id" => $shortname."_cat_tag_noindex", "type" => "select", "std" => "No", "options" => array("Yes", "No"), "info" => "Include meta tag \"noindex, follow\" into category & tag pages? The purpose is to keep search engines from spidering duplicate content from your site. Default is No (Meaning the \"noindex\" meta tag will NOT be set, and the pages will be indexed)"), array( "name" => "Nofollow RSS, trackback & admin links?", "id" => $shortname."_nofollow", "type" => "select", "std" => "Yes", "options" => array("Yes", "No"), "info" => "Make RSS, trackback & admin links \"nofollow\"? Same purpose as above. Default is Yes"), array( "name" => "Body Font", "id" => $shortname."_body_font", "type" => "select", "std" => "Tahoma", "options" => array("Tahoma", "Arial", "Calibri", "Cambria", "Candara", "Comic Sans MS", "Consolas", "Constantia", "Corbel", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS", "Verdana"), "info" => "The font face for the main content. The fonts starting with \"C\" (except Comic Sans and Courier New) are installed on Computers running Windows Vista. If you choose a Vista font here (recommended, because they're \"fresh\"), choose an Windows XP font (all other fonts in the list) in the section below, as backup for XP users. The \"serif\" or \"sans-serif\" part in the next option will cover all other website visitors, i.e Mac and Linux users. Google Adsense uses Arial, so if you want to blend in Adsense as much as possible you should use Arial here, even though that is a quite often used font face. Default: Tahoma"), array( "name" => "Body Backup Font", "id" => $shortname."_body_backup_font", "type" => "select", "std" => "Arial, sans-serif", "options" => array("Arial, sans-serif", "Calibri, sans-serif", "Cambria, serif", "Candara, sans-serif", "Comic Sans MS, sans-serif", "Consolas, sans-serif", "Constantia, serif", "Corbel, sans-serif", "Courier New, sans-serif", "Georgia, serif", "Tahoma, sans-serif", "Times New Roman, serif", "Trebuchet MS, sans-serif", "Verdana, sans-serif"), "info" => "Show this font for users that don't have the main font face (option above) installed on their computer. I.e., if you've chosen Calibri as the main font, you could choose \"Arial, sans-serif\" as the backup font, for a consistent typographical look for all website visitors."), array( "name" => "Link Default Color", "id" => $shortname."_link_color", "std" => "666666", "type" => "text", "info" => "All hex color codes. Default: 666666"), array( "name" => "Link Hover Color", "id" => $shortname."_link_hover_color", "std" => "cc0000", "type" => "text", "info" => "Color of links when \"hovering\" over them with the mouse pointer. All hex color codes. Default: cc0000"), array( "name" => "Link Default Decoration", "id" => $shortname."_link_default_decoration", "type" => "select", "std" => "none", "options" => array("none", "underline"), "info" => "Underline links or not. Default: none"), array( "name" => "Link Hover Decoration", "id" => $shortname."_link_hover_decoration", "type" => "select", "std" => "underline", "options" => array("underline", "none"), "info" => "When the mouse pointer hovers over a link, underline it or not. Default: underline"), array( "name" => "Link Text Bold or Not", "id" => $shortname."_link_weight", "type" => "select", "std" => "bold", "options" => array("bold", "normal"), "info" => "Make link text bold or not. Default: bold"), array( "name" => "Show Logo Icon?", "id" => $shortname."_show_logo_icon", "type" => "select", "std" => "Yes", "options" => array("Yes", "No"), "info" => "Show the graphic on the left hand side of the blog title? Default: Yes. To use your own graphic, leave this option at Yes and Upload a \"logosymbol.gif\" with the size of 50x50 pixels and white background to /wp-content/themes/atahualpa/images/"), array( "name" => "Blog Title Color", "id" => $shortname."_blog_title_color", "std" => "666666", "type" => "text", "info" => "All hex color codes. Default: 666666"), array( "name" => "Blog Title Hover Color", "id" => $shortname."_blog_title_hover_color", "std" => "000000", "type" => "text", "info" => "Color when hovering over the blog title. All hex color codes. Default: 000000"), array( "name" => "Blog Tagline Color", "id" => $shortname."_blog_tagline_color", "std" => "666666", "type" => "text", "info" => "All hex color codes. Default: 666666"), array( "name" => "Blog Title Font", "id" => $shortname."_blog_title_font", "type" => "select", "std" => "Tahoma", "options" => array("Tahoma", "Arial", "Calibri", "Cambria", "Candara", "Comic Sans MS", "Consolas", "Constantia", "Corbel", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS", "Verdana"), "info" => "The font face for the blog title."), array( "name" => "Blog Title Backup Font", "id" => $shortname."_blog_title_backup_font", "type" => "select", "std" => "Arial, sans-serif", "options" => array("Arial, sans-serif", "Calibri, sans-serif", "Cambria, serif", "Candara, sans-serif", "Comic Sans MS, sans-serif", "Consolas, sans-serif", "Constantia, serif", "Corbel, sans-serif", "Courier New, sans-serif", "Georgia, serif", "Tahoma, sans-serif", "Times New Roman, serif", "Trebuchet MS, sans-serif", "Verdana, sans-serif"), "info" => "The backup font for the blog title, for visitors that don't have the default font (see one option above) available on their computer."), array( "name" => "Blog Title Font Size", "id" => $shortname."_blog_title_fontsize", "std" => "2.5", "type" => "text", "info" => "All numeric values such as 2.5, 3 or 1.92. Default: 2.5"), array( "name" => "Header Image Height", "id" => $shortname."_headerimage_height", "std" => "150", "type" => "text", "info" => "Visible height of the header image, in pixels. You might need to edit this if you upload your own, bigger or smaller header image. This value does not need to match the actual image height. Only the top XXX pixels will be shown, the rest will be hidden. Default: 150"), array( "name" => "Header Image Opacity", "id" => $shortname."_header_opacity", "std" => "40", "type" => "text", "info" => "Opacity overlay for the left and right hand side of the header image. Numeric values between 0 and 99. Put 0 here to remove the Opacity. Default: 40. "), array( "name" => "Left sidebar width", "id" => $shortname."_leftcolumn_width", "std" => "15", "type" => "text", "info" => "Numbers between 10-25 make sense. Default: 15. Put 0 here to make the left sidebar dissapear. You'll have a 2 column layout then."), array( "name" => "Right sidebar width", "id" => $shortname."_rightcolumn_width", "std" => "15", "type" => "text", "info" => "Numbers between 10-25 make sense. Default: 15. Put 0 here to make the right sidebar dissapear. You'll have a 2 column layout then."), array( "name" => "Copyright start year", "id" => $shortname."_copyright_start_year", "std" => "", "type" => "text", "info" => "Start year for copyright notice at bottom of page: © XXXX - [current year]. (The current year will be included automatically). Default: blank. Example: If you put 2006 into this field, then in 2008 it will read \"2006-2008\" on your page, and on 1-1-2009 it will change to \"2006-2009\", and so on"), ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=functions.php&reset=true"); die; } } add_theme_page($themename." Options", "Atahualpa Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

settings

: class="color" name="" id="" type="" value="" />
:
:

current_post == $wp_query->post_count - 1); } ?>