Coding Standards: Update some alignment in wp-admin/authorize-application.php
for consistency.
Save blogs count to a variable for reusing. Follow-up to [49270]. See #51489. git-svn-id: https://develop.svn.wordpress.org/trunk@49282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2252cdaa8d
commit
a1403240bb
@ -129,8 +129,11 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
|||||||
<?php if ( $app_name ) : ?>
|
<?php if ( $app_name ) : ?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
|
printf(
|
||||||
/* translators: %s: Application name. */
|
/* translators: %s: Application name. */
|
||||||
printf( __( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the app in question.' ), '<strong>' . esc_html( $app_name ) . '</strong>' );
|
__( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the app in question.' ),
|
||||||
|
'<strong>' . esc_html( $app_name ) . '</strong>'
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
@ -140,19 +143,20 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
|
|||||||
<?php
|
<?php
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
$blogs = get_blogs_of_user( $user->ID, true );
|
$blogs = get_blogs_of_user( $user->ID, true );
|
||||||
if ( count( $blogs ) > 1 ) {
|
$blogs_count = count( $blogs );
|
||||||
|
if ( $blogs_count > 1 ) {
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: url to my-sites.php, 2: Number of blogs the user has. */
|
/* translators: 1: URL to my-sites.php, 2: Number of blogs the user has. */
|
||||||
_n(
|
_n(
|
||||||
'This will grant access to <a href="%1$s">the %2$s blog in this installation that you have permissions on</a>.',
|
'This will grant access to <a href="%1$s">the %2$s blog in this installation that you have permissions on</a>.',
|
||||||
'This will grant access to <a href="%1$s">all %2$s blogs in this installation that you have permissions on</a>.',
|
'This will grant access to <a href="%1$s">all %2$s blogs in this installation that you have permissions on</a>.',
|
||||||
count( $blogs )
|
$blogs_count
|
||||||
),
|
),
|
||||||
admin_url( 'my-sites.php' ),
|
admin_url( 'my-sites.php' ),
|
||||||
number_format_i18n( count( $blogs ) )
|
number_format_i18n( $blogs_count )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
@ -718,19 +718,20 @@ endif;
|
|||||||
<?php
|
<?php
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
$blogs = get_blogs_of_user( $user_id, true );
|
$blogs = get_blogs_of_user( $user_id, true );
|
||||||
if ( count( $blogs ) > 1 ) {
|
$blogs_count = count( $blogs );
|
||||||
|
if ( $blogs_count > 1 ) {
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: url to my-sites.php, 2: Number of blogs the user has. */
|
/* translators: 1: URL to my-sites.php, 2: Number of blogs the user has. */
|
||||||
_n(
|
_n(
|
||||||
'Application passwords grant access to <a href="%1$s">the %2$s blog in this installation that you have permissions on</a>.',
|
'Application passwords grant access to <a href="%1$s">the %2$s blog in this installation that you have permissions on</a>.',
|
||||||
'Application passwords grant access to <a href="%1$s">all %2$s blogs in this installation that you have permissions on</a>.',
|
'Application passwords grant access to <a href="%1$s">all %2$s blogs in this installation that you have permissions on</a>.',
|
||||||
count( $blogs )
|
$blogs_count
|
||||||
),
|
),
|
||||||
admin_url( 'my-sites.php' ),
|
admin_url( 'my-sites.php' ),
|
||||||
number_format_i18n( count( $blogs ) )
|
number_format_i18n( $blogs_count )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user