function __construct($mod)
 {
     $this->name = __('Performance', 'all-in-one-seo-pack');
     // Human-readable name of the plugin.
     $this->prefix = 'aiosp_performance_';
     // Option prefix.
     $this->file = __FILE__;
     // The current file.
     parent::__construct();
     $this->help_text = array('memory_limit' => __('This setting allows you to raise your PHP memory limit to a reasonable value. Note: WordPress core and other WordPress plugins may also change the value of the memory limit.', 'all-in-one-seo-pack'), 'execution_time' => __('This setting allows you to raise your PHP execution time to a reasonable value.', 'all-in-one-seo-pack'), 'force_rewrites' => __('Use output buffering to ensure that the title gets rewritten. Enable this option if you run into issues with the title tag being set by your theme or another plugin.', 'all-in-one-seo-pack'));
     $this->default_options = array('memory_limit' => array('name' => __('Raise memory limit', 'all-in-one-seo-pack'), 'default' => '256M', 'type' => 'select', 'initial_options' => array(0 => __('Use the system default', 'all-in-one-seo-pack'), '32M' => '32MB', '64M' => '64MB', '128M' => '128MB', '256M' => '256MB')), 'execution_time' => array('name' => __('Raise execution time', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'select', 'initial_options' => array('' => __('Use the system default', 'all-in-one-seo-pack'), 30 => '30s', 60 => '1m', 120 => '2m', 300 => '5m', 0 => __('No limit', 'all-in-one-seo-pack'))));
     $this->help_anchors = array('memory_limit' => '#raise-memory-limit', 'execution_time' => '#raise-execution-time', 'force_rewrites' => '#force-rewrites');
     global $aiosp, $aioseop_options;
     if (aioseop_option_isset('aiosp_rewrite_titles') && $aioseop_options['aiosp_rewrite_titles']) {
         $this->default_options['force_rewrites'] = array('name' => __('Force Rewrites:', 'all-in-one-seo-pack'), 'default' => 1, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack')));
     }
     $this->layout = array('default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/performance-settings/', 'options' => array_keys($this->default_options)));
     $system_status = array('status' => array('default' => '', 'type' => 'html', 'label' => 'none', 'save' => false));
     $this->layout['system_status'] = array('name' => __('System Status', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/performance-settings/', 'options' => array_keys($system_status));
     $this->default_options = array_merge($this->default_options, $system_status);
     $this->add_help_text_links();
     add_filter($this->prefix . 'display_options', array($this, 'display_options_filter'), 10, 2);
     add_filter($this->prefix . 'update_options', array($this, 'update_options_filter'), 10, 2);
     add_action($this->prefix . 'settings_update', array($this, 'settings_update_action'), 10, 2);
 }
Exemplo n.º 2
0
 function All_in_One_SEO_Pack_Performance($mod)
 {
     $this->name = __('Performance', 'all_in_one_seo_pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_performance_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     parent::__construct();
     $help_text = array("memory_limit" => __("This setting allows you to raise your PHP memory limit to a reasonable value. Note: WordPress core and other WordPress plugins may also change the value of the memory limit.<br /><a href='http://semperplugins.com/documentation/performance-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "execution_time" => __("This setting allows you to raise your PHP execution time to a reasonable value.<br /><a href='http://semperplugins.com/documentation/performance-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "force_rewrites" => __("Use output buffering to ensure that the title gets rewritten. Enable this option if you run into issues with the title tag being set by your theme or another plugin.<br /><a href='http://semperplugins.com/documentation/performance-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'));
     $this->default_options = array('memory_limit' => array('name' => __('Raise memory limit', 'all_in_one_seo_pack'), 'default' => '256M', 'type' => 'select', 'initial_options' => array(0 => __("Use the system default", 'all_in_one_seo_pack'), '32M' => '32MB', '64M' => '64MB', '128M' => '128MB', '256M' => '256MB')), 'execution_time' => array('name' => __('Raise execution time', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'select', 'initial_options' => array('' => __("Use the system default", 'all_in_one_seo_pack'), 30 => '30s', 60 => '1m', 120 => '2m', 300 => '5m', 0 => __('No limit', 'all_in_one_seo_pack'))));
     global $aiosp, $aioseop_options;
     if (aioseop_option_isset('aiosp_rewrite_titles') && $aioseop_options['aiosp_rewrite_titles']) {
         $this->default_options['force_rewrites'] = array('name' => __('Force Rewrites:', 'all_in_one_seo_pack'), 'default' => 1, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack')));
     }
     $this->layout = array('default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/performance-settings/', 'options' => array_keys($this->default_options)));
     $system_status = array('status' => array('default' => '', 'type' => 'html', 'label' => 'none', 'save' => false));
     $this->layout['system_status'] = array('name' => __('System Status', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/performance-settings/', 'options' => array_keys($system_status));
     $this->default_options = array_merge($this->default_options, $system_status);
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     add_filter($this->prefix . 'display_options', array($this, 'display_options_filter'), 10, 2);
     add_filter($this->prefix . 'update_options', array($this, 'update_options_filter'), 10, 2);
     add_action($this->prefix . 'settings_update', array($this, 'settings_update_action'), 10, 2);
 }
 function All_in_One_SEO_Pack_File_Editor()
 {
     $this->name = __('File Editor', 'all-in-one-seo-pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_file_editor_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     parent::__construct();
     if (isset($_REQUEST['tab'])) {
         $this->current_tab = $_REQUEST['tab'];
     } else {
         $this->current_tab = 'robots';
     }
     $help_text = array('robotfile' => __('Robots.txt editor', 'all-in-one-seo-pack'), 'htaccfile' => __('.htaccess editor', 'all-in-one-seo-pack'));
     $this->default_options = array('robotfile' => array('name' => __('Edit Robots.txt', 'all-in-one-seo-pack'), 'save' => false, 'default' => '', 'type' => 'textarea', 'cols' => 70, 'rows' => 25, 'label' => 'top'), 'htaccfile' => array('name' => __('Edit .htaccess', 'all-in-one-seo-pack'), 'save' => false, 'default' => '', 'type' => 'textarea', 'cols' => 70, 'rows' => 25, 'label' => 'top'));
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     $this->tabs = array('robots' => array('name' => __('robots.txt')), 'htaccess' => array('name' => __('.htaccess')));
     $this->layout = array('robots' => array('name' => __('Edit robots.txt', 'all-in-one-seo-pack'), 'options' => array('robotfile'), 'tab' => 'robots'), 'htaccess' => array('name' => __('Edit .htaccess', 'all-in-one-seo-pack'), 'options' => array('htaccfile'), 'tab' => 'htaccess'));
     $this->update_options();
     // load initial options / set defaults
 }
Exemplo n.º 4
0
 function __construct()
 {
     $this->name = __('Robots.txt', 'all-in-one-seo-pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_robots_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     parent::__construct();
     $help_text = array('additional' => __('Rule Type', 'all-in-one-seo-pack'), 'useragent' => __('User Agent', 'all-in-one-seo-pack'), 'path' => __('Directory Path', 'all-in-one-seo-pack'), 'robotgen' => __('Robots.txt editor', 'all-in-one-seo-pack'));
     $this->default_options = array('usage' => array('type' => 'html', 'label' => 'none', 'default' => __('Use the rule builder below to add rules to create a new Robots.txt file.  If you already have a Robots.txt file you should use the File Editor feature in All in One SEO Pack to edit it or you can delete your current Robots.txt file and start a new one with the rule builder below.', 'all-in-one-seo-pack'), 'save' => false), 'additional' => array('name' => __('Rule Type', 'all-in-one-seo-pack'), 'save' => false, 'type' => 'select', 'initial_options' => array('allow' => 'Allow', 'block' => 'Block')), 'useragent' => array('name' => __('User Agent', 'all-in-one-seo-pack'), 'save' => false, 'type' => 'text'), 'path' => array('name' => __('Directory Path', 'all-in-one-seo-pack'), 'save' => false, 'type' => 'text'), 'robotgen' => array('name' => __('Generate Robots.txt', 'all-in-one-seo-pack'), 'save' => false, 'default' => '', 'type' => 'textarea', 'cols' => 57, 'rows' => 20, 'label' => 'none', 'readonly' => 'readonly'), 'Submit_Preview' => array('type' => 'submit', 'class' => 'button-primary MRL', 'name' => __('Add Rule', 'all-in-one-seo-pack') . ' &raquo;', 'nowrap' => 1), 'Submit_Update' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Save Robots.txt File', 'all-in-one-seo-pack') . ' &raquo;', 'nowrap' => 1), 'Submit_Delete' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Delete Robots.txt File', 'all-in-one-seo-pack') . ' &raquo;', 'nowrap' => 1), 'optusage' => array('type' => 'html', 'label' => 'none', 'default' => __('Click the Optimize button below and All in One SEO Pack will analyze your Robots.txt file to make sure it complies with the standards for Robots.txt files.  The results will be displayed in a table below.', 'all-in-one-seo-pack'), 'save' => false), 'Submit_Opt_Update' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Update Robots.txt File', 'all-in-one-seo-pack') . ' &raquo;', 'nowrap' => 1, 'style' => 'margin-left: 20px;'), 'Submit_Opt_Preview' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Disregard Changes', 'all-in-one-seo-pack') . ' &raquo;', 'nowrap' => 1), 'Submit_Optimize' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Optimize', 'all-in-one-seo-pack') . ' &raquo;'));
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     $this->locations = array('generator' => array('name' => "Robots.txt", 'type' => 'settings', 'options' => array('usage', 'additional', 'useragent', 'path', 'Submit_Preview', 'Submit_Update', 'Submit_Delete', 'robotgen', 'optusage', 'Submit_Opt_Update', 'Submit_Opt_Preview', 'Submit_Optimize')));
     $this->layout = array('default' => array('name' => __('Create a Robots.txt File', 'all-in-one-seo-pack'), 'options' => array('usage', 'additional', 'useragent', 'path', 'Submit_Preview', 'Submit_Update', 'Submit_Delete', 'robotgen')));
     $this->layout['optimize'] = array('name' => __('Optimize your Robots.txt File', 'all-in-one-seo-pack'), 'options' => array('optusage', 'Submit_Optimize'));
     if (isset($_POST['Submit_Optimize'])) {
         $this->layout['optimize']['options'] = array('optusage', 'Submit_Opt_Update', 'Submit_Opt_Preview', 'robothtml');
         $this->default_options['optusage']['default'] = __("Your Robots.txt file has been optimized.  Here are the results and recommendations.  Click the Update Robots.txt File button below to write these changes to your Robots.txt file.  Click the Disregard Changes button to ignore these recommendations and keep your current Robots.txt file.", 'all-in-one-seo-pack');
     }
     // load initial options / set defaults
     $this->update_options();
     add_action($this->prefix . 'settings_update', array($this, 'do_robots'), 10, 2);
     add_filter($this->prefix . 'display_options', array($this, 'filter_options'), 10, 2);
     add_filter($this->prefix . 'submit_options', array($this, 'filter_submit'), 10, 2);
     add_filter($this->prefix . 'display_settings', array($this, 'filter_settings'), 10, 2);
 }
Exemplo n.º 5
0
 function All_in_One_SEO_Pack_Sitemap()
 {
     if (get_class($this) === 'All_in_One_SEO_Pack_Sitemap') {
         // Set this up only when instantiated as this class
         $this->name = __('XML Sitemap', 'all_in_one_seo_pack');
         // Human-readable name of the plugin
         $this->prefix = 'aiosp_sitemap_';
         // option prefix
         $this->file = __FILE__;
         // the current file
     }
     parent::__construct();
     $this->comment_string = __("Sitemap %s generated by All in One SEO Pack %s by Michael Torbert of Semper Fi Web Design on %s", 'all_in_one_seo_pack');
     $help_text = array("filename" => __("Specifies the name of your sitemap file. This will default to 'sitemap'.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "google" => __("Notify Google when you update your sitemap settings.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "bing" => __("Notify Bing when you update your sitemap settings.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "indexes" => __("Organize sitemap entries into distinct files in your sitemap. Enable this only if your sitemap contains over 50,000 URLs or the file is over 5MB in size.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "paginate" => __("Split long sitemaps into separate files.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "max_posts" => __("Allows you to specify the maximum number of posts in a sitemap (up to 50,000).<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "posttypes" => __("Select which Post Types appear in your sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "taxonomies" => __("Select which taxonomy archives appear in your sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "archive" => __("Include Date Archives in your sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "author" => __("Include Author Archives in your sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "gzipped" => __("Create a compressed sitemap file in .xml.gz format.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "robots" => __("Places a link to your Sitemap.xml into your virtual Robots.txt file.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "rewrite" => __("Places a link to the sitemap file in your virtual Robots.txt file which WordPress creates.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "debug" => __("Use rewrites to generate your sitemap on the fly. NOTE: This is required for WordPress Multisite.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "addl_url" => __('URL to the page.', 'all_in_one_seo_pack'), "addl_prio" => __('The priority of the page.', 'all_in_one_seo_pack'), "addl_freq" => __('The frequency of the page.', 'all_in_one_seo_pack'), "addl_mod" => __('Last modified date of the page.', 'all_in_one_seo_pack'), "excl_categories" => __("Entries from these categories will be excluded from the sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "excl_pages" => __("Use page slugs or page IDs, seperated by commas, to exclude pages from the sitemap.<br /><a href='http://semperplugins.com/documentation/xml-sitemaps-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'));
     $this->default_options = array('filename' => array('name' => __('Filename Prefix', 'all_in_one_seo_pack'), 'default' => 'sitemap', 'type' => 'text', 'sanitize' => 'filename'), 'google' => array('name' => __('Notify Google', 'all_in_one_seo_pack')), 'bing' => array('name' => __('Notify Bing', 'all_in_one_seo_pack')), 'indexes' => array('name' => __('Enable Sitemap Indexes', 'all_in_one_seo_pack')), 'paginate' => array('name' => __('Paginate Sitemap Indexes', 'all_in_one_seo_pack'), 'condshow' => array("{$this->prefix}indexes" => 'on')), 'max_posts' => array('name' => __('Maximum Posts Per Sitemap', 'all_in_one_seo_pack'), 'type' => 'text', 'default' => 50000, 'condshow' => array("{$this->prefix}indexes" => 'on', "{$this->prefix}paginate" => 'on')), 'posttypes' => array('name' => __('Post Types', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => 'all'), 'taxonomies' => array('name' => __('Taxonomies', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => 'all'), 'archive' => array('name' => __('Include Date Archive Pages', 'all_in_one_seo_pack')), 'author' => array('name' => __('Include Author Pages', 'all_in_one_seo_pack')), 'gzipped' => array('name' => __('Create Compressed Sitemap', 'all_in_one_seo_pack'), 'default' => 'On'), 'robots' => array('name' => __('Link From Virtual Robots.txt', 'all_in_one_seo_pack'), 'default' => 'On'), 'rewrite' => array('name' => __('Dynamically Generate Sitemap', 'all_in_one_seo_pack'), 'default' => 'On'));
     $status_options = array('link' => array('default' => '', 'type' => 'html', 'label' => 'none', 'save' => false), 'debug' => array('name' => __('Debug Log', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'html', 'disabled' => 'disabled', 'save' => false, 'label' => 'none', 'rows' => 5, 'cols' => 120, 'style' => 'min-width:950px'));
     $this->layout = array('status' => array('name' => __('Sitemap Status', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/', 'options' => array_keys($status_options)), 'default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/', 'options' => array_keys($this->default_options)));
     $prio = array('no' => 'Do Not Override');
     for ($i = 0; $i <= 10; $i++) {
         $str = sprintf("%0.1f", $i / 10.0);
         $prio[$str] = $str;
     }
     $freq = array('no' => 'Do Not Override');
     foreach (array('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never') as $f) {
         $freq[$f] = $f;
     }
     foreach (array('prio' => __('priority', 'all_in_one_seo_pack'), 'freq' => __('frequency', 'all_in_one_seo_pack')) as $k => $v) {
         $s = "{$k}_options";
         ${$s} = array();
         foreach (array('homepage' => __('homepage', 'all_in_one_seo_pack'), 'post' => __('posts', 'all_in_one_seo_pack'), 'taxonomies' => __('taxonomies', 'all_in_one_seo_pack'), 'archive' => __('archive pages', 'all_in_one_seo_pack'), 'author' => __('author pages', 'all_in_one_seo_pack')) as $opt => $val) {
             $arr = ${$s};
             $arr[$k . '_' . $opt] = array('name' => $this->ucwords($val), 'help_text' => sprintf(__("Manually set the %s of your %s.", 'all_in_one_seo_pack'), $v, $val), 'type' => 'select', 'initial_options' => ${$k}, 'default' => 'no');
             if ($opt == 'archive' || $opt == 'author') {
                 $arr[$k . '_' . $opt]['condshow'] = array($this->prefix . $opt => 'on');
             }
             ${$s} = $arr;
         }
     }
     $addl_options = array('addl_instructions' => array('default' => '<div>' . __('Enter information below for any additional links for your sitemap not already managed through WordPress.', 'all_in_one_seo_pack') . '</div><br />', 'type' => 'html', 'label' => 'none', 'save' => false), 'addl_url' => array('name' => __('Page URL', 'all_in_one_seo_pack'), 'type' => 'text', 'label' => 'top', 'save' => false), 'addl_prio' => array('name' => __('Page Priority', 'all_in_one_seo_pack'), 'type' => 'select', 'initial_options' => $prio, 'label' => 'top', 'save' => false), 'addl_freq' => array('name' => __('Page Frequency', 'all_in_one_seo_pack'), 'type' => 'select', 'initial_options' => $freq, 'label' => 'top', 'save' => false), 'addl_mod' => array('name' => __('Last Modified', 'all_in_one_seo_pack'), 'type' => 'text', 'label' => 'top', 'save' => false), 'addl_pages' => array('name' => __('Additional Pages', 'all_in_one_seo_pack'), 'type' => 'custom', 'save' => true), 'Submit' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Add URL', 'all_in_one_seo_pack') . ' &raquo;', 'style' => 'margin-left: 20px;', 'label' => 'none', 'save' => false, 'value' => 1));
     $excl_options = array('excl_categories' => array('name' => __('Excluded Categories', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'initial_options' => ''), 'excl_pages' => array('name' => __('Excluded Pages', 'all_in_one_seo_pack'), 'type' => 'text'));
     $this->layout['addl_pages'] = array('name' => __('Additional Pages', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#addl_pages', 'options' => array_keys($addl_options));
     $this->layout['excl_pages'] = array('name' => __('Excluded Items', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#excl_pages', 'options' => array_keys($excl_options));
     $this->layout['priorities'] = array('name' => __('Priorities', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#prio', 'options' => array_keys($prio_options));
     $this->layout['frequencies'] = array('name' => __('Frequencies', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#freq', 'options' => array_keys($freq_options));
     $this->default_options = array_merge($status_options, $this->default_options, $addl_options, $excl_options, $prio_options, $freq_options);
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     add_action('init', array($this, 'load_sitemap_options'));
     add_action($this->prefix . 'settings_update', array($this, 'do_sitemaps'));
     add_filter($this->prefix . 'display_settings', array($this, 'update_post_data'));
     add_filter($this->prefix . 'display_options', array($this, 'filter_display_options'));
     add_filter($this->prefix . 'update_options', array($this, 'filter_options'));
     add_filter($this->prefix . 'output_option', array($this, 'display_custom_options'), 10, 2);
 }
Exemplo n.º 6
0
    function __construct()
    {
        global $aioseop_options;
        $this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log';
        if (!empty($aioseop_options) && isset($aioseop_options['aiosp_do_log']) && $aioseop_options['aiosp_do_log']) {
            $this->do_log = true;
        } else {
            $this->do_log = false;
        }
        $this->init();
        $this->name = sprintf(__('%s Plugin Options', 'all-in-one-seo-pack'), AIOSEOP_PLUGIN_NAME);
        $this->menu_name = __('General Settings', 'all-in-one-seo-pack');
        $this->prefix = 'aiosp_';
        // option prefix
        $this->option_name = 'aioseop_options';
        $this->store_option = true;
        $this->file = __FILE__;
        // the current file
        $blog_name = esc_attr(get_bloginfo('name'));
        parent::__construct();
        $this->help_text = array("donate" => __("All donations support continued development of this free software.", 'all-in-one-seo-pack'), "can" => __("This option will automatically generate Canonical URLs for your entire WordPress installation.  This will help to prevent duplicate content penalties by <a href=\\'http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html\\' target=\\'_blank\\'>Google</a>.", 'all-in-one-seo-pack'), "no_paged_canonical_links" => __("Checking this option will set the Canonical URL for all paginated content to the first page.", 'all-in-one-seo-pack'), "customize_canonical_links" => __("Checking this option will allow you to customize Canonical URLs for specific posts.", 'all-in-one-seo-pack'), "can_set_protocol" => __("Set protocol for canonical URLs.", 'all-in-one-seo-pack'), "use_original_title" => __("Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.", 'all-in-one-seo-pack'), "do_log" => __("Check this and All in One SEO Pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.", 'all-in-one-seo-pack'), "home_title" => __("As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.", 'all-in-one-seo-pack'), "home_description" => __("This will be the Meta Description for your homepage. This is independent of any other option. The default is no Meta Description at all if this is not set.", 'all-in-one-seo-pack'), "home_keywords" => __("Enter a comma separated list of your most important keywords for your site that will be written as Meta Keywords on your homepage. Don\\'t stuff everything in here.", 'all-in-one-seo-pack'), "use_static_home_info" => __("Checking this option uses the title, description, and keywords set on your static Front Page.", 'all-in-one-seo-pack'), "togglekeywords" => __("This option allows you to toggle the use of Meta Keywords throughout the whole of the site.", 'all-in-one-seo-pack'), "use_categories" => __("Check this if you want your categories for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all-in-one-seo-pack'), "use_tags_as_keywords" => __("Check this if you want your tags for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all-in-one-seo-pack'), "dynamic_postspage_keywords" => __("Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) and your archive pages to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.", 'all-in-one-seo-pack'), "rewrite_titles" => __("Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the title bar and in the source code. If enabled, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: Using the default post title format below, Rewrite Titles will write all post titles as 'Post Title | Blog Name'. If you have manually defined a title using All in One SEO Pack, this will become the title of your post in the format string.", 'all-in-one-seo-pack'), "cap_titles" => __("Check this and Search Page Titles and Tag Page Titles will have the first letter of each word capitalized.", 'all-in-one-seo-pack'), "cap_cats" => __("Check this and Category Titles will have the first letter of each word capitalized.", 'all-in-one-seo-pack'), "home_page_title_format" => __("This controls the format of the title tag for your Home Page.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%page_title% - The original title of the page', 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_login% - This page's author' login", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack') . '</li>' . '</ul>', "page_title_format" => __("This controls the format of the title tag for Pages.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%page_title% - The original title of the page', 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_login% - This page's author' login", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack') . '</li><li>' . __("%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack') . '</li>' . '</ul>', "post_title_format" => __("This controls the format of the title tag for Posts.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%post_title% - The original title of the post', 'all-in-one-seo-pack') . '</li><li>' . __('%category_title% - The (main) category of the post', 'all-in-one-seo-pack') . '</li><li>' . __('%category% - Alias for %category_title%', 'all-in-one-seo-pack') . '</li><li>' . __("%post_author_login% - This post's author' login", 'all-in-one-seo-pack') . '</li><li>' . __("%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack') . '</li><li>' . __("%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack') . '</li><li>' . __("%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack') . '</li>' . '</ul>', "category_title_format" => __("This controls the format of the title tag for Category Archives.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%category_title% - The original title of the category', 'all-in-one-seo-pack') . '</li><li>' . __('%category_description% - The description of the category', 'all-in-one-seo-pack') . '</li></ul>', "archive_title_format" => __("This controls the format of the title tag for Custom Post Archives.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%archive_title - The original archive title given by wordpress', 'all-in-one-seo-pack') . '</li></ul>', "date_title_format" => __("This controls the format of the title tag for Date Archives.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all-in-one-seo-pack') . '</li><li>' . __('%day% - The original archive day given by wordpress, e.g. "17"', 'all-in-one-seo-pack') . '</li><li>' . __('%month% - The original archive month given by wordpress, e.g. "August"', 'all-in-one-seo-pack') . '</li><li>' . __('%year% - The original archive year given by wordpress, e.g. "2007"', 'all-in-one-seo-pack') . '</li></ul>', "author_title_format" => __("This controls the format of the title tag for Author Archives.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%author% - The original archive title given by wordpress, e.g. "Steve" or "John Smith"', 'all-in-one-seo-pack') . '</li></ul>', "tag_title_format" => __("This controls the format of the title tag for Tag Archives.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%tag% - The name of the tag', 'all-in-one-seo-pack') . '</li></ul>', "search_title_format" => __("This controls the format of the title tag for the Search page.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%search% - What was searched for', 'all-in-one-seo-pack') . '</li></ul>', "description_format" => __("This controls the format of Meta Descriptions.The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all-in-one-seo-pack') . '</li><li>' . __('%post_title% - The original title of the post', 'all-in-one-seo-pack') . '</li><li>' . __('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all-in-one-seo-pack') . '</li></ul>', "404_title_format" => __("This controls the format of the title tag for the 404 page.<br />The following macros are supported:", 'all-in-one-seo-pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all-in-one-seo-pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all-in-one-seo-pack') . '</li><li>' . __('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all-in-one-seo-pack') . '</li><li>' . __('%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all-in-one-seo-pack') . '</li><li>' . __('%404_title% - Additional 404 title input"', 'all-in-one-seo-pack') . '</li></ul>', "paged_format" => __("This string gets appended/prepended to titles of paged index pages (like home or archive pages).", 'all-in-one-seo-pack') . __('The following macros are supported:', 'all-in-one-seo-pack') . '<ul><li>' . __('%page% - The page number', 'all-in-one-seo-pack') . '</li></ul>', "enablecpost" => __("Check this if you want to use All in One SEO Pack with any Custom Post Types on this site.", 'all-in-one-seo-pack'), "cpostadvanced" => __("This will show or hide the advanced options for SEO for Custom Post Types.", 'all-in-one-seo-pack'), "cpostactive" => __("Use these checkboxes to select which Post Types you want to use All in One SEO Pack with.", 'all-in-one-seo-pack'), "cposttitles" => __("This allows you to set the title tags for each Custom Post Type.", 'all-in-one-seo-pack'), "posttypecolumns" => __("This lets you select which screens display the SEO Title, SEO Keywords and SEO Description columns.", 'all-in-one-seo-pack'), "admin_bar" => __("Check this to add All in One SEO Pack to the Admin Bar for easy access to your SEO settings.", 'all-in-one-seo-pack'), "custom_menu_order" => __("Check this to move the All in One SEO Pack menu item to the top of your WordPress Dashboard menu.", 'all-in-one-seo-pack'), "google_verify" => __("Enter your verification code here to verify your site with Google Webmaster Tools.<br /><a href='http://semperplugins.com/documentation/google-webmaster-tools-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack'), "bing_verify" => __("Enter your verification code here to verify your site with Bing Webmaster Tools.<br /><a href='http://semperplugins.com/documentation/bing-webmaster-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack'), "pinterest_verify" => __("Enter your verification code here to verify your site with Pinterest.<br /><a href='http://semperplugins.com/documentation/pinterest-site-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack'), "google_publisher" => __("Enter your Google+ Profile URL here to add the rel=“author” tag to your site for Google authorship. It is recommended that the URL you enter here should be your personal Google+ profile.  Use the Advanced Authorship Options below if you want greater control over the use of authorship.", 'all-in-one-seo-pack'), "google_disable_profile" => __("Check this to remove the Google Plus field from the user profile screen.", 'all-in-one-seo-pack'), "google_author_advanced" => __("Enable this to display advanced options for controlling Google Plus authorship information on your website.", 'all-in-one-seo-pack'), "google_author_location" => __("This option allows you to control which types of pages you want to display rel=\"author\" on for Google authorship. The options include the Front Page (the homepage of your site), Posts, Pages, and any Custom Post Types. The Everywhere Else option includes 404, search, categories, tags, custom taxonomies, date archives, author archives and any other page template.", 'all-in-one-seo-pack'), "google_enable_publisher" => __("This option allows you to control whether rel=\"publisher\" is displayed on the homepage of your site. Google recommends using this if the site is a business website.", 'all-in-one-seo-pack'), "google_specify_publisher" => __("The Google+ profile you enter here will appear on your homepage only as the rel=\"publisher\" tag. It is recommended that the URL you enter here should be the Google+ profile for your business.", 'all-in-one-seo-pack'), "google_sitelinks_search" => __("Add markup to display the Google Sitelinks Search Box next to your search results in Google.", 'all-in-one-seo-pack'), "google_set_site_name" => __("Add markup to tell Google the preferred name for your website.", 'all-in-one-seo-pack'), "google_connect" => __("Press the connect button to connect with Google Analytics; or if already connected, press the disconnect button to disable and remove any stored analytics credentials.", 'all-in-one-seo-pack'), "google_analytics_id" => __("Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.", 'all-in-one-seo-pack'), "ga_use_universal_analytics" => __("Use the new Universal Analytics tracking code for Google Analytics.", 'all-in-one-seo-pack'), "ga_advanced_options" => __("Check to use advanced Google Analytics options.", 'all-in-one-seo-pack'), "ga_domain" => __("Enter your domain name without the http:// to set your cookie domain.", 'all-in-one-seo-pack'), "ga_multi_domain" => __("Use this option to enable tracking of multiple or additional domains.", 'all-in-one-seo-pack'), "ga_addl_domains" => __("Add a list of additional domains to track here.  Enter one domain name per line without the http://.", 'all-in-one-seo-pack'), "ga_anonymize_ip" => __("This enables support for IP Anonymization in Google Analytics.", 'all-in-one-seo-pack'), "ga_display_advertising" => __("This enables support for the Display Advertiser Features in Google Analytics.", 'all-in-one-seo-pack'), "ga_exclude_users" => __("Exclude logged-in users from Google Analytics tracking by role.", 'all-in-one-seo-pack'), "ga_track_outbound_links" => __("Check this if you want to track outbound links with Google Analytics.", 'all-in-one-seo-pack'), "ga_link_attribution" => __("This enables support for the Enhanced Link Attribution in Google Analytics.", 'all-in-one-seo-pack'), "ga_enhanced_ecommerce" => __("This enables support for the Enhanced Ecommerce in Google Analytics.", 'all-in-one-seo-pack'), "cpostnoindex" => __("Set the default NOINDEX setting for each Post Type.", 'all-in-one-seo-pack'), "cpostnofollow" => __("Set the default NOFOLLOW setting for each Post Type.", 'all-in-one-seo-pack'), "category_noindex" => __("Check this to ask search engines not to index Category Archives. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "archive_date_noindex" => __("Check this to ask search engines not to index Date Archives. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "archive_author_noindex" => __("Check this to ask search engines not to index Author Archives. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "tags_noindex" => __("Check this to ask search engines not to index Tag Archives. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "search_noindex" => __("Check this to ask search engines not to index the Search page. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "404_noindex" => __("Check this to ask search engines not to index the 404 page.", 'all-in-one-seo-pack'), "tax_noindex" => __("Check this to ask search engines not to index custom Taxonomy archive pages. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "paginated_noindex" => __("Check this to ask search engines not to index paginated pages/posts. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), "paginated_nofollow" => __("Check this to ask search engines not to follow links from paginated pages/posts. Useful for avoiding duplicate content.", 'all-in-one-seo-pack'), 'noodp' => __('Check this box to ask search engines not to use descriptions from the Open Directory Project for your entire site.', 'all-in-one-seo-pack'), 'cpostnoodp' => __("Set the default noodp setting for each Post Type.", 'all-in-one-seo-pack'), 'noydir' => __('Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for your entire site.', 'all-in-one-seo-pack'), 'cpostnoydir' => __("Set the default noydir setting for each Post Type.", 'all-in-one-seo-pack'), "skip_excerpt" => __("Check this and your Meta Descriptions won't be generated from the excerpt.", 'all-in-one-seo-pack'), "generate_descriptions" => __("Check this and your Meta Descriptions will be auto-generated from your excerpt or content.", 'all-in-one-seo-pack'), "run_shortcodes" => __("Check this and shortcodes will get executed for descriptions auto-generated from content.", 'all-in-one-seo-pack'), "hide_paginated_descriptions" => __("Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.", 'all-in-one-seo-pack'), "dont_truncate_descriptions" => __("Check this to prevent your Description from being truncated regardless of its length.", 'all-in-one-seo-pack'), "schema_markup" => __("Check this to support Schema.org markup, i.e., itemprop on supported metadata.", 'all-in-one-seo-pack'), "unprotect_meta" => __("Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.", 'all-in-one-seo-pack'), "ex_pages" => __("Enter a comma separated list of pages here to be excluded by All in One SEO Pack.  This is helpful when using plugins which generate their own non-WordPress dynamic pages.  Ex: <em>/forum/, /contact/</em>  For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage here and it will be excluded from All in One SEO Pack.", 'all-in-one-seo-pack'), "post_meta_tags" => __("What you enter here will be copied verbatim to the header of all Posts. You can enter whatever additional headers you want here, even references to stylesheets.", 'all-in-one-seo-pack'), "page_meta_tags" => __("What you enter here will be copied verbatim to the header of all Pages. You can enter whatever additional headers you want here, even references to stylesheets.", 'all-in-one-seo-pack'), "front_meta_tags" => __("What you enter here will be copied verbatim to the header of the front page if you have set a static page in Settings, Reading, Front Page Displays. You can enter whatever additional headers you want here, even references to stylesheets. This will fall back to using Additional Page Headers if you have them set and nothing is entered here.", 'all-in-one-seo-pack'), "home_meta_tags" => __("What you enter here will be copied verbatim to the header of the home page if you have Front page displays your latest posts selected in Settings, Reading.  It will also be copied verbatim to the header on the Posts page if you have one set in Settings, Reading. You can enter whatever additional headers you want here, even references to stylesheets.", 'all-in-one-seo-pack'));
        $this->help_anchors = array('can' => '#canonical-urls', 'no_paged_canonical_links' => '#no-pagination-for-canonical-urls', 'customize_canonical_links' => '#enable-custom-canonical-urls', 'use_original_title' => '#use-original-title', 'schema_markup' => '#use-schema-markup', 'do_log' => '#log-important-events', 'home_title' => '#home-title', 'home_description' => '#home-description', 'home_keywords' => '#home-keywords', 'togglekeywords' => '#use-keywords', 'use_categories' => '#use-categories-for-meta-keywords', 'use_tags_as_keywords' => '#use-tags-for-meta-keywords', 'dynamic_postspage_keywords' => '#dynamically-generate-keywords-for-posts-page', 'rewrite_titles' => '#rewrite-titles', 'cap_titles' => '#capitalize-titles', 'home_page_title_format' => '#title-format-fields', 'page_title_format' => '#title-format-fields', 'post_title_format' => '#title-format-fields', 'category_title_format' => '#title-format-fields', 'archive_title_format' => '#title-format-fields', 'date_title_format' => '#title-format-fields', 'author_title_format' => '#title-format-fields', 'tag_title_format' => '#title-format-fields', 'search_title_format' => '#title-format-fields', '404_title_format' => '#title-format-fields', 'enablecpost' => '#seo-for-custom-post-types', 'cpostadvanced' => '#enable-advanced-options', 'cpostactive' => '#seo-on-only-these-post-types', 'cposttitles' => '#custom-titles', 'posttypecolumns' => '#show-column-labels-for-custom-post-types', 'admin_bar' => '#display-menu-in-admin-bar', 'custom_menu_order' => '#display-menu-at-the-top', 'google_verify' => '', 'bing_verify' => '', 'pinterest_verify' => '', 'google_publisher' => '#google-plus-default-profile', 'google_disable_profile' => '#disable-google-plus-profile', 'google_author_advanced' => '#advanced-authorship-options', 'google_author_location' => '#display-google-authorship', 'google_enable_publisher' => '#display-publisher-meta-on-front-page', 'google_specify_publisher' => '#specify-publisher-url', 'google_analytics_id' => 'http://semperplugins.com/documentation/setting-up-google-analytics/', 'ga_use_universal_analytics' => '#use-universal-analytics', 'ga_domain' => '#tracking-domain', 'ga_multi_domain' => '#track-multiple-domains-additional-domains', 'ga_addl_domains' => '#track-multiple-domains-additional-domains', 'ga_anonymize_ip' => '#anonymize-ip-addresses', 'ga_display_advertising' => '#display-advertiser-tracking', 'ga_exclude_users' => '#exclude-users-from-tracking', 'ga_track_outbound_links' => '#track-outbound-links', 'ga_link_attribution' => '#enhanced-link-attribution', 'ga_enhanced_ecommerce' => '#enhanced-ecommerce', 'cpostnoindex' => '#use-noindex-for-paginated-pages-posts', 'cpostnofollow' => '#use-nofollow-for-paginated-pages-posts', 'noodp' => '#exclude-site-from-the-open-directory-project', 'noydir' => '#exclude-site-from-yahoo-directory', 'generate_descriptions' => '#autogenerate-descriptions', 'run_shortcodes' => '#run-shortcodes-in-autogenerated-descriptions', 'hide_paginated_descriptions' => '#remove-descriptions-for-paginated-pages', 'dont_truncate_descriptions' => '#never-shorten-long-descriptions', 'unprotect_meta' => '#unprotect-post-meta-fields', 'ex_pages' => '#exclude-pages', 'post_meta_tags' => '#additional-post-headers', 'page_meta_tags' => '#additional-page-headers', 'front_meta_tags' => '#additional-front-page-headers', 'home_meta_tags' => '#additional-blog-page-headers');
        $meta_help_text = array('snippet' => __('A preview of what this page might look like in search engine results.', 'all-in-one-seo-pack'), 'title' => __('A custom title that shows up in the title tag for this page.', 'all-in-one-seo-pack'), 'description' => __('The META description for this page. This will override any autogenerated descriptions.', 'all-in-one-seo-pack'), 'keywords' => __('A comma separated list of your most important keywords for this page that will be written as META keywords.', 'all-in-one-seo-pack'), 'custom_link' => __("Override the canonical URLs for this post.", 'all-in-one-seo-pack'), 'noindex' => __('Check this box to ask search engines not to index this page.', 'all-in-one-seo-pack'), 'nofollow' => __('Check this box to ask search engines not to follow links from this page.', 'all-in-one-seo-pack'), 'noodp' => __('Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all-in-one-seo-pack'), 'noydir' => __('Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page.', 'all-in-one-seo-pack'), 'titleatr' => __('Set the title attribute for menu links.', 'all-in-one-seo-pack'), 'menulabel' => __('Set the label for this page menu item.', 'all-in-one-seo-pack'), 'sitemap_exclude' => __("Don't display this page in the sitemap.", 'all-in-one-seo-pack'), 'disable' => __('Disable SEO on this page.', 'all-in-one-seo-pack'), 'disable_analytics' => __('Disable Google Analytics on this page.', 'all-in-one-seo-pack'));
        $this->default_options = array("donate" => array('name' => __('I enjoy this plugin and have made a donation:', 'all-in-one-seo-pack')), "home_title" => array('name' => __('Home Title:', 'all-in-one-seo-pack'), 'default' => null, 'type' => 'textarea', 'sanitize' => 'text', 'count' => true, 'rows' => 1, 'cols' => 60, 'condshow' => array("aiosp_use_static_home_info" => 0)), "home_description" => array('name' => __('Home Description:', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'textarea', 'sanitize' => 'text', 'count' => true, 'cols' => 80, 'rows' => 2, 'condshow' => array("aiosp_use_static_home_info" => 0)), "togglekeywords" => array('name' => __('Use Keywords:', 'all-in-one-seo-pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array(0 => __('Enabled', 'all-in-one-seo-pack'), 1 => __('Disabled', 'all-in-one-seo-pack'))), "home_keywords" => array('name' => __('Home Keywords (comma separated):', 'all-in-one-seo-pack'), 'default' => null, 'type' => 'textarea', 'sanitize' => 'text', 'condshow' => array("aiosp_togglekeywords" => 0, "aiosp_use_static_home_info" => 0)), "use_static_home_info" => array('name' => __("Use Static Front Page Instead", 'all-in-one-seo-pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack'))), "can" => array('name' => __('Canonical URLs:', 'all-in-one-seo-pack'), 'default' => 1), "no_paged_canonical_links" => array('name' => __('No Pagination for Canonical URLs:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array("aiosp_can" => 'on')), "customize_canonical_links" => array('name' => __('Enable Custom Canonical URLs:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array("aiosp_can" => 'on')), "can_set_protocol" => array('name' => __('Set Protocol For Canonical URLs:', 'all-in-one-seo-pack'), 'type' => 'radio', 'default' => 'auto', 'initial_options' => array('auto' => __('Auto', 'all-in-one-seo-pack'), 'http' => __('HTTP', 'all-in-one-seo-pack'), 'https' => __('HTTPS', 'all-in-one-seo-pack')), 'condshow' => array("aiosp_can" => 'on')), "rewrite_titles" => array('name' => __('Rewrite Titles:', 'all-in-one-seo-pack'), 'default' => 1, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack'))), "force_rewrites" => array('name' => __('Force Rewrites:', 'all-in-one-seo-pack'), 'default' => 1, 'type' => 'hidden', 'prefix' => $this->prefix, 'initial_options' => array(1 => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack'))), "use_original_title" => array('name' => __('Use Original Title:', 'all-in-one-seo-pack'), 'type' => 'radio', 'default' => 0, 'initial_options' => array(1 => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack'))), "cap_titles" => array('name' => __('Capitalize Titles:', 'all-in-one-seo-pack'), 'default' => 1), "cap_cats" => array('name' => __('Capitalize Category Titles:', 'all-in-one-seo-pack'), 'default' => 1), "home_page_title_format" => array('name' => __('Home Page Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%page_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "page_title_format" => array('name' => __('Page Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%page_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "post_title_format" => array('name' => __('Post Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%post_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "category_title_format" => array('name' => __('Category Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%category_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "archive_title_format" => array('name' => __('Archive Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%archive_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "date_title_format" => array('name' => __('Date Archive Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%date% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "author_title_format" => array('name' => __('Author Archive Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%author% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "tag_title_format" => array('name' => __('Tag Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%tag% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "search_title_format" => array('name' => __('Search Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%search% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "description_format" => array('name' => __('Description Format', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '%description%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "404_title_format" => array('name' => __('404 Title Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => 'Nothing found for %request_words%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "paged_format" => array('name' => __('Paged Format:', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ' - Part %page%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "enablecpost" => array('name' => __('SEO for Custom Post Types:', 'all-in-one-seo-pack'), 'default' => 'on', 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack'))), "cpostactive" => array('name' => __('SEO on only these post types:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array('post', 'page'), 'condshow' => array('aiosp_enablecpost' => 'on')), "cpostadvanced" => array('name' => __('Enable Advanced Options:', 'all-in-one-seo-pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack')), 'label' => null, 'condshow' => array("aiosp_enablecpost" => 'on')), "cpostnoindex" => array('name' => __('Default to NOINDEX:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array()), "cpostnofollow" => array('name' => __('Default to NOFOLLOW:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array()), "cpostnoodp" => array('name' => __('Default to NOODP:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array()), "cpostnoydir" => array('name' => __('Default to NOYDIR:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array()), "cposttitles" => array('name' => __('Custom titles:', 'all-in-one-seo-pack'), 'type' => 'checkbox', 'default' => 0, 'condshow' => array("aiosp_rewrite_titles" => 1, 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "posttypecolumns" => array('name' => __('Show Column Labels for Custom Post Types:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array('post', 'page')), "admin_bar" => array('name' => __('Display Menu In Admin Bar:', 'all-in-one-seo-pack'), 'default' => 'on'), "custom_menu_order" => array('name' => __('Display Menu At The Top:', 'all-in-one-seo-pack'), 'default' => 'on'), "google_verify" => array('name' => __('Google Webmaster Tools:', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), "bing_verify" => array('name' => __('Bing Webmaster Center:', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), "pinterest_verify" => array('name' => __('Pinterest Site Verification:', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), "google_publisher" => array('name' => __('Google Plus Default Profile:', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), "google_disable_profile" => array('name' => __('Disable Google Plus Profile:', 'all-in-one-seo-pack'), 'default' => 0, 'type' => 'checkbox'), "google_sitelinks_search" => array('name' => __('Display Sitelinks Search Box:', 'all-in-one-seo-pack')), "google_set_site_name" => array('name' => __('Set Preferred Site Name:', 'all-in-one-seo-pack')), "google_specify_site_name" => array('name' => __('Specify A Preferred Name:', 'all-in-one-seo-pack'), 'type' => 'text', 'placeholder' => $blog_name, 'condshow' => array('aiosp_google_set_site_name' => 'on')), "google_author_advanced" => array('name' => __('Advanced Authorship Options:', 'all-in-one-seo-pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack')), 'label' => null), "google_author_location" => array('name' => __('Display Google Authorship:', 'all-in-one-seo-pack'), 'default' => array('all'), 'type' => 'multicheckbox', 'condshow' => array('aiosp_google_author_advanced' => 'on')), "google_enable_publisher" => array('name' => __('Display Publisher Meta on Front Page:', 'all-in-one-seo-pack'), 'default' => 'on', 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack')), 'condshow' => array('aiosp_google_author_advanced' => 'on')), "google_specify_publisher" => array('name' => __('Specify Publisher URL:', 'all-in-one-seo-pack'), 'type' => 'text', 'condshow' => array('aiosp_google_author_advanced' => 'on', 'aiosp_google_enable_publisher' => 'on')), "google_analytics_id" => array('name' => __('Google Analytics ID:', 'all-in-one-seo-pack'), 'default' => null, 'type' => 'text', 'placeholder' => 'UA-########-#'), "ga_use_universal_analytics" => array('name' => __('Use Universal Analytics:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''))), "ga_advanced_options" => array('name' => __('Advanced Analytics Options:', 'all-in-one-seo-pack'), 'default' => 'on', 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all-in-one-seo-pack'), 0 => __('Disabled', 'all-in-one-seo-pack')), 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''))), "ga_domain" => array('name' => __('Tracking Domain:', 'all-in-one-seo-pack'), 'type' => 'text', 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_multi_domain" => array('name' => __('Track Multiple Domains:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_addl_domains" => array('name' => __('Additional Domains:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on', 'aiosp_ga_multi_domain' => 'on')), "ga_anonymize_ip" => array('name' => __('Anonymize IP Addresses:', 'all-in-one-seo-pack'), 'type' => 'checkbox', 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_display_advertising" => array('name' => __('Display Advertiser Tracking:', 'all-in-one-seo-pack'), 'type' => 'checkbox', 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_exclude_users" => array('name' => __('Exclude Users From Tracking:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_track_outbound_links" => array('name' => __('Track Outbound Links:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_link_attribution" => array('name' => __('Enhanced Link Attribution:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_advanced_options' => 'on')), "ga_enhanced_ecommerce" => array('name' => __('Enhanced Ecommerce:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''), 'aiosp_ga_use_universal_analytics' => 'on', 'aiosp_ga_advanced_options' => 'on')), "use_categories" => array('name' => __('Use Categories for META keywords:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array("aiosp_togglekeywords" => 0)), "use_tags_as_keywords" => array('name' => __('Use Tags for META keywords:', 'all-in-one-seo-pack'), 'default' => 1, 'condshow' => array("aiosp_togglekeywords" => 0)), "dynamic_postspage_keywords" => array('name' => __('Dynamically Generate Keywords for Posts Page/Archives:', 'all-in-one-seo-pack'), 'default' => 1, 'condshow' => array("aiosp_togglekeywords" => 0)), "category_noindex" => array('name' => __('Use noindex for Categories:', 'all-in-one-seo-pack'), 'default' => 1), "archive_date_noindex" => array('name' => __('Use noindex for Date Archives:', 'all-in-one-seo-pack'), 'default' => 1), "archive_author_noindex" => array('name' => __('Use noindex for Author Archives:', 'all-in-one-seo-pack'), 'default' => 1), "tags_noindex" => array('name' => __('Use noindex for Tag Archives:', 'all-in-one-seo-pack'), 'default' => 0), "search_noindex" => array('name' => __('Use noindex for the Search page:', 'all-in-one-seo-pack'), 'default' => 0), "404_noindex" => array('name' => __('Use noindex for the 404 page:', 'all-in-one-seo-pack'), 'default' => 0), "tax_noindex" => array('name' => __('Use noindex for Taxonomy Archives:', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => array(), 'condshow' => array('aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "paginated_noindex" => array('name' => __('Use noindex for paginated pages/posts:', 'all-in-one-seo-pack'), 'default' => 0), "paginated_nofollow" => array('name' => __('Use nofollow for paginated pages/posts:', 'all-in-one-seo-pack'), 'default' => 0), "noodp" => array('name' => __('Exclude site from the Open Directory Project:', 'all-in-one-seo-pack'), 'default' => 0), "noydir" => array('name' => __('Exclude site from Yahoo! Directory:', 'all-in-one-seo-pack'), 'default' => 0), "skip_excerpt" => array('name' => __('Avoid Using The Excerpt In Descriptions:', 'all-in-one-seo-pack'), 'default' => 0), "generate_descriptions" => array('name' => __('Autogenerate Descriptions:', 'all-in-one-seo-pack'), 'default' => 1), "run_shortcodes" => array('name' => __('Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack'), 'default' => 0, 'condshow' => array('aiosp_generate_descriptions' => 'on')), "hide_paginated_descriptions" => array('name' => __('Remove Descriptions For Paginated Pages:', 'all-in-one-seo-pack'), 'default' => 0), "dont_truncate_descriptions" => array('name' => __('Never Shorten Long Descriptions:', 'all-in-one-seo-pack'), 'default' => 0), "schema_markup" => array('name' => __('Use Schema.org Markup', 'all-in-one-seo-pack'), 'default' => 1), "unprotect_meta" => array('name' => __('Unprotect Post Meta Fields:', 'all-in-one-seo-pack'), 'default' => 0), "ex_pages" => array('name' => __('Exclude Pages:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'default' => ''), "post_meta_tags" => array('name' => __('Additional Post Headers:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "page_meta_tags" => array('name' => __('Additional Page Headers:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "front_meta_tags" => array('name' => __('Additional Front Page Headers:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "home_meta_tags" => array('name' => __('Additional Blog Page Headers:', 'all-in-one-seo-pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "do_log" => array('name' => __('Log important events:', 'all-in-one-seo-pack'), 'default' => null));
        $this->locations = array('default' => array('name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => null), 'aiosp' => array('name' => $this->plugin_name, 'type' => 'metabox', 'prefix' => '', 'help_link' => 'http://semperplugins.com/sections/postpage-settings/', 'options' => array('edit', 'nonce-aioseop-edit', 'upgrade', 'snippet', 'title', 'description', 'keywords', 'custom_link', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel', 'sitemap_exclude', 'disable', 'disable_analytics'), 'default_options' => array('edit' => array('type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1), 'nonce-aioseop-edit' => array('type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1), 'upgrade' => array('type' => 'html', 'label' => 'none', 'default' => '<a target="__blank" href="http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=meta">' . __('Upgrade to All in One SEO Pack Pro Version', 'all-in-one-seo-pack') . '</a>'), 'snippet' => array('name' => __('Preview Snippet', 'all-in-one-seo-pack'), 'type' => 'custom', 'label' => 'top', 'default' => '
																									<script>
																									jQuery(document).ready(function() {
																										jQuery("#aiosp_title_wrapper").bind("input", function() {
																										    jQuery("#aiosp_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\\n)*?>/gm, ""));
																										});
																										jQuery("#aiosp_description_wrapper").bind("input", function() {
																										    jQuery("#aioseop_snippet_description").text(jQuery("#aiosp_description_wrapper textarea").val().replace(/<(?:.|\\n)*?>/gm, ""));
																										});
																									});
																									</script>
																									<div class="preview_snippet"><div id="aioseop_snippet"><h3><a>%s</a></h3><div><div><cite id="aioseop_snippet_link">%s</cite></div><span id="aioseop_snippet_description">%s</span></div></div></div>'), 'title' => array('name' => __('Title', 'all-in-one-seo-pack'), 'type' => 'text', 'count' => true, 'size' => 60), 'description' => array('name' => __('Description', 'all-in-one-seo-pack'), 'type' => 'textarea', 'count' => true, 'cols' => 80, 'rows' => 2), 'keywords' => array('name' => __('Keywords (comma separated)', 'all-in-one-seo-pack'), 'type' => 'text'), 'custom_link' => array('name' => __('Custom Canonical URL', 'all-in-one-seo-pack'), 'type' => 'text', 'size' => 60), 'noindex' => array('name' => __("Robots Meta NOINDEX", 'all-in-one-seo-pack'), 'default' => ''), 'nofollow' => array('name' => __("Robots Meta NOFOLLOW", 'all-in-one-seo-pack'), 'default' => ''), 'noodp' => array('name' => __("Robots Meta NOODP", 'all-in-one-seo-pack')), 'noydir' => array('name' => __("Robots Meta NOYDIR", 'all-in-one-seo-pack')), 'titleatr' => array('name' => __('Title Attribute', 'all-in-one-seo-pack'), 'type' => 'text', 'size' => 60), 'menulabel' => array('name' => __('Menu Label', 'all-in-one-seo-pack'), 'type' => 'text', 'size' => 60), 'sitemap_exclude' => array('name' => __('Exclude From Sitemap', 'all-in-one-seo-pack')), 'disable' => array('name' => __('Disable on this page/post', 'all-in-one-seo-pack')), 'disable_analytics' => array('name' => __('Disable Google Analytics', 'all-in-one-seo-pack'), 'condshow' => array('aiosp_disable' => 'on'))), 'display' => null));
        if (!empty($meta_help_text)) {
            foreach ($meta_help_text as $k => $v) {
                $this->locations['aiosp']['default_options'][$k]['help_text'] = $v;
            }
        }
        $this->layout = array('default' => array('name' => __('General Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/general-settings/', 'options' => array()), 'home' => array('name' => __('Home Page Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/home-page-settings/', 'options' => array('home_title', 'home_description', 'home_keywords', 'use_static_home_info')), 'keywords' => array('name' => __('Keyword Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/keyword-settings/', 'options' => array("togglekeywords", "use_categories", "use_tags_as_keywords", "dynamic_postspage_keywords")), 'title' => array('name' => __('Title Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/title-settings/', 'options' => array("rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "home_page_title_format", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "date_title_format", "author_title_format", "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format")), 'cpt' => array('name' => __('Custom Post Type Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/custom-post-type-settings/', 'options' => array("enablecpost", "cpostadvanced", "cpostactive", "cposttitles")), 'display' => array('name' => __('Display Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/display-settings/', 'options' => array("posttypecolumns", "admin_bar", "custom_menu_order")), 'webmaster' => array('name' => __('Webmaster Verification', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/sections/webmaster-verification/', 'options' => array("google_verify", "bing_verify", "pinterest_verify")), 'google' => array('name' => __('Google Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/google-settings/', 'options' => array("google_publisher", "google_disable_profile", "google_sitelinks_search", "google_set_site_name", "google_specify_site_name", "google_author_advanced", "google_author_location", "google_enable_publisher", "google_specify_publisher", "google_analytics_id", "ga_use_universal_analytics", "ga_advanced_options", "ga_domain", "ga_multi_domain", "ga_addl_domains", "ga_anonymize_ip", "ga_display_advertising", "ga_exclude_users", "ga_track_outbound_links", "ga_link_attribution", "ga_enhanced_ecommerce")), 'noindex' => array('name' => __('Noindex Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/noindex-settings/', 'options' => array('cpostnoindex', 'cpostnofollow', 'cpostnoodp', 'cpostnoydir', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex', 'search_noindex', '404_noindex', 'tax_noindex', 'paginated_noindex', 'paginated_nofollow', 'noodp', 'noydir')), 'advanced' => array('name' => __('Advanced Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/advanced-settings/', 'options' => array('generate_descriptions', 'skip_excerpt', 'run_shortcodes', 'hide_paginated_descriptions', 'dont_truncate_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags')));
        $other_options = array();
        foreach ($this->layout as $k => $v) {
            $other_options = array_merge($other_options, $v['options']);
        }
        $this->layout['default']['options'] = array_diff(array_keys($this->default_options), $other_options);
        if (is_admin()) {
            $this->add_help_text_links();
            add_action("aioseop_global_settings_header", array($this, 'display_right_sidebar'));
            add_action("aioseop_global_settings_footer", array($this, 'display_settings_footer'));
            add_action("output_option", array($this, 'custom_output_option'), 10, 2);
            add_action('all_admin_notices', array($this, 'visibility_warning'));
        }
    }
Exemplo n.º 7
0
        function __construct()
        {
            $this->name = __('Social Meta', 'all-in-one-seo-pack');
            // Human-readable name of the plugin
            $this->prefix = 'aiosp_opengraph_';
            // option prefix
            $this->file = __FILE__;
            // the current file
            $this->fb_object_types = array('Activities' => array('activity' => __('Activity', 'all-in-one-seo-pack'), 'sport' => __('Sport', 'all-in-one-seo-pack')), 'Businesses' => array('bar' => __('Bar', 'all-in-one-seo-pack'), 'company' => __('Company', 'all-in-one-seo-pack'), 'cafe' => __('Cafe', 'all-in-one-seo-pack'), 'hotel' => __('Hotel', 'all-in-one-seo-pack'), 'restaurant' => __('Restaurant', 'all-in-one-seo-pack')), 'Groups' => array('cause' => __('Cause', 'all-in-one-seo-pack'), 'sports_league' => __('Sports League', 'all-in-one-seo-pack'), 'sports_team' => __('Sports Team', 'all-in-one-seo-pack')), 'Organizations' => array('band' => __('Band', 'all-in-one-seo-pack'), 'government' => __('Government', 'all-in-one-seo-pack'), 'non_profit' => __('Non Profit', 'all-in-one-seo-pack'), 'school' => __('School', 'all-in-one-seo-pack'), 'university' => __('University', 'all-in-one-seo-pack')), 'People' => array('actor' => __('Actor', 'all-in-one-seo-pack'), 'athlete' => __('Athlete', 'all-in-one-seo-pack'), 'author' => __('Author', 'all-in-one-seo-pack'), 'director' => __('Director', 'all-in-one-seo-pack'), 'musician' => __('Musician', 'all-in-one-seo-pack'), 'politician' => __('Politician', 'all-in-one-seo-pack'), 'profile' => __('Profile', 'all-in-one-seo-pack'), 'public_figure' => __('Public Figure', 'all-in-one-seo-pack')), 'Places' => array('city' => __('City', 'all-in-one-seo-pack'), 'country' => __('Country', 'all-in-one-seo-pack'), 'landmark' => __('Landmark', 'all-in-one-seo-pack'), 'state_province' => __('State Province', 'all-in-one-seo-pack')), 'Products and Entertainment' => array('album' => __('Album', 'all-in-one-seo-pack'), 'book' => __('Book', 'all-in-one-seo-pack'), 'drink' => __('Drink', 'all-in-one-seo-pack'), 'food' => __('Food', 'all-in-one-seo-pack'), 'game' => __('Game', 'all-in-one-seo-pack'), 'movie' => __('Movie', 'all-in-one-seo-pack'), 'product' => __('Product', 'all-in-one-seo-pack'), 'song' => __('Song', 'all-in-one-seo-pack'), 'tv_show' => __('TV Show', 'all-in-one-seo-pack'), 'episode' => __('Episode', 'all-in-one-seo-pack')), 'Websites' => array('article' => __('Article', 'all-in-one-seo-pack'), 'blog' => __('Blog', 'all-in-one-seo-pack'), 'website' => __('Website', 'all-in-one-seo-pack')));
            parent::__construct();
            $categories = array('blog' => __('Blog', 'all-in-one-seo-pack'), 'website' => __('Website', 'all-in-one-seo-pack'), 'article' => __('Article', 'all-in-one-seo-pack'));
            $this->help_text = array("setmeta" => __("Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all-in-one-seo-pack'), "key" => __("Enter your Facebook Admin ID here. Information about how to get your Facebook Admin ID can be found at https://developers.facebook.com/docs/platforminsights/domains", 'all-in-one-seo-pack'), "appid" => __("Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/platforminsights/domains", 'all-in-one-seo-pack'), "title_shortcodes" => __("Run shortcodes that appear in social title meta tags.", 'all-in-one-seo-pack'), "description_shortcodes" => __("Run shortcodes that appear in social description meta tags.", 'all-in-one-seo-pack'), "sitename" => __("The Site Name is the name that is used to identify your website.", 'all-in-one-seo-pack'), "hometitle" => __("The Home Title is the Open Graph title for your home page.", 'all-in-one-seo-pack'), "description" => __("The Home Description is the Open Graph description for your home page.", 'all-in-one-seo-pack'), "homeimage" => __("The Home Image is the Open Graph image for your home page.", 'all-in-one-seo-pack'), "hometag" => __("The Home Tag allows you to add a list of keywords that best describe your home page content.", 'all-in-one-seo-pack'), "generate_descriptions" => __("Check this and your Open Graph descriptions will be auto-generated from your content.", 'all-in-one-seo-pack'), "defimg" => __("This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.", 'all-in-one-seo-pack'), "fallback" => __("This option lets you fall back to the default image if no image could be found above.", 'all-in-one-seo-pack'), "dimg" => __("This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.", 'all-in-one-seo-pack'), "dimgwidth" => __("This option lets you set a default width for your images, where unspecified.", 'all-in-one-seo-pack'), "dimgheight" => __("This option lets you set a default height for your images, where unspecified.", 'all-in-one-seo-pack'), "meta_key" => __("Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.", 'all-in-one-seo-pack'), "categories" => __("Set the Open Graph type for your website as either a blog or a website.", 'all-in-one-seo-pack'), "image" => __("This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.", 'all-in-one-seo-pack'), "customimg" => __("This option lets you upload an image to use as the Open Graph image for this Page or Post.", 'all-in-one-seo-pack'), "imagewidth" => __("Enter the width for your Open Graph image in pixels (i.e. 600).", 'all-in-one-seo-pack'), "imageheight" => __("Enter the height for your Open Graph image in pixels (i.e. 600).", 'all-in-one-seo-pack'), "video" => __("This option lets you specify a link to the Open Graph video used on this Page or Post.", 'all-in-one-seo-pack'), "videowidth" => __("Enter the width for your Open Graph video in pixels (i.e. 600).", 'all-in-one-seo-pack'), "videoheight" => __("Enter the height for your Open Graph video in pixels (i.e. 600).", 'all-in-one-seo-pack'), "defcard" => __("Select the default type of Twitter card to display.", 'all-in-one-seo-pack'), "setcard" => __("Select the default type of Twitter card to display.", 'all-in-one-seo-pack'), "twitter_site" => __("Enter the Twitter username associated with your website here.", 'all-in-one-seo-pack'), "twitter_creator" => __("Allows your authors to be identified by their Twitter usernames as content creators on the Twitter cards for their posts.", 'all-in-one-seo-pack'), "twitter_domain" => __("Enter the name of your website here.", 'all-in-one-seo-pack'), "gen_tags" => __("Automatically generate article tags for Facebook type article when not provided.", 'all-in-one-seo-pack'), "gen_keywords" => __("Use keywords in generated article tags.", 'all-in-one-seo-pack'), "gen_categories" => __("Use catergories in generated article tags.", 'all-in-one-seo-pack'), "gen_post_tags" => __("Use post tags in generated article tags.", 'all-in-one-seo-pack'), "types" => __("Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.", 'all-in-one-seo-pack'), "title" => __("This is the Open Graph title of this Page or Post.", 'all-in-one-seo-pack'), "desc" => __("This is the Open Graph description of this Page or Post.", 'all-in-one-seo-pack'), "category" => __("Select the Open Graph type that best describes the content of this Page or Post.", 'all-in-one-seo-pack'), "facebook_debug" => __("Press this button to have Facebook re-fetch and debug this page.", 'all-in-one-seo-pack'), "section" => __("This Open Graph meta allows you to add a general section name that best describes this content.", 'all-in-one-seo-pack'), "tag" => __("This Open Graph meta allows you to add a list of keywords that best describe this content.", 'all-in-one-seo-pack'), "facebook_publisher" => __("Link articles to the Facebook page associated with your website.", 'all-in-one-seo-pack'), "facebook_author" => __("Allows your authors to be identified by their Facebook pages as content authors on the Opengraph meta for their articles.", 'all-in-one-seo-pack'), "person_or_org" => __("Are the social profile links for your website for a person or an organization?", 'all-in-one-seo-pack'), "profile_links" => __("Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack'), "social_name" => __("Add the name of the person or organization who owns these profiles.", 'all-in-one-seo-pack'));
            $this->help_anchors = array('generate_descriptions' => '#auto-generate-og-descriptions', 'setmeta' => '#use-aioseo-title-and-description', 'sitename' => '#site-name', 'hometitle' => '#home-title-and-description', 'description' => '#home-title-and-description', 'homeimage' => '#home-image', 'defimg' => '#select-og-image-source', 'fallback' => '#use-default-if-no-image-found', 'dimg' => '#default-og-image', 'meta_key' => '#use-custom-field-for-image', 'key' => '#facebook-admin-id', 'appid' => '#facebook-app-id', 'categories' => '#facebook-object-type', 'facebook_publisher' => '#show-facebook-publisher-on-articles', 'facebook_author' => '#show-facebook-author-on-articles', 'types' => '#enable-facebook-meta-for', 'defcard' => '#default-twitter-card', 'setcard' => '#default-twitter-card', 'twitter_site' => '#twitter-site', 'twitter_creator' => '#show-twitter-author', 'twitter_domain' => '#twitter-domain', 'scan_header' => '#scan-social-meta');
            $count_desc = __(" characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all-in-one-seo-pack');
            $this->default_options = array('scan_header' => array('name' => __('Scan Header', 'all-in-one-seo-pack'), 'type' => 'custom', 'save' => true), 'setmeta' => array('name' => __('Use AIOSEO Title and Description', 'all-in-one-seo-pack'), 'type' => 'checkbox'), 'key' => array('name' => __('Facebook Admin ID', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), 'appid' => array('name' => __('Facebook App ID', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text'), 'title_shortcodes' => array('name' => __('Run Shortcodes In Title', 'all-in-one-seo-pack')), 'description_shortcodes' => array('name' => __('Run Shortcodes In Description', 'all-in-one-seo-pack')), 'sitename' => array('name' => __('Site Name', 'all-in-one-seo-pack'), 'default' => get_bloginfo('name'), 'type' => 'text'), 'hometitle' => array('name' => __('Home Title', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'textarea', 'condshow' => array('aiosp_opengraph_setmeta' => array('lhs' => "aiosp_opengraph_setmeta", 'op' => '!=', 'rhs' => 'on'))), 'description' => array('name' => __('Home Description', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'textarea', 'condshow' => array('aiosp_opengraph_setmeta' => array('lhs' => "aiosp_opengraph_setmeta", 'op' => '!=', 'rhs' => 'on'))), 'homeimage' => array('name' => __('Home Image', 'all-in-one-seo-pack'), 'type' => 'image'), 'hometag' => array('name' => __('Home Article Tags', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '', 'condshow' => array('aiosp_opengraph_categories' => 'article')), 'generate_descriptions' => array('name' => __('Autogenerate OG Descriptions', 'all-in-one-seo-pack'), 'default' => 1), 'defimg' => array('name' => __('Select OG:Image Source', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => array('' => __('Default Image'), 'featured' => __('Featured Image'), 'attach' => __('First Attached Image'), 'content' => __('First Image In Content'), 'custom' => __('Image From Custom Field'), 'author' => __('Post Author Image'), 'auto' => __('First Available Image'))), 'fallback' => array('name' => __('Use Default If No Image Found', 'all-in-one-seo-pack'), 'type' => 'checkbox'), 'dimg' => array('name' => __('Default OG:Image', 'all-in-one-seo-pack'), 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png', 'type' => 'image'), 'dimgwidth' => array('name' => __('Default Image Width', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'dimgheight' => array('name' => __('Default Image Height', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'meta_key' => array('name' => __('Use Custom Field For Image', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'categories' => array('name' => __('Facebook Object Type', 'all-in-one-seo-pack'), 'type' => 'radio', 'initial_options' => $categories, 'default' => 'blog'), 'image' => array('name' => __('Image', 'all-in-one-seo-pack'), 'type' => 'radio', 'initial_options' => array(0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">')), 'customimg' => array('name' => __('Custom Image', 'all-in-one-seo-pack'), 'type' => 'image'), 'imagewidth' => array('name' => __('Specify Image Width', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'imageheight' => array('name' => __('Specify Image Height', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'video' => array('name' => __('Custom Video', 'all-in-one-seo-pack'), 'type' => 'text'), 'videowidth' => array('name' => __('Specify Video Width', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '', 'condshow' => array('aioseop_opengraph_settings_video' => array('lhs' => "aioseop_opengraph_settings_video", 'op' => '!=', 'rhs' => ''))), 'videoheight' => array('name' => __('Specify Video Height', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '', 'condshow' => array('aioseop_opengraph_settings_video' => array('lhs' => "aioseop_opengraph_settings_video", 'op' => '!=', 'rhs' => ''))), 'defcard' => array('name' => __('Default Twitter Card', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => array('summary' => __('Summary', 'all-in-one-seo-pack'), 'summary_large_image' => __('Summary Large Image', 'all-in-one-seo-pack')), 'default' => 'summary'), 'setcard' => array('name' => __('Twitter Card Type', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => array('summary_large_image' => __('Summary Large Image', 'all-in-one-seo-pack'), 'summary' => __('Summary', 'all-in-one-seo-pack'))), 'twitter_site' => array('name' => __('Twitter Site', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'twitter_creator' => array('name' => __('Show Twitter Author', 'all-in-one-seo-pack')), 'twitter_domain' => array('name' => __('Twitter Domain', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'gen_tags' => array('name' => __('Automatically Generate Article Tags', 'all-in-one-seo-pack')), 'gen_keywords' => array('name' => __('Use Keywords In Article Tags', 'all-in-one-seo-pack'), 'default' => 'on', 'condshow' => array('aiosp_opengraph_gen_tags' => 'on')), 'gen_categories' => array('name' => __('Use Categories In Article Tags', 'all-in-one-seo-pack'), 'default' => 'on', 'condshow' => array('aiosp_opengraph_gen_tags' => 'on')), 'gen_post_tags' => array('name' => __('Use Post Tags In Article Tags', 'all-in-one-seo-pack'), 'default' => 'on', 'condshow' => array('aiosp_opengraph_gen_tags' => 'on')), 'types' => array('name' => __('Enable Facebook Meta for', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'initial_options' => $this->get_post_type_titles(array('_builtin' => false)), 'default' => array('post' => 'post', 'page' => 'page')), 'title' => array('name' => __('Title', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'text', 'size' => 95, 'count' => 1, 'count_desc' => $count_desc), 'desc' => array('name' => __('Description', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'textarea', 'cols' => 250, 'rows' => 4, 'count' => 1, 'count_desc' => $count_desc), 'category' => array('name' => __('Facebook Object Type', 'all-in-one-seo-pack'), 'type' => 'select', 'style' => '', 'initial_options' => $this->fb_object_types, 'default' => ''), 'facebook_debug' => array('name' => __('Facebook Debug', 'all-in-one-seo-pack'), 'type' => 'html', 'save' => false, 'default' => '<script>
														jQuery(document).ready(function() {
															var snippet = jQuery("#aioseop_snippet_link");
															if ( !snippet ) {
																jQuery( "#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
															} else {
																snippet = snippet.html();
																jQuery("#aioseop_opengraph_settings_facebook_debug").attr( "href", "https://developers.facebook.com/tools/debug/og/object?q=" + snippet );
															}
														});
													</script>
													<a name="aioseop_opengraph_settings_facebook_debug" id="aioseop_opengraph_settings_facebook_debug" class="button-primary" href="" target=_blank>' . __('Debug This Post', 'all-in-one-seo-pack') . '</a>'), 'section' => array('name' => __('Article Section', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '', 'condshow' => array('aioseop_opengraph_settings_category' => 'article')), 'tag' => array('name' => __('Article Tags', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => '', 'condshow' => array('aioseop_opengraph_settings_category' => 'article')), 'facebook_publisher' => array('name' => __('Show Facebook Publisher on Articles', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ''), 'facebook_author' => array('name' => __('Show Facebook Author on Articles', 'all-in-one-seo-pack')), 'profile_links' => array('name' => __('Social Profile Links', 'all-in-one-seo-pack'), 'type' => 'textarea', 'cols' => 60, 'rows' => 5), 'person_or_org' => array('name' => __('Person or Organization?', 'all-in-one-seo-pack'), 'type' => 'radio', 'initial_options' => array('person' => __('Person', 'all-in-one-seo-pack'), 'org' => __('Organization', 'all-in-one-seo-pack'))), 'social_name' => array('name' => __("Associated Name", 'all-in-one-seo-pack'), 'type' => 'text', 'default' => ""));
            // load initial options / set defaults
            $this->update_options();
            $display = array();
            if (isset($this->options['aiosp_opengraph_types'])) {
                $display = $this->options['aiosp_opengraph_types'];
            }
            $this->locations = array('opengraph' => array('name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => array('scan_header', 'setmeta', 'key', 'appid', 'sitename', 'title_shortcodes', 'description_shortcodes', 'hometitle', 'description', 'homeimage', 'hometag', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key', 'categories', 'defcard', 'profile_links', 'person_or_org', 'social_name', 'twitter_site', 'twitter_creator', 'twitter_domain', 'gen_tags', 'gen_keywords', 'gen_categories', 'gen_post_tags', 'types', 'facebook_publisher', 'facebook_author')), 'settings' => array('name' => __('Social Settings', 'all-in-one-seo-pack'), 'type' => 'metabox', 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#pagepost_settings', 'options' => array('title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'video', 'videowidth', 'videoheight', 'category', 'facebook_debug', 'section', 'tag', 'setcard'), 'display' => $display, 'prefix' => 'aioseop_opengraph_'));
            $this->layout = array('default' => array('name' => __('General Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array()), 'home' => array('name' => __('Home Page Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array('setmeta', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag')), 'image' => array('name' => __('Image Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array('defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key')), 'links' => array('name' => __('Social Profile Links', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array('profile_links', 'person_or_org', 'social_name')), 'facebook' => array('name' => __('Facebook Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array('key', 'appid', 'types', 'gen_tags', 'gen_keywords', 'gen_categories', 'gen_post_tags', 'categories', 'facebook_publisher', 'facebook_author')), 'twitter' => array('name' => __('Twitter Settings', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array('defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain')), 'scan_meta' => array('name' => __('Scan Social Meta', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#scan_meta', 'options' => array('scan_header')));
            $other_options = array();
            foreach ($this->layout as $k => $v) {
                $other_options = array_merge($other_options, $v['options']);
            }
            $this->layout['default']['options'] = array_diff(array_keys($this->default_options), $other_options);
            if (is_admin()) {
                add_action('admin_init', array($this, 'debug_post_types'), 5);
            } else {
                add_action('wp', array($this, 'type_setup'));
            }
            if (!is_admin() || defined('DOING_AJAX')) {
                $this->do_opengraph();
            }
            // Avoid having duplicate meta tags
            add_filter('jetpack_enable_open_graph', '__return_false');
        }
 /**
  * All_in_One_SEO_Pack_Feature_Manager constructor.
  *
  * @param $mod Module.
  */
 function __construct($mod)
 {
     $this->name = __('Feature Manager', 'all-in-one-seo-pack');
     // Human-readable name of the plugin.
     $this->prefix = 'aiosp_feature_manager_';
     // Option prefix.
     $this->file = __FILE__;
     // The current file.
     parent::__construct();
     $this->module_info = array('sitemap' => array('name' => __('XML Sitemaps', 'all-in-one-seo-pack'), 'description' => __('Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack')), 'opengraph' => array('name' => __('Social Meta', 'all-in-one-seo-pack'), 'description' => __('Activate this feature to add Social Meta data to your site to deliver closer integration between your website/blog and Facebook, Twitter, and Google+.', 'all-in-one-seo-pack')), 'robots' => array('name' => __('Robots.txt', 'all-in-one-seo-pack'), 'description' => __('Generate and validate your robots.txt file to guide search engines through your site.', 'all-in-one-seo-pack')), 'file_editor' => array('name' => __('File Editor', 'all-in-one-seo-pack'), 'description' => __('Edit your robots.txt file and your .htaccess file to fine-tune your site.', 'all-in-one-seo-pack')), 'importer_exporter' => array('name' => __('Importer & Exporter', 'all-in-one-seo-pack'), 'description' => __('Exports and imports your All in One SEO Pack plugin settings.', 'all-in-one-seo-pack')), 'bad_robots' => array('name' => __('Bad Bot Blocker', 'all-in-one-seo-pack'), 'description' => __('Stop badly behaving bots from slowing down your website.', 'all-in-one-seo-pack')), 'performance' => array('name' => __('Performance', 'all-in-one-seo-pack'), 'description' => __('Optimize performance related to SEO and check your system status.', 'all-in-one-seo-pack'), 'default' => 'on'));
     if (AIOSEOPPRO) {
         $this->module_info['coming_soon'] = array('name' => __('Coming Soon...', 'all-in-one-seo-pack'), 'description' => __('Image SEO', 'all-in-one-seo-pack'), 'save' => false);
         $this->module_info['video_sitemap'] = array('name' => __('Video Sitemap', 'all-in-one-seo-pack'), 'description' => __('Create and manage your Video Sitemap using this feature and submit your Video Sitemap to Google, Bing/Yahoo and Ask.com.', 'all-in-one-seo-pack'));
     } else {
         $this->module_info['coming_soon'] = array('name' => __('Video Sitemap', 'all-in-one-seo-pack'), 'description' => __('Pro Version Only', 'all-in-one-seo-pack'), 'save' => false);
     }
     // Set up default settings fields.
     // Name			- Human-readable name of the setting.
     // Help_text	- Inline documentation for the setting.
     // Type			- Type of field; this defaults to checkbox; currently supported types are checkbox, text, select, multiselect.
     // Default		- Default value of the field.
     // Initial_options - Initial option list used for selects and multiselects.
     // Other supported options: class, id, style -- allows you to set these HTML attributes on the field.
     $this->default_options = array();
     $this->module_info = apply_filters('aioseop_module_info', $this->module_info);
     $mod[] = 'coming_soon';
     foreach ($mod as $m) {
         if ('performance' === $m && !is_super_admin()) {
             continue;
         }
         $this->default_options["enable_{$m}"] = array('name' => $this->module_info[$m]['name'], 'help_text' => $this->module_info[$m]['description'], 'type' => 'custom', 'class' => 'aioseop_feature', 'id' => "aioseop_{$m}", 'save' => true);
         if (!empty($this->module_info[$m]['image'])) {
             $this->default_options["enable_{$m}"]['image'] = $this->module_info[$m]['image'];
         }
         if (!empty($this->module_info[$m])) {
             foreach (array('save', 'default') as $option) {
                 if (isset($this->module_info[$m][$option])) {
                     $this->default_options["enable_{$m}"][$option] = $this->module_info[$m][$option];
                 }
             }
         }
     }
     $this->layout = array('default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/feature-manager/', 'options' => array_keys($this->default_options)));
     // Load initial options / set defaults.
     $this->update_options();
     if (is_admin()) {
         add_filter($this->prefix . 'output_option', array($this, 'display_option_div'), 10, 2);
         add_filter($this->prefix . 'submit_options', array($this, 'filter_submit'));
     }
 }
    function All_in_One_SEO_Pack()
    {
        global $aioseop_options;
        $this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log';
        if ($aioseop_options['aiosp_do_log']) {
            $this->do_log = true;
        } else {
            $this->do_log = false;
        }
        $this->init();
        global $aioseop_plugin_name;
        $aioseop_plugin_name = __('All in One SEO Pack', 'all_in_one_seo_pack');
        if (!defined('AIOSEOP_PLUGIN_NAME')) {
            define('AIOSEOP_PLUGIN_NAME', $aioseop_plugin_name);
        }
        $this->name = sprintf(__('%s Plugin Options', 'all_in_one_seo_pack'), AIOSEOP_PLUGIN_NAME);
        $this->menu_name = __('General Settings', 'all_in_one_seo_pack');
        $this->prefix = 'aiosp_';
        // option prefix
        $this->option_name = 'aioseop_options';
        $this->store_option = true;
        $this->file = __FILE__;
        // the current file
        parent::__construct();
        $this->default_options = array("donate" => array('name' => __('I enjoy this plugin and have made a donation:', 'all_in_one_seo_pack'), 'help_text' => __('All donations support continued development of this free software.', 'all_in_one_seo_pack'), 'default' => 0), "home_title" => array('name' => __('Home Title:', 'all_in_one_seo_pack'), 'help_text' => __('As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used.', 'all_in_one_seo_pack'), 'default' => null, 'type' => 'textarea', 'sanitize' => 'text'), "home_description" => array('name' => __('Home Description:', 'all_in_one_seo_pack'), 'help_text' => __('The META description for your homepage. Independent of any other options, the default is no META description at all if this is not set.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'textarea', 'sanitize' => 'text'), "togglekeywords" => array('name' => __('Use Keywords:', 'all_in_one_seo_pack'), 'help_text' => __('This option allows you to toggle the use of meta keywords throughout the whole of the site.', 'all_in_one_seo_pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array(0 => __('Enabled', 'all_in_one_seo_pack'), 1 => __('Disabled', 'all_in_one_seo_pack'))), "home_keywords" => array('name' => __('Home Keywords (comma separated):', 'all_in_one_seo_pack'), 'help_text' => __('A comma separated list of your most important keywords for your site that will be written as META keywords on your homepage. Don\'t stuff everything in here.', 'all_in_one_seo_pack'), 'default' => null, 'type' => 'textarea', 'sanitize' => 'text', 'condshow' => array("aiosp_togglekeywords" => 0)), "can" => array('name' => __('Canonical URLs:', 'all_in_one_seo_pack'), 'help_text' => __("This option will automatically generate Canonical URLS for your entire WordPress installation.  This will help to prevent duplicate content penalties by <a href='http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html' target='_blank'>Google</a>.", 'all_in_one_seo_pack'), 'default' => 1), "rewrite_titles" => array('name' => __('Rewrite Titles:', 'all_in_one_seo_pack'), 'help_text' => __("Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: ‚'Blog Archive >> Blog Name >> Post Title‚' (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to 'Post Title | Blog Name'. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string.", 'all_in_one_seo_pack'), 'default' => 1, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack'))), "force_rewrites" => array('name' => __('Force Rewrites:', 'all_in_one_seo_pack'), 'help_text' => __("Use output buffering to ensure that the title gets rewritten.", 'all_in_one_seo_pack'), 'default' => 1, 'type' => 'hidden', 'prefix' => $this->prefix, 'initial_options' => array(1 => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack'))), "use_original_title" => array('name' => __('Use Original Title:', 'all_in_one_seo_pack'), 'help_text' => __("Use wp_title to set the title; disable this option if you run into conflicts with the title being set by your theme or another plugin.", 'all_in_one_seo_pack'), 'type' => 'radio', 'default' => 0, 'initial_options' => array(1 => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack'))), "cap_titles" => array('name' => __('Capitalize Titles:', 'all_in_one_seo_pack'), 'help_text' => __("Check this and Search Page Titles and Tag Page Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack'), 'default' => 1), "cap_cats" => array('name' => __('Capitalize Category Titles:', 'all_in_one_seo_pack'), 'help_text' => __("Check this and Category Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack'), 'default' => 1), "page_title_format" => array('name' => __('Page Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%page_title% - The original title of the page', 'all_in_one_seo_pack') . '</li><li>' . __('%category_title% - The (main) category of the page', 'all_in_one_seo_pack') . '</li><li>' . __('%category% - Alias for %category_title%', 'all_in_one_seo_pack') . '</li><li>' . __("%page_author_login% - This page's author' login", 'all_in_one_seo_pack') . '</li><li>' . __("%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack') . '</li><li>' . __("%page_author_firstname% - This page's author' first name (capitalized)", 'all_in_one_seo_pack') . '</li><li>' . __("%page_author_lastname% - This page's author' last name (capitalized)", 'all_in_one_seo_pack') . '</li>' . '</ul>', 'type' => 'text', 'default' => '%page_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "post_title_format" => array('name' => __('Post Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%post_title% - The original title of the post', 'all_in_one_seo_pack') . '</li><li>' . __('%category_title% - The (main) category of the post', 'all_in_one_seo_pack') . '</li><li>' . __('%category% - Alias for %category_title%', 'all_in_one_seo_pack') . '</li><li>' . __("%post_author_login% - This post's author' login", 'all_in_one_seo_pack') . '</li><li>' . __("%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack') . '</li><li>' . __("%post_author_firstname% - This post's author' first name (capitalized)", 'all_in_one_seo_pack') . '</li><li>' . __("%post_author_lastname% - This post's author' last name (capitalized)", 'all_in_one_seo_pack') . '</li>' . '</ul>', 'type' => 'text', 'default' => '%post_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "category_title_format" => array('name' => __('Category Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%category_title% - The original title of the category', 'all_in_one_seo_pack') . '</li><li>' . __('%category_description% - The description of the category', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%category_title% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "archive_title_format" => array('name' => __('Date Archive Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack') . '</li><li>' . __('%day% - The original archive day given by wordpress, e.g. "17"', 'all_in_one_seo_pack') . '</li><li>' . __('%month% - The original archive month given by wordpress, e.g. "August"', 'all_in_one_seo_pack') . '</li><li>' . __('%year% - The original archive year given by wordpress, e.g. "2007"', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%date% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "author_title_format" => array('name' => __('Author Archive Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%author% - The original archive title given by wordpress, e.g. "Steve" or "John Smith"', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%author% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "tag_title_format" => array('name' => __('Tag Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%tag% - The name of the tag', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%tag% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "search_title_format" => array('name' => __('Search Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%search% - What was searched for', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%search% | %blog_title%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "description_format" => array('name' => __('Description Format', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all_in_one_seo_pack') . '</li><li>' . __('%wp_title% - The original wordpress title, e.g. post_title for posts', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => '%description%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "404_title_format" => array('name' => __('404 Title Format:', 'all_in_one_seo_pack'), 'help_text' => __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%blog_title% - Your blog title', 'all_in_one_seo_pack') . '</li><li>' . __('%blog_description% - Your blog description', 'all_in_one_seo_pack') . '</li><li>' . __('%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all_in_one_seo_pack') . '</li><li>' . __('%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all_in_one_seo_pack') . '</li><li>' . __('%404_title% - Additional 404 title input"', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => 'Nothing found for %request_words%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "paged_format" => array('name' => __('Paged Format:', 'all_in_one_seo_pack'), 'help_text' => __('This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages).', 'all_in_one_seo_pack') . __('The following macros are supported:', 'all_in_one_seo_pack') . '<ul><li>' . __('%page% - The page number', 'all_in_one_seo_pack') . '</li></ul>', 'type' => 'text', 'default' => ' - Part %page%', 'condshow' => array("aiosp_rewrite_titles" => 1)), "enablecpost" => array('name' => __('SEO for Custom Post Types:', 'all_in_one_seo_pack'), 'help_text' => __('Check this if you want your enable AIOSEOP support for Custom Post Types on this site.', 'all_in_one_seo_pack'), 'default' => 'on', 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack'))), "cpostadvanced" => array('name' => __('Enable Advanced Options:', 'all_in_one_seo_pack'), 'help_text' => __('This allows you to do more with your custom post types.', 'all_in_one_seo_pack'), 'default' => 0, 'type' => 'radio', 'initial_options' => array('on' => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack')), 'label' => null, 'condshow' => array("aiosp_enablecpost" => 'on')), "cpostactive" => array('name' => __('SEO on only these post types:', 'all_in_one_seo_pack'), 'help_text' => __('Select specific custom post types for AIOSEOP support.', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => array('post', 'page'), 'condshow' => array('aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "cpostnoindex" => array('name' => __('Default to NOINDEX:', 'all_in_one_seo_pack'), 'help_text' => __('Select noindex robots meta on specific custom post types by default.', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => array(), 'condshow' => array('aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "cpostnofollow" => array('name' => __('Default to NOFOLLOW:', 'all_in_one_seo_pack'), 'help_text' => __('Select nofollow robots meta on specific custom post types by default.', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => array(), 'condshow' => array('aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "cposttitles" => array('name' => __('Custom titles:', 'all_in_one_seo_pack'), 'help_text' => __('Allows setting specific custom titles for all post types.', 'all_in_one_seo_pack'), 'type' => 'checkbox', 'default' => 0, 'condshow' => array('aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on')), "posttypecolumns" => array('name' => __('Show Column Labels for Custom Post Types:', 'all_in_one_seo_pack'), 'help_text' => __('Choose which post types you want to have SEO columns on the edit.php screen. You can select as many as you like.', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'default' => array('post', 'page')), "admin_bar" => array('name' => __('Display Menu In Admin Bar:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for easy access to settings from the admin menu bar.', 'all_in_one_seo_pack'), 'default' => 'on'), "custom_menu_order" => array('name' => __('Display Menu At The Top:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for easy access to settings from the top of your WordPress Dashboard.', 'all_in_one_seo_pack'), 'default' => 'on'), "google_verify" => array('name' => __('Google Webmaster Tools:', 'all_in_one_seo_pack'), 'help_text' => __('Enter your verification code here to add a meta tag to your homepage to verify your site.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text'), "bing_verify" => array('name' => __('Bing Webmaster Center:', 'all_in_one_seo_pack'), 'help_text' => __('Enter your verification code here to add a meta tag to your homepage to verify your site.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text'), "pinterest_verify" => array('name' => __('Pinterest Site Verification:', 'all_in_one_seo_pack'), 'help_text' => __('Enter your verification code here to add a meta tag to your homepage to verify your site.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text'), "google_publisher" => array('name' => __('Google Plus Default Profile:', 'all_in_one_seo_pack'), 'help_text' => __('Enter your Google Plus Profile URL here to link your site\'s pages to Google Plus.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text'), "google_disable_profile" => array('name' => __('Disable Google Plus Profile:', 'all_in_one_seo_pack'), 'help_text' => __('Check this option to remove the Google Plus Profile field on user profile pages.', 'all_in_one_seo_pack'), 'default' => 0, 'type' => 'checkbox'), "google_analytics_id" => array('name' => __('Google Analytics ID:', 'all_in_one_seo_pack'), 'help_text' => __('Enter your Google Analytics ID here to track your site with Google Analytics.', 'all_in_one_seo_pack'), 'default' => null, 'type' => 'text'), "ga_domain" => array('name' => __('Tracking Domain:', 'all_in_one_seo_pack'), 'type' => 'text', 'help_text' => __('Enter domain name for tracking with Google Analytics.', 'all_in_one_seo_pack'), 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''))), "ga_multi_domain" => array('name' => __('Track Multiple Domains:', 'all_in_one_seo_pack'), 'help_text' => __('Enable multi-domain tracking for Google Analytics.', 'all_in_one_seo_pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''))), "ga_track_outbound_links" => array('name' => __('Track Outbound Links:', 'all_in_one_seo_pack'), 'help_text' => __('Add functionality to track outbound links with Google Analytics.', 'all_in_one_seo_pack'), 'default' => 0, 'condshow' => array('aiosp_google_analytics_id' => array('lhs' => 'aiosp_google_analytics_id', 'op' => '!=', 'rhs' => ''))), "use_categories" => array('name' => __('Use Categories for META keywords:', 'all_in_one_seo_pack'), 'help_text' => __('Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page).', 'all_in_one_seo_pack'), 'default' => 0, 'condshow' => array("aiosp_togglekeywords" => 0)), "use_tags_as_keywords" => array('name' => __('Use Tags for META keywords:', 'all_in_one_seo_pack'), 'help_text' => __('Check this if you want your tags for a given post used as the META keywords for this post (in addition to any keywords you specify on the post edit page).', 'all_in_one_seo_pack'), 'default' => 1, 'condshow' => array("aiosp_togglekeywords" => 0)), "dynamic_postspage_keywords" => array('name' => __('Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack'), 'help_text' => __('Check this if you want your keywords on a custom posts page (set it in options->reading) to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.', 'all_in_one_seo_pack'), 'default' => 1, 'condshow' => array("aiosp_togglekeywords" => 0)), "category_noindex" => array('name' => __('Use noindex for Categories:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack'), 'default' => 1), "archive_date_noindex" => array('name' => __('Use noindex for Date Archives:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for excluding Date Archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack'), 'default' => 1), "archive_author_noindex" => array('name' => __('Use noindex for Author Archives:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for excluding Author Archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack'), 'default' => 1), "tags_noindex" => array('name' => __('Use noindex for Tag Archives:', 'all_in_one_seo_pack'), 'help_text' => __('Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack'), 'default' => 0), "generate_descriptions" => array('name' => __('Autogenerate Descriptions:', 'all_in_one_seo_pack'), 'help_text' => __("Check this and your META descriptions will get autogenerated if there's no excerpt.", 'all_in_one_seo_pack'), 'default' => 1), "hide_paginated_descriptions" => array('name' => __('Remove Descriptions For Paginated Pages:', 'all_in_one_seo_pack'), 'help_text' => __("Check this and your META descriptions will get hidden if on Page 2 or later of paginated content.", 'all_in_one_seo_pack'), 'default' => 0), "unprotect_meta" => array('name' => __('Unprotect Post Meta Fields:', 'all_in_one_seo_pack'), 'help_text' => __("Unprotect internal postmeta fields for use with XMLRPC -- if you don't know what that is, leave it unchecked.", 'all_in_one_seo_pack'), 'default' => 0), "ex_pages" => array('name' => __('Exclude Pages:', 'all_in_one_seo_pack'), 'help_text' => __("Enter any comma separated pages here to be excluded by All in One SEO Pack.  This is helpful when using plugins which generate their own non-WordPress dynamic pages.  Ex: <em>/forum/,/contact/</em>  For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is give forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage will be excluded from All in One SEO Pack.", 'all_in_one_seo_pack'), 'type' => 'textarea', 'default' => ''), "post_meta_tags" => array('name' => __('Additional Post Headers:', 'all_in_one_seo_pack'), 'help_text' => __('What you enter here will be copied verbatim to your header on posts.', 'all_in_one_seo_pack') . ' ' . __('You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "page_meta_tags" => array('name' => __('Additional Page Headers:', 'all_in_one_seo_pack'), 'help_text' => __('What you enter here will be copied verbatim to your header on pages.', 'all_in_one_seo_pack') . ' ' . __('You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "front_meta_tags" => array('name' => __('Additional Front Page Headers:', 'all_in_one_seo_pack'), 'help_text' => __('What you enter here will be copied verbatim to your header on the front page if you have a static page set in Settings, Reading.', 'all_in_one_seo_pack') . ' ' . __('You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack') . ' ' . __('This will fall back to using Additional Page Headers if you have them set and nothing is entered here.', 'all_in_one_seo_pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "home_meta_tags" => array('name' => __('Additional Blog Page Headers:', 'all_in_one_seo_pack'), 'help_text' => __('What you enter here will be copied verbatim to your header on the home page if you have Front page displays your latest posts selected in Settings, Reading.  It will also be copied verbatim to your header on the Posts page if you have one set in Settings, Reading.', 'all_in_one_seo_pack') . ' ' . __('You can enter whatever additional headers you want here, even references to stylesheets.', 'all_in_one_seo_pack'), 'type' => 'textarea', 'default' => '', 'sanitize' => 'default'), "do_log" => array('name' => __('Log important events:', 'all_in_one_seo_pack'), 'help_text' => __('Check this and SEO pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable.', 'all_in_one_seo_pack'), 'default' => null));
        $this->locations = array('default' => array('name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => null), 'aiosp' => array('name' => $this->plugin_name, 'type' => 'metabox', 'prefix' => '', 'options' => array('edit', 'nonce-aioseop-edit', 'upgrade', 'snippet', 'title', 'description', 'keywords', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel', 'sitemap_exclude', 'disable', 'disable_analytics'), 'default_options' => array('edit' => array('type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1), 'nonce-aioseop-edit' => array('type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1), 'upgrade' => array('type' => 'html', 'label' => 'none', 'default' => '<a target="__blank" href="http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/">' . __('Upgrade to All in One SEO Pack Pro Version', 'all_in_one_seo_pack') . '</a>'), 'snippet' => array('name' => __('Preview Snippet', 'all_in_one_seo_pack'), 'type' => 'custom', 'help_text' => __('A preview of what this page might look like in search engine results.', 'all_in_one_seo_pack'), 'label' => 'top', 'default' => '
																									<script>
																									jQuery(document).ready(function() {
																										jQuery("#aiosp_title_wrapper").bind("input", function() {
																										    jQuery("#aioseop_snippet_title").text(jQuery("#aiosp_title_wrapper input").val());
																										});
																										jQuery("#aiosp_description_wrapper").bind("input", function() {
																										    jQuery("#aioseop_snippet_description").text(jQuery("#aiosp_description_wrapper textarea").val());
																										});
																									});
																									</script>
																									<div class="preview_snippet"><div id="aioseop_snippet"><h3><a id="aioseop_snippet_title">%s</a></h3><div><div><cite id="aioseop_snippet_link">%s</cite></div><span id="aioseop_snippet_description">%s</span></div></div></div>'), 'title' => array('name' => __('Title', 'all_in_one_seo_pack'), 'type' => 'text', 'help_text' => __('A custom title that shows up in the title tag for this page.', 'all_in_one_seo_pack'), 'count' => true, 'size' => 60), 'description' => array('name' => __('Description', 'all_in_one_seo_pack'), 'type' => 'textarea', 'help_text' => __('The META description for this page. This will override any autogenerated descriptions.', 'all_in_one_seo_pack'), 'count' => true, 'cols' => 80, 'rows' => 2), 'keywords' => array('name' => __('Keywords (comma separated)', 'all_in_one_seo_pack'), 'type' => 'text', 'help_text' => __('A comma separated list of your most important keywords for this page that will be written as META keywords.', 'all_in_one_seo_pack')), 'noindex' => array('name' => __("Robots Meta NOINDEX", 'all_in_one_seo_pack'), 'default' => '', 'help_text' => __('Check this box to ask search engines not to index this page.', 'all_in_one_seo_pack')), 'nofollow' => array('name' => __("Robots Meta NOFOLLOW", 'all_in_one_seo_pack'), 'default' => '', 'help_text' => __('Check this box to ask search engines not to follow links from this page.', 'all_in_one_seo_pack')), 'noodp' => array('name' => __("Robots Meta NOODP", 'all_in_one_seo_pack'), 'help_text' => __('Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all_in_one_seo_pack')), 'noydir' => array('name' => __("Robots Meta NOYDIR", 'all_in_one_seo_pack'), 'help_text' => __('Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page.', 'all_in_one_seo_pack')), 'titleatr' => array('name' => __('Title Attribute', 'all_in_one_seo_pack'), 'type' => 'text', 'help_text' => __('Set the title attribute for menu links.', 'all_in_one_seo_pack'), 'size' => 60), 'menulabel' => array('name' => __('Menu Label', 'all_in_one_seo_pack'), 'type' => 'text', 'help_text' => __('Set the label for this page menu item.', 'all_in_one_seo_pack'), 'size' => 60), 'sitemap_exclude' => array('name' => __('Exclude From Sitemap', 'all_in_one_seo_pack'), 'help_text' => __("Don't display this page in the sitemap.", 'all_in_one_seo_pack')), 'disable' => array('name' => __('Disable on this page/post', 'all_in_one_seo_pack'), 'help_text' => __('Disable SEO on this page.', 'all_in_one_seo_pack')), 'disable_analytics' => array('name' => __('Disable Google Analytics', 'all_in_one_seo_pack'), 'help_text' => __('Disable Google Analytics on this page.', 'all_in_one_seo_pack'), 'condshow' => array('aiosp_disable' => 'on'))), 'display' => null));
        $this->layout = array('default' => array('name' => __('General Settings', 'all_in_one_seo_pack'), 'options' => array()), 'home' => array('name' => __('Home Page Settings', 'all_in_one_seo_pack'), 'options' => array('home_title', 'home_description', 'home_keywords')), 'keywords' => array('name' => __('Keyword Settings', 'all_in_one_seo_pack'), 'options' => array("togglekeywords", "use_categories", "use_tags_as_keywords", "dynamic_postspage_keywords")), 'title' => array('name' => __('Title Settings', 'all_in_one_seo_pack'), 'options' => array("rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "author_title_format", "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format")), 'cpt' => array('name' => __('Custom Post Type Settings', 'all_in_one_seo_pack'), 'options' => array("enablecpost", "cpostadvanced", "cpostactive", "cposttitles")), 'display' => array('name' => __('Display Settings', 'all_in_one_seo_pack'), 'options' => array("posttypecolumns", "admin_bar", "custom_menu_order")), 'webmaster' => array('name' => __('Webmaster Verification', 'all_in_one_seo_pack'), 'options' => array("google_verify", "bing_verify", "pinterest_verify")), 'google' => array('name' => __('Google Settings', 'all_in_one_seo_pack'), 'options' => array("google_publisher", "google_disable_profile", "google_analytics_id", "ga_domain", "ga_multi_domain", "ga_track_outbound_links")), 'noindex' => array('name' => __('Noindex Settings', 'all_in_one_seo_pack'), 'options' => array('cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex')), 'advanced' => array('name' => __('Advanced Settings', 'all_in_one_seo_pack'), 'options' => array('generate_descriptions', 'hide_paginated_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags')));
        $other_options = array();
        foreach ($this->layout as $k => $v) {
            $other_options = array_merge($other_options, $v['options']);
        }
        $this->layout['default']['options'] = array_diff(array_keys($this->default_options), $other_options);
        if (is_admin()) {
            add_action("aioseop_global_settings_header", array($this, 'display_right_sidebar'));
            add_action("aioseop_global_settings_footer", array($this, 'display_settings_footer'));
            add_action("output_option", array($this, 'custom_output_option'), 10, 2);
        }
    }
 /**
  * All_in_One_SEO_Pack_Bad_Robots constructor.
  */
 function __construct()
 {
     $this->name = __('Bad Bot Blocker', 'all-in-one-seo-pack');
     // Human-readable name of the plugin.
     $this->prefix = 'aiosp_bad_robots_';
     // Option prefix.
     $this->file = __FILE__;
     // The current file.
     parent::__construct();
     $help_text = array('block_bots' => __('Block requests from user agents that are known to misbehave with 503.', 'all-in-one-seo-pack'), 'block_refer' => __('Block Referral Spam using HTTP.', 'all-in-one-seo-pack'), 'track_blocks' => __('Log and show recent requests from blocked bots.', 'all-in-one-seo-pack'), 'htaccess_rules' => __('Block bad robots via Apache .htaccess rules. Warning: this will change your web server configuration, make sure you are able to edit this file manually as well.', 'all-in-one-seo-pack'), 'edit_blocks' => __('Check this to edit the list of disallowed user agents for blocking bad bots.', 'all-in-one-seo-pack'), 'blocklist' => __('This is the list of disallowed user agents used for blocking bad bots.', 'all-in-one-seo-pack'), 'referlist' => __('This is the list of disallowed referers used for blocking bad bots.', 'all-in-one-seo-pack'), 'blocked_log' => __('Shows log of most recent requests from blocked bots. Note: this will not track any bots that were already blocked at the web server / .htaccess level.', 'all-in-one-seo-pack'));
     $this->default_options = array('block_bots' => array('name' => __('Block Bad Bots using HTTP', 'all-in-one-seo-pack')), 'block_refer' => array('name' => __('Block Referral Spam using HTTP', 'all-in-one-seo-pack')), 'track_blocks' => array('name' => __('Track Blocked Bots', 'all-in-one-seo-pack')), 'htaccess_rules' => array('name' => __('Block Bad Bots using .htaccess', 'all-in-one-seo-pack')), 'edit_blocks' => array('name' => __('Use Custom Blocklists', 'all-in-one-seo-pack')), 'blocklist' => array('name' => __('User Agent Blocklist', 'all-in-one-seo-pack'), 'type' => 'textarea', 'rows' => 5, 'cols' => 120, 'condshow' => array("{$this->prefix}edit_blocks" => 'on'), 'default' => join("\n", $this->default_bad_bots())), 'referlist' => array('name' => __('Referer Blocklist', 'all-in-one-seo-pack'), 'type' => 'textarea', 'rows' => 5, 'cols' => 120, 'condshow' => array("{$this->prefix}edit_blocks" => 'on', "{$this->prefix}block_refer" => 'on'), 'default' => join("\n", $this->default_bad_referers())), 'blocked_log' => array('name' => __('Log Of Blocked Bots', 'all-in-one-seo-pack'), 'default' => __('No requests yet.', 'all-in-one-seo-pack'), 'type' => 'esc_html', 'disabled' => 'disabled', 'save' => false, 'label' => 'top', 'rows' => 5, 'cols' => 120, 'style' => 'min-width:950px', 'condshow' => array("{$this->prefix}track_blocks" => 'on')));
     $is_apache = false;
     if (!empty($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
         $is_apache = true;
         add_action($this->prefix . 'settings_update', array($this, 'generate_htaccess_blocklist'), 10);
     } else {
         unset($this->default_options['htaccess_rules']);
         unset($help_text['htaccess_rules']);
     }
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     add_filter($this->prefix . 'display_options', array($this, 'filter_display_options'));
     // Load initial options / set defaults,
     $this->update_options();
     if ($this->option_isset('edit_blocks')) {
         add_filter($this->prefix . 'badbotlist', array($this, 'filter_bad_botlist'));
         if ($this->option_isset('block_refer')) {
             add_filter($this->prefix . 'badreferlist', array($this, 'filter_bad_referlist'));
         }
     }
     if ($this->option_isset('block_bots')) {
         if (!$this->allow_bot()) {
             status_header(503);
             $ip = $this->validate_ip($_SERVER['REMOTE_ADDR']);
             $user_agent = $_SERVER['HTTP_USER_AGENT'];
             $this->blocked_message(sprintf(__('Blocked bot with IP %s -- matched user agent %s found in blocklist.', 'all-in-one-seo-pack'), $ip, $user_agent));
             exit;
         } elseif ($this->option_isset('block_refer') && $this->is_bad_referer()) {
             status_header(503);
             $ip = $this->validate_ip($_SERVER['REMOTE_ADDR']);
             $referer = $_SERVER['HTTP_REFERER'];
             $this->blocked_message(sprintf(__('Blocked bot with IP %s -- matched referer %s found in blocklist.', 'all-in-one-seo-pack'), $ip, $referer));
         }
     }
 }
 function All_in_One_SEO_Pack_Feature_Manager($mod)
 {
     $this->name = __('Feature Manager', 'all_in_one_seo_pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_feature_manager_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     parent::__construct();
     $this->module_info = array('sitemap' => array('name' => __('XML Sitemaps', 'all_in_one_seo_pack'), 'description' => __('Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com.', 'all_in_one_seo_pack')), 'performance' => array('name' => __('Performance', 'all_in_one_seo_pack'), 'description' => __('Optimize performance related to SEO and check your system status.', 'all_in_one_seo_pack'), 'default' => 'on'), 'coming_soon' => array('name' => __('Coming Soon...', 'all_in_one_seo_pack'), 'description' => __('Social Meta', 'all_in_one_seo_pack'), 'save' => false));
     // Set up default settings fields
     // name			- Human-readable name of the setting
     // help_text	- Inline documentation for the setting
     // type			- Type of field; this defaults to checkbox; currently supported types are checkbox, text, select, multiselect
     // default		- Default value of the field
     // initial_options - Initial option list used for selects and multiselects
     // Other supported options: class, id, style -- allows you to set these HTML attributes on the field
     $this->default_options = array();
     $this->module_info = apply_filters('aioseop_module_info', $this->module_info);
     $mod[] = 'coming_soon';
     foreach ($mod as $m) {
         if ($m == 'performance' && !is_super_admin()) {
             continue;
         }
         $module_name = ucwords(strtr($m, '_', ' '));
         $this->default_options["enable_{$m}"] = array('name' => $this->module_info[$m]['name'], 'help_text' => $this->module_info[$m]['description'], 'type' => 'custom', 'class' => 'aioseop_feature', 'id' => "aioseop_{$m}", 'save' => true);
         if (!empty($this->module_info[$m]['image'])) {
             $this->default_options["enable_{$m}"]['image'] = $this->module_info[$m]['image'];
         }
         if (!empty($this->module_info[$m])) {
             foreach (array('save', 'default') as $option) {
                 if (isset($this->module_info[$m][$option])) {
                     $this->default_options["enable_{$m}"][$option] = $this->module_info[$m][$option];
                 }
             }
         }
     }
     $this->layout = array('default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/feature-manager/', 'options' => array_keys($this->default_options)));
     // load initial options / set defaults
     $this->update_options();
     add_filter($this->prefix . 'output_option', array($this, 'display_option_div'), 10, 2);
     add_filter($this->prefix . 'submit_options', array($this, 'filter_submit'));
 }
Exemplo n.º 12
0
 function All_in_One_SEO_Pack_Importer_Exporter()
 {
     $this->name = __('Importer & Exporter', 'all_in_one_seo_pack');
     // Human-readable name of the module
     $this->prefix = 'aiosp_importer_exporter_';
     // option prefix
     $this->file = __FILE__;
     parent::__construct();
     $help_text = array("import_submit" => __("Select a valid All in One SEO Pack Pro ini file and click 'Import' to import options from a previous state or install of All in One SEO Pack Pro.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "export_choices" => __("You may choose to export settings from active modules, and content from post data.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "export_post_types" => __("Select which Post Types you want to export your All in One SEO Pack Pro meta data for.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'));
     $this->warnings = array();
     $this->default_options = array('import_submit' => array('name' => __('Import', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'file', 'save' => false), 'export_choices' => array('name' => __('Export Settings', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'initial_options' => array(1 => 'General Settings', 2 => 'Post Data')), 'export_post_types' => array('name' => __('Export Post Types:', 'all_in_one_seo_pack'), 'default' => array('post' => 'post', 'page' => 'page'), 'type' => 'multicheckbox', 'initial_options' => $this->get_post_type_titles(array('_builtin' => false))), 'import_export_help' => array('type' => 'html', 'label' => 'none', 'default' => __("Note: If General Settings is checked, the General Settings, the Feature Manager settings, and the following currently active modules will have their settings data exported:", 'all_in_one_seo_pack') . "<br />"));
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     $this->layout = array('default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/importer-exporter-module/', 'options' => array_keys($this->default_options)));
     // load initial options / set defaults
     add_action('admin_init', array($this, 'debug_post_types'), 5);
 }
 function All_in_One_SEO_Pack_Performance($mod)
 {
     $this->name = __('Performance', 'all_in_one_seo_pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_performance_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     parent::__construct();
     $this->default_options = array('memory_limit' => array('name' => __('Raise memory limit', 'all_in_one_seo_pack'), 'help_text' => __('Allows you to raise your PHP memory limit to a reasonable value. Note: WordPress core and other WordPress plugins may also change the value of the memory limit.', 'all_in_one_seo_pack'), 'default' => '256M', 'type' => 'select', 'initial_options' => array(0 => __("Use the system default", 'all_in_one_seo_pack'), '32M' => '32MB', '64M' => '64MB', '128M' => '128MB', '256M' => '256MB')), 'execution_time' => array('name' => __('Raise execution time', 'all_in_one_seo_pack'), 'help_text' => __('Allows you to raise your PHP execution time to a reasonable value.', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'select', 'initial_options' => array('' => __("Use the system default", 'all_in_one_seo_pack'), 30 => '30s', 60 => '1m', 120 => '2m', 300 => '5m', 0 => __('No limit', 'all_in_one_seo_pack'))));
     global $aiosp, $aioseop_options;
     if (aioseop_option_isset('aiosp_rewrite_titles') && $aioseop_options['aiosp_rewrite_titles']) {
         $this->default_options['force_rewrites'] = array('name' => __('Force Rewrites:', 'all_in_one_seo_pack'), 'help_text' => __("Use output buffering to ensure that the title gets rewritten.", 'all_in_one_seo_pack'), 'default' => 1, 'type' => 'radio', 'initial_options' => array(1 => __('Enabled', 'all_in_one_seo_pack'), 0 => __('Disabled', 'all_in_one_seo_pack')));
     }
     $this->layout = array('default' => array('name' => $this->name, 'options' => array_keys($this->default_options)));
     $system_status = array('status' => array('default' => '', 'type' => 'html', 'label' => 'none', 'save' => false));
     $this->layout['system_status'] = array('name' => __('System Status', 'all_in_one_seo_pack'), 'options' => array_keys($system_status));
     $this->default_options = array_merge($this->default_options, $system_status);
     add_filter($this->prefix . 'display_options', array($this, 'display_options_filter'), 10, 2);
     add_filter($this->prefix . 'update_options', array($this, 'update_options_filter'), 10, 2);
     add_action($this->prefix . 'settings_update', array($this, 'settings_update_action'), 10, 2);
 }
Exemplo n.º 14
0
 function All_in_One_SEO_Pack_Opengraph()
 {
     $this->name = __('Social Meta', 'all_in_one_seo_pack');
     // Human-readable name of the plugin
     $this->prefix = 'aiosp_opengraph_';
     // option prefix
     $this->file = __FILE__;
     // the current file
     $this->fb_object_types = array('Activities' => array('activity' => __('Activity', 'all_in_one_seo_pack'), 'sport' => __('Sport', 'all_in_one_seo_pack')), 'Businesses' => array('bar' => __('Bar', 'all_in_one_seo_pack'), 'company' => __('Company', 'all_in_one_seo_pack'), 'cafe' => __('Cafe', 'all_in_one_seo_pack'), 'hotel' => __('Hotel', 'all_in_one_seo_pack'), 'restaurant' => __('Restaurant', 'all_in_one_seo_pack')), 'Groups' => array('cause' => __('Cause', 'all_in_one_seo_pack'), 'sports_league' => __('Sports League', 'all_in_one_seo_pack'), 'sports_team' => __('Sports Team', 'all_in_one_seo_pack')), 'Organizations' => array('band' => __('Band', 'all_in_one_seo_pack'), 'government' => __('Government', 'all_in_one_seo_pack'), 'non_profit' => __('Non Profit', 'all_in_one_seo_pack'), 'school' => __('School', 'all_in_one_seo_pack'), 'university' => __('University', 'all_in_one_seo_pack')), 'People' => array('actor' => __('Actor', 'all_in_one_seo_pack'), 'athlete' => __('Athlete', 'all_in_one_seo_pack'), 'author' => __('Author', 'all_in_one_seo_pack'), 'director' => __('Director', 'all_in_one_seo_pack'), 'musician' => __('Musician', 'all_in_one_seo_pack'), 'politician' => __('Politician', 'all_in_one_seo_pack'), 'profile' => __('Profile', 'all_in_one_seo_pack'), 'public_figure' => __('Public Figure', 'all_in_one_seo_pack')), 'Places' => array('city' => __('City', 'all_in_one_seo_pack'), 'country' => __('Country', 'all_in_one_seo_pack'), 'landmark' => __('Landmark', 'all_in_one_seo_pack'), 'state_province' => __('State Province', 'all_in_one_seo_pack')), 'Products and Entertainment' => array('album' => __('Album', 'all_in_one_seo_pack'), 'book' => __('Book', 'all_in_one_seo_pack'), 'drink' => __('Drink', 'all_in_one_seo_pack'), 'food' => __('Food', 'all_in_one_seo_pack'), 'game' => __('Game', 'all_in_one_seo_pack'), 'movie' => __('Movie', 'all_in_one_seo_pack'), 'product' => __('Product', 'all_in_one_seo_pack'), 'song' => __('Song', 'all_in_one_seo_pack'), 'tv_show' => __('TV Show', 'all_in_one_seo_pack')), 'Websites' => array('article' => __('Article', 'all_in_one_seo_pack'), 'blog' => __('Blog', 'all_in_one_seo_pack'), 'website' => __('Website', 'all_in_one_seo_pack')));
     parent::__construct();
     $categories = array('blog' => 'blog', 'website' => 'website');
     $help_text = array("setmeta" => __("Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "key" => __("Your Profile Admin ID is your Facebook profile ID. You can find out your Facebook ID using the lookup tool here: https://graph.facebook.com/yourusername<br />NOTE: Replace 'yourusername' with your Facebook profile name.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "sitename" => __("The Site Name is the name that is used to identify your website.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "hometitle" => __("The Home Title is the Open Graph title for your home page.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "description" => __("The Home Description is the Open Graph description for your home page.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "generate_descriptions" => __("Check this and your Open Graph descriptions will be auto-generated from your excerpt or content.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "disable_jetpack" => __("Check this box to disable the Open Graph meta output by the Jetpack plugin.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "defimg" => __("This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "dimg" => __("This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "meta_key" => __("Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "categories" => __("Set the Open Graph type for your website as either a blog or a website.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "image" => __("This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "customimg" => __("This option lets you upload an image to use as the Open Graph image for this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "imagewidth" => __("Enter the width for your Open Graph image in pixels (i.e. 600).<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "imageheight" => __("Enter the height for your Open Graph image in pixels (i.e. 600).<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "types" => __("Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "title" => __("This is the Open Graph title of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "desc" => __("This is the Open Graph description of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'), "category" => __("Select the Open Graph type that best describes the content of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack'));
     $count_desc = __(" characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all_in_one_seo_pack');
     $this->default_options = array('scan_header' => array('name' => __('Scan Header', 'all_in_one_seo_pack'), 'type' => 'custom', 'save' => true), 'setmeta' => array('name' => __('Use AIOSEO Title and Description', 'all_in_one_seo_pack'), 'type' => 'checkbox'), 'key' => array('name' => __('Profile Admins ID', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text'), 'sitename' => array('name' => __('Site Name', 'all_in_one_seo_pack'), 'default' => get_bloginfo('name'), 'type' => 'text'), 'hometitle' => array('name' => __('Home Title', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'textarea', 'condshow' => array('aiosp_opengraph_setmeta' => array('lhs' => "aiosp_opengraph_setmeta", 'op' => '!=', 'rhs' => 'on'))), 'description' => array('name' => __('Home Description', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'textarea', 'condshow' => array('aiosp_opengraph_setmeta' => array('lhs' => "aiosp_opengraph_setmeta", 'op' => '!=', 'rhs' => 'on'))), 'generate_descriptions' => array('name' => __('Autogenerate OG Descriptions', 'all_in_one_seo_pack'), 'default' => 1), 'disable_jetpack' => array('name' => __('Disable Jetpack Tags', 'all_in_one_seo_pack'), 'default' => 0), 'defimg' => array('name' => __('Select OG:Image Source', 'all_in_one_seo_pack'), 'type' => 'select', 'initial_options' => array('' => __('Default Image'), 'featured' => __('Featured Image'), 'attach' => __('First Attached Image'), 'content' => __('First Image In Content'), 'custom' => __('Image From Custom Field'), 'auto' => __('First Available Image'))), 'dimg' => array('name' => __('Default OG:Image', 'all_in_one_seo_pack'), 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png', 'type' => 'image'), 'meta_key' => array('name' => __('Use Custom Field For Image', 'all_in_one_seo_pack'), 'type' => 'text', 'default' => ''), 'categories' => array('name' => __('Facebook Object Type', 'all_in_one_seo_pack'), 'type' => 'radio', 'initial_options' => $categories, 'default' => 'blog'), 'image' => array('name' => __('Image', 'all_in_one_seo_pack'), 'type' => 'radio', 'initial_options' => array(0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">')), 'customimg' => array('name' => __('Custom Image', 'all_in_one_seo_pack'), 'type' => 'image'), 'imagewidth' => array('name' => __('Specify Image Width', 'all_in_one_seo_pack'), 'type' => 'text', 'default' => ''), 'imageheight' => array('name' => __('Specify Image Height', 'all_in_one_seo_pack'), 'type' => 'text', 'default' => ''), 'types' => array('name' => __('Enable Facebook Meta for', 'all_in_one_seo_pack'), 'type' => 'multicheckbox', 'initial_options' => $this->get_post_type_titles(array('_builtin' => false)), 'default' => array('post' => 'post', 'page' => 'page')), 'title' => array('name' => __('Title', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'text', 'size' => 95, 'count' => 1, 'count_desc' => $count_desc), 'desc' => array('name' => __('Description', 'all_in_one_seo_pack'), 'default' => '', 'type' => 'textarea', 'cols' => 250, 'rows' => 4, 'count' => 1, 'count_desc' => $count_desc), 'category' => array('name' => __('Facebook Object Type', 'all_in_one_seo_pack'), 'type' => 'select', 'style' => '', 'initial_options' => $this->fb_object_types, 'default' => ''));
     if (!empty($help_text)) {
         foreach ($help_text as $k => $v) {
             $this->default_options[$k]['help_text'] = $v;
         }
     }
     // load initial options / set defaults
     $this->update_options();
     $display = array();
     if (isset($this->options['aiosp_opengraph_types'])) {
         $display = $this->options['aiosp_opengraph_types'];
     }
     $this->locations = array('opengraph' => array('name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'disable_jetpack', 'generate_descriptions', 'defimg', 'dimg', 'meta_key', 'categories', 'types')), 'settings' => array('name' => __('Social Settings', 'all_in_one_seo_pack'), 'type' => 'metabox', 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#pagepost_settings', 'options' => array('title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'category'), 'display' => $display, 'prefix' => 'aioseop_opengraph_'));
     $this->layout = array('default' => array('name' => __('Social Meta', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/', 'options' => array()), 'scan_meta' => array('name' => __('Scan Social Meta', 'all_in_one_seo_pack'), 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#scan_meta', 'options' => array('scan_header')));
     $other_options = array();
     foreach ($this->layout as $k => $v) {
         $other_options = array_merge($other_options, $v['options']);
     }
     $this->layout['default']['options'] = array_diff(array_keys($this->default_options), $other_options);
     add_action('admin_init', array($this, 'debug_post_types'), 5);
     if (!is_admin() || defined('DOING_AJAX')) {
         $this->do_opengraph();
     }
 }
 /**
  * All_in_One_SEO_Pack_Sitemap constructor.
  */
 function __construct()
 {
     if (get_class($this) === 'All_in_One_SEO_Pack_Sitemap') {
         // Set this up only when instantiated as this class.
         $this->name = __('XML Sitemap', 'all-in-one-seo-pack');
         // Human-readable name of the plugin.
         $this->prefix = 'aiosp_sitemap_';
         // Option prefix.
         $this->file = __FILE__;
         // The current file.
         $this->extra_sitemaps = array();
         $this->extra_sitemaps = apply_filters($this->prefix . 'extra', $this->extra_sitemaps);
     }
     parent::__construct();
     $this->comment_string = 'Sitemap %s generated by All in One SEO Pack %s by Michael Torbert of Semper Fi Web Design on %s';
     $this->help_text = array('filename' => __("Specifies the name of your sitemap file. This will default to 'sitemap'.", 'all-in-one-seo-pack'), 'google' => __('Notify Google when you update your sitemap settings.', 'all-in-one-seo-pack'), 'bing' => __('Notify Bing when you update your sitemap settings.', 'all-in-one-seo-pack'), 'daily_cron' => __('Notify search engines based on the selected schedule, and also update static sitemap daily if in use. (this uses WP-Cron, so make sure this is working properly on your server as well)', 'all-in-one-seo-pack'), 'indexes' => __('Organize sitemap entries into distinct files in your sitemap. Enable this only if your sitemap contains over 50,000 URLs or the file is over 5MB in size.', 'all-in-one-seo-pack'), 'paginate' => __('Split long sitemaps into separate files.', 'all-in-one-seo-pack'), 'max_posts' => __('Allows you to specify the maximum number of posts in a sitemap (up to 50,000).', 'all-in-one-seo-pack'), 'posttypes' => __('Select which Post Types appear in your sitemap.', 'all-in-one-seo-pack'), 'taxonomies' => __('Select which taxonomy archives appear in your sitemap', 'all-in-one-seo-pack'), 'archive' => __('Include Date Archives in your sitemap.', 'all-in-one-seo-pack'), 'author' => __('Include Author Archives in your sitemap.', 'all-in-one-seo-pack'), 'gzipped' => __('Create a compressed sitemap file in .xml.gz format.', 'all-in-one-seo-pack'), 'robots' => __('Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all-in-one-seo-pack'), 'rewrite' => __('Dynamically creates the XML sitemap instead of using a static file.', 'all-in-one-seo-pack'), 'debug' => __('Use rewrites to generate your sitemap on the fly. NOTE: This is required for WordPress Multisite.', 'all-in-one-seo-pack'), 'addl_url' => __('URL to the page.', 'all-in-one-seo-pack'), 'addl_prio' => __('The priority of the page.', 'all-in-one-seo-pack'), 'addl_freq' => __('The frequency of the page.', 'all-in-one-seo-pack'), 'addl_mod' => __('Last modified date of the page.', 'all-in-one-seo-pack'), 'excl_categories' => __('Entries from these categories will be excluded from the sitemap.', 'all-in-one-seo-pack'), 'excl_pages' => __('Use page slugs or page IDs, seperated by commas, to exclude pages from the sitemap.', 'all-in-one-seo-pack'));
     $this->help_anchors = array('filename' => '#filename-prefix', 'google' => '#notify-google-bing', 'bing' => '#notify-google-bing', 'daily_cron' => '#schedule-updates', 'indexes' => '#enable-sitemap-indexes', 'paginate' => '#enable-sitemap-indexes', 'max_posts' => '#enable-sitemap-indexes', 'posttypes' => '#post-types-and-taxonomies', 'taxonomies' => '#post-types-and-taxonomies', 'archive' => '#include-archive-pages', 'author' => '#include-archive-pages', 'gzipped' => '#create-compressed-sitemap', 'robots' => '#link-from-virtual-robots', 'rewrite' => '#dynamically-generate-sitemap', 'addl_url' => '#additional-pages', 'addl_prio' => '#additional-pages', 'addl_freq' => '#additional-pages', 'addl_mod' => '#additional-pages', 'excl_categories' => '#excluded-items', 'excl_pages' => '#excluded-items');
     $this->default_options = array('filename' => array('name' => __('Filename Prefix', 'all-in-one-seo-pack'), 'default' => 'sitemap', 'type' => 'text', 'sanitize' => 'filename'), 'google' => array('name' => __('Notify Google', 'all-in-one-seo-pack')), 'bing' => array('name' => __('Notify Bing', 'all-in-one-seo-pack')), 'daily_cron' => array('name' => __('Schedule Updates', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => array(0 => __('No Schedule', 'all-in-one-seo-pack'), 'daily' => __('Daily', 'all-in-one-seo-pack'), 'weekly' => __('Weekly', 'all-in-one-seo-pack'), 'monthly' => __('Monthly', 'all-in-one-seo-pack')), 'default' => 0), 'indexes' => array('name' => __('Enable Sitemap Indexes', 'all-in-one-seo-pack')), 'paginate' => array('name' => __('Paginate Sitemap Indexes', 'all-in-one-seo-pack'), 'condshow' => array("{$this->prefix}indexes" => 'on')), 'max_posts' => array('name' => __('Maximum Posts Per Sitemap', 'all-in-one-seo-pack'), 'type' => 'text', 'default' => 50000, 'condshow' => array("{$this->prefix}indexes" => 'on', "{$this->prefix}paginate" => 'on')), 'posttypes' => array('name' => __('Post Types', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => 'all'), 'taxonomies' => array('name' => __('Taxonomies', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'default' => 'all'), 'archive' => array('name' => __('Include Date Archive Pages', 'all-in-one-seo-pack')), 'author' => array('name' => __('Include Author Pages', 'all-in-one-seo-pack')), 'gzipped' => array('name' => __('Create Compressed Sitemap', 'all-in-one-seo-pack'), 'default' => 'On'), 'robots' => array('name' => __('Link From Virtual Robots.txt', 'all-in-one-seo-pack'), 'default' => 'On'), 'rewrite' => array('name' => __('Dynamically Generate Sitemap', 'all-in-one-seo-pack'), 'default' => 'On'));
     $status_options = array('link' => array('default' => '', 'type' => 'html', 'label' => 'none', 'save' => false), 'debug' => array('name' => __('Debug Log', 'all-in-one-seo-pack'), 'default' => '', 'type' => 'html', 'disabled' => 'disabled', 'save' => false, 'label' => 'none', 'rows' => 5, 'cols' => 120, 'style' => 'min-width:950px'));
     $this->layout = array('status' => array('name' => __('Sitemap Status', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/', 'options' => array_keys($status_options)), 'default' => array('name' => $this->name, 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/', 'options' => array_keys($this->default_options)));
     $prio = array();
     for ($i = 0; $i <= 10; $i++) {
         $str = sprintf('%0.1f', $i / 10.0);
         $prio[$str] = $str;
     }
     $arr_no = array('no' => __('Do Not Override', 'all-in-one-seo-pack'));
     $arr_sel = array('sel' => __('Select Individual', 'all-in-one-seo-pack'));
     $this->prio_sel = array_merge($arr_no, $arr_sel, $prio);
     $this->prio = array_merge($arr_no, $prio);
     $freq = array();
     foreach (array('always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never') as $f) {
         $freq[$f] = $f;
     }
     $this->freq_sel = array_merge($arr_no, $arr_sel, $freq);
     $this->freq = array_merge($arr_no, $freq);
     foreach (array('prio' => __('priority', 'all-in-one-seo-pack'), 'freq' => __('frequency', 'all-in-one-seo-pack')) as $k => $v) {
         $s = "{$k}_options";
         ${$s} = array();
         foreach (array('homepage' => __('homepage', 'all-in-one-seo-pack'), 'post' => __('posts', 'all-in-one-seo-pack'), 'taxonomies' => __('taxonomies', 'all-in-one-seo-pack'), 'archive' => __('archive pages', 'all-in-one-seo-pack'), 'author' => __('author pages', 'all-in-one-seo-pack')) as $opt => $val) {
             $arr = ${$s};
             if ('post' === $opt || 'taxonomies' === $opt) {
                 $iopts = $this->{"{$k}_sel"};
             } else {
                 $iopts = $this->{$k};
             }
             $arr[$k . '_' . $opt] = array('name' => $this->ucwords($val), 'help_text' => sprintf(__('Manually set the %s of your %s.', 'all-in-one-seo-pack'), $v, $val), 'type' => 'select', 'initial_options' => $iopts, 'default' => 'no');
             if ('archive' === $opt || 'author' === $opt) {
                 $arr[$k . '_' . $opt]['condshow'] = array($this->prefix . $opt => 'on');
             }
             ${$s} = $arr;
         }
     }
     $addl_options = array('addl_instructions' => array('default' => '<div>' . __('Enter information below for any additional links for your sitemap not already managed through WordPress.', 'all-in-one-seo-pack') . '</div><br />', 'type' => 'html', 'label' => 'none', 'save' => false), 'addl_url' => array('name' => __('Page URL', 'all-in-one-seo-pack'), 'type' => 'text', 'label' => 'top', 'save' => false), 'addl_prio' => array('name' => __('Page Priority', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => $prio, 'label' => 'top', 'save' => false), 'addl_freq' => array('name' => __('Page Frequency', 'all-in-one-seo-pack'), 'type' => 'select', 'initial_options' => $freq, 'label' => 'top', 'save' => false), 'addl_mod' => array('name' => __('Last Modified', 'all-in-one-seo-pack'), 'type' => 'text', 'label' => 'top', 'save' => false), 'addl_pages' => array('name' => __('Additional Pages', 'all-in-one-seo-pack'), 'type' => 'custom', 'save' => true), 'Submit' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Add URL', 'all-in-one-seo-pack') . ' &raquo;', 'style' => 'margin-left: 20px;', 'label' => 'none', 'save' => false, 'value' => 1));
     $excl_options = array('excl_categories' => array('name' => __('Excluded Categories', 'all-in-one-seo-pack'), 'type' => 'multicheckbox', 'initial_options' => ''), 'excl_pages' => array('name' => __('Excluded Pages', 'all-in-one-seo-pack'), 'type' => 'text'));
     $this->layout['addl_pages'] = array('name' => __('Additional Pages', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages', 'options' => array_keys($addl_options));
     $this->layout['excl_pages'] = array('name' => __('Excluded Items', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items', 'options' => array_keys($excl_options));
     $this->layout['priorities'] = array('name' => __('Priorities', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies', 'options' => array_keys($prio_options));
     $this->layout['frequencies'] = array('name' => __('Frequencies', 'all-in-one-seo-pack'), 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies', 'options' => array_keys($freq_options));
     $this->default_options = array_merge($status_options, $this->default_options, $addl_options, $excl_options, $prio_options, $freq_options);
     $this->add_help_text_links();
     add_action('after_doing_aioseop_updates', array($this, 'do_sitemaps'));
     // Update static sitemap when AIOSEOP is upgrade to new version.
     add_action('init', array($this, 'load_sitemap_options'));
     add_action($this->prefix . 'settings_update', array($this, 'do_sitemaps'));
     add_filter($this->prefix . 'display_settings', array($this, 'update_post_data'));
     add_filter($this->prefix . 'display_options', array($this, 'filter_display_options'));
     add_filter($this->prefix . 'update_options', array($this, 'filter_options'));
     add_filter($this->prefix . 'output_option', array($this, 'display_custom_options'), 10, 2);
     add_action($this->prefix . 'daily_update_cron', array($this, 'daily_update'));
     add_action('init', array($this, 'make_dynamic_xsl'));
     add_action('transition_post_status', array($this, 'update_sitemap_from_posts'), 10, 3);
 }