Changeset 56571
- Timestamp:
- 09/14/2023 01:11:29 AM (12 months ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-custom-background.php
r55881 r56571 240 240 <h1><?php _e( 'Custom Background' ); ?></h1> 241 241 242 <?php if ( current_user_can( 'customize' ) ) { ?> 243 <div class="notice notice-info hide-if-no-customize"> 244 <p> 245 <?php 246 printf( 242 <?php 243 if ( current_user_can( 'customize' ) ) { 244 $message = sprintf( 247 245 /* translators: %s: URL to background image configuration in Customizer. */ 248 246 __( 'You can now manage and live-preview Custom Backgrounds in the <a href="%s">Customizer</a>.' ), 249 247 admin_url( 'customize.php?autofocus[control]=background_image' ) 250 248 ); 251 ?> 252 </p> 253 </div> 254 <?php } ?> 255 256 <?php if ( ! empty( $this->updated ) ) { ?> 249 wp_admin_notice( 250 $message, 251 array( 252 'type' => 'info', 253 'additional_classes' => array( 'hide-if-no-customize' ), 254 ) 255 ); 256 } 257 258 if ( ! empty( $this->updated ) ) { 259 ?> 257 260 <div id="message" class="updated"> 258 261 <p> -
trunk/src/wp-admin/includes/class-custom-image-header.php
r55988 r56571 510 510 <h1><?php _e( 'Custom Header' ); ?></h1> 511 511 512 <?php if ( current_user_can( 'customize' ) ) { ?> 513 <div class="notice notice-info hide-if-no-customize"> 514 <p> 515 <?php 516 printf( 512 <?php 513 if ( current_user_can( 'customize' ) ) { 514 $message = sprintf( 517 515 /* translators: %s: URL to header image configuration in Customizer. */ 518 516 __( 'You can now manage and live-preview Custom Header in the <a href="%s">Customizer</a>.' ), 519 517 admin_url( 'customize.php?autofocus[control]=header_image' ) 520 518 ); 521 ?> 522 </p> 523 </div> 524 <?php } ?> 519 wp_admin_notice( 520 $message, 521 array( 522 'type' => 'info', 523 'additional_classes' => array( 'hide-if-no-customize' ), 524 ) 525 ); 526 } 527 ?> 525 528 526 529 <?php if ( ! empty( $this->updated ) ) { ?> -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r56397 r56571 687 687 <?php 688 688 if ( ! $compatible_php || ! $compatible_wp ) { 689 echo '<div class="notice inline notice-error notice-alt"><p>';689 $incompatible_notice_message = ''; 690 690 if ( ! $compatible_php && ! $compatible_wp ) { 691 _e( 'This plugin does not work with your versions of WordPress and PHP.' );691 $incompatible_notice_message .= __( 'This plugin does not work with your versions of WordPress and PHP.' ); 692 692 if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { 693 printf(693 $incompatible_notice_message .= sprintf( 694 694 /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ 695 695 ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), … … 697 697 esc_url( wp_get_update_php_url() ) 698 698 ); 699 wp_update_php_annotation( '</p><p><em>', '</em>');699 $incompatible_notice_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 700 700 } elseif ( current_user_can( 'update_core' ) ) { 701 printf(701 $incompatible_notice_message .= sprintf( 702 702 /* translators: %s: URL to WordPress Updates screen. */ 703 703 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 705 705 ); 706 706 } elseif ( current_user_can( 'update_php' ) ) { 707 printf(707 $incompatible_notice_message .= sprintf( 708 708 /* translators: %s: URL to Update PHP page. */ 709 709 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 710 710 esc_url( wp_get_update_php_url() ) 711 711 ); 712 wp_update_php_annotation( '</p><p><em>', '</em>');712 $incompatible_notice_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 713 713 } 714 714 } elseif ( ! $compatible_wp ) { 715 _e( 'This plugin does not work with your version of WordPress.' );715 $incompatible_notice_message .= __( 'This plugin does not work with your version of WordPress.' ); 716 716 if ( current_user_can( 'update_core' ) ) { 717 printf(717 $incompatible_notice_message .= printf( 718 718 /* translators: %s: URL to WordPress Updates screen. */ 719 719 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 722 722 } 723 723 } elseif ( ! $compatible_php ) { 724 _e( 'This plugin does not work with your version of PHP.' );724 $incompatible_notice_message .= __( 'This plugin does not work with your version of PHP.' ); 725 725 if ( current_user_can( 'update_php' ) ) { 726 printf(726 $incompatible_notice_message .= sprintf( 727 727 /* translators: %s: URL to Update PHP page. */ 728 728 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 729 729 esc_url( wp_get_update_php_url() ) 730 730 ); 731 wp_update_php_annotation( '</p><p><em>', '</em>');731 $incompatible_notice_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 732 732 } 733 733 } 734 echo '</p></div>'; 734 735 wp_admin_notice( 736 $incompatible_notice_message, 737 array( 738 'type' => 'error', 739 'additional_classes' => array( 'notice-alt', 'inline' ), 740 ) 741 ); 735 742 } 736 743 ?> -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r56549 r56571 1244 1244 echo apply_filters( 'plugin_auto_update_setting_html', $html, $plugin_file, $plugin_data ); 1245 1245 1246 echo '<div class="notice notice-error notice-alt inline hidden"><p></p></div>'; 1246 wp_admin_notice( 1247 '', 1248 array( 1249 'type' => 'error', 1250 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 1251 ) 1252 ); 1253 1247 1254 echo '</td>'; 1248 1255 -
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r56549 r56571 2077 2077 <?php endif; ?> 2078 2078 2079 <div class="notice notice-error notice-alt inline hidden"> 2080 <p class="error"></p> 2081 </div> 2079 <?php 2080 wp_admin_notice( 2081 '<p class="error"></p>', 2082 array( 2083 'type' => 'error', 2084 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 2085 'paragraph_wrap' => false, 2086 ) 2087 ); 2088 ?> 2082 2089 </div> 2083 2090 </div> <!-- end of .inline-edit-wrapper --> -
trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php
r56499 r56571 353 353 ); 354 354 } else { 355 ?> 356 <div class="notice notice-warning inline wp-pp-notice"> 357 <p> 358 <?php 359 echo $message; 360 printf( 361 ' <a href="%s" target="_blank">%s <span class="screen-reader-text">%s</span></a>', 362 $url, 363 $label, 364 /* translators: Hidden accessibility text. */ 365 __( '(opens in a new tab)' ) 366 ); 367 ?> 368 </p> 369 </div> 370 <?php 355 $message .= sprintf( 356 ' <a href="%s" target="_blank">%s <span class="screen-reader-text">%s</span></a>', 357 $url, 358 $label, 359 /* translators: Hidden accessibility text. */ 360 __( '(opens in a new tab)' ) 361 ); 362 wp_admin_notice( 363 $message, 364 array( 365 'type' => 'warning', 366 'additional_classes' => array( 'inline', 'wp-pp-notice' ), 367 ) 368 ); 371 369 } 372 370 } … … 395 393 396 394 /* translators: %s: Date of plugin deactivation. */ 397 $removed = __( 'You deactivated this plugin on %s and may no longer need this policy.' ); 398 $removed = '<div class="notice notice-info inline"><p>' . sprintf( $removed, $date ) . '</p></div>'; 395 $removed = sprintf( __( 'You deactivated this plugin on %s and may no longer need this policy.' ), $date ); 396 $removed = wp_get_admin_notice( 397 $removed, 398 array( 399 'type' => 'info', 400 'additional_classes' => array( 'inline' ), 401 ) 402 ); 399 403 } elseif ( ! empty( $section['updated'] ) ) { 400 404 $badge_class = ' blue'; -
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r56549 r56571 712 712 <input type="hidden" name="post_type" value="<?php echo esc_attr( $this->screen->post_type ); ?>" /> 713 713 714 <div class="notice notice-error notice-alt inline hidden"> 715 <p class="error"></p> 716 </div> 714 <?php 715 wp_admin_notice( 716 '<p class="error"></p>', 717 array( 718 'type' => 'error', 719 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 720 'paragraph_wrap' => false, 721 ) 722 ); 723 ?> 717 724 </div> 718 725 </div> -
trunk/src/wp-admin/includes/meta-boxes.php
r56420 r56571 312 312 313 313 if ( 'draft' === $post->post_status && get_post_meta( $post_id, '_customize_changeset_uuid', true ) ) : 314 ?> 315 <div class="notice notice-info notice-alt inline"> 316 <p> 317 <?php 318 printf( 319 /* translators: %s: URL to the Customizer. */ 320 __( 'This draft comes from your <a href="%s">unpublished customization changes</a>. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ), 321 esc_url( 322 add_query_arg( 323 'changeset_uuid', 324 rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), 325 admin_url( 'customize.php' ) 326 ) 327 ) 328 ); 329 ?> 330 </p> 331 </div> 332 <?php 314 $message = sprintf( 315 /* translators: %s: URL to the Customizer. */ 316 __( 'This draft comes from your <a href="%s">unpublished customization changes</a>. You can edit, but there is no need to publish now. It will be published automatically with those changes.' ), 317 esc_url( 318 add_query_arg( 319 'changeset_uuid', 320 rawurlencode( get_post_meta( $post_id, '_customize_changeset_uuid', true ) ), 321 admin_url( 'customize.php' ) 322 ) 323 ) 324 ); 325 wp_admin_notice( 326 $message, 327 array( 328 'type' => 'info', 329 'additional_classes' => array( 'notice-alt', 'inline' ), 330 ) 331 ); 333 332 endif; 334 333 -
trunk/src/wp-admin/includes/plugin-install.php
r56446 r56571 818 818 819 819 if ( ! $compatible_php ) { 820 echo '<div class="notice notice-error notice-alt"><p>'; 821 _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' ); 820 $compatible_php_notice_message = '<p>'; 821 $compatible_php_notice_message .= __( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' ); 822 822 823 if ( current_user_can( 'update_php' ) ) { 823 printf(824 $compatible_php_notice_message .= sprintf( 824 825 /* translators: %s: URL to Update PHP page. */ 825 826 ' ' . __( '<a href="%s" target="_blank">Click here to learn more about updating PHP</a>.' ), 826 827 esc_url( wp_get_update_php_url() ) 827 ); 828 829 wp_update_php_annotation( '</p><p><em>', '</em>' ); 828 ) . wp_update_php_annotation( '</p><p><em>', '</em>', false ); 830 829 } else { 831 echo '</p>'; 832 } 833 echo '</div>'; 830 $compatible_php_notice_message .= '</p>'; 831 } 832 833 wp_admin_notice( 834 $compatible_php_notice_message, 835 array( 836 'type' => 'error', 837 'additional_classes' => array( 'notice-alt' ), 838 'paragraph_wrap' => false, 839 ) 840 ); 834 841 } 835 842 836 843 if ( ! $tested_wp ) { 837 echo '<div class="notice notice-warning notice-alt"><p>'; 838 _e( '<strong>Warning:</strong> This plugin <strong>has not been tested</strong> with your current version of WordPress.' ); 839 echo '</p></div>'; 844 wp_admin_notice( 845 __( '<strong>Warning:</strong> This plugin <strong>has not been tested</strong> with your current version of WordPress.' ), 846 array( 847 'type' => 'warning', 848 'additional_classes' => array( 'notice-alt' ), 849 ) 850 ); 840 851 } elseif ( ! $compatible_wp ) { 841 echo '<div class="notice notice-error notice-alt"><p>'; 842 _e( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' ); 852 $compatible_wp_notice_message = __( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' ); 843 853 if ( current_user_can( 'update_core' ) ) { 844 printf(854 $compatible_wp_notice_message .= sprintf( 845 855 /* translators: %s: URL to WordPress Updates screen. */ 846 856 ' ' . __( '<a href="%s" target="_parent">Click here to update WordPress</a>.' ), … … 848 858 ); 849 859 } 850 echo '</p></div>'; 860 861 wp_admin_notice( 862 $compatible_wp_notice_message, 863 array( 864 'type' => 'error', 865 'additional_classes' => array( 'notice-alt' ), 866 ) 867 ); 851 868 } 852 869 -
trunk/src/wp-admin/includes/plugin.php
r56414 r56571 2498 2498 } 2499 2499 2500 printf(2501 '< div class="notice notice-error"><p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p></div>',2500 $message = sprintf( 2501 '<strong>%s</strong><br>%s</p><p><a href="%s">%s</a>', 2502 2502 __( 'One or more plugins failed to load properly.' ), 2503 2503 __( 'You can find more details and make changes on the Plugins screen.' ), 2504 2504 esc_url( admin_url( 'plugins.php?plugin_status=paused' ) ), 2505 2505 __( 'Go to the Plugins screen' ) 2506 ); 2507 wp_admin_notice( 2508 $message, 2509 array( 'type' => 'error' ) 2506 2510 ); 2507 2511 } … … 2572 2576 } 2573 2577 2574 printf(2575 '< div class="notice notice-warning"><p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p></div>',2578 $message = sprintf( 2579 '<strong>%s</strong><br>%s</p><p><a href="%s">%s</a>', 2576 2580 sprintf( 2577 2581 /* translators: %s: Name of deactivated plugin. */ … … 2583 2587 __( 'Go to the Plugins screen' ) 2584 2588 ); 2589 wp_admin_notice( $message, array( 'type' => 'warning' ) ); 2585 2590 } 2586 2591 -
trunk/src/wp-admin/includes/template.php
r56549 r56571 513 513 <span class="waiting spinner"></span> 514 514 </p> 515 <div class="notice notice-error notice-alt inline hidden"> 516 <p class="error"></p> 517 </div> 515 <?php 516 wp_admin_notice( 517 '<p class="error"></p>', 518 array( 519 'type' => 'error', 520 'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ), 521 'paragraph_wrap' => false, 522 ) 523 ); 524 ?> 518 525 </div> 519 526 … … 2777 2784 */ 2778 2785 function _wp_posts_page_notice() { 2779 printf( 2780 '<div class="notice notice-warning inline"><p>%s</p></div>', 2781 __( 'You are currently editing the page that shows your latest posts.' ) 2786 wp_admin_notice( 2787 __( 'You are currently editing the page that shows your latest posts.' ), 2788 array( 2789 'type' => 'warning', 2790 'additional_classes' => array( 'inline' ), 2791 ) 2782 2792 ); 2783 2793 } -
trunk/src/wp-admin/includes/theme.php
r56552 r56571 1225 1225 } 1226 1226 1227 printf(1228 '< div class="notice notice-error"><p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p></div>',1227 $message = sprintf( 1228 '<p><strong>%s</strong><br>%s</p><p><a href="%s">%s</a></p>', 1229 1229 __( 'One or more themes failed to load properly.' ), 1230 1230 __( 'You can find more details and make changes on the Themes screen.' ), … … 1232 1232 __( 'Go to the Themes screen' ) 1233 1233 ); 1234 wp_admin_notice( 1235 $message, 1236 array( 1237 'type' => 'error', 1238 'paragraph_wrap' => false, 1239 ) 1240 ); 1234 1241 } -
trunk/src/wp-admin/includes/update.php
r55874 r56571 1050 1050 $url = wp_nonce_url( $url, WP_Recovery_Mode::EXIT_ACTION ); 1051 1051 1052 ?> 1053 <div class="notice notice-info"> 1054 <p> 1055 <?php 1056 printf( 1057 /* translators: %s: Recovery Mode exit link. */ 1058 __( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button. <a href="%s">Exit Recovery Mode</a>' ), 1059 esc_url( $url ) 1060 ); 1061 ?> 1062 </p> 1063 </div> 1064 <?php 1052 $message = sprintf( 1053 /* translators: %s: Recovery Mode exit link. */ 1054 __( 'You are in recovery mode. This means there may be an error with a theme or plugin. To exit recovery mode, log out or use the Exit button. <a href="%s">Exit Recovery Mode</a>' ), 1055 esc_url( $url ) 1056 ); 1057 wp_admin_notice( $message, array( 'type' => 'info' ) ); 1065 1058 } 1066 1059
Note: See TracChangeset
for help on using the changeset viewer.