本文整理汇总了PHP中All_in_One_SEO_Pack_Module类的典型用法代码示例。如果您正苦于以下问题:PHP All_in_One_SEO_Pack_Module类的具体用法?PHP All_in_One_SEO_Pack_Module怎么用?PHP All_in_One_SEO_Pack_Module使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了All_in_One_SEO_Pack_Module类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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') . ' »', 'nowrap' => 1), 'Submit_Update' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Save Robots.txt File', 'all-in-one-seo-pack') . ' »', 'nowrap' => 1), 'Submit_Delete' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Delete Robots.txt File', 'all-in-one-seo-pack') . ' »', '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') . ' »', 'nowrap' => 1, 'style' => 'margin-left: 20px;'), 'Submit_Opt_Preview' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Disregard Changes', 'all-in-one-seo-pack') . ' »', 'nowrap' => 1), 'Submit_Optimize' => array('type' => 'submit', 'class' => 'button-primary', 'name' => __('Optimize', 'all-in-one-seo-pack') . ' »'));
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
示例2: 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
示例3: 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
示例4: unset
function add_page_hooks()
{
$memory_usage = memory_get_peak_usage() / 1024 / 1024;
if ($memory_usage > 32) {
unset($this->default_options['memory_limit']['initial_options']['32M']);
if ($memory_usage > 64) {
unset($this->default_options['memory_limit']['initial_options']['64M']);
}
if ($memory_usage > 128) {
unset($this->default_options['memory_limit']['initial_options']['128M']);
}
if ($memory_usage > 256) {
unset($this->default_options['memory_limit']['initial_options']['256M']);
}
}
$this->update_options();
parent::add_page_hooks();
}
开发者ID:ActiveWebsite,项目名称:BoojPressPlugins,代码行数:18,代码来源:aioseop_performance.php
示例5: 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
示例6: 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
示例7: 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
示例8: array
function get_current_options($opts = array(), $location = null, $defaults = null, $post = null)
{
if ($location === 'aiosp' && $this->locations[$location]['type'] == 'metabox') {
if ($post == null) {
global $post;
}
$post_id = $post;
if (is_object($post_id)) {
$post_id = $post_id->ID;
}
$get_opts = $this->default_options($location);
foreach (array('keywords', 'description', 'title', 'sitemap_exclude', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel') as $f) {
$field = "aiosp_{$f}";
$get_opts[$field] = htmlspecialchars(stripslashes(get_post_meta($post_id, '_aioseop_' . $f, true)));
}
$opts = wp_parse_args($opts, $get_opts);
return $opts;
} else {
$options = parent::get_current_options($opts, $location, $defaults);
return $options;
}
}
开发者ID:mahassan,项目名称:shellneverknow,代码行数:22,代码来源:aioseop_class.php
示例9:
function get_the_image($options = null, $p = null)
{
$meta_key = $this->options['aiosp_opengraph_meta_key'];
return parent::get_the_image(array('meta_key' => $meta_key), $p);
}
开发者ID:interfisch,项目名称:lm,代码行数:5,代码来源:aioseop_opengraph.php
示例10: array
/** Set up settings, checking for sitemap conflicts, on settings page. **/
function add_page_hooks()
{
$this->flush_rules_hook();
$this->add_post_types();
parent::add_page_hooks();
add_action($this->prefix . 'settings_header', array($this, 'do_sitemap_scan'), 5);
add_filter("{$this->prefix}submit_options", array($this, 'filter_submit'));
}
开发者ID:demochko-ol,项目名称:hezy,代码行数:9,代码来源:aioseop_sitemap.php
示例11: array
function enqueue_scripts()
{
add_filter("{$this->prefix}display_settings", array($this, 'filter_settings'), 10, 3);
add_filter("{$this->prefix}display_options", array($this, 'filter_options'), 10, 2);
parent::enqueue_scripts();
}
开发者ID:recetasdemama,项目名称:wordpress,代码行数:6,代码来源:aioseop_class.php
示例12: array
function add_page_hooks()
{
parent::add_page_hooks();
add_action($this->prefix . 'settings_update', array($this, 'do_file_editor'), 10, 2);
}
开发者ID:StefanBonilla,项目名称:CoupSoup,代码行数:5,代码来源:aioseop_file_editor.php
示例13: array
function get_current_options($opts = array(), $location = null, $defaults = null, $post = null)
{
if ($location === 'aiosp' && $this->locations[$location]['type'] == 'metabox') {
if ($post == null) {
global $post;
}
$post_id = $post;
if (is_object($post_id)) {
$post_id = $post_id->ID;
}
$get_opts = $this->default_options($location);
$optlist = array('keywords', 'description', 'title', 'custom_link', 'sitemap_exclude', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel');
if (!!empty($this->options['aiosp_can']) && !empty($this->options['aiosp_customize_canonical_links'])) {
unset($optlist["custom_link"]);
}
foreach ($optlist as $f) {
$meta = '';
$field = "aiosp_{$f}";
if (AIOSEOPPRO) {
if (isset($_GET['taxonomy']) && isset($_GET['tag_ID']) || is_category() || is_tag() || is_tax()) {
if (is_admin() && isset($_GET['tag_ID'])) {
$meta = get_term_meta($_GET['tag_ID'], '_aioseop_' . $f, true);
} else {
$queried_object = get_queried_object();
if (!empty($queried_object) && !empty($queried_object->term_id)) {
$meta = get_term_meta($queried_object->term_id, '_aioseop_' . $f, true);
}
}
} else {
$meta = get_post_meta($post_id, '_aioseop_' . $f, true);
}
if ('title' === $f || 'description' === $f) {
$get_opts[$field] = htmlspecialchars($meta);
} else {
$get_opts[$field] = htmlspecialchars(stripslashes($meta));
}
} else {
$field = "aiosp_{$f}";
$meta = get_post_meta($post_id, '_aioseop_' . $f, true);
if ('title' === $f || 'description' === $f) {
$get_opts[$field] = htmlspecialchars($meta);
} else {
$get_opts[$field] = htmlspecialchars(stripslashes($meta));
}
}
}
$opts = wp_parse_args($opts, $get_opts);
return $opts;
} else {
$options = parent::get_current_options($opts, $location, $defaults);
return $options;
}
}
开发者ID:kding0409,项目名称:kding0409.github.io,代码行数:53,代码来源:aioseop_class.php
注:本文中的All_in_One_SEO_Pack_Module类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论