PHP Class WPKB\Admin

Afficher le fichier Open project: ibericode/wp-knowledge-base

Méthodes publiques

Méthode Description
__construct ( Options $options ) Construct
add_hooks ( ) Add hooks
add_menu_items ( ) Add menu items
add_meta_box ( WP_Pos\WP_Post $post ) Add metabox with Article Settings to wpkb-article edit screen.
register_settings ( ) Register settings
sanitize_settings ( $settings ) : array
save_kb_article ( integer $post_id, WP_Pos\WP_Post $post ) : boolean Runs when saving a KB article
show_meta_box ( WP_Pos\WP_Post $post )
show_settings_page ( ) Render the settings page

Method Details

__construct() public méthode

Construct
public __construct ( Options $options )
$options Options

add_hooks() public méthode

Add hooks
public add_hooks ( )

add_menu_items() public méthode

Add menu items
public add_menu_items ( )

add_meta_box() public méthode

Add metabox with Article Settings to wpkb-article edit screen.
public add_meta_box ( WP_Pos\WP_Post $post )
$post WP_Pos\WP_Post

register_settings() public méthode

Register settings
public register_settings ( )

sanitize_settings() public méthode

public sanitize_settings ( $settings ) : array
$settings
Résultat array

save_kb_article() public méthode

Runs when saving a KB article
public save_kb_article ( integer $post_id, WP_Pos\WP_Post $post ) : boolean
$post_id integer
$post WP_Pos\WP_Post
Résultat boolean

show_meta_box() public méthode

public show_meta_box ( WP_Pos\WP_Post $post )
$post WP_Pos\WP_Post

show_settings_page() public méthode

Render the settings page
public show_settings_page ( )