WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/16/2018 08:52:18 AM (18 months ago)
Author:
azaozz
Message:

Privacy: add a postbox that is shown when editing the privacy policy page, and where plugins and core will output suggested content and additional privacy info. First run.

Props melchoyce, azaozz.
See #43620.

File:
1 edited

Legend:

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

    r42967 r42980  
    133133add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
    134134add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
     135
     136// Privacy policy text changes check.
     137add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'text_change_check' ), 20 );
     138
     139// Show a "postbox" with the text suggestions for a privacy policy.
     140add_action( 'edit_form_after_title', array( 'WP_Privacy_Policy_Content', 'privacy_policy_postbox' ) );
     141
     142// Add the suggested policy text from WordPress.
     143add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 15 );
     144
     145// Stop checking for text changes after the policy page is updated.
     146add_action( 'post_updated', array( 'WP_Privacy_Policy_Content', '_policy_page_updated' ) );
     147
Note: See TracChangeset for help on using the changeset viewer.