Make WordPress Core

Ticket #6479: 6479.4.patch

File 6479.4.patch, 1.6 KB (added by rafiahmedd, 2 years ago)

Here is the patch for notice

  • src/wp-includes/option.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php
    a b  
    25142514
    25152515        return $registered[ $option ]['default'];
    25162516}
     2517
     2518/**
     2519 * Prints error message if site doesn't have a tagline.
     2520 *
     2521 * @since 6.1.0
     2522 *
     2523 * @return void
     2524 */
     2525function _push_admin_notice_on_empty_tagline () {
     2526        if ( empty(get_option( 'blogdescription' )) ) {
     2527                echo '<div class="error"> <p>' . __( 'Please add your site tagline. ' ) . '<a href="'. admin_url( 'options-general.php' ) .'">' . __('Click Here') . '</a></p> </div>';
     2528        }
     2529}
  • src/wp-admin/includes/admin-filters.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/wp-admin/includes/admin-filters.php b/src/wp-admin/includes/admin-filters.php
    a b  
    167167
    168168// Append '(Draft)' to draft page titles in the privacy page dropdown.
    169169add_filter( 'list_pages', '_wp_privacy_settings_filter_draft_page_titles', 10, 2 );
     170
     171// Add an admin notice if tagline is empty.
     172add_action('admin_notices', '_push_admin_notice_on_empty_tagline');