'Regular Sidebar', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); } /* Plugin Name: Separate Comments & Pings Plugin URI: http://urbangiraffe.com/plugins/separate-comment-pings/ Description: Removes all pings & trackbacks from comments and puts them into $pings. Author: John Godley Version: 1.0 Author URI: http://urbangiraffe.com/ */ function ping_comments ($comments) { global $pings, $comment; // Initialise the variables $pings = $newcomments = array (); // Loop through existing comments foreach ($comments AS $comment) { if (get_comment_type () == 'comment') $newcomments[] = $comment; else $pings[] = $comment; } // Return the comments without any pings return $newcomments; } // Adjust comments number so comments_number() function is correct function ping_comments_number ($num) { global $pings; return $num - count ($pings); } // Hook into WordPress filters add_filter ('get_comments_number', 'ping_comments_number'); add_filter ('comments_array', 'ping_comments'); /* wp options page --------------------------------------------------------------- */ $themename = "Amazona Theme"; $shortname = "amazona"; $options = array( array( "type" => "open" ), array( "type" => "title", "name" => "Amazona Theme Options", "desc" => 'Customize amazona to your needs. If you have any questions about this theme, go to Seo-Scout Amazona Page. I will add a detailed howto there. If you accidentially destroyed these Options here, just click the RESET button and start over. Putting HTML-Code into these Option-Fields is possible (be careful).' ), array( "type" => "title", "name" => "Header-Links", "desc" => "Put up to 5 external links or short messages into the top of the header. This is the syntax for links:
<a href="http://address.goes.here/" target="_blank" title="This Text is visible on Mouseover">The Linktext on Page</a>", "image" => "5links.jpg" ), /* header-links (5 pieces) */ array( "name" => "Header-Link 1", "desc" => "You can put up to 5 Links in the Top of the Header or one message. 1. Link in Header, above Searchform. Like to manually edit this? Go to /lib/navigation.php line 25ff.", "id" => $shortname . "_link_1", "std" => '', "type" => "textbox_small" ), array( "name" => "Header-Link 2", "desc" => "2. Link in Header, above Searchform", "id" => $shortname . "_link_2", "std" => '', "type" => "textbox_small" ), array( "name" => "Header-Link 3", "desc" => "3. Link in Header, above Searchform", "id" => $shortname . "_link_3", "std" => '', "type" => "textbox_small" ), array( "name" => "Header-Link 4", "desc" => "4. Link in Header, above Searchform", "id" => $shortname . "_link_4", "std" => '', "type" => "textbox_small" ), array( "name" => "Header-Link 5", "desc" => "5. Link in Header, above Searchform", "id" => $shortname . "_link_5", "std" => '', "type" => "textbox_small" ), array( "type" => "title", "name" => "Very small message", "desc" => "If you like, you can put an image or a small message next to the search-button. If you don't have any idea what to put there, delete the text and save.", "image" => "smallmessage.jpg" ), /* small message in header, nearby searchform */ array( "name" => "Very Small Message in Head", "desc" => "Content for the Textfield in Header, nearby Searchform. You can put a small message (up to 60 characters) here, if you like.
If you want to edit it manually (for example, to place a picture), go to /lib/navigation.php, line 73.", "id" => $shortname . "_smallmessage", "std" => "", "type" => "textbox_small" ), array( "type" => "title", "name" => "About-Section", "desc" => "Here you can place an informative text about you and this blog (what is it about?)", "image" => "about.jpg" ), /* short about section title */ array( "name" => "Your About Title", "desc" => "About-Section above Carousel: Put in a short Title. If you want to edit it manually, go to /lib/meta.inc.php.", "id" => $shortname . "_about_title", "std" => "About this Blog (Title)", "type" => "textbox_small" ), /* short about section text */ array( "name" => "Your About Text", "desc" => "About-Section above Carousel: Put in an informative description text. If you want to edit it manually, go to /lib/meta.inc.php.", "id" => $shortname . "_about_text", "std" => 'About this Blog (Text). Tell the people out there in 2-3 sentences what this blog is about and who you are. Use your main keywords here, as this text is visible on all pages', "type" => "textbox" ), array( "type" => "title", "name" => "Amazon-Carousel", "desc" => "This is the perfect spot for an Amazon.com Carousel, stuffed with your stuff. Or you can put a big picture or very important Text in here... This will be on all pages.", "image" => "amazoncarousel.jpg" ), /* Amazon Carousel Code */ array( "name" => "Put in your Amazon.com Carousel code", "desc" => "Go to Amazon.com, subscribe as affiliate partner and get your Amazon Carousel. To edit it manually, go to /lib/announce.inc.php, line 10ff.", "id" => $shortname . "_carouselcode", "type" => "textbox", "std" => 'Suggestion: Amazon.com Carousel here.' ), array( "type" => "title", "name" => "On Special (orange box)", "desc" => "This is an attraktive spot for very important links or a super-important text (or a pic or something else).", "image" => "onspecial.jpg" ), /* on special orange box nearby carousel */ array( "name" => "On Special (orange box)", "desc" => "Special Content or Links in that orange box nearby amazon carousel. To edit it manually, go to /lib/announce.inc.php, line 21ff.", "id" => $shortname . "_onspecial", "std" => '', "type" => "textbox" ), array( "type" => "title", "name" => "Good Spot for Google Adsense", "desc" => "This is a good spot for Google Adsense 250x250 px Advertising Block.", "image" => "adsense.jpg" ), /* adwords 250x250 above sidebar */ array( "name" => "Google Adsense", "desc" => "If you like, put in here your code for an Google Adsense Block 250x250 px; it will appear above the sidebar.", "id" => $shortname . "_ga_250", "std" => '', "type" => "textbox" ), array( "type" => "title", "name" => "Your aStore Page URL", "desc" => "You can integrate your aStore Page within this blog, just provide the complete URL in the field below..." ), array( "name" => "aStore Page URL", "desc" => "Once you saved your aStore Page URL here, go to pages ยป add page and choose template aStore Page within attributes. Done. Your aStore is integrated within your blog!", "id" => $shortname . "_astore_url", "std" => "", "type" => "textbox_small" ), array( "type" => "close" ) ); add_action( "admin_menu", "amazona_add_admin" ); function amazona_add_admin( ) { global $themename, $shortname, $options; if( isset( $_GET['page'] ) && $_GET['page'] == basename( __FILE__ )) { if( isset( $_REQUEST['action'] ) && '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" ); wp_redirect( "themes.php?page=functions.php&saved=true" ); die; } else if( isset( $_REQUEST['action'] ) && 'reset' == $_REQUEST['action'] ) { foreach( $options as $value ) { delete_option( $value['id'] ); } #header( "Location: themes.php?page=functions.php&reset=true" ); wp_redirect( "themes.php?page=functions.php&reset=true" ); die; } } add_theme_page( $themename . " Options", "" . $themename . " Options", 'edit_themes', basename( __FILE__ ), 'amazona_admin' ); } function amazona_admin( ) { global $themename, $shortname, $options; if( $_REQUEST['saved'] ) echo '

' . $themename . ' settings saved.

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

' . $themename . ' settings reset.

'; ?>
image
image
" />
image

image

image
/>