diff --git a/src/my-calendar-settings.php b/src/my-calendar-settings.php index 7de3f7f0..59d720eb 100644 --- a/src/my-calendar-settings.php +++ b/src/my-calendar-settings.php @@ -728,11 +728,13 @@ function my_calendar_settings() { $page_title = ''; $edit_link = ''; $note = ''; - if ( mc_get_option( 'uri_id' ) ) { + if ( mc_get_option( 'uri_id' ) && 'publish' === get_post_status( mc_get_option( 'uri_id' ) ) ) { $page_title = get_post( absint( mc_get_option( 'uri_id' ) ) )->post_title; $edit_link = esc_url( get_edit_post_link( absint( mc_get_option( 'uri_id' ) ) ) ); // Translators: Editing URL for calendar page. $note = sprintf( __( 'Search for a different page or edit the current calendar page.', 'my-calendar' ), $edit_link ); + } elseif ( mc_get_option( 'uri_id' ) && 'trash' === get_post_status( mc_get_option( 'uri_id' ) ) ) { + $note = __( 'Your primary My Calendar page is set, but the page is in the Trash.', 'my-calendar' ); } ?>