diff --git a/lib/class-wp-block-patterns-registry.php b/lib/class-wp-block-patterns-registry.php index 9cf17eb375293..dedce3f9a3f19 100644 --- a/lib/class-wp-block-patterns-registry.php +++ b/lib/class-wp-block-patterns-registry.php @@ -138,44 +138,3 @@ function register_block_pattern( $pattern_name, $pattern_properties ) { function unregister_block_pattern( $pattern_name ) { return WP_Block_Patterns_Registry::get_instance()->unregister( $pattern_name ); } - -/** - * Class used for interacting with patterns. - */ -class WP_Patterns_Registry { - - /** - * Utility method to retrieve the main instance of the class. - * - * @return WP_Block_Patterns_Registry The main instance. - */ - public static function get_instance() { - _deprecated_function( 'WP_Patterns_Registry', 'Gutenberg 8.3.0', 'WP_Block_Patterns_Registry' ); - return WP_Block_Patterns_Registry::get_instance(); - } -} - -/** - * Registers a new pattern. - * - * @param string $pattern_name Pattern name including namespace. - * @param array $pattern_properties Array containing the properties of the pattern. - * - * @return boolean True if the pattern was registered with success and false otherwise. - */ -function register_pattern( $pattern_name, $pattern_properties ) { - _deprecated_function( __FUNCTION__, 'Gutenberg 8.1.0', 'register_block_pattern()' ); - return register_block_pattern( $pattern_name, $pattern_properties ); -} - -/** - * Unregisters a pattern. - * - * @param string $pattern_name Pattern name including namespace. - * - * @return boolean True if the pattern was unregistered with success and false otherwise. - */ -function unregister_pattern( $pattern_name ) { - _deprecated_function( __FUNCTION__, 'Gutenberg 8.1.0', 'unregister_block_pattern()' ); - return unregister_block_pattern( $pattern_name ); -} diff --git a/lib/compat.php b/lib/compat.php index 9dd224adb2f19..36ca6a752a7bf 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -147,27 +147,6 @@ function gutenberg_add_dom_rect_polyfill( $scripts ) { } add_action( 'wp_default_scripts', 'gutenberg_add_dom_rect_polyfill', 20 ); -/** - * Sets the current post for usage in template blocks. - * - * @return WP_Post|null The post if any, or null otherwise. - */ -function gutenberg_get_post_from_context() { - // TODO: Without this temporary fix, an infinite loop can occur where - // posts with post content blocks render themselves recursively. - if ( is_admin() || defined( 'REST_REQUEST' ) ) { - return null; - } - - _deprecated_function( __FUNCTION__, '8.1.0' ); - - if ( ! in_the_loop() ) { - rewind_posts(); - the_post(); - } - return get_post(); -} - /** * Filters default block categories to substitute legacy category names with new * block categories.