Make WordPress Core


Ignore:
Timestamp:
08/03/2026 07:59:48 PM (8 weeks ago)
Author:
joedolson
Message:

Widgets: Always render the On This Day widget.

While the intention was to only render the On This Day widget when it returned results, this proved to create a variety of implementation complications and some significant points of confusion for users.

Remove the conditional rendering of the On This Day widget. When active without posts, display a message inviting the user to publish a new post.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/12575

Props iamchitti, mirmpro, shailu25, ugyensupport, iamraju, nazmulasif, wildworks, joedolson, mukesh27, annezazu, paaljoachim, joen.
Fixes #65647.

File:
1 edited

Legend:

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

    r62849 r62977  
    9090
    9191        // On This Day.
    92         if ( ! function_exists( 'wp_dashboard_on_this_day_setup' ) ) {
     92        if ( ! function_exists( 'wp_dashboard_on_this_day' ) ) {
    9393                require_once ABSPATH . 'wp-admin/includes/dashboard-on-this-day.php';
    9494        }
    9595
    96         wp_dashboard_on_this_day_setup();
     96        wp_add_dashboard_widget( 'wp_dashboard_on_this_day', __( 'On This Day' ), 'wp_dashboard_on_this_day' );
    9797
    9898        // WordPress Events and News.
Note: See TracChangeset for help on using the changeset viewer.