Automattic\WooCommerce\Admin\Features\Navigation
Screen::register_post_type() public WC 1.0
Register post type for use in WooCommerce Navigation screens.
{} Это метод класса: Screen{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$result = Screen::register_post_type( $post_type );
- $post_type(строка) (обязательный)
- Post type to add.
Код Screen::register_post_type() Screen::register post type WC 5.0.0
public static function register_post_type( $post_type ) {
if ( ! in_array( $post_type, self::$post_types, true ) ) {
self::$post_types[] = $post_type;
}
}