Ticket #45057: 45057.2.diff
File 45057.2.diff, 1.7 KB (added by , 6 years ago) |
---|
-
src/wp-admin/includes/admin-filters.php
144 144 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'text_change_check' ), 100 ); 145 145 146 146 // Show a "postbox" with the text suggestions for a privacy policy. 147 add_action( ' edit_form_after_title', array( 'WP_Privacy_Policy_Content', 'notice' ) );147 add_action( 'admin_notices', array( 'WP_Privacy_Policy_Content', 'notice' ) ); 148 148 149 149 // Add the suggested policy text from WordPress. 150 150 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 1 ); -
src/wp-admin/includes/misc.php
1540 1540 * Add a notice with a link to the guide when editing the privacy policy page. 1541 1541 * 1542 1542 * @since 4.9.6 1543 * @since 5.0.0 The $post parameter is now optional. 1543 1544 * 1544 * @param WP_Post $post The currently edited post.1545 * @param WP_Post|null $post The currently edited post. Default is null. 1545 1546 */ 1546 public static function notice( $post ) { 1547 public static function notice( $post = null ) { 1548 $post = get_post( $post ); 1549 1547 1550 if ( ! ( $post instanceof WP_Post ) ) { 1548 1551 return; 1549 1552 } … … 1559 1562 } 1560 1563 1561 1564 ?> 1562 <div class="notice notice-warning inlinewp-pp-notice">1565 <div class="notice notice-warning wp-pp-notice"> 1563 1566 <p> 1564 1567 <?php 1565 1568 /* translators: 1: Privacy Policy guide URL, 2: additional link attributes, 3: accessibility text */