PHP Класс Message_Board

С версии: 1.0.0
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$db_version integer Current database version.
$deleted_post object | null Used for temporarily saving a deleted post object.
$dir_path string Directory path to the plugin folder.
$dir_uri string Directory URI to the plugin folder.
$forum_query object Forum query. Is assigned a WP_Query object. On forum archive/single views, this is the main $wp_query object.
$forum_types array Forum types (e.g., normal, category).
$reply_query object Reply query. Is assigned a WP_Query object. This is mainly useful on single topic views, where it is used to display the replies to the current topic.
$role_query object | null Role query. This holds the results of mb_get_dynamic_roles() and is used on the role archive page.
$roles array Forum roles (e.g., keymaster, moderator, participant, spectator, banned).
$search_query object Search query. Is assigned a WP_Query object. This is the $wp_query object when viewing a forum search results page.
$subforum_query object Sub-forum query. Is assigned a WP_Query object. This is only useful when getting the sub-forums of a particular forum.
$topic_query object Topic query. Is assigned a WP_Query object. On topic single/archive views, this is the main $wp_query object.
$topic_types array Topic types (e.g., normal, super, sticky).
$user_query object | null User query. This holds the results of get_users() and is particularly useful for the user archive page.
$version string Plugin version number.

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

Метод Описание
__call ( $method = '', $args = [] ) : void Magic method to prevent a fatal error when calling a method that doesn't exist.
__clone ( ) : void Magic method to keep the object from being cloned.
__toString ( ) : void Magic method to output a string if trying to use the object as a string.
__wakeup ( ) : void Magic method to keep the object from being unserialized.
activation ( ) : void Method that runs only when the plugin is activated.
enqueue_scripts ( ) : void Loads the front end scripts and styles. No styles are loaded if the theme supports the plugin.
get_instance ( ) : object Returns the instance.
i18n ( ) : void Loads the translation files.

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

Метод Описание
__construct ( ) : void Constructor method.
includes ( ) : void Loads include and admin files for the plugin.
setup ( ) : void Initial plugin setup.
setup_actions ( ) : void Sets up initial actions.

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

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

Magic method to prevent a fatal error when calling a method that doesn't exist.
С версии: 1.0.0
public __call ( $method = '', $args = [] ) : void
Результат void

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

Magic method to keep the object from being cloned.
С версии: 1.0.0
public __clone ( ) : void
Результат void

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

Magic method to output a string if trying to use the object as a string.
С версии: 1.0.0
public __toString ( ) : void
Результат void

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

Magic method to keep the object from being unserialized.
С версии: 1.0.0
public __wakeup ( ) : void
Результат void

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

Method that runs only when the plugin is activated.
С версии: 1.0.0
public activation ( ) : void
Результат void

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

Loads the front end scripts and styles. No styles are loaded if the theme supports the plugin.
С версии: 1.0.0
public enqueue_scripts ( ) : void
Результат void

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

Returns the instance.
С версии: 1.0.0
public static get_instance ( ) : object
Результат object

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

Loads the translation files.
С версии: 1.0.0
public i18n ( ) : void
Результат void

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

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

Current database version.
С версии: 1.0.0
public int $db_version
Результат integer

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

Used for temporarily saving a deleted post object.
С версии: 1.0.0
public object|null $deleted_post
Результат object | null

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

Directory path to the plugin folder.
С версии: 1.0.0
public string $dir_path
Результат string

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

Directory URI to the plugin folder.
С версии: 1.0.0
public string $dir_uri
Результат string

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

Forum query. Is assigned a WP_Query object. On forum archive/single views, this is the main $wp_query object.
С версии: 1.0.0
public object $forum_query
Результат object

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

Forum types (e.g., normal, category).
С версии: 1.0.0
public array $forum_types
Результат array

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

Reply query. Is assigned a WP_Query object. This is mainly useful on single topic views, where it is used to display the replies to the current topic.
С версии: 1.0.0
public object $reply_query
Результат object

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

Role query. This holds the results of mb_get_dynamic_roles() and is used on the role archive page.
С версии: 1.0.0
public object|null $role_query
Результат object | null

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

Forum roles (e.g., keymaster, moderator, participant, spectator, banned).
С версии: 1.0.0
public array $roles
Результат array

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

Search query. Is assigned a WP_Query object. This is the $wp_query object when viewing a forum search results page.
С версии: 1.0.0
public object $search_query
Результат object

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

Sub-forum query. Is assigned a WP_Query object. This is only useful when getting the sub-forums of a particular forum.
С версии: 1.0.0
public object $subforum_query
Результат object

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

Topic query. Is assigned a WP_Query object. On topic single/archive views, this is the main $wp_query object.
С версии: 1.0.0
public object $topic_query
Результат object

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

Topic types (e.g., normal, super, sticky).
С версии: 1.0.0
public array $topic_types
Результат array

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

User query. This holds the results of get_users() and is particularly useful for the user archive page.
С версии: 1.0.0
public object|null $user_query
Результат object | null

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

Plugin version number.
С версии: 1.0.0
public string $version
Результат string