WordPress.org

Make WordPress Core

Ticket #22260: 22260.2.diff

File 22260.2.diff, 17.0 KB (added by DrewAPicture, 6 years ago)
  • wp-signup.php

     
    382382$i18n_signup['user'] = _x('user', 'Multisite active signup type');
    383383
    384384if ( is_super_admin() )
    385         echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
     385        echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%1$s&#8221; registrations. To change or disable registration go to your <a href="%2$s">Options page</a>.' ), $i18n_signup[$active_signup], esc_url( network_admin_url( 'settings.php' ) ) ) . '</div>';
    386386
    387387$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
    388388
  • wp-includes/class-phpmailer.php

     
    638638        $this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader;
    639639      }
    640640
    641       $this->SentMIMEMessage = sprintf("%s%s\r\n\r\n%s",$this->MIMEHeader,$mailHeader,$this->MIMEBody);
     641      $this->SentMIMEMessage = sprintf("%1$s%2$s\r\n\r\n%3$s",$this->MIMEHeader,$mailHeader,$this->MIMEBody);
    642642      return true;
    643643
    644644    } catch (phpmailerException $e) {
     
    685685   */
    686686  protected function SendmailSend($header, $body) {
    687687    if ($this->Sender != '') {
    688       $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
     688      $sendmail = sprintf("%1$s -oi -f %2$s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
    689689    } else {
    690690      $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
    691691    }
     
    12241224    if($this->MessageID != '') {
    12251225      $result .= $this->HeaderLine('Message-ID', $this->MessageID);
    12261226    } else {
    1227       $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
     1227      $result .= sprintf("Message-ID: <%1$s@%2$s>%3$s", $uniq_id, $this->ServerHostname(), $this->LE);
    12281228    }
    12291229    $result .= $this->HeaderLine('X-Priority', $this->Priority);
    12301230    if($this->XMailer) {
     
    14441444      $encoding = $this->Encoding;
    14451445    }
    14461446    $result .= $this->TextLine('--' . $boundary);
    1447     $result .= sprintf("Content-Type: %s; charset=\"%s\"", $contentType, $charSet);
     1447    $result .= sprintf("Content-Type: %1$s; charset=\"%2$s\"", $contentType, $charSet);
    14481448    $result .= $this->LE;
    14491449    $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
    14501450    $result .= $this->LE;
     
    15871587        if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; }
    15881588        $cidUniq[$cid] = true;
    15891589
    1590         $mime[] = sprintf("--%s%s", $boundary, $this->LE);
    1591         $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);
    1592         $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
     1590        $mime[] = sprintf("--%1$s%2$s", $boundary, $this->LE);
     1591        $mime[] = sprintf("Content-Type: %s; name=\"%1$s\"%2$s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE);
     1592        $mime[] = sprintf("Content-Transfer-Encoding: %1$s%2$s", $encoding, $this->LE);
    15931593
    15941594        if($disposition == 'inline') {
    1595           $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
     1595          $mime[] = sprintf("Content-ID: <%1$s>%2$s", $cid, $this->LE);
    15961596        }
    15971597
    1598         $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);
     1598        $mime[] = sprintf("Content-Disposition: %1$s; filename=\"%2$s\"%3$s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE);
    15991599
    16001600        // Encode as string attachment
    16011601        if($bString) {
     
    16141614      }
    16151615    }
    16161616
    1617     $mime[] = sprintf("--%s--%s", $boundary, $this->LE);
     1617    $mime[] = sprintf("--%1$s--%2$s", $boundary, $this->LE);
    16181618
    16191619    return implode("", $mime);
    16201620  }
     
    21352135    $tzs = ($tz < 0) ? '-' : '+';
    21362136    $tz = abs($tz);
    21372137    $tz = (int)($tz/3600)*100 + ($tz%3600)/60;
    2138     $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
     2138    $result = sprintf("%1$s %2$s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
    21392139
    21402140    return $result;
    21412141  }
  • wp-includes/class-wp-customize-control.php

     
    299299                                $dropdown = str_replace( '<select', '<select ' . $this->get_link(), $dropdown );
    300300
    301301                                printf(
    302                                         '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',
     302                                        '<label class="customize-control-select"><span class="customize-control-title">%1$s</span> %2$s</label>',
    303303                                        $this->label,
    304304                                        $dropdown
    305305                                );
  • wp-admin/edit-comments.php

     
    144144<h2><?php
    145145if ( $post_id )
    146146        echo sprintf(__('Comments on &#8220;%s&#8221;'),
    147                 sprintf('<a href="%s">%s</a>',
     147                sprintf('<a href="%1$s">%2$s</a>',
    148148                        get_edit_post_link($post_id),
    149149                        wp_html_excerpt(_draft_or_post_title($post_id), 50)
    150150                )
  • wp-admin/includes/ajax-actions.php

     
    924924                        $_POST['post_type'] = $post->post_type;
    925925                        $_POST['post_status'] = 'draft';
    926926                        $now = current_time('timestamp', 1);
    927                         $_POST['post_title'] = sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now));
     927                        $_POST['post_title'] = sprintf('Draft created on %1$s at %2$s', date(get_option('date_format'), $now), date(get_option('time_format'), $now));
    928928
    929929                        if ( $pid = edit_post() ) {
    930930                                if ( is_wp_error( $pid ) ) {
     
    10161016                'id' => $user_id,
    10171017                'data' => $wp_list_table->single_row( $user_object, '', $role ),
    10181018                'supplemental' => array(
    1019                         'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
     1019                        'show-link' => sprintf(__( 'User <a href="#%1$s">%2$s</a> added' ), "user-$user_id", $user_object->user_login),
    10201020                        'role' => $role,
    10211021                )
    10221022        ) );
  • wp-admin/includes/class-wp-list-table.php

     
    384384                        $month = zeroise( $arc_row->month, 2 );
    385385                        $year = $arc_row->year;
    386386
    387                         printf( "<option %s value='%s'>%s</option>\n",
     387                        printf( "<option %1$s value='%2$s'>%3$s</option>\n",
    388388                                selected( $m, $year . $month, false ),
    389389                                esc_attr( $arc_row->year . $month ),
    390390                                /* translators: 1: month name, 2: 4-digit year */
     
    503503                if ( $current == $total_pages )
    504504                        $disable_last = ' disabled';
    505505
    506                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     506                $page_links[] = sprintf( "<a class='%1$s' title='%2$s' href='%3$s'>%4$s</a>",
    507507                        'first-page' . $disable_first,
    508508                        esc_attr__( 'Go to the first page' ),
    509509                        esc_url( remove_query_arg( 'paged', $current_url ) ),
    510510                        '&laquo;'
    511511                );
    512512
    513                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     513                $page_links[] = sprintf( "<a class='%1$s' title='%2$s' href='%3$s'>%4$s</a>",
    514514                        'prev-page' . $disable_first,
    515515                        esc_attr__( 'Go to the previous page' ),
    516516                        esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
     
    520520                if ( 'bottom' == $which )
    521521                        $html_current_page = $current;
    522522                else
    523                         $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
     523                        $html_current_page = sprintf( "<input class='current-page' title='%1$s' type='text' name='paged' value='%2$s' size='%3$d' />",
    524524                                esc_attr__( 'Current page' ),
    525525                                $current,
    526526                                strlen( $total_pages )
     
    529529                $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
    530530                $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
    531531
    532                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     532                $page_links[] = sprintf( "<a class='%1$s' title='%2$s' href='%3$s'>%4$s</a>",
    533533                        'next-page' . $disable_last,
    534534                        esc_attr__( 'Go to the next page' ),
    535535                        esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
    536536                        '&rsaquo;'
    537537                );
    538538
    539                 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
     539                $page_links[] = sprintf( "<a class='%1$s' title='%2$s' href='%3$s'>%4$s</a>",
    540540                        'last-page' . $disable_last,
    541541                        esc_attr__( 'Go to the last page' ),
    542542                        esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
  • wp-admin/includes/class-wp-ms-themes-list-table.php

     
    214214                                $url = 'themes.php';
    215215
    216216                        if ( 'search' != $type ) {
    217                                 $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
     217                                $status_links[$type] = sprintf( "<a href='%1$s' %2$s>%3$s</a>",
    218218                                        esc_url( add_query_arg('theme_status', $type, $url) ),
    219219                                        ( $type == $status ) ? ' class="current"' : '',
    220220                                        sprintf( $text, number_format_i18n( $count ) )
  • wp-admin/includes/deprecated.php

     
    578578                                'add_args' => $args
    579579                        ) );
    580580                        if ( $this->paging_text ) {
    581                                 $this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
     581                                $this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %1$s&#8211;%2$s of %3$s' ) . '</span>%4$s',
    582582                                        number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
    583583                                        number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
    584584                                        number_format_i18n( $this->total_users_for_query ),
  • wp-admin/includes/class-wp-plugins-list-table.php

     
    220220                        }
    221221
    222222                        if ( 'search' != $type ) {
    223                                 $status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
     223                                $status_links[$type] = sprintf( "<a href='%1$s' %2$s>%3$s</a>",
    224224                                        add_query_arg('plugin_status', $type, 'plugins.php'),
    225225                                        ( $type == $status ) ? ' class="current"' : '',
    226226                                        sprintf( $text, number_format_i18n( $count ) )
  • wp-admin/includes/class-wp-filesystem-ftpext.php

     
    165165
    166166                // chmod the file or directory
    167167                if ( ! function_exists('ftp_chmod') )
    168                         return (bool)@ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));
     168                        return (bool)@ftp_site($this->link, sprintf('CHMOD %1$o %2$s', $mode, $file));
    169169                return (bool)@ftp_chmod($this->link, $mode, $file);
    170170        }
    171171        function chown($file, $owner, $recursive = false ) {
  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    184184                if ( ! $this->exists($file) )
    185185                        return false;
    186186                if ( ! $recursive || ! $this->is_dir($file) )
    187                         return $this->run_command(sprintf('chgrp %o %s', $mode, escapeshellarg($file)), true);
    188                 return $this->run_command(sprintf('chgrp -R %o %s', $mode, escapeshellarg($file)), true);
     187                        return $this->run_command(sprintf('chgrp %1$o %2$s', $mode, escapeshellarg($file)), true);
     188                return $this->run_command(sprintf('chgrp -R %1$o %2$s', $mode, escapeshellarg($file)), true);
    189189        }
    190190
    191191        function chmod($file, $mode = false, $recursive = false) {
     
    202202                }
    203203
    204204                if ( ! $recursive || ! $this->is_dir($file) )
    205                         return $this->run_command(sprintf('chmod %o %s', $mode, escapeshellarg($file)), true);
    206                 return $this->run_command(sprintf('chmod -R %o %s', $mode, escapeshellarg($file)), true);
     205                        return $this->run_command(sprintf('chmod %1$o %2$s', $mode, escapeshellarg($file)), true);
     206                return $this->run_command(sprintf('chmod -R %1$o %2$s', $mode, escapeshellarg($file)), true);
    207207        }
    208208
    209209        function chown($file, $owner, $recursive = false ) {
    210210                if ( ! $this->exists($file) )
    211211                        return false;
    212212                if ( ! $recursive || ! $this->is_dir($file) )
    213                         return $this->run_command(sprintf('chown %o %s', $mode, escapeshellarg($file)), true);
    214                 return $this->run_command(sprintf('chown -R %o %s', $mode, escapeshellarg($file)), true);
     213                        return $this->run_command(sprintf('chown %1$o %2$s', $mode, escapeshellarg($file)), true);
     214                return $this->run_command(sprintf('chown -R %1$o %2$s', $mode, escapeshellarg($file)), true);
    215215        }
    216216
    217217        function owner($file) {
  • wp-admin/plugins.php

     
    364364$invalid = validate_active_plugins();
    365365if ( !empty($invalid) )
    366366        foreach ( $invalid as $plugin_file => $error )
    367                 echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '</p></div>';
     367                echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%1$s</code> has been <strong>deactivated</strong> due to an error: %2$s'), esc_html($plugin_file), $error->get_error_message()) . '</p></div>';
    368368?>
    369369
    370370<?php if ( isset($_GET['error']) ) :
  • wp-admin/edit.php

     
    5858        if ( 'delete_all' == $doaction ) {
    5959                $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']);
    6060                if ( get_post_status_object($post_status) ) // Check the post status exists first
    61                         $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status ) );
     61                        $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type=%1$s AND post_status = %2$s", $post_type, $post_status ) );
    6262                $doaction = 'delete';
    6363        } elseif ( isset( $_REQUEST['media'] ) ) {
    6464                $post_ids = $_REQUEST['media'];
  • wp-admin/press-this.php

     
    608608                        if ( $selection )
    609609                                $content .= __('via ');
    610610
    611                         $content .= sprintf( "<a href='%s'>%s</a>.</p>", esc_url( $url ), esc_html( $title ) );
     611                        $content .= sprintf( "<a href='%1$s'>%2$s</a>.</p>", esc_url( $url ), esc_html( $title ) );
    612612                }
    613613
    614614                remove_action( 'media_buttons', 'media_buttons' );
  • wp-admin/update-core.php

     
    2626        static $first_pass = true;
    2727
    2828        $version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ?
    29                         $update->current : sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
     29                        $update->current : sprintf("%1$s&ndash;<strong>%2$s</strong>", $update->current, $update->locale);
    3030        $current = false;
    3131        if ( !isset($update->response) || 'latest' == $update->response )
    3232                $current = true;
     
    161161                echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '</p>';
    162162        } else {
    163163                list( $normalized_version ) = explode( '-', $wp_version );
    164                 echo '<p>' . sprintf( __( '<a href="%s">Learn more about WordPress %s</a>.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '</p>';
     164                echo '<p>' . sprintf( __( '<a href="%1$s">Learn more about WordPress %2$s</a>.' ), esc_url( self_admin_url( 'about.php' ) ), $normalized_version ) . '</p>';
    165165        }
    166166        dismissed_updates();
    167167}