PHP Class Message_Board

Since: 1.0.0
Datei anzeigen Open project: justintadlock/message-board Class Usage Examples

Public Properties

Property Type Description
$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.

Public Methods

Method Description
__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.

Private Methods

Method Description
__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.

Method Details

__call() public method

Magic method to prevent a fatal error when calling a method that doesn't exist.
Since: 1.0.0
public __call ( $method = '', $args = [] ) : void
return void

__clone() public method

Magic method to keep the object from being cloned.
Since: 1.0.0
public __clone ( ) : void
return void

__toString() public method

Magic method to output a string if trying to use the object as a string.
Since: 1.0.0
public __toString ( ) : void
return void

__wakeup() public method

Magic method to keep the object from being unserialized.
Since: 1.0.0
public __wakeup ( ) : void
return void

activation() public method

Method that runs only when the plugin is activated.
Since: 1.0.0
public activation ( ) : void
return void

enqueue_scripts() public method

Loads the front end scripts and styles. No styles are loaded if the theme supports the plugin.
Since: 1.0.0
public enqueue_scripts ( ) : void
return void

get_instance() public static method

Returns the instance.
Since: 1.0.0
public static get_instance ( ) : object
return object

i18n() public method

Loads the translation files.
Since: 1.0.0
public i18n ( ) : void
return void

Property Details

$db_version public_oe property

Current database version.
Since: 1.0.0
public int $db_version
return integer

$deleted_post public_oe property

Used for temporarily saving a deleted post object.
Since: 1.0.0
public object|null $deleted_post
return object | null

$dir_path public_oe property

Directory path to the plugin folder.
Since: 1.0.0
public string $dir_path
return string

$dir_uri public_oe property

Directory URI to the plugin folder.
Since: 1.0.0
public string $dir_uri
return string

$forum_query public_oe property

Forum query. Is assigned a WP_Query object. On forum archive/single views, this is the main $wp_query object.
Since: 1.0.0
public object $forum_query
return object

$forum_types public_oe property

Forum types (e.g., normal, category).
Since: 1.0.0
public array $forum_types
return array

$reply_query public_oe property

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.
Since: 1.0.0
public object $reply_query
return object

$role_query public_oe property

Role query. This holds the results of mb_get_dynamic_roles() and is used on the role archive page.
Since: 1.0.0
public object|null $role_query
return object | null

$roles public_oe property

Forum roles (e.g., keymaster, moderator, participant, spectator, banned).
Since: 1.0.0
public array $roles
return array

$search_query public_oe property

Search query. Is assigned a WP_Query object. This is the $wp_query object when viewing a forum search results page.
Since: 1.0.0
public object $search_query
return object

$subforum_query public_oe property

Sub-forum query. Is assigned a WP_Query object. This is only useful when getting the sub-forums of a particular forum.
Since: 1.0.0
public object $subforum_query
return object

$topic_query public_oe property

Topic query. Is assigned a WP_Query object. On topic single/archive views, this is the main $wp_query object.
Since: 1.0.0
public object $topic_query
return object

$topic_types public_oe property

Topic types (e.g., normal, super, sticky).
Since: 1.0.0
public array $topic_types
return array

$user_query public_oe property

User query. This holds the results of get_users() and is particularly useful for the user archive page.
Since: 1.0.0
public object|null $user_query
return object | null

$version public_oe property

Plugin version number.
Since: 1.0.0
public string $version
return string