PHP Класс TEXTDOMAIN_Theme_Plugin_Enhancements, theme-tools

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

Открытые свойства

Свойство Тип Описание
$display_notice
$plugins

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

Метод Описание
__construct ( ) Determine the plugin enhancements declared by the theme.
admin_notices ( ) Display the admin notice for the plugin enhancements.
get_module_name ( string $module ) Set the name of our modules. This is just so we can easily refer to them in a nice, consistent, human-readable way.
get_theme_dependencies ( ) Let's see which modules (if any!) this theme relies on.
init ( ) Init function.
plugin_activate_url ( string $slug ) Helper function to return the URL for activating a plugin.
plugin_install_url ( string $slug ) Helper function to return the URL for installing a plugin.
set_module_status ( ) For Jetpack modules, we want to check and see if those modules are actually activated.
set_plugin_status ( ) Determine the status of each of the plugins declared as a dependency by the theme and whether an admin notice is necessary or not.

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

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

Themes must declare the plugins on which they depend by using add_theme_support( 'plugin-enhancements' ). If there are plugin enhancements and any of the enhancements are either not installed or not activated, alert the user.
public __construct ( )

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

Display the admin notice for the plugin enhancements.
public admin_notices ( )

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

Set the name of our modules. This is just so we can easily refer to them in a nice, consistent, human-readable way.
public get_module_name ( string $module )
$module string The slug of the Jetpack module in question.

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

Let's see which modules (if any!) this theme relies on.

init() статический публичный Метод

Init function.
static public init ( )

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

Helper function to return the URL for activating a plugin.
public plugin_activate_url ( string $slug )
$slug string Plugin slug; determines which plugin to activate.

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

Helper function to return the URL for installing a plugin.
public plugin_install_url ( string $slug )
$slug string Plugin slug; determines which plugin to install.

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

For Jetpack modules, we want to check and see if those modules are actually activated.
public set_module_status ( )

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

Determine the status of each of the plugins declared as a dependency by the theme and whether an admin notice is necessary or not.
public set_plugin_status ( )

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

$display_notice публичное свойство

public $display_notice

$plugins публичное свойство

public $plugins