Changeset 56599
- Timestamp:
- 09/17/2023 03:21:07 PM (15 months ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-bulk-upgrader-skin.php
r56027 r56599 144 144 if ( $this->error || ! $this->result ) { 145 145 if ( $this->error ) { 146 echo '<div class="error"><p>' . sprintf( $this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ) . '</p></div>';146 $after_error_message = sprintf( $this->upgrader->strings['skin_update_failed_error'], $title, '<strong>' . $this->error . '</strong>' ); 147 147 } else { 148 echo '<div class="error"><p>' . sprintf( $this->upgrader->strings['skin_update_failed'], $title ) . '</p></div>';148 $after_error_message = sprintf( $this->upgrader->strings['skin_update_failed'], $title ); 149 149 } 150 wp_admin_notice( 151 $after_error_message, 152 array( 153 'additional_classes' => array( 'error' ), 154 ) 155 ); 150 156 151 157 echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>'; -
trunk/src/wp-admin/includes/class-custom-background.php
r56571 r56599 257 257 258 258 if ( ! empty( $this->updated ) ) { 259 ?> 260 <div id="message" class="updated"> 261 <p> 262 <?php 263 /* translators: %s: Home URL. */ 264 printf( __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), esc_url( home_url( '/' ) ) ); 265 ?> 266 </p> 267 </div> 268 <?php } ?> 259 $updated_message = sprintf( 260 /* translators: %s: Home URL. */ 261 __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), 262 esc_url( home_url( '/' ) ) 263 ); 264 wp_admin_notice( 265 $updated_message, 266 array( 267 'id' => 'message', 268 'additional_classes' => array( 'updated' ), 269 ) 270 ); 271 } 272 ?> 269 273 270 274 <h2><?php _e( 'Background Image' ); ?></h2> -
trunk/src/wp-admin/includes/class-custom-image-header.php
r56571 r56599 525 525 ); 526 526 } 527 528 if ( ! empty( $this->updated ) ) { 529 $updated_message = sprintf( 530 /* translators: %s: Home URL. */ 531 __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), 532 esc_url( home_url( '/' ) ) 533 ); 534 wp_admin_notice( 535 $updated_message, 536 array( 537 'id' => 'message', 538 'additional_classes' => array( 'updated' ), 539 ) 540 ); 541 } 527 542 ?> 528 529 <?php if ( ! empty( $this->updated ) ) { ?>530 <div id="message" class="updated">531 <p>532 <?php533 /* translators: %s: Home URL. */534 printf( __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), esc_url( home_url( '/' ) ) );535 ?>536 </p>537 </div>538 <?php } ?>539 543 540 544 <h2><?php _e( 'Header Image' ); ?></h2> -
trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php
r56571 r56599 291 291 */ 292 292 public function no_items() { 293 if ( isset( $this->error ) ) { ?> 294 <div class="inline error"><p><?php echo $this->error->get_error_message(); ?></p> 295 <p class="hide-if-no-js"><button class="button try-again"><?php _e( 'Try Again' ); ?></button></p> 296 </div> 293 if ( isset( $this->error ) ) { 294 $error_message = '<p>' . $this->error->get_error_message() . '</p>'; 295 $error_message .= '<p class="hide-if-no-js"><button class="button try-again">' . __( 'Try Again' ) . '</button></p>'; 296 wp_admin_notice( 297 $error_message, 298 array( 299 'additional_classes' => array( 'inline', 'error' ), 300 'paragraph_wrap' => false, 301 ) 302 ); 303 ?> 297 304 <?php } else { ?> 298 305 <div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div> -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r56571 r56599 1283 1283 '<tr class="plugin-update-tr">' . 1284 1284 '<td colspan="%s" class="plugin-update colspanchange">' . 1285 '<div class="update-message notice inline notice-error notice-alt"><p>',1286 1285 esc_attr( $this->get_column_count() ) 1287 1286 ); 1288 1287 1288 $incompatible_message = ''; 1289 1289 if ( ! $compatible_php && ! $compatible_wp ) { 1290 _e( 'This plugin does not work with your versions of WordPress and PHP.' );1290 $incompatible_message .= __( 'This plugin does not work with your versions of WordPress and PHP.' ); 1291 1291 if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { 1292 printf(1292 $incompatible_message .= sprintf( 1293 1293 /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ 1294 1294 ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ), … … 1296 1296 esc_url( wp_get_update_php_url() ) 1297 1297 ); 1298 wp_update_php_annotation( '</p><p><em>', '</em>');1298 $incompatible_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 1299 1299 } elseif ( current_user_can( 'update_core' ) ) { 1300 printf(1300 $incompatible_message .= sprintf( 1301 1301 /* translators: %s: URL to WordPress Updates screen. */ 1302 1302 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 1304 1304 ); 1305 1305 } elseif ( current_user_can( 'update_php' ) ) { 1306 printf(1306 $incompatible_message .= sprintf( 1307 1307 /* translators: %s: URL to Update PHP page. */ 1308 1308 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 1309 1309 esc_url( wp_get_update_php_url() ) 1310 1310 ); 1311 wp_update_php_annotation( '</p><p><em>', '</em>');1311 $incompatible_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 1312 1312 } 1313 1313 } elseif ( ! $compatible_wp ) { 1314 _e( 'This plugin does not work with your version of WordPress.' );1314 $incompatible_message .= __( 'This plugin does not work with your version of WordPress.' ); 1315 1315 if ( current_user_can( 'update_core' ) ) { 1316 printf(1316 $incompatible_message .= sprintf( 1317 1317 /* translators: %s: URL to WordPress Updates screen. */ 1318 1318 ' ' . __( '<a href="%s">Please update WordPress</a>.' ), … … 1321 1321 } 1322 1322 } elseif ( ! $compatible_php ) { 1323 _e( 'This plugin does not work with your version of PHP.' );1323 $incompatible_message .= __( 'This plugin does not work with your version of PHP.' ); 1324 1324 if ( current_user_can( 'update_php' ) ) { 1325 printf(1325 $incompatible_message .= sprintf( 1326 1326 /* translators: %s: URL to Update PHP page. */ 1327 1327 ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ), 1328 1328 esc_url( wp_get_update_php_url() ) 1329 1329 ); 1330 wp_update_php_annotation( '</p><p><em>', '</em>');1330 $incompatible_message .= wp_update_php_annotation( '</p><p><em>', '</em>', false ); 1331 1331 } 1332 1332 } 1333 1333 1334 echo '</p></div></td></tr>'; 1334 wp_admin_notice( 1335 $incompatible_message, 1336 array( 1337 'type' => 'error', 1338 'additional_classes' => array( 'notice-alt', 'inline', 'update-message' ), 1339 ) 1340 ); 1341 1342 echo '</td></tr>'; 1335 1343 } 1336 1344 -
trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php
r56571 r56599 139 139 } 140 140 141 ?> 142 <div class="policy-text-updated notice notice-warning is-dismissible"> 143 <p> 144 <?php 145 printf( 146 /* translators: %s: Privacy Policy Guide URL. */ 147 __( 'The suggested privacy policy text has changed. Please <a href="%s">review the guide</a> and update your privacy policy.' ), 148 esc_url( admin_url( 'privacy-policy-guide.php?tab=policyguide' ) ) 149 ); 150 ?> 151 </p> 152 </div> 153 <?php 141 $privacy_message = sprintf( 142 /* translators: %s: Privacy Policy Guide URL. */ 143 __( 'The suggested privacy policy text has changed. Please <a href="%s">review the guide</a> and update your privacy policy.' ), 144 esc_url( admin_url( 'privacy-policy-guide.php?tab=policyguide' ) ) 145 ); 146 147 wp_admin_notice( 148 $privacy_message, 149 array( 150 'type' => 'warning', 151 'additional_classes' => array( 'policy-text-updated' ), 152 'dismissible' => true, 153 ) 154 ); 154 155 } 155 156 -
trunk/src/wp-admin/includes/dashboard.php
r56548 r56599 574 574 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form hide-if-no-js"> 575 575 576 <?php if ( $error_msg ) : ?> 577 <div class="error"><?php echo $error_msg; ?></div> 578 <?php endif; ?> 576 <?php 577 if ( $error_msg ) { 578 wp_admin_notice( 579 $error_msg, 580 array( 581 'additional_classes' => array( 'error' ), 582 ) 583 ); 584 } 585 ?> 579 586 580 587 <div class="input-text-wrap" id="title-wrap"> … … 1158 1165 */ 1159 1166 function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array(), ...$args ) { 1160 $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><div class="hide-if-js notice notice-error inline"><p>' . __( 'This widget requires JavaScript.' ) . '</p></div>';1161 1167 $doing_ajax = wp_doing_ajax(); 1168 $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p>'; 1169 $loading .= wp_get_admin_notice( 1170 __( 'This widget requires JavaScript.' ), 1171 array( 1172 'type' => 'error', 1173 'additional_classes' => array( 'inline', 'hide-if-js' ), 1174 ) 1175 ); 1162 1176 1163 1177 if ( empty( $check_urls ) ) { … … 1341 1355 */ 1342 1356 function wp_print_community_events_markup() { 1343 ?> 1344 1345 <div class="community-events-errors notice notice-error inline hide-if-js"> 1346 <p class="hide-if-js"> 1347 <?php _e( 'This widget requires JavaScript.' ); ?> 1348 </p> 1349 1350 <p class="community-events-error-occurred" aria-hidden="true"> 1351 <?php _e( 'An error occurred. Please try again.' ); ?> 1352 </p> 1353 1354 <p class="community-events-could-not-locate" aria-hidden="true"></p> 1355 </div> 1356 1357 <div class="community-events-loading hide-if-no-js"> 1358 <?php _e( 'Loading…' ); ?> 1359 </div> 1360 1361 <?php 1357 $community_events_notice = '<p class="hide-if-js">' . ( 'This widget requires JavaScript.' ) . '</p>'; 1358 $community_events_notice .= '<p class="community-events-error-occurred" aria-hidden="true">' . __( 'An error occurred. Please try again.' ) . '</p>'; 1359 $community_events_notice .= '<p class="community-events-could-not-locate" aria-hidden="true"></p>'; 1360 1361 wp_admin_notice( 1362 $community_events_notice, 1363 array( 1364 'type' => 'error', 1365 'additional_classes' => array( 'community-events-errors', 'inline', 'hide-if-js' ), 1366 'paragraph_wrap' => false, 1367 ) 1368 ); 1369 1362 1370 /* 1363 1371 * Hide the main element when the page first loads, because the content -
trunk/src/wp-admin/includes/file.php
r56559 r56599 2427 2427 $error_string = esc_html( $error->get_error_message() ); 2428 2428 } 2429 echo '<div id="message" class="error"><p>' . $error_string . '</p></div>'; 2429 wp_admin_notice( 2430 $error_string, 2431 array( 2432 'id' => 'message', 2433 'additional_classes' => array( 'error' ), 2434 ) 2435 ); 2430 2436 } 2431 2437 -
trunk/src/wp-admin/includes/ms.php
r56549 r56599 693 693 694 694 if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) { 695 echo "<div class='update-nag notice notice-warning inline'>" .sprintf(695 $upgrade_network_message = sprintf( 696 696 /* translators: %s: URL to Upgrade Network screen. */ 697 697 __( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ), 698 698 esc_url( network_admin_url( 'upgrade.php' ) ) 699 ) . '</div>'; 699 ); 700 701 wp_admin_notice( 702 $upgrade_network_message, 703 array( 704 'type' => 'warning', 705 'additional_classes' => array( 'update-nag', 'inline' ), 706 'paragraph_wrap' => false, 707 ) 708 ); 700 709 } 701 710 } -
trunk/src/wp-admin/includes/nav-menu.php
r56548 r56599 1438 1438 1439 1439 if ( is_wp_error( $menu_item_db_id ) ) { 1440 $messages[] = '<div id="message" class="error"><p>' . $menu_item_db_id->get_error_message() . '</p></div>'; 1440 $messages[] = wp_get_admin_notice( 1441 $menu_item_db_id->get_error_message(), 1442 array( 1443 'id' => 'message', 1444 'additional_classes' => array( 'error' ), 1445 ) 1446 ); 1441 1447 } else { 1442 1448 unset( $menu_items[ $menu_item_db_id ] ); -
trunk/src/wp-admin/includes/network.php
r56410 r56599 114 114 115 115 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 116 echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . sprintf( 116 $cannot_define_constant_message = '<strong>' . __( 'Error:' ) . '</strong> '; 117 $cannot_define_constant_message .= sprintf( 117 118 /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */ 118 119 __( 'The constant %s cannot be defined when creating a network.' ), 119 120 '<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>' 120 ) . '</p></div>'; 121 ); 122 123 wp_admin_notice( 124 $cannot_define_constant_message, 125 array( 126 'additional_classes' => array( 'error' ), 127 ) 128 ); 129 121 130 echo '</div>'; 122 131 require_once ABSPATH . 'wp-admin/admin-footer.php'; … … 143 152 $has_ports = strstr( $hostname, ':' ); 144 153 if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) { 145 echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>'; 154 wp_admin_notice( 155 '<strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ), 156 array( 157 'additional_classes' => array( 'error' ), 158 ) 159 ); 160 146 161 echo '<p>' . sprintf( 147 162 /* translators: %s: Port number. */ … … 161 176 $error_codes = array(); 162 177 if ( is_wp_error( $errors ) ) { 163 echo '<div class="error"><p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>';178 $network_created_error_message = '<p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>'; 164 179 foreach ( $errors->get_error_messages() as $error ) { 165 echo "<p>$error</p>"; 166 } 167 echo '</div>'; 180 $network_created_error_message .= "<p>$error</p>"; 181 } 182 wp_admin_notice( 183 $network_created_error_message, 184 array( 185 'additional_classes' => array( 'error' ), 186 'paragraph_wrap' => false, 187 ) 188 ); 168 189 $error_codes = $errors->get_error_codes(); 169 190 } … … 196 217 $got_mod_rewrite = got_mod_rewrite(); 197 218 if ( $got_mod_rewrite ) { // Dangerous assumptions. 198 echo '<div class="updated inline"><p><strong>' . __( 'Note:' ) . '</strong> '; 199 printf( 219 $message_class = 'updated'; 220 $message = '<p><strong>' . __( 'Warning:' ) . '</strong> '; 221 $message .= '<p>' . sprintf( 200 222 /* translators: %s: mod_rewrite */ 201 223 __( 'Please make sure the Apache %s module is installed as it will be used at the end of this installation.' ), 202 224 '<code>mod_rewrite</code>' 203 ); 204 echo '</p>'; 225 ) . '</p>'; 205 226 } elseif ( $is_apache ) { 206 echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> '; 207 printf( 227 $message_class = 'error'; 228 $message = '<p><strong>' . __( 'Warning:' ) . '</strong> '; 229 $message .= sprintf( 208 230 /* translators: %s: mod_rewrite */ 209 231 __( 'It looks like the Apache %s module is not installed.' ), 210 232 '<code>mod_rewrite</code>' 211 ); 212 echo '</p>'; 233 ) . '</p>'; 213 234 } 214 235 215 236 if ( $got_mod_rewrite || $is_apache ) { // Protect against mod_rewrite mimicry (but ! Apache). 216 echo '<p>'; 217 printf( 237 $message .= '<p>' . sprintf( 218 238 /* translators: 1: mod_rewrite, 2: mod_rewrite documentation URL, 3: Google search for mod_rewrite. */ 219 239 __( 'If %1$s is disabled, ask your administrator to enable that module, or look at the <a href="%2$s">Apache documentation</a> or <a href="%3$s">elsewhere</a> for help setting it up.' ), … … 221 241 'https://httpd.apache.org/docs/mod/mod_rewrite.html', 222 242 'https://www.google.com/search?q=apache+mod_rewrite' 243 ) . '</p>'; 244 245 wp_admin_notice( 246 $message, 247 array( 248 'additional_classes' => array( $message_class, 'inline' ), 249 'paragraph_wrap' => false, 250 ) 223 251 ); 224 echo '</p></div>';225 252 } 226 253 } … … 264 291 265 292 if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) { 266 echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>'; 293 $subdirectory_warning_message = '<strong>' . __( 'Warning:' ) . '</strong> '; 294 $subdirectory_warning_message .= __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ); 295 wp_admin_notice( 296 $subdirectory_warning_message, 297 array( 298 'additional_classes' => array( 'error', 'inline' ), 299 ) 300 ); 267 301 } 268 302 … … 410 444 // Wildcard DNS message. 411 445 if ( is_wp_error( $errors ) ) { 412 echo '<div class="error">' . $errors->get_error_message() . '</div>'; 446 wp_admin_notice( 447 $errors->get_error_message(), 448 array( 449 'additional_classes' => array( 'error' ), 450 ) 451 ); 413 452 } 414 453 … … 427 466 } else { 428 467 $subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" ); 468 469 wp_admin_notice( 470 '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'An existing WordPress network was detected.' ), 471 array( 472 'additional_classes' => array( 'error' ), 473 ) 474 ); 429 475 ?> 430 <div class="error"><p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>431 476 <p><?php _e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p> 432 477 <?php -
trunk/src/wp-admin/includes/template.php
r56571 r56599 1014 1014 $upload_dir = wp_upload_dir(); 1015 1015 if ( ! empty( $upload_dir['error'] ) ) : 1016 ?> 1017 <div class="error"><p><?php _e( 'Before you can upload your import file, you will need to fix the following error:' ); ?></p> 1018 <p><strong><?php echo $upload_dir['error']; ?></strong></p></div> 1019 <?php 1016 $upload_directory_error = '<p>' . __( 'Before you can upload your import file, you will need to fix the following error:' ) . '</p>'; 1017 $upload_directory_error .= '<p><strong>' . $upload_dir['error'] . '</strong></p>'; 1018 wp_admin_notice( 1019 $upload_directory_error, 1020 array( 1021 'additonal_classes' => array( 'error' ), 1022 'paragraph_wrap' => false, 1023 ) 1024 ); 1020 1025 else : 1021 1026 ?> … … 1435 1440 $plugin = _get_plugin_from_callback( $box['callback'] ); 1436 1441 if ( $plugin ) { 1437 ?> 1438 <div class="error inline"> 1439 <p> 1440 <?php 1441 /* translators: %s: The name of the plugin that generated this meta box. */ 1442 printf( __( 'This meta box, from the %s plugin, is not compatible with the block editor.' ), "<strong>{$plugin['Name']}</strong>" ); 1443 ?> 1444 </p> 1445 </div> 1446 <?php 1442 $meta_box_not_compatible_message = sprintf( 1443 /* translators: %s: The name of the plugin that generated this meta box. */ 1444 __( 'This meta box, from the %s plugin, is not compatible with the block editor.' ), 1445 "<strong>{$plugin['Name']}</strong>" 1446 ); 1447 wp_admin_notice( 1448 $meta_box_not_compatible_message, 1449 array( 1450 'additional_classes' => array( 'error', 'inline' ), 1451 ) 1452 ); 1447 1453 } 1448 1454 } … … 2696 2702 */ 2697 2703 function _local_storage_notice() { 2698 ?> 2699 <div id="local-storage-notice" class="hidden notice is-dismissible"> 2700 <p class="local-restore"> 2701 <?php _e( 'The backup of this post in your browser is different from the version below.' ); ?> 2702 <button type="button" class="button restore-backup"><?php _e( 'Restore the backup' ); ?></button> 2703 </p> 2704 <p class="help"> 2705 <?php _e( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); ?> 2706 </p> 2707 </div> 2708 <?php 2704 $local_storage_message = '<p class="local-restore">'; 2705 $local_storage_message .= __( 'The backup of this post in your browser is different from the version below.' ); 2706 $local_storage_message .= '<button type="button" class="button restore-backup">' . __( 'Restore the backup' ) . '</button></p>'; 2707 $local_storage_message .= '<p class="help">'; 2708 $local_storage_message .= __( 'This will replace the current editor content with the last backup version. You can use undo and redo in the editor to get the old content back or to return to the restored version.' ); 2709 $local_storage_message .= '</p>'; 2710 2711 wp_admin_notice( 2712 $local_storage_message, 2713 array( 2714 'id' => 'local-storage-notice', 2715 'additional_classes' => array( 'hidden' ), 2716 'dismissible' => true, 2717 'paragraph_wrap' => false, 2718 ) 2719 ); 2709 2720 } 2710 2721 -
trunk/src/wp-admin/includes/update.php
r56571 r56599 343 343 } 344 344 345 echo "<div class='update-nag notice notice-warning inline'>$msg</div>"; 345 wp_admin_notice( 346 $msg, 347 array( 348 'type' => 'warning', 349 'additonal_classes' => array( 'update-nag', 'inline' ), 350 'paragraph_wrap' => false, 351 ) 352 ); 346 353 } 347 354 … … 885 892 } 886 893 887 echo "<div class='update-nag notice notice-warning inline'>$msg</div>"; 894 wp_admin_notice( 895 $msg, 896 array( 897 'type' => 'warning', 898 'additional_classes' => array( 'update-nag', 'inline' ), 899 'paragraph_wrap' => false, 900 ) 901 ); 888 902 } 889 903 -
trunk/src/wp-admin/includes/user.php
r55988 r56599 536 536 return; 537 537 } 538 ?> 539 <div class="error default-password-nag"> 540 <p> 541 <strong><?php _e( 'Notice:' ); ?></strong> 542 <?php _e( 'You are using the auto-generated password for your account. Would you like to change it?' ); ?> 543 </p> 544 <p> 545 <?php 546 printf( 547 '<a href="%1$s">%2$s</a> | ', 548 esc_url( get_edit_profile_url() . '#password' ), 549 __( 'Yes, take me to my profile page' ) 550 ); 551 printf( 552 '<a href="%1$s" id="default-password-nag-no">%2$s</a>', 553 '?default_password_nag=0', 554 __( 'No thanks, do not remind me again' ) 555 ); 556 ?> 557 </p> 558 </div> 559 <?php 538 539 $default_password_nag_message = sprintf( 540 '<p><strong>%1$s</strong> %2$s</p>', 541 __( 'Notice:' ), 542 __( 'You are using the auto-generated password for your account. Would you like to change it?' ) 543 ); 544 $default_password_nag_message .= sprintf( 545 '<p><a href="%1$s">%2$s</a> | ', 546 esc_url( get_edit_profile_url() . '#password' ), 547 __( 'Yes, take me to my profile page' ) 548 ); 549 $default_password_nag_message .= sprintf( 550 '<a href="%1$s" id="default-password-nag-no">%2$s</a></p>', 551 '?default_password_nag=0', 552 __( 'No thanks, do not remind me again' ) 553 ); 554 555 wp_admin_notice( 556 $default_password_nag_message, 557 array( 558 'additional_classes' => array( 'error', 'default-password-nag' ), 559 'paragraph_wrap' => false, 560 ) 561 ); 560 562 } 561 563
Note: See TracChangeset
for help on using the changeset viewer.