~canonical-sysadmins/wordpress/5.0

« back to all changes in this revision

Viewing changes to wp-admin/includes/deprecated.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
 *
223
223
 * @deprecated 3.1.0 Use get_users()
224
224
 *
 
225
 * @global wpdb $wpdb WordPress database abstraction object.
 
226
 *
225
227
 * @return array List of user IDs.
226
228
 */
227
229
function get_author_user_ids() {
241
243
 *
242
244
 * @deprecated 3.1.0 Use get_users()
243
245
 *
 
246
 * @global wpdb $wpdb WordPress database abstraction object.
 
247
 *
244
248
 * @param int $user_id User ID.
245
249
 * @return array|bool List of editable authors. False if no editable users.
246
250
 */
266
270
 *
267
271
 * @deprecated 3.1.0 Use get_users()
268
272
 *
 
273
 * @global wpdb $wpdb WordPress database abstraction object.
 
274
 *
269
275
 * @param int  $user_id       User ID.
270
276
 * @param bool $exclude_zeros Optional. Whether to exclude zeroes. Default true.
271
277
 * @return array Array of editable user IDs, empty array otherwise.
302
308
 * Gets all users who are not authors.
303
309
 *
304
310
 * @deprecated 3.1.0 Use get_users()
 
311
 *
 
312
 * @global wpdb $wpdb WordPress database abstraction object.
305
313
 */
306
314
function get_nonauthor_user_ids() {
307
315
        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
664
672
 * @deprecated 3.1.0 Use get_posts()
665
673
 * @see get_posts()
666
674
 *
 
675
 * @global wpdb $wpdb WordPress database abstraction object.
 
676
 *
667
677
 * @param int    $user_id User ID to not retrieve posts from.
668
678
 * @param string $type    Optional. Post type to retrieve. Accepts 'draft', 'pending' or 'any' (all).
669
679
 *                        Default 'any'.
1210
1220
 * Displays a screen icon.
1211
1221
 *
1212
1222
 * @since 2.7.0
1213
 
 * @since 3.8.0 Screen icons are no longer used in WordPress. This function no longer produces output.
1214
 
 * @deprecated 3.8.0 Use get_screen_icon()
1215
 
 * @see get_screen_icon()
 
1223
 * @deprecated 3.8.0
1216
1224
 */
1217
1225
function screen_icon() {
 
1226
        _deprecated_function( __FUNCTION__, '3.8.0' );
1218
1227
        echo get_screen_icon();
1219
1228
}
1220
1229
 
1221
1230
/**
1222
1231
 * Retrieves the screen icon (no longer used in 3.8+).
1223
1232
 *
 
1233
 * @since 3.2.0
1224
1234
 * @deprecated 3.8.0
1225
1235
 *
1226
 
 * @return string
 
1236
 * @return string An HTML comment explaining that icons are no longer used.
1227
1237
 */
1228
1238
function get_screen_icon() {
 
1239
        _deprecated_function( __FUNCTION__, '3.8.0' );
1229
1240
        return '<!-- Screen icons are no longer used as of WordPress 3.8. -->';
1230
1241
}
1231
1242
 
1464
1475
 * Replaced with wp_page_reload_on_back_button_js() that also fixes this problem.
1465
1476
 *
1466
1477
 * @since 4.0.0
1467
 
 * $deprecated 4.6.0
 
1478
 * @deprecated 4.6.0
 
1479
 *
 
1480
 * @link https://core.trac.wordpress.org/ticket/35852
1468
1481
 *
1469
1482
 * @global bool $is_safari
1470
1483
 * @global bool $is_chrome
1478
1491
                echo ' autocomplete="off"';
1479
1492
        }
1480
1493
}
 
1494
 
 
1495
/**
 
1496
 * Display JavaScript on the page.
 
1497
 *
 
1498
 * @since 3.5.0
 
1499
 * @deprecated 4.9.0
 
1500
 */
 
1501
function options_permalink_add_js() {
 
1502
        ?>
 
1503
        <script type="text/javascript">
 
1504
                jQuery(document).ready(function() {
 
1505
                        jQuery('.permalink-structure input:radio').change(function() {
 
1506
                                if ( 'custom' == this.value )
 
1507
                                        return;
 
1508
                                jQuery('#permalink_structure').val( this.value );
 
1509
                        });
 
1510
                        jQuery( '#permalink_structure' ).on( 'click input', function() {
 
1511
                                jQuery( '#custom_selection' ).prop( 'checked', true );
 
1512
                        });
 
1513
                });
 
1514
        </script>
 
1515
        <?php
 
1516
}