General: Prevent nested paragraph tags when displaying PHP update annotations.

This change utilizes the new parameters accepted by `wp_update_php_annotation()` introduced in [44935] to prevent nested `<p>` tags when displaying the PHP update annotation.

Props afragen, desrosj.
Fixes #46269.
Built from https://develop.svn.wordpress.org/trunk@44936


git-svn-id: http://core.svn.wordpress.org/trunk@44767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-03-19 20:41:53 +00:00
parent 53f212ebbe
commit 612a0c8c80
2 changed files with 4 additions and 4 deletions

View File

@ -642,7 +642,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
self_admin_url( 'update-core.php' ), self_admin_url( 'update-core.php' ),
esc_url( wp_get_update_php_url() ) esc_url( wp_get_update_php_url() )
); );
wp_update_php_annotation(); wp_update_php_annotation( '</p><p><em>', '</em>' );
} elseif ( current_user_can( 'update_core' ) ) { } elseif ( current_user_can( 'update_core' ) ) {
printf( printf(
/* translators: %s: "Update WordPress" screen URL */ /* translators: %s: "Update WordPress" screen URL */
@ -655,7 +655,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
esc_url( wp_get_update_php_url() ) esc_url( wp_get_update_php_url() )
); );
wp_update_php_annotation(); wp_update_php_annotation( '</p><p><em>', '</em>' );
} }
} elseif ( ! $compatible_wp ) { } elseif ( ! $compatible_wp ) {
_e( 'This plugin doesn&#8217;t work with your version of WordPress.' ); _e( 'This plugin doesn&#8217;t work with your version of WordPress.' );
@ -674,7 +674,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
esc_url( wp_get_update_php_url() ) esc_url( wp_get_update_php_url() )
); );
wp_update_php_annotation(); wp_update_php_annotation( '</p><p><em>', '</em>' );
} }
} }
echo '</p></div>'; echo '</p></div>';

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.2-alpha-44935'; $wp_version = '5.2-alpha-44936';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.