'string', 'single' => true, 'show_in_rest' => true, 'auth_callback' => static fn () => current_user_can( 'edit_posts' ), 'sanitize_callback' => 'sanitize_title', ) ); register_post_meta( $post_type, Meta_Keys::PAGE_STYLE_LOCKED, array( 'type' => 'boolean', 'single' => true, 'show_in_rest' => true, 'auth_callback' => static fn () => current_user_can( 'edit_posts' ), 'sanitize_callback' => static fn ( $value ) => (bool) $value, ) ); } } public static function enqueue_editor_assets(): void { wp_enqueue_script( 'forwp-ss-editor', FORWP_STYLE_SWITCHER_URL . 'assets/editor.js', array( 'wp-plugins', 'wp-edit-post', 'wp-components', 'wp-data', 'wp-i18n', 'wp-element' ), FORWP_STYLE_SWITCHER_VERSION, true ); wp_enqueue_style( 'forwp-ss-editor', FORWP_STYLE_SWITCHER_URL . 'assets/admin.css', array( 'wp-components' ), FORWP_STYLE_SWITCHER_VERSION ); } }