PHP Class Message_Board_Admin

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

Public Properties

Property Type Description
$forum_type string Forum post type name.
$reply_type string Reply post type name.
$topic_type string Topic post type name.

Public Methods

Method Description
__construct ( ) : void Sets up needed actions/filters for the admin to initialize.
admin_body_class ( string $class ) : string Adds a custom admin body class.
admin_menu ( ) : void Adds admin menu items needed by the plugin. Rather than having multiple top-level menu items like some plugins, which shall remain unnamed, we'll consolidate everything into a single item. Yay for no clutter!
admin_notices ( ) : void Displays an admin notice if the current theme does not support the Message Board plugin.
get_instance ( ) : object Returns the instance.
nav_menu_meta_box_object ( object $object ) : object Makes sure the correct post status is used when loading forums on the nav menus screen. By default, WordPress will only load them if they have the "publish" post status.
parent_file ( string $parent_file ) : string Corrects the parent file for post type screens.
register_scripts ( ) : object Registers the admin scripts and styles.
views_edit ( array $views ) : array Puts the post status links in the a better order. By default, WP will list these in the order they're registered. Instead, we're going to put them in order from public, private, protected, and other.

Method Details

__construct() public method

Sets up needed actions/filters for the admin to initialize.
Since: 1.0.0
public __construct ( ) : void
return void

admin_body_class() public method

Adds a custom admin body class.
Since: 1.0.0
public admin_body_class ( string $class ) : string
$class string
return string

admin_menu() public method

Adds admin menu items needed by the plugin. Rather than having multiple top-level menu items like some plugins, which shall remain unnamed, we'll consolidate everything into a single item. Yay for no clutter!
Since: 1.0.0
public admin_menu ( ) : void
return void

admin_notices() public method

Displays an admin notice if the current theme does not support the Message Board plugin.
Since: 1.0.0
public admin_notices ( ) : void
return void

get_instance() public static method

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

nav_menu_meta_box_object() public method

Makes sure the correct post status is used when loading forums on the nav menus screen. By default, WordPress will only load them if they have the "publish" post status.
Since: 1.0.0
public nav_menu_meta_box_object ( object $object ) : object
$object object
return object

parent_file() public method

Corrects the parent file for post type screens.
Since: 1.0.0
public parent_file ( string $parent_file ) : string
$parent_file string
return string

register_scripts() public method

Registers the admin scripts and styles.
Since: 1.0.0
public register_scripts ( ) : object
return object

views_edit() public method

Puts the post status links in the a better order. By default, WP will list these in the order they're registered. Instead, we're going to put them in order from public, private, protected, and other.
Since: 1.0.0
public views_edit ( array $views ) : array
$views array
return array

Property Details

$forum_type public_oe property

Forum post type name.
Since: 1.0.0
public string $forum_type
return string

$reply_type public_oe property

Reply post type name.
Since: 1.0.0
public string $reply_type
return string

$topic_type public_oe property

Topic post type name.
Since: 1.0.0
public string $topic_type
return string