Skip to content

Commit

Permalink
Plugin: Remove PHP functions slated for removal in 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Feb 25, 2019
1 parent d2f4f7c commit 629596c
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 1,014 deletions.
100 changes: 0 additions & 100 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,103 +234,3 @@ function gutenberg_init( $return, $post ) {

return true;
}

/**
* Adds the filters to register additional links for the Gutenberg editor in
* the post/page screens.
*
* @since 1.5.0
* @deprecated 5.0.0
*/
function gutenberg_add_edit_link_filters() {
_deprecated_function( __FUNCTION__, '5.0.0' );
}

/**
* Registers an additional link in the post/page screens to edit any post/page in
* the Classic editor.
*
* @since 1.5.0
* @deprecated 5.0.0
*
* @param array $actions Post actions.
*
* @return array Updated post actions.
*/
function gutenberg_add_edit_link( $actions ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $actions;
}

/**
* Removes the Edit action from the reusable block list's Bulk Actions dropdown.
*
* @since 3.8.0
* @deprecated 5.0.0
*
* @param array $actions Bulk actions.
*
* @return array Updated bulk actions.
*/
function gutenberg_block_bulk_actions( $actions ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $actions;
}

/**
* Prints the JavaScript to replace the default "Add New" button.$_COOKIE
*
* @since 1.5.0
* @deprecated 5.0.0
*/
function gutenberg_replace_default_add_new_button() {
_deprecated_function( __FUNCTION__, '5.0.0' );
}

/**
* Adds the block-editor-page class to the body tag on the Gutenberg page.
*
* @since 1.5.0
* @deprecated 5.0.0
*
* @param string $classes Space separated string of classes being added to the body tag.
* @return string The $classes string, with block-editor-page appended.
*/
function gutenberg_add_admin_body_class( $classes ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $classes;
}

/**
* Adds attributes to kses allowed tags that aren't in the default list
* and that Gutenberg needs to save blocks such as the Gallery block.
*
* @deprecated 5.0.0
*
* @param array $tags Allowed HTML.
* @return array (Maybe) modified allowed HTML.
*/
function gutenberg_kses_allowedtags( $tags ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $tags;
}

/**
* Adds the wp-embed-responsive class to the body tag if the theme has opted in to
* Gutenberg responsive embeds.
*
* @since 4.1.0
* @deprecated 5.0.0
*
* @param Array $classes Array of classes being added to the body tag.
* @return Array The $classes array, with wp-embed-responsive appended.
*/
function gutenberg_add_responsive_body_class( $classes ) {
_deprecated_function( __FUNCTION__, '5.0.0' );

return $classes;
}
142 changes: 0 additions & 142 deletions lib/blocks.php

This file was deleted.

115 changes: 0 additions & 115 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,6 @@ function gutenberg_url( $path ) {
return plugins_url( $path, dirname( __FILE__ ) );
}

/**
* Returns contents of an inline script used in appending polyfill scripts for
* browsers which fail the provided tests. The provided array is a mapping from
* a condition to verify feature support to its polyfill script handle.
*
* @param array $tests Features to detect.
* @return string Conditional polyfill inline script.
*/
function gutenberg_get_script_polyfill( $tests ) {
_deprecated_function( __FUNCTION__, '5.0.0', 'wp_get_script_polyfill' );

global $wp_scripts;
return wp_get_script_polyfill( $wp_scripts, $tests );
}

if ( ! function_exists( 'register_tinymce_scripts' ) ) {
/**
* Registers the main TinyMCE scripts.
*
* @deprecated 5.0.0 wp_register_tinymce_scripts
*/
function register_tinymce_scripts() {
_deprecated_function( __FUNCTION__, '5.0.0', 'wp_register_tinymce_scripts' );

global $wp_scripts;
return wp_register_tinymce_scripts( $wp_scripts );
}
}

/**
* Registers a script according to `wp_register_script`. Honors this request by
* deregistering any script by the same handler before registration.
Expand Down Expand Up @@ -507,23 +478,6 @@ function gutenberg_register_scripts_and_styles() {
add_action( 'wp_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 );
add_action( 'admin_enqueue_scripts', 'gutenberg_register_scripts_and_styles', 5 );

/**
* Append result of internal request to REST API for purpose of preloading
* data to be attached to the page. Expected to be called in the context of
* `array_reduce`.
*
* @deprecated 5.0.0 rest_preload_api_request
*
* @param array $memo Reduce accumulator.
* @param string $path REST API path to preload.
* @return array Modified reduce accumulator.
*/
function gutenberg_preload_api_request( $memo, $path ) {
_deprecated_function( __FUNCTION__, '5.0.0', 'rest_preload_api_request' );

return rest_preload_api_request( $memo, $path );
}

/**
* Registers vendor JavaScript files to be used as dependencies of the editor
* and plugins.
Expand Down Expand Up @@ -681,51 +635,6 @@ function gutenberg_register_vendor_script( $handle, $src, $deps = array() ) {
);
}

/**
* Prepares server-registered blocks for JavaScript, returning an associative
* array of registered block data keyed by block name. Data includes properties
* of a block relevant for client registration.
*
* @deprecated 5.0.0 get_block_editor_server_block_settings
*
* @return array An associative array of registered block data.
*/
function gutenberg_prepare_blocks_for_js() {
_deprecated_function( __FUNCTION__, '5.0.0', 'get_block_editor_server_block_settings' );

return get_block_editor_server_block_settings();
}

/**
* Handles the enqueueing of block scripts and styles that are common to both
* the editor and the front-end.
*
* Note: This function must remain *before*
* `gutenberg_editor_scripts_and_styles` so that editor-specific stylesheets
* are loaded last.
*
* @since 0.4.0
* @deprecated 5.0.0 wp_common_block_scripts_and_styles
*/
function gutenberg_common_scripts_and_styles() {
_deprecated_function( __FUNCTION__, '5.0.0', 'wp_common_block_scripts_and_styles' );

wp_common_block_scripts_and_styles();
}

/**
* Enqueues registered block scripts and styles, depending on current rendered
* context (only enqueuing editor scripts while in context of the editor).
*
* @since 2.0.0
* @deprecated 5.0.0 wp_enqueue_registered_block_scripts_and_styles
*/
function gutenberg_enqueue_registered_block_scripts_and_styles() {
_deprecated_function( __FUNCTION__, '5.0.0', 'wp_enqueue_registered_block_scripts_and_styles' );

wp_enqueue_registered_block_scripts_and_styles();
}

/**
* Assigns a default editor template with a default block by post format, if
* not otherwise assigned for a new post of type "post".
Expand Down Expand Up @@ -795,21 +704,6 @@ function gutenberg_get_autosave_newer_than_post_save( $post ) {
return false;
}

/**
* Returns all the block categories.
*
* @since 2.2.0
* @deprecated 5.0.0 get_block_categories
*
* @param WP_Post $post Post object.
* @return Object[] Block categories.
*/
function gutenberg_get_block_categories( $post ) {
_deprecated_function( __FUNCTION__, '5.0.0', 'get_block_categories' );

return get_block_categories( $post );
}

/**
* Loads Gutenberg Locale Data.
*/
Expand Down Expand Up @@ -1282,12 +1176,3 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
*/
do_action( 'enqueue_block_editor_assets' );
}

/**
* Enqueue the reusable blocks listing page's script
*
* @deprecated 5.0.0
*/
function gutenberg_load_list_reusable_blocks() {
_deprecated_function( __FUNCTION__, '5.0.0' );
}
Loading

0 comments on commit 629596c

Please sign in to comment.