Automattic\WooCommerce\Internal\PushNotifications
PushNotifications::register_post_types
Registers the push token custom post type.
Метод класса: PushNotifications{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$PushNotifications = new PushNotifications(); $PushNotifications->register_post_types(): void;
Список изменений
| С версии 10.5.0 | Введена. |
Код PushNotifications::register_post_types() PushNotifications::register post types WC 10.5.2
public function register_post_types(): void {
register_post_type(
PushToken::POST_TYPE,
array(
'labels' => array(
'name' => __( 'Push Tokens', 'woocommerce' ),
'singular_name' => __( 'Push Token', 'woocommerce' ),
),
'public' => false,
'publicly_queryable' => false,
'show_ui' => false,
'show_in_menu' => false,
'query_var' => false,
'rewrite' => false,
'capability_type' => 'post',
'has_archive' => false,
'hierarchical' => false,
'supports' => array( 'author' ),
'can_export' => false,
'delete_with_user' => true,
)
);
}