PHP Class RWMB_Core

Show file Open project: rilwis/meta-box Class Usage Examples

Public Methods

Method Description
__construct ( ) Register hooks.
fix_page_template ( WP_Post $post ) WordPress will prevent post data saving if a page template has been selected that does not exist This is especially a problem when switching to our theme, and old page templates are in the post data Unset the page template if the page does not exist to allow the post to save
get_fields ( ) : array Get all registered fields.
get_meta_boxes ( ) Get registered meta boxes via a filter.
load_textdomain ( ) Load plugin translation.
plugin_links ( array $links ) : array Add links to Documentation and Extensions in plugin's list of action links.
register_meta_boxes ( ) Register meta boxes.
register_wpml_hooks ( ) Register wpml compatibility hooks

Method Details

__construct() public method

Register hooks.
public __construct ( )

fix_page_template() public method

WordPress will prevent post data saving if a page template has been selected that does not exist This is especially a problem when switching to our theme, and old page templates are in the post data Unset the page template if the page does not exist to allow the post to save
Since: 4.3.10
public fix_page_template ( WP_Post $post )
$post WP_Post

get_fields() public static method

Get all registered fields.
public static get_fields ( ) : array
return array

get_meta_boxes() public static method

Advantages: - prevents duplicated global variables. - allows users to remove/hide registered meta boxes.
public static get_meta_boxes ( )

load_textdomain() public method

Load plugin translation.
public load_textdomain ( )

register_meta_boxes() public method

Advantages: - prevents incorrect hook. - no need to check for class existences.
public register_meta_boxes ( )

register_wpml_hooks() public method

Register wpml compatibility hooks
public register_wpml_hooks ( )