4663bea20ac43dc59a/app/node_modules/sucrase">sucrase 30f7226d9a first commit 2 vuotta sitten supports-preserve-symlinks-flag 30f7226d9a first commit 2 vuotta sitten tailwind-color-palette 30f7226d9a first commit 2 vuotta sitten tailwindcss 30f7226d9a first commit 2 vuotta sitten thenify 30f7226d9a first commit 2 vuotta sitten thenify-all 30f7226d9a first commit 2 vuotta sitten to-regex-range 30f7226d9a first commit 2 vuotta sitten tr46 30f7226d9a first commit 2 vuotta sitten ts-interface-checker 30f7226d9a first commit 2 vuotta sitten uglify-js 30f7226d9a first commit 2 vuotta sitten underscore 30f7226d9a first commit 2 vuotta sitten upper-case 30f7226d9a first commit 2 vuotta sitten util-deprecate 30f7226d9a first commit 2 vuotta sitten valid-data-url 30f7226d9a first commit 2 vuotta sitten web-resource-inliner 30f7226d9a first commit 2 vuotta sitten webidl-conversions 30f7226d9a first commit 2 vuotta sitten whatwg-url 30f7226d9a first commit 2 vuotta sitten wrap-ansi 30f7226d9a first commit 2 vuotta sitten wrappy 30f7226d9a first commit 2 vuotta sitten y18n 30f7226d9a first commit 2 vuotta sitten yallist 30f7226d9a first commit 2 vuotta sitten yaml 30f7226d9a first commit 2 vuotta sitten yargs 30f7226d9a first commit 2 vuotta sitten yargs-parser 30f7226d9a first commit 2 vuotta sitten .yarn-integrity 30f7226d9a first commit 2 vuotta sitten tum/whitesports - Gogs: Simplico Git Service

Нет описания

tools.php 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * Tools Administration Screen.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. if ( isset( $_GET['page'] ) && ! empty( $_POST ) ) {
  9. // Ensure POST-ing to `tools.php?page=export_personal_data` and `tools.php?page=remove_personal_data`
  10. // continues to work after creating the new files for exporting and erasing of personal data.
  11. if ( 'export_personal_data' === $_GET['page'] ) {
  12. require_once ABSPATH . 'wp-admin/export-personal-data.php';
  13. return;
  14. } elseif ( 'remove_personal_data' === $_GET['page'] ) {
  15. require_once ABSPATH . 'wp-admin/erase-personal-data.php';
  16. return;
  17. }
  18. }
  19. // The privacy policy guide used to be outputted from here. Since WP 5.3 it is in wp-admin/privacy-policy-guide.php.
  20. if ( isset( $_GET['wp-privacy-policy-guide'] ) ) {
  21. require_once dirname( __DIR__ ) . '/wp-load.php';
  22. wp_redirect( admin_url( 'options-privacy.php?tab=policyguide' ), 301 );
  23. exit;
  24. } elseif ( isset( $_GET['page'] ) ) {
  25. // These were also moved to files in WP 5.3.
  26. if ( 'export_personal_data' === $_GET['page'] ) {
  27. require_once dirname( __DIR__ ) . '/wp-load.php';
  28. wp_redirect( admin_url( 'export-personal-data.php' ), 301 );
  29. exit;
  30. } elseif ( 'remove_personal_data' === $_GET['page'] ) {
  31. require_once dirname( __DIR__ ) . '/wp-load.php';
  32. wp_redirect( admin_url( 'erase-personal-data.php' ), 301 );
  33. exit;
  34. }
  35. }
  36. /** WordPress Administration Bootstrap */
  37. require_once __DIR__ . '/admin.php';
  38. $title = __( 'Tools' );
  39. get_current_screen()->add_help_tab(
  40. array(
  41. 'id' => 'converter',
  42. 'title' => __( 'Categories and Tags Converter' ),
  43. '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>' .
  44. '<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 &amp; Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>',
  45. )
  46. );
  47. get_current_screen()->set_help_sidebar(
  48. '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
  49. '<p>' . __( '<a href="https://wordpress.org/support/article/tools-screen/">Documentation on Tools</a>' ) . '</p>' .
  50. '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
  51. );
  52. require_once ABSPATH . 'wp-admin/admin-header.php';
  53. ?>
  54. <div class="wrap">
  55. <h1><?php echo esc_html( $title ); ?></h1>
  56. <?php
  57. if ( current_user_can( 'import' ) ) :
  58. $cats = get_taxonomy( 'category' );
  59. $tags = get_taxonomy( 'post_tag' );
  60. if ( current_user_can( $cats->cap->manage_terms ) || current_user_can( $tags->cap->manage_terms ) ) :
  61. ?>
  62. <div class="card">
  63. <h2 class="title"><?php _e( 'Categories and Tags Converter' ); ?></h2>
  64. <p>
  65. <?php
  66. printf(
  67. /* translators: %s: URL to Import screen. */
  68. __( 'If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.' ),
  69. 'import.php'
  70. );
  71. ?>
  72. </p>
  73. </div>
  74. <?php
  75. endif;
  76. endif;
  77. /**
  78. * Fires at the end of the Tools Administration screen.
  79. *
  80. * @since 2.8.0
  81. */
  82. do_action( 'tool_box' );
  83. ?>
  84. </div>
  85. <?php
  86. require_once ABSPATH . 'wp-admin/admin-footer.php';