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.

git-svn-id: https://develop.svn.wordpress.org/trunk@44936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2019-03-19 20:40:02 +00:00
parent b8a918dcaa
commit 1b97ea1fcf
1 changed files with 3 additions and 3 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>';