ACF_Post_Type::register_post_type
Registers the acf-post-type custom post type with WordPress.
Метод класса: ACF_Post_Type{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ACF_Post_Type = new ACF_Post_Type(); $ACF_Post_Type->register_post_type();
Список изменений
С версии 6.1 | Введена. |
Код ACF_Post_Type::register_post_type() ACF Post Type::register post type ACF 6.4.2
public function register_post_type() { $cap = acf_get_setting( 'capability' ); register_post_type( 'acf-post-type', array( 'labels' => array( 'name' => __( 'Post Types', 'acf' ), 'singular_name' => __( 'Post Type', 'acf' ), 'add_new' => __( 'Add New', 'acf' ), 'add_new_item' => __( 'Add New Post Type', 'acf' ), 'edit_item' => __( 'Edit Post Type', 'acf' ), 'new_item' => __( 'New Post Type', 'acf' ), 'view_item' => __( 'View Post Type', 'acf' ), 'search_items' => __( 'Search Post Types', 'acf' ), 'not_found' => __( 'No Post Types found', 'acf' ), 'not_found_in_trash' => __( 'No Post Types found in Trash', 'acf' ), ), 'public' => false, 'hierarchical' => true, 'show_ui' => true, 'show_in_menu' => false, '_builtin' => false, 'capability_type' => 'post', 'capabilities' => array( 'edit_post' => $cap, 'delete_post' => $cap, 'edit_posts' => $cap, 'delete_posts' => $cap, ), 'supports' => false, 'rewrite' => false, 'query_var' => false, ) ); }