Make WordPress Core

Ticket #31248: 31248.patch

File 31248.patch, 3.8 KB (added by ipm-frommen, 10 years ago)
  • wp-admin/includes/template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    328328        }
    329329}
    330330
    331 // adds hidden fields with the data for use in the inline editor for posts and pages
    332331/**
    333  * {@internal Missing Short Description}}
     332 * Adds hidden fields with the data for use in the inline editor for posts and pages.
    334333 *
    335334 * @since 2.7.0
    336335 *
     
    411410 * @param string $mode
    412411 * @param bool $table_row
    413412 */
    414 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
     413function wp_comment_reply($position = 1, $checkbox = false, $mode = 'single', $table_row = true) {
    415414        global $wp_list_table;
    416415        /**
    417416         * Filter the in-line comment reply-to form output in the Comments
     
    582581        static $update_nonce = false;
    583582
    584583        if ( is_protected_meta( $entry['meta_key'], 'post' ) )
    585                 return;
     584                return '';
    586585
    587586        if ( !$update_nonce )
    588587                $update_nonce = wp_create_nonce( 'add-meta' );
     
    597596                } else {
    598597                        // This is a serialized array/object so we should NOT display it.
    599598                        --$count;
    600                         return;
     599                        return '';
    601600                }
    602601        }
    603602
     
    845844 *
    846845 * @param string $selected slug for the role that should be already selected
    847846 */
    848 function wp_dropdown_roles( $selected = false ) {
     847function wp_dropdown_roles( $selected = '' ) {
    849848        $p = '';
    850849        $r = '';
    851850
     
    853852
    854853        foreach ( $editable_roles as $role => $details ) {
    855854                $name = translate_user_role($details['name'] );
    856                 if ( $selected == $role ) // preselect specified role
     855                if ( $selected === $role ) // preselect specified role
    857856                        $p = "\n\t<option selected='selected' value='" . esc_attr($role) . "'>$name</option>";
    858857                else
    859858                        $r .= "\n\t<option value='" . esc_attr($role) . "'>$name</option>";
     
    15271526 *
    15281527 * @since 2.7.0
    15291528 * @param string $title Title of the Iframe page.
    1530  * @param bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued).
    15311529 *
    15321530 */
    1533 function iframe_header( $title = '', $limit_styles = false ) {
     1531function iframe_header( $title = '' ) {
    15341532        show_admin_bar( false );
    1535         global $hook_suffix, $current_user, $admin_body_class, $wp_locale;
     1533        global $hook_suffix, $admin_body_class, $wp_locale;
    15361534        $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    15371535
    15381536        $current_screen = get_current_screen();
     
    18131811 *                     These attributes will be output as attribute="value", such as tabindex="1".
    18141812 *                     Defaults to no other attributes. Other attributes can also be provided as a
    18151813 *                     string such as 'tabindex="1"', though the array format is typically cleaner.
     1814 *
     1815 * @return string Submit button HTML.
    18161816 */
    1817 function get_submit_button( $text = null, $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = null ) {
     1817function get_submit_button( $text = '', $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = array() ) {
    18181818        if ( ! is_array( $type ) )
    18191819                $type = explode( ' ', $type );
    18201820
     
    19001900         *
    19011901         * Individual pointers (e.g. wp390_widgets) can be disabled using the following:
    19021902         *     remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp390_widgets' ) );
     1903         *
     1904         * @param string $hook_suffix The current admin page.
    19031905         */
    19041906        public static function enqueue_scripts( $hook_suffix ) {
    19051907                /*
     
    20672069         * Prevents new users from seeing existing 'new feature' pointers.
    20682070         *
    20692071         * @since 3.3.0
     2072         *
     2073         * @param int $user_id User ID.
    20702074         */
    20712075        public static function dismiss_pointers_for_new_users( $user_id ) {
    20722076                add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp360_locks,wp390_widgets' );