WPCF7_ContactForm::register_post_type
Registers the post type for contact forms.
Метод класса: WPCF7_ContactForm{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = WPCF7_ContactForm::register_post_type();
Код WPCF7_ContactForm::register_post_type() WPCF7 ContactForm::register post type CF7 6.1.5
public static function register_post_type() {
register_post_type( self::post_type, array(
'labels' => array(
'name' => __( 'Contact Forms', 'contact-form-7' ),
'singular_name' => __( 'Contact Form', 'contact-form-7' ),
),
'rewrite' => false,
'query_var' => false,
'public' => false,
'capability_type' => 'page',
'capabilities' => array(
'edit_post' => 'wpcf7_edit_contact_form',
'read_post' => 'wpcf7_read_contact_form',
'delete_post' => 'wpcf7_delete_contact_form',
'edit_posts' => 'wpcf7_edit_contact_forms',
'edit_others_posts' => 'wpcf7_edit_contact_forms',
'publish_posts' => 'wpcf7_edit_contact_forms',
'read_private_posts' => 'wpcf7_edit_contact_forms',
),
) );
}