diff --git a/lib/register.php b/lib/register.php index 16d5aa85b623e0..9f86fdb58200b8 100644 --- a/lib/register.php +++ b/lib/register.php @@ -25,16 +25,16 @@ function gutenberg_collect_meta_box_data() { * Return whether the post can be edited in Gutenberg and by the current user. * * @since 0.5.0 - * @deprecated 5.0.0 use_block_editor_for_post + * @deprecated 5.1.0 use_block_editor_for_post * * @param int|WP_Post $post Post ID or WP_Post object. * @return bool Whether the post can be edited with Gutenberg. */ function gutenberg_can_edit_post( $post ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'use_block_editor_for_post' ); + _deprecated_function( __FUNCTION__, '5.1.0', 'use_block_editor_for_post' ); + require_once ABSPATH . 'wp-admin/includes/post.php'; return use_block_editor_for_post( $post ); - } /** @@ -44,14 +44,15 @@ function gutenberg_can_edit_post( $post ) { * REST API, then the post cannot be edited in Gutenberg. * * @since 1.5.2 - * @deprecated 5.0.0 use_block_editor_for_post_type + * @deprecated 5.1.0 use_block_editor_for_post_type * * @param string $post_type The post type. * @return bool Whether the post type can be edited with Gutenberg. */ function gutenberg_can_edit_post_type( $post_type ) { - _deprecated_function( __FUNCTION__, '5.0.0', 'use_block_editor_for_post_type' ); + _deprecated_function( __FUNCTION__, '5.1.0', 'use_block_editor_for_post_type' ); + require_once ABSPATH . 'wp-admin/includes/post.php'; return use_block_editor_for_post_type( $post_type ); } @@ -155,23 +156,23 @@ function gutenberg_bulk_post_updated_messages( $messages ) { * Injects a hidden input in the edit form to propagate the information that classic editor is selected. * * @since 1.5.2 - * @deprecated 5.0.0 + * @deprecated 5.1.0 */ function gutenberg_remember_classic_editor_when_saving_posts() { - _deprecated_function( __FUNCTION__, '5.0.0' ); + _deprecated_function( __FUNCTION__, '5.1.0' ); } /** * Appends a query argument to the redirect url to make sure it gets redirected to the classic editor. * * @since 1.5.2 - * @deprecated 5.0.0 + * @deprecated 5.1.0 * * @param string $url Redirect url. * @return string Redirect url. */ function gutenberg_redirect_to_classic_editor_when_saving_posts( $url ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); + _deprecated_function( __FUNCTION__, '5.1.0' ); return $url; } @@ -181,13 +182,13 @@ function gutenberg_redirect_to_classic_editor_when_saving_posts( $url ) { * the editor from which the user navigated. * * @since 1.5.2 - * @deprecated 5.0.0 + * @deprecated 5.1.0 * * @param string $url Edit url. * @return string Edit url. */ function gutenberg_revisions_link_to_editor( $url ) { - _deprecated_function( __FUNCTION__, '5.0.0' ); + _deprecated_function( __FUNCTION__, '5.1.0' ); return $url; }