ACF_UI_Options_Page::register_post_type │ public │ ACF 6.2

Registers the acf-ui-options-page custom post type with WordPress.

Метод класса: ACF_UI_Options_Page{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ACF_UI_Options_Page = new ACF_UI_Options_Page();
$ACF_UI_Options_Page->register_post_type();

Список изменений

С версии 6.2 Введена.

Код ACF_UI_Options_Page::register_post_type() ACF 6.8.11

public function register_post_type() {
	$cap = acf_get_setting( 'capability' );

	register_post_type(
		'acf-ui-options-page',
		array(
			'labels'          => array(
				'name'               => __( 'Options Pages', 'acf' ),
				'singular_name'      => __( 'Options Pages', 'acf' ),
				'add_new'            => __( 'Add New', 'acf' ),
				'add_new_item'       => __( 'Add New Options Page', 'acf' ),
				'edit_item'          => __( 'Edit Options Page', 'acf' ),
				'new_item'           => __( 'New Options Page', 'acf' ),
				'view_item'          => __( 'View Options Page', 'acf' ),
				'search_items'       => __( 'Search Options Pages', 'acf' ),
				'not_found'          => __( 'No Options Pages found', 'acf' ),
				'not_found_in_trash' => __( 'No Options Pages 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,
		)
	);
}