1<?php
2/**
3 * Deprecated admin functions from past WordPress versions. You shouldn't use these
4 * functions and look for the alternatives instead. The functions will be removed
5 * in a later version.
6 *
7 * @package WordPress
8 * @subpackage Deprecated
9 */
10
11/*
12 * Deprecated functions come here to die.
13 */
14
15/**
16 * @since 2.1.0
17 * @deprecated 2.1.0 Use wp_editor()
18 * @see wp_editor()
19 */
20function tinymce_include() {
21	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_editor()' );
22
23	wp_tiny_mce();
24}
25
26/**
27 * Unused Admin function.
28 *
29 * @since 2.0.0
30 * @deprecated 2.5.0
31 *
32 */
33function documentation_link() {
34	_deprecated_function( __FUNCTION__, '2.5.0' );
35}
36
37/**
38 * Calculates the new dimensions for a downsampled image.
39 *
40 * @since 2.0.0
41 * @deprecated 3.0.0 Use wp_constrain_dimensions()
42 * @see wp_constrain_dimensions()
43 *
44 * @param int $width Current width of the image
45 * @param int $height Current height of the image
46 * @param int $wmax Maximum wanted width
47 * @param int $hmax Maximum wanted height
48 * @return array Shrunk dimensions (width, height).
49 */
50function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
51	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
52	return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
53}
54
55/**
56 * Calculated the new dimensions for a downsampled image.
57 *
58 * @since 2.0.0
59 * @deprecated 3.5.0 Use wp_constrain_dimensions()
60 * @see wp_constrain_dimensions()
61 *
62 * @param int $width Current width of the image
63 * @param int $height Current height of the image
64 * @return array Shrunk dimensions (width, height).
65 */
66function get_udims( $width, $height ) {
67	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
68	return wp_constrain_dimensions( $width, $height, 128, 96 );
69}
70
71/**
72 * Legacy function used to generate the categories checklist control.
73 *
74 * @since 0.71
75 * @deprecated 2.6.0 Use wp_category_checklist()
76 * @see wp_category_checklist()
77 *
78 * @global int $post_ID
79 *
80 * @param int $default       Unused.
81 * @param int $parent        Unused.
82 * @param array $popular_ids Unused.
83 */
84function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
85	_deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
86	global $post_ID;
87	wp_category_checklist( $post_ID );
88}
89
90/**
91 * Legacy function used to generate a link categories checklist control.
92 *
93 * @since 2.1.0
94 * @deprecated 2.6.0 Use wp_link_category_checklist()
95 * @see wp_link_category_checklist()
96 *
97 * @global int $link_id
98 *
99 * @param int $default Unused.
100 */
101function dropdown_link_categories( $default = 0 ) {
102	_deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
103	global $link_id;
104	wp_link_category_checklist( $link_id );
105}
106
107/**
108 * Get the real filesystem path to a file to edit within the admin.
109 *
110 * @since 1.5.0
111 * @deprecated 2.9.0
112 * @uses WP_CONTENT_DIR Full filesystem path to the wp-content directory.
113 *
114 * @param string $file Filesystem path relative to the wp-content directory.
115 * @return string Full filesystem path to edit.
116 */
117function get_real_file_to_edit( $file ) {
118	_deprecated_function( __FUNCTION__, '2.9.0' );
119
120	return WP_CONTENT_DIR . $file;
121}
122
123/**
124 * Legacy function used for generating a categories drop-down control.
125 *
126 * @since 1.2.0
127 * @deprecated 3.0.0 Use wp_dropdown_categories()
128 * @see wp_dropdown_categories()
129 *
130 * @param int $currentcat    Optional. ID of the current category. Default 0.
131 * @param int $currentparent Optional. Current parent category ID. Default 0.
132 * @param int $parent        Optional. Parent ID to retrieve categories for. Default 0.
133 * @param int $level         Optional. Number of levels deep to display. Default 0.
134 * @param array $categories  Optional. Categories to include in the control. Default 0.
135 * @return void|false Void on success, false if no categories were found.
136 */
137function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
138	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
139	if (!$categories )
140		$categories = get_categories( array('hide_empty' => 0) );
141
142	if ( $categories ) {
143		foreach ( $categories as $category ) {
144			if ( $currentcat != $category->term_id && $parent == $category->parent) {
145				$pad = str_repeat( '&#8211; ', $level );
146				$category->name = esc_html( $category->name );
147				echo "\n\t<option value='$category->term_id'";
148				if ( $currentparent == $category->term_id )
149					echo " selected='selected'";
150				echo ">$pad$category->name</option>";
151				wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
152			}
153		}
154	} else {
155		return false;
156	}
157}
158
159/**
160 * Register a setting and its sanitization callback
161 *
162 * @since 2.7.0
163 * @deprecated 3.0.0 Use register_setting()
164 * @see register_setting()
165 *
166 * @param string $option_group A settings group name. Should correspond to an allowed option key name.
167 *                             Default allowed option key names include 'general', 'discussion', 'media',
168 *                             'reading', 'writing', 'misc', 'options', and 'privacy'.
169 * @param string $option_name The name of an option to sanitize and save.
170 * @param callable $sanitize_callback A callback function that sanitizes the option's value.
171 */
172function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
173	_deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
174	register_setting( $option_group, $option_name, $sanitize_callback );
175}
176
177/**
178 * Unregister a setting
179 *
180 * @since 2.7.0
181 * @deprecated 3.0.0 Use unregister_setting()
182 * @see unregister_setting()
183 *
184 * @param string $option_group
185 * @param string $option_name
186 * @param callable $sanitize_callback
187 */
188function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
189	_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
190	unregister_setting( $option_group, $option_name, $sanitize_callback );
191}
192
193/**
194 * Determines the language to use for CodePress syntax highlighting.
195 *
196 * @since 2.8.0
197 * @deprecated 3.0.0
198 *
199 * @param string $filename
200**/
201function codepress_get_lang( $filename ) {
202	_deprecated_function( __FUNCTION__, '3.0.0' );
203}
204
205/**
206 * Adds JavaScript required to make CodePress work on the theme/plugin editors.
207 *
208 * @since 2.8.0
209 * @deprecated 3.0.0
210**/
211function codepress_footer_js() {
212	_deprecated_function( __FUNCTION__, '3.0.0' );
213}
214
215/**
216 * Determine whether to use CodePress.
217 *
218 * @since 2.8.0
219 * @deprecated 3.0.0
220**/
221function use_codepress() {
222	_deprecated_function( __FUNCTION__, '3.0.0' );
223}
224
225/**
226 * Get all user IDs.
227 *
228 * @deprecated 3.1.0 Use get_users()
229 *
230 * @global wpdb $wpdb WordPress database abstraction object.
231 *
232 * @return array List of user IDs.
233 */
234function get_author_user_ids() {
235	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
236
237	global $wpdb;
238	if ( !is_multisite() )
239		$level_key = $wpdb->get_blog_prefix() . 'user_level';
240	else
241		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
242
243	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
244}
245
246/**
247 * Gets author users who can edit posts.
248 *
249 * @deprecated 3.1.0 Use get_users()
250 *
251 * @global wpdb $wpdb WordPress database abstraction object.
252 *
253 * @param int $user_id User ID.
254 * @return array|false List of editable authors. False if no editable users.
255 */
256function get_editable_authors( $user_id ) {
257	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
258
259	global $wpdb;
260
261	$editable = get_editable_user_ids( $user_id );
262
263	if ( !$editable ) {
264		return false;
265	} else {
266		$editable = join(',', $editable);
267		$authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
268	}
269
270	return apply_filters('get_editable_authors', $authors);
271}
272
273/**
274 * Gets the IDs of any users who can edit posts.
275 *
276 * @deprecated 3.1.0 Use get_users()
277 *
278 * @global wpdb $wpdb WordPress database abstraction object.
279 *
280 * @param int  $user_id       User ID.
281 * @param bool $exclude_zeros Optional. Whether to exclude zeroes. Default true.
282 * @return array Array of editable user IDs, empty array otherwise.
283 */
284function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
285	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
286
287	global $wpdb;
288
289	if ( ! $user = get_userdata( $user_id ) )
290		return array();
291	$post_type_obj = get_post_type_object($post_type);
292
293	if ( ! $user->has_cap($post_type_obj->cap->edit_others_posts) ) {
294		if ( $user->has_cap($post_type_obj->cap->edit_posts) || ! $exclude_zeros )
295			return array($user->ID);
296		else
297			return array();
298	}
299
300	if ( !is_multisite() )
301		$level_key = $wpdb->get_blog_prefix() . 'user_level';
302	else
303		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
304
305	$query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key);
306	if ( $exclude_zeros )
307		$query .= " AND meta_value != '0'";
308
309	return $wpdb->get_col( $query );
310}
311
312/**
313 * Gets all users who are not authors.
314 *
315 * @deprecated 3.1.0 Use get_users()
316 *
317 * @global wpdb $wpdb WordPress database abstraction object.
318 */
319function get_nonauthor_user_ids() {
320	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
321
322	global $wpdb;
323
324	if ( !is_multisite() )
325		$level_key = $wpdb->get_blog_prefix() . 'user_level';
326	else
327		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // WPMU site admins don't have user_levels.
328
329	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
330}
331
332if ( ! class_exists( 'WP_User_Search', false ) ) :
333/**
334 * WordPress User Search class.
335 *
336 * @since 2.1.0
337 * @deprecated 3.1.0 Use WP_User_Query
338 */
339class WP_User_Search {
340
341	/**
342	 * {@internal Missing Description}}
343	 *
344	 * @since 2.1.0
345	 * @access private
346	 * @var mixed
347	 */
348	var $results;
349
350	/**
351	 * {@internal Missing Description}}
352	 *
353	 * @since 2.1.0
354	 * @access private
355	 * @var string
356	 */
357	var $search_term;
358
359	/**
360	 * Page number.
361	 *
362	 * @since 2.1.0
363	 * @access private
364	 * @var int
365	 */
366	var $page;
367
368	/**
369	 * Role name that users have.
370	 *
371	 * @since 2.5.0
372	 * @access private
373	 * @var string
374	 */
375	var $role;
376
377	/**
378	 * Raw page number.
379	 *
380	 * @since 2.1.0
381	 * @access private
382	 * @var int|bool
383	 */
384	var $raw_page;
385
386	/**
387	 * Amount of users to display per page.
388	 *
389	 * @since 2.1.0
390	 * @access public
391	 * @var int
392	 */
393	var $users_per_page = 50;
394
395	/**
396	 * {@internal Missing Description}}
397	 *
398	 * @since 2.1.0
399	 * @access private
400	 * @var int
401	 */
402	var $first_user;
403
404	/**
405	 * {@internal Missing Description}}
406	 *
407	 * @since 2.1.0
408	 * @access private
409	 * @var int
410	 */
411	var $last_user;
412
413	/**
414	 * {@internal Missing Description}}
415	 *
416	 * @since 2.1.0
417	 * @access private
418	 * @var string
419	 */
420	var $query_limit;
421
422	/**
423	 * {@internal Missing Description}}
424	 *
425	 * @since 3.0.0
426	 * @access private
427	 * @var string
428	 */
429	var $query_orderby;
430
431	/**
432	 * {@internal Missing Description}}
433	 *
434	 * @since 3.0.0
435	 * @access private
436	 * @var string
437	 */
438	var $query_from;
439
440	/**
441	 * {@internal Missing Description}}
442	 *
443	 * @since 3.0.0
444	 * @access private
445	 * @var string
446	 */
447	var $query_where;
448
449	/**
450	 * {@internal Missing Description}}
451	 *
452	 * @since 2.1.0
453	 * @access private
454	 * @var int
455	 */
456	var $total_users_for_query = 0;
457
458	/**
459	 * {@internal Missing Description}}
460	 *
461	 * @since 2.1.0
462	 * @access private
463	 * @var bool
464	 */
465	var $too_many_total_users = false;
466
467	/**
468	 * {@internal Missing Description}}
469	 *
470	 * @since 2.1.0
471	 * @access private
472	 * @var WP_Error
473	 */
474	var $search_errors;
475
476	/**
477	 * {@internal Missing Description}}
478	 *
479	 * @since 2.7.0
480	 * @access private
481	 * @var string
482	 */
483	var $paging_text;
484
485	/**
486	 * PHP5 Constructor - Sets up the object properties.
487	 *
488	 * @since 2.1.0
489	 *
490	 * @param string $search_term Search terms string.
491	 * @param int $page Optional. Page ID.
492	 * @param string $role Role name.
493	 * @return WP_User_Search
494	 */
495	function __construct( $search_term = '', $page = '', $role = '' ) {
496		_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
497
498		$this->search_term = wp_unslash( $search_term );
499		$this->raw_page = ( '' == $page ) ? false : (int) $page;
500		$this->page = ( '' == $page ) ? 1 : (int) $page;
501		$this->role = $role;
502
503		$this->prepare_query();
504		$this->query();
505		$this->do_paging();
506	}
507
508	/**
509	 * PHP4 Constructor - Sets up the object properties.
510	 *
511	 * @since 2.1.0
512	 *
513	 * @param string $search_term Search terms string.
514	 * @param int $page Optional. Page ID.
515	 * @param string $role Role name.
516	 * @return WP_User_Search
517	 */
518	public function WP_User_Search( $search_term = '', $page = '', $role = '' ) {
519		self::__construct( $search_term, $page, $role );
520	}
521
522	/**
523	 * Prepares the user search query (legacy).
524	 *
525	 * @since 2.1.0
526	 * @access public
527	 */
528	public function prepare_query() {
529		global $wpdb;
530		$this->first_user = ($this->page - 1) * $this->users_per_page;
531
532		$this->query_limit = $wpdb->prepare(" LIMIT %d, %d", $this->first_user, $this->users_per_page);
533		$this->query_orderby = ' ORDER BY user_login';
534
535		$search_sql = '';
536		if ( $this->search_term ) {
537			$searches = array();
538			$search_sql = 'AND (';
539			foreach ( array('user_login', 'user_nicename', 'user_email', 'user_url', 'display_name') as $col )
540				$searches[] = $wpdb->prepare( $col . ' LIKE %s', '%' . like_escape($this->search_term) . '%' );
541			$search_sql .= implode(' OR ', $searches);
542			$search_sql .= ')';
543		}
544
545		$this->query_from = " FROM $wpdb->users";
546		$this->query_where = " WHERE 1=1 $search_sql";
547
548		if ( $this->role ) {
549			$this->query_from .= " INNER JOIN $wpdb->usermeta ON $wpdb->users.ID = $wpdb->usermeta.user_id";
550			$this->query_where .= $wpdb->prepare(" AND $wpdb->usermeta.meta_key = '{$wpdb->prefix}capabilities' AND $wpdb->usermeta.meta_value LIKE %s", '%' . $this->role . '%');
551		} elseif ( is_multisite() ) {
552			$level_key = $wpdb->prefix . 'capabilities'; // WPMU site admins don't have user_levels.
553			$this->query_from .= ", $wpdb->usermeta";
554			$this->query_where .= " AND $wpdb->users.ID = $wpdb->usermeta.user_id AND meta_key = '{$level_key}'";
555		}
556
557		do_action_ref_array( 'pre_user_search', array( &$this ) );
558	}
559
560	/**
561	 * Executes the user search query.
562	 *
563	 * @since 2.1.0
564	 * @access public
565	 */
566	public function query() {
567		global $wpdb;
568
569		$this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit);
570
571		if ( $this->results )
572			$this->total_users_for_query = $wpdb->get_var("SELECT COUNT(DISTINCT($wpdb->users.ID))" . $this->query_from . $this->query_where); // No limit.
573		else
574			$this->search_errors = new WP_Error('no_matching_users_found', __('No users found.'));
575	}
576
577	/**
578	 * Prepares variables for use in templates.
579	 *
580	 * @since 2.1.0
581	 * @access public
582	 */
583	function prepare_vars_for_template_usage() {}
584
585	/**
586	 * Handles paging for the user search query.
587	 *
588	 * @since 2.1.0
589	 * @access public
590	 */
591	public function do_paging() {
592		if ( $this->total_users_for_query > $this->users_per_page ) { // Have to page the results.
593			$args = array();
594			if ( ! empty($this->search_term) )
595				$args['usersearch'] = urlencode($this->search_term);
596			if ( ! empty($this->role) )
597				$args['role'] = urlencode($this->role);
598
599			$this->paging_text = paginate_links( array(
600				'total' => ceil($this->total_users_for_query / $this->users_per_page),
601				'current' => $this->page,
602				'base' => 'users.php?%_%',
603				'format' => 'userspage=%#%',
604				'add_args' => $args
605			) );
606			if ( $this->paging_text ) {
607				$this->paging_text = sprintf(
608					/* translators: 1: Starting number of users on the current page, 2: Ending number of users, 3: Total number of users. */
609					'<span class="displaying-num">' . __( 'Displaying %1$s&#8211;%2$s of %3$s' ) . '</span>%s',
610					number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
611					number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
612					number_format_i18n( $this->total_users_for_query ),
613					$this->paging_text
614				);
615			}
616		}
617	}
618
619	/**
620	 * Retrieves the user search query results.
621	 *
622	 * @since 2.1.0
623	 * @access public
624	 *
625	 * @return array
626	 */
627	public function get_results() {
628		return (array) $this->results;
629	}
630
631	/**
632	 * Displaying paging text.
633	 *
634	 * @see do_paging() Builds paging text.
635	 *
636	 * @since 2.1.0
637	 * @access public
638	 */
639	function page_links() {
640		echo $this->paging_text;
641	}
642
643	/**
644	 * Whether paging is enabled.
645	 *
646	 * @see do_paging() Builds paging text.
647	 *
648	 * @since 2.1.0
649	 * @access public
650	 *
651	 * @return bool
652	 */
653	function results_are_paged() {
654		if ( $this->paging_text )
655			return true;
656		return false;
657	}
658
659	/**
660	 * Whether there are search terms.
661	 *
662	 * @since 2.1.0
663	 * @access public
664	 *
665	 * @return bool
666	 */
667	function is_search() {
668		if ( $this->search_term )
669			return true;
670		return false;
671	}
672}
673endif;
674
675/**
676 * Retrieves editable posts from other users.
677 *
678 * @since 2.3.0
679 * @deprecated 3.1.0 Use get_posts()
680 * @see get_posts()
681 *
682 * @global wpdb $wpdb WordPress database abstraction object.
683 *
684 * @param int    $user_id User ID to not retrieve posts from.
685 * @param string $type    Optional. Post type to retrieve. Accepts 'draft', 'pending' or 'any' (all).
686 *                        Default 'any'.
687 * @return array List of posts from others.
688 */
689function get_others_unpublished_posts( $user_id, $type = 'any' ) {
690	_deprecated_function( __FUNCTION__, '3.1.0' );
691
692	global $wpdb;
693
694	$editable = get_editable_user_ids( $user_id );
695
696	if ( in_array($type, array('draft', 'pending')) )
697		$type_sql = " post_status = '$type' ";
698	else
699		$type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) ";
700
701	$dir = ( 'pending' == $type ) ? 'ASC' : 'DESC';
702
703	if ( !$editable ) {
704		$other_unpubs = '';
705	} else {
706		$editable = join(',', $editable);
707		$other_unpubs = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != %d ORDER BY post_modified $dir", $user_id) );
708	}
709
710	return apply_filters('get_others_drafts', $other_unpubs);
711}
712
713/**
714 * Retrieve drafts from other users.
715 *
716 * @deprecated 3.1.0 Use get_posts()
717 * @see get_posts()
718 *
719 * @param int $user_id User ID.
720 * @return array List of drafts from other users.
721 */
722function get_others_drafts($user_id) {
723	_deprecated_function( __FUNCTION__, '3.1.0' );
724
725	return get_others_unpublished_posts($user_id, 'draft');
726}
727
728/**
729 * Retrieve pending review posts from other users.
730 *
731 * @deprecated 3.1.0 Use get_posts()
732 * @see get_posts()
733 *
734 * @param int $user_id User ID.
735 * @return array List of posts with pending review post type from other users.
736 */
737function get_others_pending($user_id) {
738	_deprecated_function( __FUNCTION__, '3.1.0' );
739
740	return get_others_unpublished_posts($user_id, 'pending');
741}
742
743/**
744 * Output the QuickPress dashboard widget.
745 *
746 * @since 3.0.0
747 * @deprecated 3.2.0 Use wp_dashboard_quick_press()
748 * @see wp_dashboard_quick_press()
749 */
750function wp_dashboard_quick_press_output() {
751	_deprecated_function( __FUNCTION__, '3.2.0', 'wp_dashboard_quick_press()' );
752	wp_dashboard_quick_press();
753}
754
755/**
756 * Outputs the TinyMCE editor.
757 *
758 * @since 2.7.0
759 * @deprecated 3.3.0 Use wp_editor()
760 * @see wp_editor()
761 */
762function wp_tiny_mce( $teeny = false, $settings = false ) {
763	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
764
765	static $num = 1;
766
767	if ( ! class_exists( '_WP_Editors', false ) )
768		require_once ABSPATH . WPINC . '/class-wp-editor.php';
769
770	$editor_id = 'content' . $num++;
771
772	$set = array(
773		'teeny' => $teeny,
774		'tinymce' => $settings ? $settings : true,
775		'quicktags' => false
776	);
777
778	$set = _WP_Editors::parse_settings($editor_id, $set);
779	_WP_Editors::editor_settings($editor_id, $set);
780}
781
782/**
783 * Preloads TinyMCE dialogs.
784 *
785 * @deprecated 3.3.0 Use wp_editor()
786 * @see wp_editor()
787 */
788function wp_preload_dialogs() {
789	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
790}
791
792/**
793 * Prints TinyMCE editor JS.
794 *
795 * @deprecated 3.3.0 Use wp_editor()
796 * @see wp_editor()
797 */
798function wp_print_editor_js() {
799	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
800}
801
802/**
803 * Handles quicktags.
804 *
805 * @deprecated 3.3.0 Use wp_editor()
806 * @see wp_editor()
807 */
808function wp_quicktags() {
809	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
810}
811
812/**
813 * Returns the screen layout options.
814 *
815 * @since 2.8.0
816 * @deprecated 3.3.0 WP_Screen::render_screen_layout()
817 * @see WP_Screen::render_screen_layout()
818 */
819function screen_layout( $screen ) {
820	_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_layout()' );
821
822	$current_screen = get_current_screen();
823
824	if ( ! $current_screen )
825		return '';
826
827	ob_start();
828	$current_screen->render_screen_layout();
829	return ob_get_clean();
830}
831
832/**
833 * Returns the screen's per-page options.
834 *
835 * @since 2.8.0
836 * @deprecated 3.3.0 Use WP_Screen::render_per_page_options()
837 * @see WP_Screen::render_per_page_options()
838 */
839function screen_options( $screen ) {
840	_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
841
842	$current_screen = get_current_screen();
843
844	if ( ! $current_screen )
845		return '';
846
847	ob_start();
848	$current_screen->render_per_page_options();
849	return ob_get_clean();
850}
851
852/**
853 * Renders the screen's help.
854 *
855 * @since 2.7.0
856 * @deprecated 3.3.0 Use WP_Screen::render_screen_meta()
857 * @see WP_Screen::render_screen_meta()
858 */
859function screen_meta( $screen ) {
860	$current_screen = get_current_screen();
861	$current_screen->render_screen_meta();
862}
863
864/**
865 * Favorite actions were deprecated in version 3.2. Use the admin bar instead.
866 *
867 * @since 2.7.0
868 * @deprecated 3.2.0 Use WP_Admin_Bar
869 * @see WP_Admin_Bar
870 */
871function favorite_actions() {
872	_deprecated_function( __FUNCTION__, '3.2.0', 'WP_Admin_Bar' );
873}
874
875/**
876 * Handles uploading an image.
877 *
878 * @deprecated 3.3.0 Use wp_media_upload_handler()
879 * @see wp_media_upload_handler()
880 *
881 * @return null|string
882 */
883function media_upload_image() {
884	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
885	return wp_media_upload_handler();
886}
887
888/**
889 * Handles uploading an audio file.
890 *
891 * @deprecated 3.3.0 Use wp_media_upload_handler()
892 * @see wp_media_upload_handler()
893 *
894 * @return null|string
895 */
896function media_upload_audio() {
897	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
898	return wp_media_upload_handler();
899}
900
901/**
902 * Handles uploading a video file.
903 *
904 * @deprecated 3.3.0 Use wp_media_upload_handler()
905 * @see wp_media_upload_handler()
906 *
907 * @return null|string
908 */
909function media_upload_video() {
910	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
911	return wp_media_upload_handler();
912}
913
914/**
915 * Handles uploading a generic file.
916 *
917 * @deprecated 3.3.0 Use wp_media_upload_handler()
918 * @see wp_media_upload_handler()
919 *
920 * @return null|string
921 */
922function media_upload_file() {
923	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
924	return wp_media_upload_handler();
925}
926
927/**
928 * Handles retrieving the insert-from-URL form for an image.
929 *
930 * @deprecated 3.3.0 Use wp_media_insert_url_form()
931 * @see wp_media_insert_url_form()
932 *
933 * @return string
934 */
935function type_url_form_image() {
936	_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('image')" );
937	return wp_media_insert_url_form( 'image' );
938}
939
940/**
941 * Handles retrieving the insert-from-URL form for an audio file.
942 *
943 * @deprecated 3.3.0 Use wp_media_insert_url_form()
944 * @see wp_media_insert_url_form()
945 *
946 * @return string
947 */
948function type_url_form_audio() {
949	_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('audio')" );
950	return wp_media_insert_url_form( 'audio' );
951}
952
953/**
954 * Handles retrieving the insert-from-URL form for a video file.
955 *
956 * @deprecated 3.3.0 Use wp_media_insert_url_form()
957 * @see wp_media_insert_url_form()
958 *
959 * @return string
960 */
961function type_url_form_video() {
962	_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('video')" );
963	return wp_media_insert_url_form( 'video' );
964}
965
966/**
967 * Handles retrieving the insert-from-URL form for a generic file.
968 *
969 * @deprecated 3.3.0 Use wp_media_insert_url_form()
970 * @see wp_media_insert_url_form()
971 *
972 * @return string
973 */
974function type_url_form_file() {
975	_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
976	return wp_media_insert_url_form( 'file' );
977}
978
979/**
980 * Add contextual help text for a page.
981 *
982 * Creates an 'Overview' help tab.
983 *
984 * @since 2.7.0
985 * @deprecated 3.3.0 Use WP_Screen::add_help_tab()
986 * @see WP_Screen::add_help_tab()
987 *
988 * @param string    $screen The handle for the screen to add help to. This is usually
989 *                          the hook name returned by the `add_*_page()` functions.
990 * @param string    $help   The content of an 'Overview' help tab.
991 */
992function add_contextual_help( $screen, $help ) {
993	_deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
994
995	if ( is_string( $screen ) )
996		$screen = convert_to_screen( $screen );
997
998	WP_Screen::add_old_compat_help( $screen, $help );
999}
1000
1001/**
1002 * Get the allowed themes for the current site.
1003 *
1004 * @since 3.0.0
1005 * @deprecated 3.4.0 Use wp_get_themes()
1006 * @see wp_get_themes()
1007 *
1008 * @return WP_Theme[] Array of WP_Theme objects keyed by their name.
1009 */
1010function get_allowed_themes() {
1011	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
1012
1013	$themes = wp_get_themes( array( 'allowed' => true ) );
1014
1015	$wp_themes = array();
1016	foreach ( $themes as $theme ) {
1017		$wp_themes[ $theme->get('Name') ] = $theme;
1018	}
1019
1020	return $wp_themes;
1021}
1022
1023/**
1024 * Retrieves a list of broken themes.
1025 *
1026 * @since 1.5.0
1027 * @deprecated 3.4.0 Use wp_get_themes()
1028 * @see wp_get_themes()
1029 *
1030 * @return array
1031 */
1032function get_broken_themes() {
1033	_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
1034
1035	$themes = wp_get_themes( array( 'errors' => true ) );
1036	$broken = array();
1037	foreach ( $themes as $theme ) {
1038		$name = $theme->get('Name');
1039		$broken[ $name ] = array(
1040			'Name' => $name,
1041			'Title' => $name,
1042			'Description' => $theme->errors()->get_error_message(),
1043		);
1044	}
1045	return $broken;
1046}
1047
1048/**
1049 * Retrieves information on the current active theme.
1050 *
1051 * @since 2.0.0
1052 * @deprecated 3.4.0 Use wp_get_theme()
1053 * @see wp_get_theme()
1054 *
1055 * @return WP_Theme
1056 */
1057function current_theme_info() {
1058	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
1059
1060	return wp_get_theme();
1061}
1062
1063/**
1064 * This was once used to display an 'Insert into Post' button.
1065 *
1066 * Now it is deprecated and stubbed.
1067 *
1068 * @deprecated 3.5.0
1069 */
1070function _insert_into_post_button( $type ) {
1071	_deprecated_function( __FUNCTION__, '3.5.0' );
1072}
1073
1074/**
1075 * This was once used to display a media button.
1076 *
1077 * Now it is deprecated and stubbed.
1078 *
1079 * @deprecated 3.5.0
1080 */
1081function _media_button($title, $icon, $type, $id) {
1082	_deprecated_function( __FUNCTION__, '3.5.0' );
1083}
1084
1085/**
1086 * Gets an existing post and format it for editing.
1087 *
1088 * @since 2.0.0
1089 * @deprecated 3.5.0 Use get_post()
1090 * @see get_post()
1091 *
1092 * @param int $id
1093 * @return WP_Post
1094 */
1095function get_post_to_edit( $id ) {
1096	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
1097
1098	return get_post( $id, OBJECT, 'edit' );
1099}
1100
1101/**
1102 * Gets the default page information to use.
1103 *
1104 * @since 2.5.0
1105 * @deprecated 3.5.0 Use get_default_post_to_edit()
1106 * @see get_default_post_to_edit()
1107 *
1108 * @return WP_Post Post object containing all the default post data as attributes
1109 */
1110function get_default_page_to_edit() {
1111	_deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
1112
1113	$page = get_default_post_to_edit();
1114	$page->post_type = 'page';
1115	return $page;
1116}
1117
1118/**
1119 * This was once used to create a thumbnail from an Image given a maximum side size.
1120 *
1121 * @since 1.2.0
1122 * @deprecated 3.5.0 Use image_resize()
1123 * @see image_resize()
1124 *
1125 * @param mixed $file Filename of the original image, Or attachment ID.
1126 * @param int $max_side Maximum length of a single side for the thumbnail.
1127 * @param mixed $deprecated Never used.
1128 * @return string Thumbnail path on success, Error string on failure.
1129 */
1130function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
1131	_deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
1132	return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
1133}
1134
1135/**
1136 * This was once used to display a meta box for the nav menu theme locations.
1137 *
1138 * Deprecated in favor of a 'Manage Locations' tab added to nav menus management screen.
1139 *
1140 * @since 3.0.0
1141 * @deprecated 3.6.0
1142 */
1143function wp_nav_menu_locations_meta_box() {
1144	_deprecated_function( __FUNCTION__, '3.6.0' );
1145}
1146
1147/**
1148 * This was once used to kick-off the Core Updater.
1149 *
1150 * Deprecated in favor of instantating a Core_Upgrader instance directly,
1151 * and calling the 'upgrade' method.
1152 *
1153 * @since 2.7.0
1154 * @deprecated 3.7.0 Use Core_Upgrader
1155 * @see Core_Upgrader
1156 */
1157function wp_update_core($current, $feedback = '') {
1158	_deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
1159
1160	if ( !empty($feedback) )
1161		add_filter('update_feedback', $feedback);
1162
1163	require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1164	$upgrader = new Core_Upgrader();
1165	return $upgrader->upgrade($current);
1166
1167}
1168
1169/**
1170 * This was once used to kick-off the Plugin Updater.
1171 *
1172 * Deprecated in favor of instantating a Plugin_Upgrader instance directly,
1173 * and calling the 'upgrade' method.
1174 * Unused since 2.8.0.
1175 *
1176 * @since 2.5.0
1177 * @deprecated 3.7.0 Use Plugin_Upgrader
1178 * @see Plugin_Upgrader
1179 */
1180function wp_update_plugin($plugin, $feedback = '') {
1181	_deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
1182
1183	if ( !empty($feedback) )
1184		add_filter('update_feedback', $feedback);
1185
1186	require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1187	$upgrader = new Plugin_Upgrader();
1188	return $upgrader->upgrade($plugin);
1189}
1190
1191/**
1192 * This was once used to kick-off the Theme Updater.
1193 *
1194 * Deprecated in favor of instantiating a Theme_Upgrader instance directly,
1195 * and calling the 'upgrade' method.
1196 * Unused since 2.8.0.
1197 *
1198 * @since 2.7.0
1199 * @deprecated 3.7.0 Use Theme_Upgrader
1200 * @see Theme_Upgrader
1201 */
1202function wp_update_theme($theme, $feedback = '') {
1203	_deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
1204
1205	if ( !empty($feedback) )
1206		add_filter('update_feedback', $feedback);
1207
1208	require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1209	$upgrader = new Theme_Upgrader();
1210	return $upgrader->upgrade($theme);
1211}
1212
1213/**
1214 * This was once used to display attachment links. Now it is deprecated and stubbed.
1215 *
1216 * @since 2.0.0
1217 * @deprecated 3.7.0
1218 *
1219 * @param int|bool $id
1220 */
1221function the_attachment_links( $id = false ) {
1222	_deprecated_function( __FUNCTION__, '3.7.0' );
1223}
1224
1225/**
1226 * Displays a screen icon.
1227 *
1228 * @since 2.7.0
1229 * @deprecated 3.8.0
1230 */
1231function screen_icon() {
1232	_deprecated_function( __FUNCTION__, '3.8.0' );
1233	echo get_screen_icon();
1234}
1235
1236/**
1237 * Retrieves the screen icon (no longer used in 3.8+).
1238 *
1239 * @since 3.2.0
1240 * @deprecated 3.8.0
1241 *
1242 * @return string An HTML comment explaining that icons are no longer used.
1243 */
1244function get_screen_icon() {
1245	_deprecated_function( __FUNCTION__, '3.8.0' );
1246	return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
1247}
1248
1249/**
1250 * Deprecated dashboard widget controls.
1251 *
1252 * @since 2.5.0
1253 * @deprecated 3.8.0
1254 */
1255function wp_dashboard_incoming_links_output() {}
1256
1257/**
1258 * Deprecated dashboard secondary output.
1259 *
1260 * @deprecated 3.8.0
1261 */
1262function wp_dashboard_secondary_output() {}
1263
1264/**
1265 * Deprecated dashboard widget controls.
1266 *
1267 * @since 2.7.0
1268 * @deprecated 3.8.0
1269 */
1270function wp_dashboard_incoming_links() {}
1271
1272/**
1273 * Deprecated dashboard incoming links control.
1274 *
1275 * @deprecated 3.8.0
1276 */
1277function wp_dashboard_incoming_links_control() {}
1278
1279/**
1280 * Deprecated dashboard plugins control.
1281 *
1282 * @deprecated 3.8.0
1283 */
1284function wp_dashboard_plugins() {}
1285
1286/**
1287 * Deprecated dashboard primary control.
1288 *
1289 * @deprecated 3.8.0
1290 */
1291function wp_dashboard_primary_control() {}
1292
1293/**
1294 * Deprecated dashboard recent comments control.
1295 *
1296 * @deprecated 3.8.0
1297 */
1298function wp_dashboard_recent_comments_control() {}
1299
1300/**
1301 * Deprecated dashboard secondary section.
1302 *
1303 * @deprecated 3.8.0
1304 */
1305function wp_dashboard_secondary() {}
1306
1307/**
1308 * Deprecated dashboard secondary control.
1309 *
1310 * @deprecated 3.8.0
1311 */
1312function wp_dashboard_secondary_control() {}
1313
1314/**
1315 * Display plugins text for the WordPress news widget.
1316 *
1317 * @since 2.5.0
1318 * @deprecated 4.8.0
1319 *
1320 * @param string $rss  The RSS feed URL.
1321 * @param array  $args Array of arguments for this RSS feed.
1322 */
1323function wp_dashboard_plugins_output( $rss, $args = array() ) {
1324	_deprecated_function( __FUNCTION__, '4.8.0' );
1325
1326	// Plugin feeds plus link to install them.
1327	$popular = fetch_feed( $args['url']['popular'] );
1328
1329	if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
1330		$plugin_slugs = array_keys( get_plugins() );
1331		set_transient( 'plugin_slugs', $plugin_slugs, DAY_IN_SECONDS );
1332	}
1333
1334	echo '<ul>';
1335
1336	foreach ( array( $popular ) as $feed ) {
1337		if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
1338			continue;
1339
1340		$items = $feed->get_items(0, 5);
1341
1342		// Pick a random, non-installed plugin.
1343		while ( true ) {
1344			// Abort this foreach loop iteration if there's no plugins left of this type.
1345			if ( 0 === count($items) )
1346				continue 2;
1347
1348			$item_key = array_rand($items);
1349			$item = $items[$item_key];
1350
1351			list($link, $frag) = explode( '#', $item->get_link() );
1352
1353			$link = esc_url($link);
1354			if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )
1355				$slug = $matches[1];
1356			else {
1357				unset( $items[$item_key] );
1358				continue;
1359			}
1360
1361			// Is this random plugin's slug already installed? If so, try again.
1362			reset( $plugin_slugs );
1363			foreach ( $plugin_slugs as $plugin_slug ) {
1364				if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) {
1365					unset( $items[$item_key] );
1366					continue 2;
1367				}
1368			}
1369
1370			// If we get to this point, then the random plugin isn't installed and we can stop the while().
1371			break;
1372		}
1373
1374		// Eliminate some common badly formed plugin descriptions.
1375		while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
1376			unset($items[$item_key]);
1377
1378		if ( !isset($items[$item_key]) )
1379			continue;
1380
1381		$raw_title = $item->get_title();
1382
1383		$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
1384		echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
1385			'&nbsp;<a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
1386			/* translators: %s: Plugin name. */
1387			esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
1388
1389		$feed->__destruct();
1390		unset( $feed );
1391	}
1392
1393	echo '</ul>';
1394}
1395
1396/**
1397 * This was once used to move child posts to a new parent.
1398 *
1399 * @since 2.3.0
1400 * @deprecated 3.9.0
1401 * @access private
1402 *
1403 * @param int $old_ID
1404 * @param int $new_ID
1405 */
1406function _relocate_children( $old_ID, $new_ID ) {
1407	_deprecated_function( __FUNCTION__, '3.9.0' );
1408}
1409
1410/**
1411 * Add a top-level menu page in the 'objects' section.
1412 *
1413 * This function takes a capability which will be used to determine whether
1414 * or not a page is included in the menu.
1415 *
1416 * The function which is hooked in to handle the output of the page must check
1417 * that the user has the required capability as well.
1418 *
1419 * @since 2.7.0
1420 *
1421 * @deprecated 4.5.0 Use add_menu_page()
1422 * @see add_menu_page()
1423 * @global int $_wp_last_object_menu
1424 *
1425 * @param string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
1426 * @param string   $menu_title The text to be used for the menu.
1427 * @param string   $capability The capability required for this menu to be displayed to the user.
1428 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
1429 * @param callable $function   The function to be called to output the content for this page.
1430 * @param string   $icon_url   The url to the icon to be used for this menu.
1431 * @return string The resulting page's hook_suffix.
1432 */
1433function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
1434	_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
1435
1436	global $_wp_last_object_menu;
1437
1438	$_wp_last_object_menu++;
1439
1440	return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu);
1441}
1442
1443/**
1444 * Add a top-level menu page in the 'utility' section.
1445 *
1446 * This function takes a capability which will be used to determine whether
1447 * or not a page is included in the menu.
1448 *
1449 * The function which is hooked in to handle the output of the page must check
1450 * that the user has the required capability as well.
1451 *
1452 * @since 2.7.0
1453 *
1454 * @deprecated 4.5.0 Use add_menu_page()
1455 * @see add_menu_page()
1456 * @global int $_wp_last_utility_menu
1457 *
1458 * @param string   $page_title The text to be displayed in the title tags of the page when the menu is selected.
1459 * @param string   $menu_title The text to be used for the menu.
1460 * @param string   $capability The capability required for this menu to be displayed to the user.
1461 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
1462 * @param callable $function   The function to be called to output the content for this page.
1463 * @param string   $icon_url   The url to the icon to be used for this menu.
1464 * @return string The resulting page's hook_suffix.
1465 */
1466function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
1467	_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
1468
1469	global $_wp_last_utility_menu;
1470
1471	$_wp_last_utility_menu++;
1472
1473	return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu);
1474}
1475
1476/**
1477 * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
1478 * as they disregard the autocomplete setting on the editor textarea. That can break the editor
1479 * when the user navigates to it with the browser's Back button. See #28037
1480 *
1481 * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
1482 *
1483 * @since 4.0.0
1484 * @deprecated 4.6.0
1485 *
1486 * @link https://core.trac.wordpress.org/ticket/35852
1487 *
1488 * @global bool $is_safari
1489 * @global bool $is_chrome
1490 */
1491function post_form_autocomplete_off() {
1492	global $is_safari, $is_chrome;
1493
1494	_deprecated_function( __FUNCTION__, '4.6.0' );
1495
1496	if ( $is_safari || $is_chrome ) {
1497		echo ' autocomplete="off"';
1498	}
1499}
1500
1501/**
1502 * Display JavaScript on the page.
1503 *
1504 * @since 3.5.0
1505 * @deprecated 4.9.0
1506 */
1507function options_permalink_add_js() {
1508	?>
1509	<script type="text/javascript">
1510		jQuery(document).ready(function() {
1511			jQuery('.permalink-structure input:radio').change(function() {
1512				if ( 'custom' == this.value )
1513					return;
1514				jQuery('#permalink_structure').val( this.value );
1515			});
1516			jQuery( '#permalink_structure' ).on( 'click input', function() {
1517				jQuery( '#custom_selection' ).prop( 'checked', true );
1518			});
1519		});
1520	</script>
1521	<?php
1522}
1523
1524/**
1525 * Previous class for list table for privacy data export requests.
1526 *
1527 * @since 4.9.6
1528 * @deprecated 5.3.0
1529 */
1530class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Data_Export_Requests_List_Table {
1531	function __construct( $args ) {
1532		_deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Export_Requests_List_Table' );
1533
1534		if ( ! isset( $args['screen'] ) || $args['screen'] === 'export_personal_data' ) {
1535			$args['screen'] = 'export-personal-data';
1536		}
1537
1538		parent::__construct( $args );
1539	}
1540}
1541
1542/**
1543 * Previous class for list table for privacy data erasure requests.
1544 *
1545 * @since 4.9.6
1546 * @deprecated 5.3.0
1547 */
1548class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Data_Removal_Requests_List_Table {
1549	function __construct( $args ) {
1550		_deprecated_function( __CLASS__, '5.3.0', 'WP_Privacy_Data_Removal_Requests_List_Table' );
1551
1552		if ( ! isset( $args['screen'] ) || $args['screen'] === 'remove_personal_data' ) {
1553			$args['screen'] = 'erase-personal-data';
1554		}
1555
1556		parent::__construct( $args );
1557	}
1558}
1559
1560/**
1561 * Was used to add options for the privacy requests screens before they were separate files.
1562 *
1563 * @since 4.9.8
1564 * @access private
1565 * @deprecated 5.3.0
1566 */
1567function _wp_privacy_requests_screen_options() {
1568	_deprecated_function( __FUNCTION__, '5.3.0' );
1569}
1570