ACF_Taxonomy::register_post_type
Registers the acf-taxonomy custom post type with WordPress.
Метод класса: ACF_Taxonomy{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ACF_Taxonomy = new ACF_Taxonomy(); $ACF_Taxonomy->register_post_type();
Список изменений
| С версии 6.1 | Введена. |
Код ACF_Taxonomy::register_post_type() ACF Taxonomy::register post type ACF 6.4.2
public function register_post_type() {
$cap = acf_get_setting( 'capability' );
register_post_type(
'acf-taxonomy',
array(
'labels' => array(
'name' => __( 'Taxonomies', 'acf' ),
'singular_name' => __( 'Taxonomies', 'acf' ),
'add_new' => __( 'Add New', 'acf' ),
'add_new_item' => __( 'Add New Taxonomy', 'acf' ),
'edit_item' => __( 'Edit Taxonomy', 'acf' ),
'new_item' => __( 'New Taxonomy', 'acf' ),
'view_item' => __( 'View Taxonomy', 'acf' ),
'search_items' => __( 'Search Taxonomies', 'acf' ),
'not_found' => __( 'No Taxonomies found', 'acf' ),
'not_found_in_trash' => __( 'No Taxonomies 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,
)
);
}