Make WordPress Core

Changeset 62681


Ignore:
Timestamp:
07/09/2026 07:34:41 PM (5 weeks ago)
Author:
joedolson
Message:

Widgets: Add "On This Day" dashboard widget.

Add a dashboard widget that shows users past entries published on the same month and day from previous years. The widget is hidden if there are no history to show for the date.

Props alshakero, eclev91, annezazu, westonruter, kellychoffman, simison, joen, retrofox, audrasjb, desrosj, peterwilsoncc, matt, sabernhardt, wildworks, jeherve, apermo, dmsnell, jonsurrell, jorbin, talldanwp, retrofox, joedolson.
Fixes #65116.

Location:
trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/dashboard.css

    r62670 r62681  
    10181018}
    10191019
     1020/* On This Day dashboard widget */
     1021
     1022#wp_dashboard_on_this_day h3 {
     1023        font-weight: 600;
     1024}
     1025
     1026#wp_dashboard_on_this_day li {
     1027        margin: 0;
     1028        padding: 0;
     1029}
     1030
     1031#wp_dashboard_on_this_day ul ul {
     1032        margin: 0 0 0 18px;
     1033        padding: 0;
     1034        list-style: disc;
     1035}
     1036
     1037#wp_dashboard_on_this_day ul ul li + li {
     1038        margin-top: 6px;
     1039}
     1040
     1041#wp_dashboard_on_this_day .wp-on-this-day-widget > ul > li + li {
     1042        margin-top: 16px;
     1043}
     1044
     1045#wp_dashboard_on_this_day .wp-on-this-day-post-author {
     1046        color: #646970;
     1047}
     1048
    10201049/* Browse happy box */
    10211050
  • trunk/src/wp-admin/includes/dashboard.php

    r62670 r62681  
    8888                wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' );
    8989        }
     90
     91        // On This Day.
     92        if ( ! function_exists( 'wp_dashboard_on_this_day_setup' ) ) {
     93                require_once ABSPATH . 'wp-admin/includes/dashboard-on-this-day.php';
     94        }
     95
     96        wp_dashboard_on_this_day_setup();
    9097
    9198        // WordPress Events and News.
Note: See TracChangeset for help on using the changeset viewer.