cat_name; $thecatname=str_replace("&","&",$thecatname); $catdlist[$catforlist->cat_ID] = $thecatname; } $categories_tmp = array_unshift($catdlist, "Select a category:"); $pathtothemetemplate = get_bloginfo('template_directory'); $menuicoantisnews=TEMPLATEPATH . '/images/antisnewsico.png'; $PageMetaSettings=__("Page Meta Settings","Antisnews"); $GoogleAnalyticsSettings=__("Google Analytics Settings","Antisnews"); $BlogNameTaglineSettings=__("Blog Name and Tagline Settings","Antisnews"); $AdsSettings=__("Ads Settings","Antisnews"); $MiscellaneousSidebarSettings=__("Miscellaneous Sidebar Settings","Antisnews"); $StickyPostsSettings=__("Sticky Post Settings","Antisnews"); $HorizontalNavigationMenuSettings=__("Horizontal Navigation Menu Settings","Antisnews"); $FeaturedSliderSettings=__("Featured Category 1 Slider Settings","Antisnews"); $FeaturedCategory2Options=__("Featured Category 2 Options","Antisnews"); $CustomLatestPostsRecentCommentsSettings=__("Custom Latest Posts and Recent Comments Settings","Antisnews"); $FeaturedCategory3Options=__("Featured Category 3 Options","Antisnews"); $FeaturedCategory4Options=__("Featured Category 4 Options","Antisnews"); $FeaturedCategory5Options=__("Featured Category 5 Options","Antisnews"); $FeaturedCategory6Options=__("Featured Category 6 Options","Antisnews"); $FeaturedCategory7Options=__("Featured Category 7 Options","Antisnews"); $StandardThumbnailSettings=__("Standard Thumbnail Settings","Antisnews"); $CommentFormSettings=__("Comment Form Settings","Antisnews"); $StandardConfigurationOptions=__("Standard Configuration Options","Antisnews"); if( file_exists(TEMPLATEPATH.'/antisnews_css_styling_tool.php') ) { include (TEMPLATEPATH . '/antisnews_css_styling_tool.php'); } if ( function_exists('register_sidebar') ) register_sidebars(1,array( 'name'=>'Magazine Sidebar Home One', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Two', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Three', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Four', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Five', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Six', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Magazine Sidebar Home Seven', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Sidebar Single Post', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Sidebar One', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Sidebar Two', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 1 Filler Space Top', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 1 Filler Space Bottom', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 2 Filler Space Top', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 2 Filler Space Bottom', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 3 Filler Space Top', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 4 Filler Space Bottom', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 5 Filler Space Top', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 6 Filler Space Bottom', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebars(1,array( 'name'=>'Featured 7 Filler Space Bottom', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); /*unregister_sidebar('Filler Space One'); unregister_sidebar('Featured 2 Filler Space Top'); unregister_sidebar('Featured 2 Filler Space Bottom'); unregister_sidebar('Featured 3 Filler Space Top'); unregister_sidebar('Featured 4 Filler Space Bottom'); unregister_sidebar('Featured 5 Filler Space Top'); unregister_sidebar('Featured 6 Filler Space Bottom'); unregister_sidebar('Featured 7 Filler Space Bottom'); unregister_sidebar('Magazine Sidebar Home One'); unregister_sidebar('Magazine Sidebar Home Two'); unregister_sidebar('Magazine Sidebar Home Three'); unregister_sidebar('Magazine Sidebar Home Four'); unregister_sidebar('Magazine Sidebar Home Five'); unregister_sidebar('Magazine Sidebar Home Six'); unregister_sidebar('Magazine Sidebar Home Seven');*/ remove_action('wp_head', 'wp_generator'); function bdw_get_images($postID,$imgwidth,$imgheight) { // Get the post ID $iPostID = $postID; // Get images for this post $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $iPostID ); // If images exist for this page if($arrImages) { // Get array keys representing attached image numbers $arrKeys = array_keys($arrImages); /******BEGIN BUBBLE SORT BY MENU ORDER************ // Put all image objects into new array with standard numeric keys (new array only needed while we sort the keys) foreach($arrImages as $oImage) { $arrNewImages[] = $oImage; } // Bubble sort image object array by menu_order TODO: Turn this into std "sort-by" function in functions.php for($i = 0; $i < sizeof($arrNewImages) - 1; $i++) { for($j = 0; $j < sizeof($arrNewImages) - 1; $j++) { if((int)$arrNewImages[$j]->menu_order > (int)$arrNewImages[$j + 1]->menu_order) { $oTemp = $arrNewImages[$j]; $arrNewImages[$j] = $arrNewImages[$j + 1]; $arrNewImages[$j + 1] = $oTemp; } } } // Reset arrKeys array $arrKeys = array(); // Replace arrKeys with newly sorted object ids foreach($arrNewImages as $oNewImage) { $arrKeys[] = $oNewImage->ID; } ******END BUBBLE SORT BY MENU ORDER**************/ // Get the first image attachment $iNum = $arrKeys[0]; // Get the thumbnail url for the attachment $sThumbUrl = wp_get_attachment_thumb_url($iNum); // UNCOMMENT THIS IF YOU WANT THE FULL SIZE IMAGE INSTEAD OF THE THUMBNAIL //$sImageUrl = wp_get_attachment_url($iNum); // Build the string $sImgString = '' . '' . get_the_title($iPostID) . '' . ''; // Print the image echo $sImgString; } } function get_image_for_crop($postID,$thumborno) { global $themeoptionsprefix; $AntisnewsOptions=get_antisnewsoptions(); $iNum=''; // Get the post ID $iPostID = $postID; $files = get_children("post_parent=$iPostID&post_type=attachment&post_mime_type=image"); if($files){ $keys = array_keys($files); $iNum=$keys[0]; } if( (isset($thumborno)) && ($thumborno == 1) ) { $sImageUrlSet = wp_get_attachment_thumb_url($iNum); } elseif( (isset($thumborno)) && ($thumborno == 2) ) { $sImageUrlSet =wp_get_attachment_medium_url($iNum); } else { $sImageUrlSet = wp_get_attachment_url($iNum); } if(!isset($sImageUrlSet) || empty($sImageUrlSet)) { $thepostimages = c12pulltheimgurl($iPostID); foreach($thepostimages as $thepostimage) { $sImageUrlSet=$thepostimages[0]; } } if(isset($sImageUrlSet) && !empty($sImageUrlSet)) { $sImageUrl = $sImageUrlSet; if($AntisnewsOptions[$themeoptionsprefix.'_precleanthumburl'] == "on"){$sImageUrl=prepsimageurl($sImageUrl);} } else { $sImageUrl=''; } return $sImageUrl; } function c12pulltheimgurl($thepostid) { $theimgstring=get_the_content($thepostid); $c12tcmts = '/ '', 'align' => 'alignnone', 'width' => '', 'caption' => '' ), $attr)); if ( 1 > (int) $width || empty($caption) ) return $content; if ( $id ) $id = 'id="' . $id . '" '; return '
' . do_shortcode( $content ) . '
' . $caption . '
'; } add_shortcode('wp_caption', 'fb_img_caption_shortcode'); add_shortcode('caption', 'fb_img_caption_shortcode'); function prepsimageurl($src) { $url_parts = parse_url($src); $theimgpath=$url_parts['path']; return $theimgpath; } function has_breaking_news_announcement() { $hasbreakingnews=''; // Code to check for breaking news return $hasbreakingnews; } function LimitText($Text,$Min,$Max,$MinAddChar) { if (strlen($Text) < $Min) { $Limit = $Min-strlen($Text); $Text .= $MinAddChar; } elseif (strlen($Text) >= $Max) { $words = explode(" ", $Text); $check=1; while (strlen($Text) >= $Max) { $c=count($words)-$check; $Text=substr($Text,0,(strlen($words[$c])+1)*(-1)); $check++; } } return $Text; } $metaoptions = array ( array("optionname" => "$PageMetaSettings", "optiontype" => "heading"), array("optionname" => "Default meta keywords", "optiondescription" => "

The theme tries to assist with minor SEO. You can enter default meta keywords for your site here

", "optionid" => $themeoptionsprefix."_metakeywords", "selectoptiondef" => "", "optiontype" => "text"), array("optionname" => "Default meta description", "optiondescription" => "

The theme tries to assist with minor SEO. You can enter default meta description for your site here

", "optionid" => $themeoptionsprefix."_metadescription", "selectoptiondef" => "", "optiontype" => "text"), array("optionname" => "Deactivate Theme Meta", "optiondescription" => "

If you are using an SEO plugin you might need to deactivate the theme meta tags for your plugin to work.

", "optionid" => $themeoptionsprefix."_deactivatethememeta", "selectoptiondef" => "Select an option:", "optiontype" => "select", "options" => $activatedeactivate), ); $googleanalyticsoptions = array ( array("optionname" => "$GoogleAnalyticsSettings", "optiontype" => "heading"), array("optionname" => "Site Tracking Code Example: Google Analytics", "optiondescription" => "

Using Goolge Analytics? You can enter your code above.

", "optionid" => $themeoptionsprefix."_sitetrackingcode", "selectoptiondef" => "", "optiontype" => "textarea"), ); $standardconfigops = array ( array("optionname" => "$StandardConfigurationOptions", "optiontype" => "heading"), array("optionname" => "Operation Mode", "optiondescription" => "", "optionid" => $themeoptionsprefix."_opmodepagehead", "optiontype" => "heading"), array("optionname" => "Run Antisnews in mode", "optiondescription" => "

Tutorial runs the home page in tutorial mode and Live runs it in active mode. So to learn how to use the theme set to Tutorial, and when you have setup your options and categories switch to Live. Magazine Off turns off the magazine style and runs in normal blog mode.

", "optionid" => $themeoptionsprefix."_operationmode", "selectoptiondef" => "Magazine Off", "optiontype" => "select", "options" => $operationmodeops), array("optionname" => "Archive Page", "optiondescription" => "", "optionid" => $themeoptionsprefix."_archivepagehead", "optiontype" => "heading"), array("optionname" => "Excerpt or full?", "optiondescription" => "

Show excerpts on archive/category pages or full post?

", "optionid" => $themeoptionsprefix."_archiveexcerptorfull", "selectoptiondef" => "excerpt", "optiontype" => "select", "options" => $excerptorfullops), ); $logotaglineoptions = array ( array("optionname" => "$BlogNameTaglineSettings", "optiontype" => "heading"), array("optionname" => "Site Logo", "optiondescription" => "

You can replace the text title with a logo by entering the logo URL here Note:include http://

", "optionid" => $themeoptionsprefix."_sitelogo", "selectoptiondef" => "", "optiontype" => "text"), array("optionname" => "Show/Hide Tagline", "optiondescription" => "

Select hide if you prefer to hide the site tagline

", "optionid" => $themeoptionsprefix."_style_showhide_tagline", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Tagline position", "optiondescription" => "

Move tagline to the left right or center

", "optionid" => $themeoptionsprefix."_style_position_tagline", "selectoptiondef" => "left", "optiontype" => "select", "options" => $leftrightcenterops), ); $adsettingsoptions = array ( array("optionname" => "Ads Settings", "optiontype" => "heading"), array("optionname" => "Show/Hide leaderboard Space", "optiondescription" => "

Select hide to hide or show to display the leaderboard content space under the date/search bar

", "optionid" => $themeoptionsprefix."_showhideleader", "selectoptiondef" => "hide", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Leaderboard Space Content", "optiondescription" => "

Content for the leaderboard space under the date/search bar

", "optionid" => $themeoptionsprefix."_leadercode", "selectoptiondef" => "", "optiontype" => "textarea"), array("optionname" => "Leaderboard content text position", "optiondescription" => "

Select left to align leaderboard content to left or center to align to center

", "optionid" => $themeoptionsprefix."_showhideleadercontentposition", "selectoptiondef" => "$sop:", "optiontype" => "select", "options" => $textalignlc), array("optionname" => "Ad code for single page posts", "optiondescription" => "

If using positions left or right best to use 200 by 200 ads. For other positions best to use 468 by 60 ads

", "optionid" => $themeoptionsprefix."_singlepageadsensecode", "selectoptiondef" => "", "optiontype" => "textarea"), array("optionname" => "Position for single page post ads", "optiondescription" => "

Left will float left, right will float right - 6 position options

", "optionid" => $themeoptionsprefix."_singlepageadsenseposition", "selectoptiondef" => "Select Option:", "optiontype" => "select", "options" => $singlepageadsensepositions), ); $miscellaneoussidebaroptions = array ( array("optionname" => "$MiscellaneousSidebarSettings", "optiontype" => "heading"), array("optionname" => "Sidebar One Position", "optiondescription" => "

Select 1 to move Sidebar One to left or 2 for right. Does not apply on homepage

", "optionid" => $themeoptionsprefix."_sidebarpos", "selectoptiondef" => "2", "optiontype" => "select", "options" => $sidebarpos), array("optionname" => "Share Widget", "optiondescription" => "

Select hide to conceal the share icons widget box in the post sidebar

", "optionid" => $themeoptionsprefix."_hideshareicons", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "More From Category", "optiondescription" => "

Select hide to conceal the 'more from this category' widget box in the post sidebar

", "optionid" => $themeoptionsprefix."_hidemorefromcategory", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "More From Category Title", "optiondescription" => "

Change header text from Sticky Posts.

", "optionid" => $themeoptionsprefix."_morefromthiscattitle", "selectoptiondef" => "More from category", "optiontype" => "text"), array("optionname" => "More from category number of posts", "optiondescription" => "

How many excerpts to show?

", "optionid" => $themeoptionsprefix."_morefromthiscathowmany", "selectoptiondef" => "5", "optiontype" => "text"), array("optionname" => "More from category show excerpt text", "optiondescription" => "

Only title is shown by default. If you want to include excerpt text select show.

", "optionid" => $themeoptionsprefix."_morefromthiscatshowexcerpt", "selectoptiondef" => "show", "optiontype" => "select", "options" => $hideshowarr), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_morefromthiscatexcerptlength", "selectoptiondef" => "120", "optiontype" => "text"), array("optionname" => "More from category excerpt thumbnail", "optiondescription" => "

If you prefer no thumbnail with the More from category excerpt select hide to conceal thumbnails.

", "optionid" => $themeoptionsprefix."_morefromthiscatshowthumb", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Thumbnail height", "optiondescription" => "

Increase or decrease thumbnail height.

", "optionid" => $themeoptionsprefix."_morefromthiscatthumbheight", "selectoptiondef" => "75", "optiontype" => "text"), array("optionname" => "Thumbnail width", "optiondescription" => "

Increase or decrease thumbnail width.

", "optionid" => $themeoptionsprefix."_morefromthiscatthumbwidth", "selectoptiondef" => "75", "optiontype" => "text"), ); $stickypostssettings = array ( array("optionname" => "$StickyPostsSettings", "optiontype" => "heading"), array("optionname" => "Sticky Posts Title", "optiondescription" => "

Change header text from Sticky Posts.

", "optionid" => $themeoptionsprefix."_stickytitle", "selectoptiondef" => "Sticky Posts", "optiontype" => "text"), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_stickyexcerptlength", "selectoptiondef" => "120", "optiontype" => "text"), ); $horizontalnavigationmenuoptions = array ( array("optionname" => "$HorizontalNavigationMenuSettings", "optiontype" => "heading"), array("optionname" => "Show/Hide Add Post Link", "optiondescription" => "

Selecting show will display an Add Post link in your homepage menu that you can click to have quick access for adding new posts. Only you will be able to see the link

", "optionid" => $themeoptionsprefix."_hideaddpostlink", "selectoptiondef" => "hide", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Menu pages or categories", "optiondescription" => "The horizontal navigation menu shows your pages by default. If you prefer categories switch to categories

", "optionid" => $themeoptionsprefix."_pagesorcategories", "selectoptiondef" => "pages", "optiontype" => "select", "options" => $pagesorcategoriesarr), array("optionname" => "Pages/Categories exclude IDs", "optiondescription" => "

If there are pages or categories you want to exclude from the horizontal menu (depending on which of the two you are using) enter the IDs of the pages or categories that should be excluded. Separate with comma.

", "optionid" => $themeoptionsprefix."_pagecatidstoexclude", "selectoptiondef" => "", "optiontype" => "text"), ); $featuredslideroptions = array ( array("optionname" => "$FeaturedSliderSettings", "optiontype" => "heading"), array("optionname" => "Featured Category 1 for slideshow", "optiondescription" => "

Select your main featured category for the slideshow.

", "optionid" => $themeoptionsprefix."_featuredcat", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Number of Featured Posts to show", "optiondescription" => "

You can set the number of featured posts to show in the featured slideshow.

", "optionid" => $themeoptionsprefix."_numpostsfeatured", "selectoptiondef" => "5", "optiontype" => "select", "options" => $numfeaturedpostsarr), array("optionname" => "Deactivate Slideshow", "optiondescription" => "

This will turn off the slider and default to a single static image from the slideshow featured category.

", "optionid" => $themeoptionsprefix."_deactivateslideshow", "selectoptiondef" => "activate", "optiontype" => "select", "options" => $activatedeactivate), ); $featured2options = array ( array("optionname" => "$FeaturedCategory2Options", "optiontype" => "heading"), array("optionname" => "Featured Category 2", "optiondescription" => "

Select your second featured category.

", "optionid" => $themeoptionsprefix."_featuredcat2", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat2excerptlength", "selectoptiondef" => "120", "optiontype" => "text"), ); $featured3options = array ( array("optionname" => "$FeaturedCategory3Options", "optiontype" => "heading"), array("optionname" => "Featured Category 3", "optiondescription" => "

Select your third featured category.

", "optionid" => $themeoptionsprefix."_featuredcat3", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat3excerptlength", "selectoptiondef" => "175", "optiontype" => "text"), ); $featured4options = array ( array("optionname" => "$FeaturedCategory4Options", "optiontype" => "heading"), array("optionname" => "Featured Category 4", "optiondescription" => "

Select your fourth featured category.

", "optionid" => $themeoptionsprefix."_featuredcat4", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat4excerptlength", "selectoptiondef" => "90", "optiontype" => "text"), ); $featured5options = array ( array("optionname" => "$FeaturedCategory5Options", "optiontype" => "heading"), array("optionname" => "Featured Category 5", "optiondescription" => "

Select your fifth featured category.

", "optionid" => $themeoptionsprefix."_featuredcat5", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat5excerptlength", "selectoptiondef" => "175", "optiontype" => "text"), ); $featured6options = array ( array("optionname" => "$FeaturedCategory6Options", "optiontype" => "heading"), array("optionname" => "Featured Category 6", "optiondescription" => "

Select your fifth featured category.

", "optionid" => $themeoptionsprefix."_featuredcat6", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat6excerptlength", "selectoptiondef" => "90", "optiontype" => "text"), ); $featured7options = array ( array("optionname" => "$FeaturedCategory7Options", "optiontype" => "heading"), array("optionname" => "Featured Category 7", "optiondescription" => "

Select your sixth featured category.

", "optionid" => $themeoptionsprefix."_featuredcat7", "selectoptiondef" => "Select Category:", "optiontype" => "select", "options" => $catdlist), array("optionname" => "Excerpt Length Left", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat7excerptlength1", "selectoptiondef" => "275", "optiontype" => "text"), array("optionname" => "Excerpt Length Right", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_featuredcat7excerptlength2", "selectoptiondef" => "123", "optiontype" => "text"), ); $customsidebarelementoptions = array ( array("optionname" => "$CustomLatestPostsRecentCommentsSettings", "optiontype" => "heading"), array("optionname" => "Hide Custom Latest Topics", "optiondescription" => "

The package comes with a custom latest topics in Sidebar Two. Select hide if you prefer to hide it.

", "optionid" => $themeoptionsprefix."_hidecustomlatesttopics", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Hide Custom Latest Comments", "optiondescription" => "

The package comes with a custom latest comments in Sidebar Two. Select hide if you prefer to hide it.

", "optionid" => $themeoptionsprefix."_hidecustomlatestcomments", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Position for sidebar 2 widgets", "optiondescription" => "

If not hiding the custom recent topics and custom recent comments you can decide if to show your dragged widgets on top of the packaged sidebar elements or below them. Choose 1 for top or 2 for bottom.

", "optionid" => $themeoptionsprefix."_sidebar2widgetspos", "selectoptiondef" => "2", "optiontype" => "select", "options" => $sidebar2widgetspos), array("optionname" => "Number of items for Custom Latest Topics", "optiondescription" => "

If using the customized Latest Topics in sidebar select how many to display

", "optionid" => $themeoptionsprefix."_numlatesttopics", "selectoptiondef" => "5", "optiontype" => "select", "options" => $numfeaturedarr), array("optionname" => "Number of items for Custom Recent Comments ", "optiondescription" => "

If using the customized Recent Comments in sidebar select how many to display

", "optionid" => $themeoptionsprefix."_numrecentcomments", "selectoptiondef" => "5", "optiontype" => "select", "options" => $numfeaturedarr), array("optionname" => "Latest Topics Title", "optiondescription" => "

Change header text from Latest Topics.

", "optionid" => $themeoptionsprefix."_latesttopicstitle", "selectoptiondef" => "Latest Topics", "optiontype" => "text"), array("optionname" => "Latest Topics hide excerpt text", "optiondescription" => "

If you prefer to only have the title in the latest topics excerpts you can select hide to conceal the excerpt text.

", "optionid" => $themeoptionsprefix."_latesttopicsshowexcerpt", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Recent Comments Title", "optiondescription" => "

Change header text from Recent Comments.

", "optionid" => $themeoptionsprefix."_recentcommentstitle", "selectoptiondef" => "Recent Comments", "optiontype" => "text"), array("optionname" => "Recent Comments title phrase", "optiondescription" => "

Where it says author 'had this to say' in custom comment list you can change 'had this to say' to whatever you prefer. Enter 'none' (without the quotes) for no text.

", "optionid" => $themeoptionsprefix."_recentcommentstitlephrase", "selectoptiondef" => "had this to say", "optiontype" => "text"), array("optionname" => "Recent Comments read the post text", "optiondescription" => "

Where it says author 'Read the post' under custom comments list you can change 'Read the post' to whatever you prefer.

", "optionid" => $themeoptionsprefix."_recentcommentsreadposttext", "selectoptiondef" => "Read the post", "optiontype" => "text"), array("optionname" => "Comments order", "optiondescription" => "

Select ASC for lowest to highest or DESC for highest to lowest

", "optionid" => $themeoptionsprefix."_recentcommentsdisplayorder", "selectoptiondef" => "ASC", "optiontype" => "select", "options" => $displayorder), array("optionname" => "Recent comments hide excerpt text", "optiondescription" => "

If you prefer to only have the title in the latest topics excerpts you can select hide to conceal the excerpt text.

", "optionid" => $themeoptionsprefix."_recentcommentsshowexcerpt", "selectoptiondef" => "show", "optiontype" => "select", "options" => $showhidearr), array("optionname" => "Latest Topics excerpt length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_latesttopicsexcerptlength", "selectoptiondef" => "120", "optiontype" => "text"), array("optionname" => "Recent comments excerpt length", "optiondescription" => "

Increase or decrease character length to control appearance.

", "optionid" => $themeoptionsprefix."_recentcommentsexcerptlength", "selectoptiondef" => "120", "optiontype" => "text"), ); $generalthumbnailoptions = array ( array("optionname" => "$StandardThumbnailSettings", "optiontype" => "heading"), array("optionname" => "State of default no image thumbnail", "optiondescription" => "

If you prefer not to use a no image thumbnail for posts that have no image change state to off

", "optionid" => $themeoptionsprefix."_noimagethumbnailstate", "selectoptiondef" => "on", "optiontype" => "select", "options" => $onoffops), array("optionname" => "Pre-clean thumb URL", "optiondescription" => "

Some installations have problems with the TimThumb cropping script. If your thumbnails don't show select on to pre clean the thumbnail url before it gets passed to the TimThumb to be cropped. This sometimes resolves the problem.

", "optionid" => $themeoptionsprefix."_precleanthumburl", "selectoptiondef" => "", "optiontype" => "select", "options" => $offonops), array("optionname" => "Remote Image Allowed Site Override", "optiondescription" => "

You bear the responsibiity for the security risks involved in attempting to resize images from any remote website not included in the allowed sites list. Currently remote image resizing is restricted to [flickr.com,picasa.com,blogger.com,wordpress.com,img.youtube.com,ecx.images-amazon.com]. If you set this option to on the script will attempt to grab and resize images from the locations where they are being hosted even if it is not a location in the allowed sites list. However this presents a security risk and is not recommended. By setting this option to on you acknowledge that you have been advised that the better and safer practice is to host the images on your own site or only use images from one of sites in the allowed sites list so as to use the script as intended and not to activate web-wide remote image cropping and that if you choose to activate web-wide remote image cropping you bear full responsibility for your choice to do so.

", "optionid" => $themeoptionsprefix."_overrideremotehostrestriction", "selectoptiondef" => "", "optiontype" => "select", "options" => $offonops), array("optionname" => "Archive/Search excerpt length", "optiondescription" => "

Excerpt length for search results and archive pages

", "optionid" => $themeoptionsprefix."_archivesearchexcerptlength", "selectoptiondef" => "275", "optiontype" => "text"), array("optionname" => "Image Zoom Crop", "optiondescription" => "

Select 1 to zoom in on image and crop part or 0 to crop full image

", "optionid" => $themeoptionsprefix."_featuredcatimageszoomcrop", "selectoptiondef" => "1", "optiontype" => "select", "options" => $zoomcropops), array("optionname" => "Image Quality", "optiondescription" => "

Modify value as needed to adjust image quality

", "optionid" => $themeoptionsprefix."_featuredcatimagesquality", "selectoptiondef" => "95", "optiontype" => "text"), ); $commentformoptions = array ( array("optionname" => "$CommentFormSettings", "optiontype" => "heading"), array("optionname" => "Comment form on Post Pages", "optiondescription" => "

Do you want posts of the type Page to have a comment form?

", "optionid" => $themeoptionsprefix."_commentsonpage", "selectoptiondef" => "Select yes or no:", "optiontype" => "select", "options" => $commentsonpage), ); function get_antisnewsoptions() { $mypsoptions=array(); global $themeoptionsprefix; $pstandoptions=get_option($themeoptionsprefix.'_theme_options'); $ppremoptions=get_option($themeoptionsprefix.'_css_style_options'); if(isset($pstandoptions) && !empty($pstandoptions)) { foreach ($pstandoptions as $pstandoption) { if(isset($pstandoption['optionid']) && !empty($pstandoption['optionid'])) { $mypsoptions[$pstandoption['optionid']]=$pstandoption['selectoptiondef']; } } } if(isset($ppremoptions) && !empty($ppremoptions)) { foreach ($ppremoptions as $ppremoption) { if(isset($ppremoption['optionid']) && !empty($ppremoption['optionid'])) { $mypsoptions[$ppremoption['optionid']] = $ppremoption['selectoptiondef']; } } } return $mypsoptions; } function get_ppremoption($psoptionid) { $psopval=''; global $themeoptionsprefix; $cssoptions=$AntisnewsOptions[$themeoptionsprefix.'_css_style_options']; foreach ($cssoptions as $cssoption) { if($cssoption['optionid'] == $psoptionid) { $mypsoptions[]=array("optionname" => $cssoption['optionname'], "optiondescription" => $cssoption['optiondescription'], "optionid" => $cssoption['optionid'], "selectoptiondef" => $cssoption['selectoptiondef'], "optiontype" => $cssoption['optiontype'], "options" => $cssoption['options']); } } if(isset($mypsoptions) && !empty($mypsoptions)) { foreach($mypsoptions as $mypsoptions) { $psopval=$mypsoptions['selectoptiondef']; } } return $psopval; } function get_myoptionsarray($whichpremiumoptions) { global $themeoptionsprefix; $AntisnewsOptions=get_antisnewsoptions(); $mywhichoptions=array(); foreach ($whichpremiumoptions as $optionvalue) { if(isset($optionvalue['optionid']) && !empty($optionvalue['optionid'])) { if(!isset($optionvalue['options']) || empty($optionvalue['options'])) { $optionvalue['options']=''; } $whichpremiumoptionval = $AntisnewsOptions[$optionvalue['optionid']]; $mywhichoptions[]=array("optionname" => $optionvalue['optionname'], "optiondescription" => $optionvalue['optiondescription'], "optionid" => $optionvalue['optionid'], "selectoptiondef" => $whichpremiumoptionval, "optiontype" => $optionvalue['optiontype'], "options" => $optionvalue['options']); } } return $mywhichoptions; } function get_def_opt_val($c12_premiumoptions,$optionvalue) { $psopval=''; foreach ($c12_premiumoptions as $c12_premiumoption) { if(isset($c12_premiumoption['optionid']) && !empty($c12_premiumoption['optionid'])) { if($c12_premiumoption['optionid'] == $optionvalue) { $psopval=$c12_premiumoption['selectoptiondef']; } } } return $psopval; } check_for_options(); function check_for_options() { $AntisnewsOptions=get_antisnewsoptions(); global $themeoptionsprefix,$metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops; $mydefoptions=array_merge($metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops); $mythemeoptions=$themeoptionsprefix.'_theme_options'; $mysavedthemeoptions=get_option($mythemeoptions); $options = $mysavedthemeoptions; if (!isset($options) || empty($options) || !is_array($options)) { $options = $mydefoptions; foreach ($options as $optionvalue) { if(!isset($optionvalue['optionid']) || empty($optionvalue['optionid'])) { $optionvalue['optionid']=''; } if(!isset($optionvalue['options']) || empty($optionvalue['options'])) { $optionvalue['options']=''; } if(!isset($optionvalue['optiondescription']) || empty($optionvalue['optiondescription'])) { $optionvalue['optiondescription']=''; } if(!isset($optionvalue['selectoptiondef']) || empty($optionvalue['selectoptiondef'])) { $optionvalue['selectoptiondef']=''; } if(isset($optionvalue['optionid']) && !empty($optionvalue['optionid'])) { $savedoptionvalue=get_option($optionvalue['optionid']); } if(!isset($savedoptionvalue) || empty ($savedoptionvalue)) { $savedoptionvalue=$optionvalue['selectoptiondef']; } $setmyoptions[]=array("optionname" => $optionvalue['optionname'], "optiondescription" => $optionvalue['optiondescription'], "optionid" => $optionvalue['optionid'], "selectoptiondef" => $savedoptionvalue, "optiontype" => $optionvalue['optiontype'], "options" => $optionvalue['options']); if(isset($optionvalue['optionid']) && !empty($optionvalue['optionid'])) { delete_option($optionvalue['optionid']); } } update_option($mythemeoptions,$setmyoptions); } } function antisnews_reconcile_standard_options() { global $themeoptionsprefix,$metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops; $mydefoptions=array_merge($metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops); $AntisnewsOptions=get_antisnewsoptions(); $mythemeoptions=$themeoptionsprefix.'_theme_options'; $setmyoptions=array(); foreach ($mydefoptions as $optionvalue) { if(!isset($optionvalue['optionid']) || empty($optionvalue['optionid'])) { $optionvalue['optionid']=''; } if(!isset($optionvalue['options']) || empty($optionvalue['options'])) { $optionvalue['options']=''; } if(!isset($optionvalue['optiondescription']) || empty($optionvalue['optiondescription'])) { $optionvalue['optiondescription']=''; } if(!isset($optionvalue['selectoptiondef']) || empty($optionvalue['selectoptiondef'])) { $optionvalue['selectoptiondef']=''; } if(!isset($optionvalue['options']) || empty($optionvalue['options'])) { $optionvalue['options']=''; } if(isset($AntisnewsOptions[$optionvalue['optionid']]) && !empty($AntisnewsOptions[$optionvalue['optionid']])) { $savedoptionvalue=$AntisnewsOptions[$optionvalue['optionid']]; } elseif(isset($optionvalue['selectoptiondef']) && !empty($optionvalue['selectoptiondef'])) { $savedoptionvalue=$optionvalue['selectoptiondef']; } else { $savedoptionvalue=''; } $setmyoptions[]=array("optionname" => $optionvalue['optionname'], "optiondescription" => $optionvalue['optiondescription'], "optionid" => $optionvalue['optionid'], "selectoptiondef" => $savedoptionvalue, "optiontype" => $optionvalue['optiontype'], "options" => $optionvalue['options']); } update_option($mythemeoptions,$setmyoptions); } function do_options_update_theme() { global $this_theme,$themeoptionsprefix,$optionsupdated,$optionsreset; global $metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops; $myantisoptions=array_merge($metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops); $myantisoptionname=$themeoptionsprefix.'_theme_options'; $myantisoptionsaved=get_myoptionsarray($myantisoptions); if (!isset($myantisoptionsaved) || empty($myantisoptionsaved) || !is_array($myantisoptionsaved)) { $optionsforupdate = $myantisoptions; } else { $optionsforupdate = $myantisoptionsaved; } if ( isset($_REQUEST['page']) && ($_REQUEST['page'] == basename(__FILE__) ) ) { if( isset($_REQUEST['action']) && ( 'updateoptions' == $_REQUEST['action'] )) { foreach ($optionsforupdate as $optionvalue) { if(isset($optionvalue['optionid']) && !empty($optionvalue['optionid'])) { if( isset( $_REQUEST[ $optionvalue['optionid'] ] ) ) { $myantisoptionvalue = $_REQUEST[ $optionvalue['optionid'] ]; } else { $myantisoptionvalue=$optionvalue['selectoptiondef']; } } $mypoptions[]=array("optionname" => $optionvalue['optionname'], "optiondescription" => $optionvalue['optiondescription'], "optionid" => $optionvalue['optionid'], "selectoptiondef" => $myantisoptionvalue, "optiontype" => $optionvalue['optiontype'], "options" => $optionvalue['options']); } update_option($myantisoptionname,$mypoptions); $optionsupdated=true; } else if( isset($_REQUEST['action']) && ( 'reset' == $_REQUEST['action'] )) { if(isset($_REQUEST['w']) && !empty($_REQUEST['w'])) { $whichoptions=$_REQUEST['w']; } if($whichoptions == 1) { $options=$metaoptions; } elseif($whichoptions == 2) { $options=$googleanalyticsoptions; } elseif($whichoptions == 3) { $options=$logotaglineoptions; } elseif($whichoptions == 4) { $options=$adsettingsoptions; } elseif($whichoptions == 5) { $options=$miscellaneoussidebaroptions; } elseif($whichoptions == 6) { $options=$stickypostssettings; } elseif($whichoptions == 7) { $options=$horizontalnavigationmenuoptions; } elseif($whichoptions == 8) { $options=$featuredslideroptions; } elseif($whichoptions == 9) { $options=$featured2options; } elseif($whichoptions == 10) { $options=$featured3options; } elseif($whichoptions == 11) { $options=$featured4options; } elseif($whichoptions == 12) { $options=$featured5options; } elseif($whichoptions == 13) { $options=$featured6options; } elseif($whichoptions == 14) { $options=$generalthumbnailoptions; } elseif($whichoptions == 15) { $options=$commentformoptions; } elseif($whichoptions == 16) { $options=$customsidebarelementoptions; } elseif($whichoptions == 17) { $options=$standardconfigops; } elseif($whichoptions == 18) { $options=$featured7options; } elseif($whichoptions == 'all') { $options=array_merge($metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops); } foreach ($options as $option) { if(isset($option['optionid']) && !empty($option['optionid'])) { $optionidsfordel[]=$option['optionid']; } } foreach ($optionsforupdate as $optionvalue) { if(in_array($optionvalue['optionid'],$optionidsfordel)) { $myoptiondelvalue = get_def_opt_val($options,$optionvalue['optionid']); if(!isset($myoptiondelvalue) || empty($myoptiondelvalue)) { $myoptiondelvalue=""; } $myoptionvalue = "$myoptiondelvalue"; } else { $myoptionvalue=$optionvalue['selectoptiondef']; } $mypoptions[]=array("optionname" => $optionvalue['optionname'], "optiondescription" => $optionvalue['optiondescription'], "optionid" => $optionvalue['optionid'], "selectoptiondef" => $myoptionvalue, "optiontype" => $optionvalue['optiontype'], "options" => $optionvalue['options']); } update_option($myantisoptionname,$mypoptions); $optionsupdated=true; } } add_theme_page($this_theme." Options", $this_theme." Options", 'edit_themes', basename(__FILE__), 'display_page_options_antisnews', ''); } function display_page_options_antisnews() { global $themeoptionsprefix; global $optionsreset,$optionsupdated,$this_theme; global $metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops; global $PageMetaSettings,$GoogleAnalyticsSettings,$BlogNameTaglineSettings,$AdsSettings,$MiscellaneousSidebarSettings,$StickyPostsSettings,$HorizontalNavigationMenuSettings,$FeaturedSliderSettings,$FeaturedCategory2Options,$FeaturedCategory3Options,$FeaturedCategory4Options,$FeaturedCategory5Options,$FeaturedCategory6Options,$FeaturedCategory7Options,$StandardThumbnailSettings,$CommentFormSettings,$CustomLatestPostsRecentCommentsSettings,$StandardConfigurationOptions; $mymergedoptions=array_merge($metaoptions,$googleanalyticsoptions,$logotaglineoptions,$adsettingsoptions,$miscellaneoussidebaroptions,$stickypostssettings,$horizontalnavigationmenuoptions,$featuredslideroptions,$featured2options,$featured3options,$featured4options,$featured5options,$featured6options,$featured7options,$generalthumbnailoptions,$commentformoptions,$customsidebarelementoptions,$standardconfigops); if(isset($_REQUEST['action']) && !empty($_REQUEST['action']) && ($_REQUEST['action'] == 'loadstandardoptionsform')) { if(isset($_REQUEST['antistandops']) && !empty($_REQUEST['antistandops'])) { $whichoptions=$_REQUEST['antistandops']; if($whichoptions == 1) { $options=$metaoptions; } elseif($whichoptions == 2) { $options=$googleanalyticsoptions; } elseif($whichoptions == 3) { $options=$logotaglineoptions; } elseif($whichoptions == 4) { $options=$adsettingsoptions; } elseif($whichoptions == 5) { $options=$miscellaneoussidebaroptions; } elseif($whichoptions == 6) { $options=$stickypostssettings; } elseif($whichoptions == 7) { $options=$horizontalnavigationmenuoptions; } elseif($whichoptions == 8) { $options=$featuredslideroptions; } elseif($whichoptions == 9) { $options=$featured2options; } elseif($whichoptions == 10) { $options=$featured3options; } elseif($whichoptions == 11) { $options=$featured4options; } elseif($whichoptions == 12) { $options=$featured5options; } elseif($whichoptions == 13) { $options=$featured6options; } elseif($whichoptions == 14) { $options=$generalthumbnailoptions; } elseif($whichoptions == 15) { $options=$commentformoptions; } elseif($whichoptions == 16) { $options=$customsidebarelementoptions; } elseif($whichoptions == 17) { $options=$standardconfigops; } elseif($whichoptions == 18) { $options=$featured7options; } else { $options=$logotaglineoptions; } } else { $options=$mymergedoptions; } do_page_antisnews($options,$whichoptions); } else { antisnews_reconcile_standard_options(); ?>

Option Title Manage Options
Option Title Manage Options

Options

"heading" ) { ?>
" />

"heading" ) { ?>

You have a breaking news headline running. If you need to unset it use the link below to clear the breaking news headline.

"; ?> Clear the breaking news headline

Setup Breaking News

The breaking news headline has been set
The breaking news headline has been cleared

" />

  • id="li-comment-">
    ' ); ?>
    %s says:'), get_comment_author_link()) ?> comment_approved == '0') : ?>
    $depth, 'max_depth' => $args['max_depth']))) ?>