--- a/wp/wp-admin/includes/deprecated.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/includes/deprecated.php Tue Dec 15 13:49:49 2020 +0100
@@ -159,8 +159,9 @@
* @deprecated 3.0.0 Use register_setting()
* @see register_setting()
*
- * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
- * Default whitelisted option key names include "general," "discussion," and "reading," among others.
+ * @param string $option_group A settings group name. Should correspond to an allowed option key name.
+ * Default allowed option key names include 'general', 'discussion', 'media',
+ * 'reading', 'writing', 'misc', 'options', and 'privacy'.
* @param string $option_name The name of an option to sanitize and save.
* @param callable $sanitize_callback A callback function that sanitizes the option's value.
*/
@@ -233,7 +234,7 @@
if ( !is_multisite() )
$level_key = $wpdb->get_blog_prefix() . 'user_level';
else
- $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+ $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
}
@@ -295,7 +296,7 @@
if ( !is_multisite() )
$level_key = $wpdb->get_blog_prefix() . 'user_level';
else
- $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+ $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
$query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
if ( $exclude_zeros )
@@ -319,7 +320,7 @@
if ( !is_multisite() )
$level_key = $wpdb->get_blog_prefix() . 'user_level';
else
- $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels
+ $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
}
@@ -544,7 +545,7 @@
$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
$this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
} elseif ( is_multisite() ) {
- $level_key = $wpdb->prefix . 'capabilities'; // wpmu site admins don't have user_levels
+ $level_key = $wpdb->prefix . 'capabilities'; // WPMU site admins don't have user_levels.
$this->query_from .= ", $wpdb->usermeta";
$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
}
@@ -564,7 +565,7 @@
$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
if ( $this->results )
- $this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // no limit
+ $this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // No limit.
else
$this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
}
@@ -584,7 +585,7 @@
* @access public
*/
public function do_paging() {
- if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
+ if ( $this->total_users_for_query > $this->users_per_page ) { // Have to page the results.
$args = array();
if ( ! empty($this->search_term) )
$args['usersearch'] = urlencode($this->search_term);
@@ -599,7 +600,9 @@
'add_args' => $args
) );
if ( $this->paging_text ) {
- $this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s–%s of %s' ) . '</span>%s',
+ $this->paging_text = sprintf(
+ /* translators: 1: Starting number of users on the current page, 2: Ending number of users, 3: Total number of users. */
+ '<span class="displaying-num">' . __( 'Displaying %1$s–%2$s of %3$s' ) . '</span>%s',
number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
number_format_i18n( $this->total_users_for_query ),
@@ -751,8 +754,6 @@
* @since 2.7.0
* @deprecated 3.3.0 Use wp_editor()
* @see wp_editor()
- *
- * @staticvar int $num
*/
function wp_tiny_mce( $teeny = false, $settings = false ) {
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
@@ -760,7 +761,7 @@
static $num = 1;
if ( ! class_exists( '_WP_Editors', false ) )
- require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
+ require_once ABSPATH . WPINC . '/class-wp-editor.php';
$editor_id = 'content' . $num++;
@@ -999,7 +1000,7 @@
* @deprecated 3.4.0 Use wp_get_themes()
* @see wp_get_themes()
*
- * @return array $themes Array of allowed themes.
+ * @return WP_Theme[] Array of WP_Theme objects keyed by their name.
*/
function get_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
@@ -1116,7 +1117,7 @@
* @deprecated 3.5.0 Use image_resize()
* @see image_resize()
*
- * @param mixed $file Filename of the original image, Or attachment id.
+ * @param mixed $file Filename of the original image, Or attachment ID.
* @param int $max_side Maximum length of a single side for the thumbnail.
* @param mixed $deprecated Never used.
* @return string Thumbnail path on success, Error string on failure.
@@ -1154,7 +1155,7 @@
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
- include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Core_Upgrader();
return $upgrader->upgrade($current);
@@ -1177,7 +1178,7 @@
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
- include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Plugin_Upgrader();
return $upgrader->upgrade($plugin);
}
@@ -1199,7 +1200,7 @@
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
- include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new Theme_Upgrader();
return $upgrader->upgrade($theme);
}
@@ -1317,7 +1318,7 @@
function wp_dashboard_plugins_output( $rss, $args = array() ) {
_deprecated_function( __FUNCTION__, '4.8.0' );
- // Plugin feeds plus link to install them
+ // Plugin feeds plus link to install them.
$popular = fetch_feed( $args['url']['popular'] );
if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
@@ -1333,10 +1334,10 @@
$items = $feed->get_items(0, 5);
- // Pick a random, non-installed plugin
+ // Pick a random, non-installed plugin.
while ( true ) {
- // Abort this foreach loop iteration if there's no plugins left of this type
- if ( 0 == count($items) )
+ // Abort this foreach loop iteration if there's no plugins left of this type.
+ if ( 0 === count($items) )
continue 2;
$item_key = array_rand($items);
@@ -1365,7 +1366,7 @@
break;
}
- // Eliminate some common badly formed plugin descriptions
+ // Eliminate some common badly formed plugin descriptions.
while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
unset($items[$item_key]);
@@ -1377,8 +1378,8 @@
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800';
echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
' <a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
- /* translators: %s: plugin name */
- esc_attr( sprintf( __( 'Install %s' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
+ /* translators: %s: Plugin name. */
+ esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
$feed->__destruct();
unset( $feed );
@@ -1514,3 +1515,50 @@
</script>
<?php
}
+
+/**
+ * Previous class for list table for privacy data export requests.
+ *
+ * @since 4.9.6
+ * @deprecated 5.3.0
+ */
+class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Data_Export_Requests_List_Table {
+ function __construct( $args ) {
+ _deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Export_Requests_List_Table' );
+
+ if ( ! isset( $args['screen'] ) || $args['screen'] === 'export_personal_data' ) {
+ $args['screen'] = 'export-personal-data';
+ }
+
+ parent::__construct( $args );
+ }
+}
+
+/**
+ * Previous class for list table for privacy data erasure requests.
+ *
+ * @since 4.9.6
+ * @deprecated 5.3.0
+ */
+class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Data_Removal_Requests_List_Table {
+ function __construct( $args ) {
+ _deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Removal_Requests_List_Table' );
+
+ if ( ! isset( $args['screen'] ) || $args['screen'] === 'remove_personal_data' ) {
+ $args['screen'] = 'erase-personal-data';
+ }
+
+ parent::__construct( $args );
+ }
+}
+
+/**
+ * Was used to add options for the privacy requests screens before they were separate files.
+ *
+ * @since 4.9.8
+ * @access private
+ * @deprecated 5.3.0
+ */
+function _wp_privacy_requests_screen_options() {
+ _deprecated_function( __FUNCTION__, '5.3.0' );
+}