PHP 클래스 TEXTDOMAIN_Theme_Plugin_Enhancements, theme-tools

파일 보기 프로젝트 열기: Automattic/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