id ); } /** * Filters callback which sets the status of an untrashed post to its previous status. * * This can be used as a callback on the `wp_untrash_post_status` filter. * * @since 5.6.0 * * @param string $new_status The new status of the post being restored. * @param int $post_id The ID of the post being restored. * @param string $previous_status The status of the post at the point where it was trashed. * @return string The new status of the post. */ function wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status ) { return $previous_status; } /** * Returns whether the post can be edited in the block editor. * * @since 5.0.0 * @since 6.1.0 Moved to wp-includes from wp-admin. * * @param int|WP_Post $post Post ID or WP_Post object. * @return bool Whether the post can be edited in the block editor. */ function use_block_editor_for_post( $post ) { $post = get_post( $post ); if ( ! $post ) { return false; } // We're in the meta box loader, so don't use the block editor. if ( is_admin() && isset( $_GET['meta-box-loader'] ) ) { check_admin_referer( 'meta-box-loader', 'meta-box-loader-nonce' ); return false; } $use_block_editor = use_block_editor_for_post_type( $post->post_type ); /** * Filters whether a post is able to be edited in the block editor. * * @since 5.0.0 * * @param bool $use_block_editor Whether the post can be edited or not. * @param WP_Post $post The post being checked. */ return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post ); } /** * Returns whether a post type is compatible with the block editor. * * The block editor depends on the REST API, and if the post type is not shown in the * REST API, then it won't work with the block editor. * * @since 5.0.0 * @since 6.1.0 Moved to wp-includes from wp-admin. * * @param string $post_type The post type. * @return bool Whether the post type can be edited with the block editor. */ function use_block_editor_for_post_type( $post_type ) { if ( ! post_type_exists( $post_type ) ) { return false; } if ( ! post_type_supports( $post_type, 'editor' ) ) { return false; } $post_type_object = get_post_type_object( $post_type ); if ( $post_type_object && ! $post_type_object->show_in_rest ) { return false; } /** * Filters whether a post is able to be edited in the block editor. * * @since 5.0.0 * * @param bool $use_block_editor Whether the post type can be edited or not. Default true. * @param string $post_type The post type being checked. */ return apply_filters( 'use_block_editor_for_post_type', true, $post_type ); } /** * Registers any additional post meta fields. * * @since 6.3.0 Adds `wp_pattern_sync_status` meta field to the wp_block post type so an unsynced option can be added. * * @link https://github.com/WordPress/gutenberg/pull/51144 */ function wp_create_initial_post_meta() { register_post_meta( 'wp_block', 'wp_pattern_sync_status', array( 'sanitize_callback' => 'sanitize_text_field', 'single' => true, 'type' => 'string', 'show_in_rest' => array( 'schema' => array( 'type' => 'string', 'enum' => array( 'partial', 'unsynced' ), ), ), ) ); }
Fatal error: Uncaught Error: Call to undefined function _get_custom_object_labels() in /home/sportuga/public_html/wp-includes/taxonomy.php:720 Stack trace: #0 /home/sportuga/public_html/wp-includes/class-wp-taxonomy.php(486): get_taxonomy_labels(Object(WP_Taxonomy)) #1 /home/sportuga/public_html/wp-includes/class-wp-taxonomy.php(290): WP_Taxonomy->set_props('post', Array) #2 /home/sportuga/public_html/wp-includes/taxonomy.php(532): WP_Taxonomy->__construct('category', 'post', Array) #3 /home/sportuga/public_html/wp-includes/taxonomy.php(82): register_taxonomy('category', 'post', Array) #4 /home/sportuga/public_html/wp-settings.php(499): create_initial_taxonomies() #5 /home/sportuga/public_html/wp-config.php(102): require_once('/home/sportuga/...') #6 /home/sportuga/public_html/wp-load.php(50): require_once('/home/sportuga/...') #7 /home/sportuga/public_html/wp-blog-header.php(13): require_once('/home/sportuga/...') #8 /home/sportuga/public_html/index.php(17): require('/home/sportuga/...') #9 {main} thrown in /home/sportuga/public_html/wp-includes/taxonomy.php on line 720