Changeset 64799
- Timestamp:
- 10/27/2026 10:41:08 AM (13 days ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
-
js/_enqueues/admin/edit-comments.js (modified) (1 diff)
-
wp-admin/css/dashboard.css (modified) (2 diffs)
-
wp-admin/includes/dashboard.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/edit-comments.js
r63600 r64799 153 153 } 154 154 155 $( '.comment-count a', '#dashboard_right_now' ).text( response.i18n_comments_text );155 $( '.comment-count .comments-count-text', '#dashboard_right_now' ).text( response.i18n_comments_text ); 156 156 }; 157 157 -
trunk/src/wp-admin/css/dashboard.css
r64593 r64799 353 353 .welcome-panel .welcome-icon::before, 354 354 #dashboard_right_now li a::before, 355 #dashboard_right_now li span::before, 356 #dashboard_right_now .search-engines-info::before { 355 #dashboard_right_now li span::before { 357 356 color: #646970; 358 357 font: 400 20px/1 dashicons; … … 434 433 /* Right Now specific Icons styles */ 435 434 436 #dashboard_right_now .search-engines-info::before,437 435 #dashboard_right_now li a::before, 438 #dashboard_right_now li > span::before { /* get only the first level span to exclude screen-reader-text in mu-storage */436 #dashboard_right_now li > span::before { 439 437 padding: 0 5px 0 0; 440 /* generic icon for items added by CPTs ? */ 441 content: "\f159"; 442 content: "\f159" / ""; 443 } 444 445 #dashboard_right_now .page-count a::before, 446 #dashboard_right_now .page-count span::before { 447 content: "\f105"; 448 content: "\f105" / ""; 449 } 450 451 #dashboard_right_now .post-count a::before, 452 #dashboard_right_now .post-count span::before { 453 content: "\f109"; 454 content: "\f109" / ""; 455 } 456 457 #dashboard_right_now .comment-count a::before { 458 content: "\f101"; 459 content: "\f101" / ""; 460 } 461 462 #dashboard_right_now .comment-mod-count a::before { 463 content: "\f125"; 464 content: "\f125" / ""; 465 } 466 467 #dashboard_right_now .storage-count a::before { 468 content: "\f104"; 469 content: "\f104" / ""; 470 } 471 472 #dashboard_right_now .storage-count.warning a::before { 473 content: "\f153"; 474 content: "\f153" / ""; 475 } 476 477 #dashboard_right_now .search-engines-info::before { 478 content: "\f348"; 479 content: "\f348" / ""; 438 /* 439 * Default icon for plugin-added items: a copy of the core `asterisk` icon. 440 * Plugins can still override `content` with a Dashicon. 441 */ 442 content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2024%2024%22%20style%3D%22fill%3A%20none%22%20stroke%3D%22%23646970%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M5.72131%2015.625L12%2012M12%2012L18.2787%208.375M12%2012V4.75M12%2012L12%2019.25M12%2012L5.72131%208.375M12%2012L18.2787%2015.625%22%20stroke-linecap%3D%22square%22%20%2F%3E%3C%2Fsvg%3E"); 443 content: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2024%2024%22%20style%3D%22fill%3A%20none%22%20stroke%3D%22%23646970%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M5.72131%2015.625L12%2012M12%2012L18.2787%208.375M12%2012V4.75M12%2012L12%2019.25M12%2012L5.72131%208.375M12%2012L18.2787%2015.625%22%20stroke-linecap%3D%22square%22%20%2F%3E%3C%2Fsvg%3E") / ""; 444 } 445 446 #dashboard_right_now li a:has(> svg)::before, 447 #dashboard_right_now li > span:has(> svg)::before { 448 display: none; 449 } 450 451 #dashboard_right_now li a:has(> svg), 452 #dashboard_right_now li > span:has(> svg), 453 #dashboard_right_now .search-engines-info a { 454 display: inline-flex; 455 align-items: flex-start; 456 gap: 5px; 457 /* Match the height of ::before icon rows so the floated list items don't snag. */ 458 vertical-align: top; 459 } 460 461 #dashboard_right_now li a > svg, 462 #dashboard_right_now li > span > svg, 463 #dashboard_right_now .search-engines-info svg { 464 flex: none; 465 color: #646970; 466 } 467 468 #dashboard_right_now .warning a > svg, 469 #dashboard_right_now .search-engines-info svg { 480 470 color: #d63638; 481 471 } -
trunk/src/wp-admin/includes/dashboard.php
r64593 r64799 350 350 $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); 351 351 $post_type_object = get_post_type_object( $post_type ); 352 $icon = wp_get_icon( 'post' === $post_type ? 'core-admin/pin' : 'core-admin/page', array( 'size' => 20 ) ); 352 353 353 354 if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { … … 359 360 admin_url( 'edit.php' ) 360 361 ); 361 printf( '<li class="%1$s-count"><a href="%2$s">%3$s </a></li>', $post_type, esc_url( $url ), esc_html( $text ) );362 printf( '<li class="%1$s-count"><a href="%2$s">%3$s%4$s</a></li>', $post_type, esc_url( $url ), $icon, esc_html( $text ) ); 362 363 } else { 363 printf( '<li class="%1$s-count"><span>%2$s </span></li>', $post_type, $text);364 printf( '<li class="%1$s-count"><span>%2$s%3$s</span></li>', $post_type, $icon, esc_html( $text ) ); 364 365 } 365 366 } … … 374 375 ?> 375 376 <li class="comment-count"> 376 <a href="edit-comments.php"><?php echo $text; ?></a>377 <a href="edit-comments.php"><?php echo wp_get_icon( 'core-admin/comment', array( 'size' => 20 ) ); ?><span class="comments-count-text"><?php echo $text; ?></span></a> 377 378 </li> 378 379 <?php … … 382 383 ?> 383 384 <li class="comment-mod-count<?php echo ! $num_comm->moderated ? ' hidden' : ''; ?>"> 384 <a href="edit-comments.php?comment_status=moderated" class="comments-in-moderation-text"><?php echo $text; ?></a>385 <a href="edit-comments.php?comment_status=moderated"><?php echo wp_get_icon( 'core-admin/post-comments', array( 'size' => 20 ) ); ?><span class="comments-in-moderation-text"><?php echo $text; ?></span></a> 385 386 </li> 386 387 <?php … … 441 442 $title_attr = '' === $title ? '' : " title='$title'"; 442 443 443 echo "<p class='search-engines-info'><a href='options-reading.php'$title_attr>$content</a></p>"; 444 $icon = wp_get_icon( 'core-admin/info', array( 'size' => 20 ) ); 445 echo "<p class='search-engines-info'><a href='options-reading.php'$title_attr>$icon$content</a></p>"; 444 446 } 445 447 ?> … … 1922 1924 ); 1923 1925 printf( 1924 '<a href="%1$s">%2$s <span class="screen-reader-text"> (%3$s)</span></a>',1926 '<a href="%1$s">%2$s%3$s<span class="screen-reader-text"> (%4$s)</span></a>', 1925 1927 esc_url( admin_url( 'upload.php' ) ), 1928 wp_get_icon( 'core-admin/media', array( 'size' => 20 ) ), 1926 1929 $text, 1927 1930 /* translators: Hidden accessibility text. */ … … 1938 1941 ); 1939 1942 printf( 1940 '<a href="%1$s" class="musublink">%2$s <span class="screen-reader-text"> (%3$s)</span></a>',1943 '<a href="%1$s" class="musublink">%2$s%3$s<span class="screen-reader-text"> (%4$s)</span></a>', 1941 1944 esc_url( admin_url( 'upload.php' ) ), 1945 wp_get_icon( $used_class ? 'core-admin/error' : 'core-admin/media', array( 'size' => 20 ) ), 1942 1946 $text, 1943 1947 /* translators: Hidden accessibility text. */
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)