PHP Класс WPSEO_Admin, wordpress-seo

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$admin_features array Array of classes that add admin functionality

Открытые методы

Метод Описание
__construct ( ) Class constructor
add_action_link ( array $links, string $file ) : array Add a link to the settings page to the plugins list
blog_public_warning ( ) Display an error message when the blog is set to private.
bulk_edit_options ( ) Adds the ability to choose how many posts are displayed per page on the bulk edit pages.
clear_cache ( ) Clears the cache
clear_rewrites ( ) Clear rewrites
config_page_scripts ( ) Enqueues the (tiny) global JS needed for the plugin.
enqueue_assets ( ) Register assets needed on admin pages
enqueue_global_style ( ) Enqueues the (tiny) global stylesheet needed for the plugin.
filter_settings_pages ( array $pages ) : array Filters all advanced settings pages from the given pages.
filter_stopwords_from_slug ( string $slug, string $post_title ) : string Filter the stopwords from the slug
get_admin_features ( ) : array Returns all the classes for the admin features
grant_access ( ) : boolean Check whether the current user is allowed to access the configuration.
import_plugin_hooks ( ) Setting the hooks for importing data from other plugins
load_page ( ) Load the form for a WPSEO admin page
maybe_upgrade ( ) Check whether the current user is allowed to access the configuration.
meta_description_warning ( ) Display an error message when the theme contains a meta description tag.
network_config_page ( ) Loads the form for the network configuration page.
options_init ( ) Register all the options needed for the configuration pages.
register_network_settings_page ( ) Register the settings page for the Network settings.
register_settings_page ( ) Register the menu item and its sub menu's.
remove_stopwords_from_slug ( string $slug ) : string Cleans stopwords out of the slug, if the slug hasn't been set yet.
save_bulk_edit_options ( integer $status, string $option, integer $value ) : integer Saves the posts per page limit for bulk edit pages.
schedule_rewrite_flush ( ) Schedules a rewrite flush to happen at shutdown
stopwords ( ) : array Returns the stopwords for the current language
stopwords_check ( string $haystack, boolean $checkingUrl = false ) : boolean | mixed Check whether the stopword appears in the string
switch_theme ( ) Log the updated timestamp for user profiles when theme is changed
title_metas_help_tab ( ) Adds contextual help to the titles & metas page.
update_contactmethods ( array $contactmethods ) : array Filter the $contactmethods array and add Facebook, Google+ and Twitter.

Защищенные методы

Метод Описание
set_upsell_notice ( ) Sets the upsell notice.

Приватные методы

Метод Описание
get_dismiss_url ( string $dismiss_param ) : string Extending the current page URL with two params to be able to ignore the notice.
get_manage_options_cap ( ) : mixed | void Returns the manage_options cap
get_premium_indicator ( ) : string
localize_admin_global_script ( ) : array Localization for the dismiss urls.

Описание методов

__construct() публичный Метод

Class constructor
public __construct ( )

blog_public_warning() публичный Метод

Display an error message when the blog is set to private.
Устаревший: 3.3
public blog_public_warning ( )

bulk_edit_options() публичный Метод

Adds the ability to choose how many posts are displayed per page on the bulk edit pages.
public bulk_edit_options ( )

clear_cache() публичный Метод

Clears the cache
См. также: WPSEO_Utils::clear_cache()
Устаревший: 1.5.0
Устаревший: use WPSEO_Utils::clear_cache()
public clear_cache ( )

clear_rewrites() публичный Метод

Clear rewrites
См. также: WPSEO_Utils::clear_rewrites()
Устаревший: 1.5.0
Устаревший: use WPSEO_Utils::clear_rewrites()
public clear_rewrites ( )

config_page_scripts() публичный Метод

Enqueues the (tiny) global JS needed for the plugin.
public config_page_scripts ( )

enqueue_assets() публичный Метод

Register assets needed on admin pages
public enqueue_assets ( )

enqueue_global_style() публичный Метод

Enqueues the (tiny) global stylesheet needed for the plugin.

filter_settings_pages() публичный Метод

Filters all advanced settings pages from the given pages.
public filter_settings_pages ( array $pages ) : array
$pages array The pages to filter.
Результат array

filter_stopwords_from_slug() публичный Метод

Filter the stopwords from the slug
public filter_stopwords_from_slug ( string $slug, string $post_title ) : string
$slug string The current slug, if not empty there will be done nothing.
$post_title string The title which will be used in case of an empty slug.
Результат string

get_admin_features() публичный Метод

Returns all the classes for the admin features
public get_admin_features ( ) : array
Результат array

grant_access() публичный Метод

Check whether the current user is allowed to access the configuration.
См. также: WPSEO_Utils::grant_access()
Устаревший: 1.5.0
Устаревший: use WPSEO_Utils::grant_access()
public grant_access ( ) : boolean
Результат boolean

import_plugin_hooks() публичный Метод

Setting the hooks for importing data from other plugins
public import_plugin_hooks ( )

load_page() публичный Метод

Load the form for a WPSEO admin page
public load_page ( )

maybe_upgrade() публичный Метод

Check whether the current user is allowed to access the configuration.
См. также: WPSEO_Upgrade
Устаревший: 1.5.0
Устаревший: use wpseo_do_upgrade()
public maybe_upgrade ( )

meta_description_warning() публичный Метод

Display an error message when the theme contains a meta description tag.
Устаревший: 3.3
С версии: 1.4.14

network_config_page() публичный Метод

Loads the form for the network configuration page.
public network_config_page ( )

options_init() публичный Метод

Register all the options needed for the configuration pages.
См. также: WPSEO_Option::register_setting()
Устаревший: 1.5.0
Устаревший: use WPSEO_Option::register_setting() on each individual option
public options_init ( )

register_network_settings_page() публичный Метод

Register the settings page for the Network settings.

register_settings_page() публичный Метод

Register the menu item and its sub menu's.

remove_stopwords_from_slug() публичный Метод

Cleans stopwords out of the slug, if the slug hasn't been set yet.
С версии: 1.1.7
public remove_stopwords_from_slug ( string $slug ) : string
$slug string if this isn't empty, the function will return an unaltered slug.
Результат string $clean_slug cleaned slug

save_bulk_edit_options() публичный Метод

Saves the posts per page limit for bulk edit pages.
public save_bulk_edit_options ( integer $status, string $option, integer $value ) : integer
$status integer Status value to pass through.
$option string Option name.
$value integer Count value to check.
Результат integer

schedule_rewrite_flush() публичный Метод

Schedules a rewrite flush to happen at shutdown

set_upsell_notice() защищенный Метод

Sets the upsell notice.
protected set_upsell_notice ( )

stopwords() публичный Метод

Returns the stopwords for the current language
Устаревший: 3.1 Use WPSEO_Admin_Stop_Words::list_stop_words() instead.
С версии: 1.1.7
public stopwords ( ) : array
Результат array $stopwords array of stop words to check and / or remove from slug

stopwords_check() публичный Метод

Check whether the stopword appears in the string
Устаревший: 3.1
public stopwords_check ( string $haystack, boolean $checkingUrl = false ) : boolean | mixed
$haystack string The string to be checked for the stopword.
$checkingUrl boolean Whether or not we're checking a URL.
Результат boolean | mixed

switch_theme() публичный Метод

Log the updated timestamp for user profiles when theme is changed
public switch_theme ( )

title_metas_help_tab() публичный Метод

Adds contextual help to the titles & metas page.

update_contactmethods() публичный Метод

These are used with the Facebook author, rel="author" and Twitter cards implementation.
public update_contactmethods ( array $contactmethods ) : array
$contactmethods array currently set contactmethods.
Результат array $contactmethods with added contactmethods.

Описание свойств

$admin_features защищенное свойство

Array of classes that add admin functionality
protected array $admin_features
Результат array