Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Remove PHP functions slated for 5.5. 5.4 removal #14806

Merged
merged 1 commit into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ For features included in the Gutenberg plugin, the deprecation policy is intende
- The PHP function `gutenberg_default_post_format_template` has been removed.
- The PHP function `gutenberg_get_available_image_sizes` has been removed.
- The PHP function `gutenberg_get_autosave_newer_than_post_save` has been removed.
- The PHP function `gutenberg_default_post_format_template` has been removed.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was duplicate. See three lines above.

- The PHP function `gutenberg_editor_scripts_and_styles` has been removed.

## 5.4.0
Expand Down
46 changes: 0 additions & 46 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@

gutenberg_pre_init();

/**
* Project.
*
* The main entry point for the Gutenberg editor. Renders the editor on the
* wp-admin page for the plugin.
*
* @since 0.1.0
* @deprecated 5.3.0
*/
function the_gutenberg_project() {
_deprecated_function( __FUNCTION__, '5.3.0' );
}

/**
* Gutenberg's Menu.
*
Expand Down Expand Up @@ -81,22 +68,6 @@ function gutenberg_menu() {
}
add_action( 'admin_menu', 'gutenberg_menu' );

/**
* Checks whether we're currently loading a Gutenberg page
*
* @since 3.1.0
* @deprecated 5.3.0 WP_Screen::is_block_editor
*
* @return boolean Whether Gutenberg is being loaded.
*/
function is_gutenberg_page() {
_deprecated_function( __FUNCTION__, '5.3.0', 'WP_Screen::is_block_editor' );

require_once ABSPATH . 'wp-admin/includes/screen.php';
$screen = get_current_screen();
return ! is_null( $screen ) && get_current_screen()->is_block_editor();
}

/**
* Display a version notice and deactivate the Gutenberg plugin.
*
Expand Down Expand Up @@ -146,20 +117,3 @@ function gutenberg_pre_init() {

require_once dirname( __FILE__ ) . '/lib/load.php';
}

/**
* Initialize Gutenberg.
*
* Load API functions, register scripts and actions, etc.
*
* @deprecated 5.3.0
*
* @return bool Whether Gutenberg was initialized.
*/
function gutenberg_init() {
_deprecated_function( __FUNCTION__, '5.3.0' );

require_once ABSPATH . 'wp-admin/includes/screen.php';
$screen = get_current_screen();
return ! is_null( $screen ) && get_current_screen()->is_block_editor();
}
53 changes: 0 additions & 53 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,59 +500,6 @@ function gutenberg_register_vendor_script( $handle, $src, $deps = array() ) {
);
}

/**
* Assigns a default editor template with a default block by post format, if
* not otherwise assigned for a new post of type "post".
*
* @deprecated 5.3.0
*
* @param array $settings Default editor settings.
*
* @return array Filtered block editor settings.
*/
function gutenberg_default_post_format_template( $settings ) {
_deprecated_function( __FUNCTION__, '5.3.0' );

return $settings;
}

/**
* Retrieve a stored autosave that is newer than the post save.
*
* Deletes autosaves that are older than the post save.
*
* @deprecated 5.3.0
*
* @return WP_Post|boolean The post autosave. False if none found.
*/
function gutenberg_get_autosave_newer_than_post_save() {
_deprecated_function( __FUNCTION__, '5.3.0' );

return false;
}

/**
* Loads Gutenberg Locale Data.
*
* @deprecated 5.2.0
*/
function gutenberg_load_locale_data() {
_deprecated_function( __FUNCTION__, '5.2.0' );
}

/**
* Retrieve The available image sizes for a post
*
* @deprecated 5.3.0
*
* @return array
*/
function gutenberg_get_available_image_sizes() {
_deprecated_function( __FUNCTION__, '5.3.0' );

return array();
}

/**
* Extends block editor settings to include Gutenberg's `editor-styles.css` as
* taking precedent those styles shipped with core.
Expand Down
53 changes: 0 additions & 53 deletions lib/i18n.php

This file was deleted.

1 change: 0 additions & 1 deletion lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

require dirname( __FILE__ ) . '/blocks.php';
require dirname( __FILE__ ) . '/client-assets.php';
require dirname( __FILE__ ) . '/i18n.php';
require dirname( __FILE__ ) . '/demo.php';
require dirname( __FILE__ ) . '/widgets.php';
require dirname( __FILE__ ) . '/widgets-page.php';