Changeset 45448 for trunk/src/wp-admin/tools.php
- Timestamp:
- 05/26/2019 08:49:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/tools.php
r45140 r45448 7 7 */ 8 8 9 if ( isset( $_GET['page'] ) && ! empty( $_POST ) ) { 10 // Ensure POST-ing to `tools.php?page=export_personal_data` and `tools.php?page=remove_personal_data` 11 // continues to work after creating the new files for exporting and erasing of personal data. 12 if ( $_GET['page'] === 'export_personal_data' ) { 13 require_once( ABSPATH . 'wp-admin/export-personal-data.php' ); 14 return; 15 } elseif ( $_GET['page'] === 'remove_personal_data' ) { 16 require_once( ABSPATH . 'wp-admin/erase-personal-data.php' ); 17 return; 18 } 19 } 20 9 21 /** WordPress Administration Bootstrap */ 10 22 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 23 12 $is_privacy_guide = ( isset( $_GET['wp-privacy-policy-guide'] ) && current_user_can( 'manage_privacy_options' ) ); 24 // The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php. 25 if ( isset( $_GET['wp-privacy-policy-guide'] ) ) { 26 wp_redirect( admin_url( 'privacy-policy-guide.php' ), 301 ); 27 exit; 28 } elseif ( isset( $_GET['page'] ) ) { 29 // These were also moved to files in WP 5.3. 30 if ( $_GET['page'] === 'export_personal_data' ) { 31 wp_redirect( admin_url( 'export-personal-data.php' ), 301 ); 32 exit; 33 } elseif ( $_GET['page'] === 'remove_personal_data' ) { 34 wp_redirect( admin_url( 'erase-personal-data.php' ), 301 ); 35 exit; 36 } 37 } 13 38 14 if ( $is_privacy_guide ) { 15 $title = __( 'Privacy Policy Guide' ); 39 $title = __( 'Tools' ); 16 40 17 // "Borrow" xfn.js for now so we don't have to create new files. 18 wp_enqueue_script( 'xfn' ); 41 get_current_screen()->add_help_tab( 42 array( 43 'id' => 'converter', 44 'title' => __( 'Categories and Tags Converter' ), 45 'content' => '<p>' . __( 'Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' . 46 '<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>', 47 ) 48 ); 19 49 20 } else { 21 22 $title = __( 'Tools' ); 23 24 get_current_screen()->add_help_tab( 25 array( 26 'id' => 'converter', 27 'title' => __( 'Categories and Tags Converter' ), 28 'content' => '<p>' . __( 'Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' . 29 '<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>', 30 ) 31 ); 32 33 get_current_screen()->set_help_sidebar( 34 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 35 '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>' ) . '</p>' . 36 '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' 37 ); 38 } 50 get_current_screen()->set_help_sidebar( 51 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 52 '<p>' . __( '<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>' ) . '</p>' . 53 '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' 54 ); 39 55 40 56 require_once( ABSPATH . 'wp-admin/admin-header.php' ); … … 44 60 <h1><?php echo esc_html( $title ); ?></h1> 45 61 <?php 46 47 if ( $is_privacy_guide ) {48 ?>49 <div class="wp-privacy-policy-guide">50 <?php WP_Privacy_Policy_Content::privacy_policy_guide(); ?>51 </div>52 <?php53 54 } else {55 62 56 63 if ( current_user_can( 'import' ) ) : … … 73 80 */ 74 81 do_action( 'tool_box' ); 75 } 82 76 83 ?> 77 84 </div> 78 85 <?php 86 79 87 include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset
for help on using the changeset viewer.