mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Coding Standards: Replace echo sprintf()
with printf()
.
See #49542. Built from https://develop.svn.wordpress.org/trunk@48111 git-svn-id: http://core.svn.wordpress.org/trunk@47880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be16bb9fba
commit
19bca10d79
@ -219,7 +219,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<span class="preview-notice">
|
||||
<?php
|
||||
/* translators: %s: The site/panel title in the Customizer. */
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' );
|
||||
printf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name', 'display' ) . '</strong>' );
|
||||
?>
|
||||
</span>
|
||||
<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
|
||||
|
@ -111,7 +111,7 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
|
||||
printf( __( 'Successfully repaired the %s table.' ), "<code>$table</code>" );
|
||||
} else {
|
||||
/* translators: 1: Table name, 2: Error message. */
|
||||
echo sprintf( __( 'Failed to repair the %1$s table. Error: %2$s' ), "<code>$table</code>", "<code>$check->Msg_text</code>" ) . '<br />';
|
||||
printf( __( 'Failed to repair the %1$s table. Error: %2$s' ), "<code>$table</code>", "<code>$check->Msg_text</code>" ) . '<br />';
|
||||
$problems[ $table ] = $check->Msg_text;
|
||||
$okay = false;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ if ( isset( $_GET['action'] ) ) {
|
||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
||||
<input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
|
||||
<?php wp_nonce_field( $site_action . '_' . $id, '_wpnonce', false ); ?>
|
||||
<p><?php echo sprintf( $manage_actions[ $site_action ], $site_address ); ?></p>
|
||||
<p><?php printf( $manage_actions[ $site_action ], $site_address ); ?></p>
|
||||
<?php submit_button( __( 'Confirm' ), 'primary' ); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -197,18 +197,18 @@ $content = esc_textarea( $content );
|
||||
if ( is_plugin_active( $plugin ) ) {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: Plugin file name. */
|
||||
echo sprintf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: Plugin file name. */
|
||||
echo sprintf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
} else {
|
||||
if ( is_writeable( $real_file ) ) {
|
||||
/* translators: %s: Plugin file name. */
|
||||
echo sprintf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
} else {
|
||||
/* translators: %s: Plugin file name. */
|
||||
echo sprintf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
printf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -200,7 +200,7 @@ if ( $file_description !== $file_show ) {
|
||||
<p><strong><?php _e( 'Did you know?' ); ?></strong></p>
|
||||
<p>
|
||||
<?php
|
||||
echo sprintf(
|
||||
printf(
|
||||
/* translators: %s: Link to Custom CSS section in the Customizer. */
|
||||
__( 'There’s no need to change your CSS here — you can edit and live preview CSS changes in the <a href="%s">built-in CSS editor</a>.' ),
|
||||
esc_url( add_query_arg( 'autofocus[section]', 'custom_css', admin_url( 'customize.php' ) ) )
|
||||
@ -362,7 +362,7 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
|
||||
<?php
|
||||
if ( ! $theme->parent() ) {
|
||||
echo '<p>';
|
||||
echo sprintf(
|
||||
printf(
|
||||
/* translators: %s: Link to documentation on child themes. */
|
||||
__( 'If you need to tweak more than your theme’s CSS, you might want to try <a href="%s">making a child theme</a>.' ),
|
||||
esc_url( __( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) )
|
||||
|
@ -391,7 +391,7 @@ if ( $tab ) {
|
||||
<a class="num-ratings" href="{{ data.reviews_url }}">
|
||||
<?php
|
||||
/* translators: %s: Number of ratings. */
|
||||
echo sprintf( __( '(%s ratings)' ), '{{ data.num_ratings }}' );
|
||||
printf( __( '(%s ratings)' ), '{{ data.num_ratings }}' );
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -371,7 +371,7 @@ class WP_Customize_Panel {
|
||||
<span class="preview-notice">
|
||||
<?php
|
||||
/* translators: %s: The site/panel title in the Customizer. */
|
||||
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
|
||||
printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
|
||||
?>
|
||||
</span>
|
||||
<# if ( data.description ) { #>
|
||||
|
@ -824,7 +824,7 @@ final class WP_Customize_Widgets {
|
||||
<span class="customize-action">
|
||||
<?php
|
||||
/* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */
|
||||
echo sprintf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'widgets' )->title ) );
|
||||
printf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'widgets' )->title ) );
|
||||
?>
|
||||
</span>
|
||||
<?php _e( 'Add a Widget' ); ?>
|
||||
|
@ -208,7 +208,7 @@ final class WP_Customize_Selective_Refresh {
|
||||
);
|
||||
|
||||
// Export data to JS.
|
||||
echo sprintf( '<script>var _customizePartialRefreshExports = %s;</script>', wp_json_encode( $exports ) );
|
||||
printf( '<script>var _customizePartialRefreshExports = %s;</script>', wp_json_encode( $exports ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -149,7 +149,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
<span class="themes-displayed">
|
||||
<?php
|
||||
/* translators: %s: Number of themes displayed. */
|
||||
echo sprintf( __( '%s themes' ), '<span class="theme-count">0</span>' );
|
||||
printf( __( '%s themes' ), '<span class="theme-count">0</span>' );
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-48110';
|
||||
$wp_version = '5.5-alpha-48111';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -66,7 +66,7 @@ class WP_Widget_Categories extends WP_Widget {
|
||||
);
|
||||
|
||||
if ( $dropdown ) {
|
||||
echo sprintf( '<form action="%s" method="get">', esc_url( home_url() ) );
|
||||
printf( '<form action="%s" method="get">', esc_url( home_url() ) );
|
||||
$dropdown_id = ( $first_dropdown ) ? 'cat' : "{$this->id_base}-dropdown-{$this->number}";
|
||||
$first_dropdown = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user