PHP Класс RWMB_Core

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

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

Метод Описание
__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

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

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

Register hooks.
public __construct ( )

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

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
С версии: 4.3.10
public fix_page_template ( WP_Post $post )
$post WP_Post

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

Get all registered fields.
public static get_fields ( ) : array
Результат array

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

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

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

Load plugin translation.
public load_textdomain ( )

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

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

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

Register wpml compatibility hooks
public register_wpml_hooks ( )