当前位置: 首页>>代码示例>>PHP>>正文


PHP All_in_One_SEO_Pack_Module::__construct方法代码示例

本文整理汇总了PHP中All_in_One_SEO_Pack_Module::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP All_in_One_SEO_Pack_Module::__construct方法的具体用法?PHP All_in_One_SEO_Pack_Module::__construct怎么用?PHP All_in_One_SEO_Pack_Module::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在All_in_One_SEO_Pack_Module的用法示例。


在下文中一共展示了All_in_One_SEO_Pack_Module::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 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);
 }
开发者ID:ActiveWebsite,项目名称:BoojPressPlugins,代码行数:25,代码来源:aioseop_performance.php

示例2: array

 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);
 }
开发者ID:rongandat,项目名称:sallumeh,代码行数:28,代码来源:aioseop_performance.php

示例3: array

 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
 }
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:26,代码来源:aioseop_file_editor.php

示例4: array

 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);
 }
开发者ID:demochko-ol,项目名称:hezy,代码行数:30,代码来源:aioseop_robots.php

示例5: array

 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);
 }
开发者ID:popovdenis,项目名称:kmst,代码行数:57,代码来源:aioseop_sitemap.php

示例6: array

 /**
  * 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'));
     }
 }
开发者ID:crazyyy,项目名称:bessarabia,代码行数:55,代码来源:aioseop_feature_manager.php

示例7: array

 /**
  * 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));
         }
     }
 }
开发者ID:ActiveWebsite,项目名称:BoojPressPlugins,代码行数:51,代码来源:aioseop_bad_robots.php

示例8: array

 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'));
 }
开发者ID:mahassan,项目名称:shellneverknow,代码行数:43,代码来源:aioseop_feature_manager.php

示例9: array

 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);
 }
开发者ID:netfor,项目名称:nextrading,代码行数:20,代码来源:aioseop_importer_exporter.php

示例10: array

 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);
 }
开发者ID:kristinakarnitskaya,项目名称:larkyonline,代码行数:22,代码来源:aioseop_performance.php

示例11: array

 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();
     }
 }
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:37,代码来源:aioseop_opengraph.php

示例12: array

 /**
  * 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);
 }
开发者ID:ActiveWebsite,项目名称:BoojPressPlugins,代码行数:75,代码来源:aioseop_sitemap.php


注:本文中的All_in_One_SEO_Pack_Module::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。