WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/21/2018 04:17:17 PM (11 months ago)
Author:
mcsf
Message:

Block Editor: Show privacy help notice on Privacy Policy page.

When editing a page set to be the Privacy Policy page, display a help notice
containing a link to the Privacy Policy guide.

This changeset ports this functionality to the new Block Editor.

Props desrosj.
Fixes #45057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/misc.php

    r43912 r43920  
    15411541     *
    15421542     * @since 4.9.6
    1543      *
    1544      * @param WP_Post $post The currently edited post.
     1543     * @since 5.0.0 The $post parameter is now optional.
     1544     *
     1545     * @param WP_Post|null $post The currently edited post. Default null.
    15451546     */
    1546     public static function notice( $post ) {
     1547    public static function notice( $post = null ) {
     1548        $post = get_post( $post );
     1549
    15471550        if ( ! ( $post instanceof WP_Post ) ) {
    15481551            return;
Note: See TracChangeset for help on using the changeset viewer.