Current File : /home/k/a/r/karenpetzb/www/items/category/wp-admin.zip |
PK G[��r�_; _;
upload.phpnu �[��� <?php
/**
* Media Library administration panel.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
}
$message = '';
if ( ! empty( $_GET['posted'] ) ) {
$message = __( 'Media file updated.' );
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'posted' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['posted'] );
}
if ( ! empty( $_GET['attached'] ) && absint( $_GET['attached'] ) ) {
$attached = absint( $_GET['attached'] );
if ( 1 === $attached ) {
$message = __( 'Media file attached.' );
} else {
$message = sprintf(
/* translators: %s: Number of media files. */
_n( '%s media file attached.', '%s media files attached.', $attached ),
number_format_i18n( $attached )
);
}
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['detach'], $_GET['attached'] );
}
if ( ! empty( $_GET['detach'] ) && absint( $_GET['detach'] ) ) {
$detached = absint( $_GET['detach'] );
if ( 1 === $detached ) {
$message = __( 'Media file detached.' );
} else {
$message = sprintf(
/* translators: %s: Number of media files. */
_n( '%s media file detached.', '%s media files detached.', $detached ),
number_format_i18n( $detached )
);
}
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['detach'], $_GET['attached'] );
}
if ( ! empty( $_GET['deleted'] ) && absint( $_GET['deleted'] ) ) {
$deleted = absint( $_GET['deleted'] );
if ( 1 === $deleted ) {
$message = __( 'Media file permanently deleted.' );
} else {
$message = sprintf(
/* translators: %s: Number of media files. */
_n( '%s media file permanently deleted.', '%s media files permanently deleted.', $deleted ),
number_format_i18n( $deleted )
);
}
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'deleted' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['deleted'] );
}
if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
$trashed = absint( $_GET['trashed'] );
if ( 1 === $trashed ) {
$message = __( 'Media file moved to the Trash.' );
} else {
$message = sprintf(
/* translators: %s: Number of media files. */
_n( '%s media file moved to the Trash.', '%s media files moved to the Trash.', $trashed ),
number_format_i18n( $trashed )
);
}
$message .= sprintf(
' <a href="%1$s">%2$s</a>',
esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ),
__( 'Undo' )
);
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'trashed' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['trashed'] );
}
if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
$untrashed = absint( $_GET['untrashed'] );
if ( 1 === $untrashed ) {
$message = __( 'Media file restored from the Trash.' );
} else {
$message = sprintf(
/* translators: %s: Number of media files. */
_n( '%s media file restored from the Trash.', '%s media files restored from the Trash.', $untrashed ),
number_format_i18n( $untrashed )
);
}
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'untrashed' ), $_SERVER['REQUEST_URI'] );
unset( $_GET['untrashed'] );
}
$messages[1] = __( 'Media file updated.' );
$messages[2] = __( 'Media file permanently deleted.' );
$messages[3] = __( 'Error saving media file.' );
$messages[4] = __( 'Media file moved to the Trash.' ) . sprintf(
' <a href="%1$s">%2$s</a>',
esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ),
__( 'Undo' )
);
$messages[5] = __( 'Media file restored from the Trash.' );
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
$message = $messages[ $_GET['message'] ];
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message' ), $_SERVER['REQUEST_URI'] );
}
$modes = array( 'grid', 'list' );
if ( isset( $_GET['mode'] ) && in_array( $_GET['mode'], $modes, true ) ) {
$mode = $_GET['mode'];
update_user_option( get_current_user_id(), 'media_library_mode', $mode );
} else {
$mode = get_user_option( 'media_library_mode', get_current_user_id() ) ? get_user_option( 'media_library_mode', get_current_user_id() ) : 'grid';
}
if ( 'grid' === $mode ) {
wp_enqueue_media();
wp_enqueue_script( 'media-grid' );
wp_enqueue_script( 'media' );
// Remove the error parameter added by deprecation of wp-admin/media.php.
add_filter(
'removable_query_args',
function () {
return array( 'error' );
},
10,
0
);
$q = $_GET;
// Let JS handle this.
unset( $q['s'] );
$vars = wp_edit_attachments_query_vars( $q );
$ignore = array( 'mode', 'post_type', 'post_status', 'posts_per_page' );
foreach ( $vars as $key => $value ) {
if ( ! $value || in_array( $key, $ignore, true ) ) {
unset( $vars[ $key ] );
}
}
wp_localize_script(
'media-grid',
'_wpMediaGridSettings',
array(
'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ),
'queryVars' => (object) $vars,
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first.' ) . '</p>' .
'<p>' . __( 'You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.' ) . '</p>' .
'<p>' . __( 'To delete media items, click the Bulk Select button at the top of the screen. Select any items you wish to delete, then click the Delete Selected button. Clicking the Cancel Selection button takes you back to viewing your media.' ) . '</p>',
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'attachment-details',
'title' => __( 'Attachment Details' ),
'content' =>
'<p>' . __( 'Clicking an item will display an Attachment Details dialog, which allows you to preview media and make quick edits. Any changes you make to the attachment details will be automatically saved.' ) . '</p>' .
'<p>' . __( 'Use the arrow buttons at the top of the dialog, or the left and right arrow keys on your keyboard, to navigate between media items quickly.' ) . '</p>' .
'<p>' . __( 'You can also delete individual items and access the extended edit screen from the details dialog.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/media-library-screen/">Documentation on Media Library</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
// Used in the HTML title tag.
$title = __( 'Media Library' );
$parent_file = 'upload.php';
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query(); ?>">
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
<?php
if ( current_user_can( 'upload_files' ) ) {
?>
<a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html__( 'Add Media File' ); ?></a>
<?php
}
?>
<hr class="wp-header-end">
<?php
if ( ! empty( $message ) ) {
wp_admin_notice(
$message,
array(
'id' => 'message',
'additional_classes' => array( 'updated' ),
'dismissible' => true,
)
);
}
$js_required_message = sprintf(
/* translators: %s: List view URL. */
__( 'The grid view for the Media Library requires JavaScript. <a href="%s">Switch to the list view</a>.' ),
'upload.php?mode=list'
);
wp_admin_notice(
$js_required_message,
array(
'additional_classes' => array( 'error', 'hide-if-js' ),
)
);
?>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
exit;
}
$wp_list_table = _get_list_table( 'WP_Media_List_Table' );
$pagenum = $wp_list_table->get_pagenum();
// Handle bulk actions.
$doaction = $wp_list_table->current_action();
if ( $doaction ) {
check_admin_referer( 'bulk-media' );
$post_ids = array();
if ( 'delete_all' === $doaction ) {
$post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" );
$doaction = 'delete';
} elseif ( isset( $_REQUEST['media'] ) ) {
$post_ids = $_REQUEST['media'];
} elseif ( isset( $_REQUEST['ids'] ) ) {
$post_ids = explode( ',', $_REQUEST['ids'] );
}
$post_ids = array_map( 'intval', (array) $post_ids );
$location = 'upload.php';
$referer = wp_get_referer();
if ( $referer ) {
if ( str_contains( $referer, 'upload.php' ) ) {
$location = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'message', 'ids', 'posted' ), $referer );
}
}
switch ( $doaction ) {
case 'detach':
wp_media_attach_action( $_REQUEST['parent_post_id'], 'detach' );
break;
case 'attach':
wp_media_attach_action( $_REQUEST['found_post_id'] );
break;
case 'trash':
if ( empty( $post_ids ) ) {
break;
}
foreach ( $post_ids as $post_id ) {
if ( ! current_user_can( 'delete_post', $post_id ) ) {
wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) );
}
if ( ! wp_trash_post( $post_id ) ) {
wp_die( __( 'Error in moving the item to Trash.' ) );
}
}
$location = add_query_arg(
array(
'trashed' => count( $post_ids ),
'ids' => implode( ',', $post_ids ),
),
$location
);
break;
case 'untrash':
if ( empty( $post_ids ) ) {
break;
}
foreach ( $post_ids as $post_id ) {
if ( ! current_user_can( 'delete_post', $post_id ) ) {
wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) );
}
if ( ! wp_untrash_post( $post_id ) ) {
wp_die( __( 'Error in restoring the item from Trash.' ) );
}
}
$location = add_query_arg( 'untrashed', count( $post_ids ), $location );
break;
case 'delete':
if ( empty( $post_ids ) ) {
break;
}
foreach ( $post_ids as $post_id_del ) {
if ( ! current_user_can( 'delete_post', $post_id_del ) ) {
wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
}
if ( ! wp_delete_attachment( $post_id_del ) ) {
wp_die( __( 'Error in deleting the attachment.' ) );
}
}
$location = add_query_arg( 'deleted', count( $post_ids ), $location );
break;
default:
$screen = get_current_screen()->id;
/** This action is documented in wp-admin/edit.php */
$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
wp_redirect( $location );
exit;
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
exit;
}
$wp_list_table->prepare_items();
// Used in the HTML title tag.
$title = __( 'Media Library' );
$parent_file = 'upload.php';
wp_enqueue_script( 'media' );
add_screen_option( 'per_page' );
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'All the files you’ve uploaded are listed in the Media Library, with the most recent uploads listed first. You can use the Screen Options tab to customize the display of this screen.' ) . '</p>' .
'<p>' . __( 'You can narrow the list by file type/status or by date using the dropdown menus above the media table.' ) . '</p>' .
'<p>' . __( 'You can view your media in a simple visual grid or a list with columns. Switch between these views using the icons to the left above the media.' ) . '</p>',
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'actions-links',
'title' => __( 'Available Actions' ),
'content' =>
'<p>' . __( 'Hovering over a row reveals action links that allow you to manage media items. You can perform the following actions:' ) . '</p>' .
'<ul>' .
'<li>' . __( '<strong>Edit</strong> takes you to a simple screen to edit that individual file’s metadata. You can also reach that screen by clicking on the media file name or thumbnail.' ) . '</li>' .
'<li>' . __( '<strong>Delete Permanently</strong> will delete the file from the media library (as well as from any posts to which it is currently attached).' ) . '</li>' .
'<li>' . __( '<strong>View</strong> will take you to a public display page for that file.' ) . '</li>' .
'<li>' . __( '<strong>Copy URL</strong> copies the URL for the media file to your clipboard.' ) . '</li>' .
'<li>' . __( '<strong>Download file</strong> downloads the original media file to your device.' ) . '</li>' .
'</ul>',
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'attaching-files',
'title' => __( 'Attaching Files' ),
'content' =>
'<p>' . __( 'If a media file has not been attached to any content, you will see that in the Uploaded To column, and can click on Attach to launch a small popup that will allow you to search for existing content and attach the file.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/media-library-screen/">Documentation on Media Library</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
get_current_screen()->set_screen_reader_content(
array(
'heading_views' => __( 'Filter media items list' ),
'heading_pagination' => __( 'Media items list navigation' ),
'heading_list' => __( 'Media items list' ),
)
);
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
<?php
if ( current_user_can( 'upload_files' ) ) {
?>
<a href="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="page-title-action"><?php echo esc_html__( 'Add Media File' ); ?></a>
<?php
}
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
echo '<span class="subtitle">';
printf(
/* translators: %s: Search query. */
__( 'Search results for: %s' ),
'<strong>' . get_search_query() . '</strong>'
);
echo '</span>';
}
?>
<hr class="wp-header-end">
<?php
if ( ! empty( $message ) ) {
wp_admin_notice(
$message,
array(
'id' => 'message',
'additional_classes' => array( 'updated' ),
'dismissible' => true,
)
);
}
?>
<form id="posts-filter" method="get">
<?php $wp_list_table->views(); ?>
<?php $wp_list_table->display(); ?>
<div id="ajax-response"></div>
<?php find_posts_div(); ?>
</form>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK G[2�&�
privacy.phpnu �[��� <?php
/**
* Privacy administration panel.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
// Used in the HTML title tag.
$title = __( 'Privacy' );
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap about__container">
<div class="about__header">
<div class="about__header-title">
<h1>
<?php _e( 'Privacy' ); ?>
</h1>
</div>
<div class="about__header-text">
<?php _e( 'WordPress.org takes privacy and transparency very seriously' ); ?>
</div>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a>
<a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Privacy' ); ?></a>
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
</nav>
<div class="about__section has-2-columns is-wider-right">
<div class="column about__image">
<img class="privacy-image" src="<?php echo esc_url( admin_url( 'images/privacy.svg?ver=6.5' ) ); ?>" alt="" />
</div>
<div class="column is-vertically-aligned-center">
<p><?php _e( 'From time to time, your WordPress site may send data to WordPress.org — including, but not limited to — the version you are using, and a list of installed plugins and themes.' ); ?></p>
<p>
<?php
printf(
/* translators: %s: https://wordpress.org/about/stats/ */
__( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ),
__( 'https://wordpress.org/about/stats/' )
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: https://wordpress.org/about/privacy/ */
__( 'WordPress.org takes privacy and transparency very seriously. To learn more about what data is collected, and how it is used, please visit <a href="%s">the WordPress.org Privacy Policy</a>.' ),
__( 'https://wordpress.org/about/privacy/' )
);
?>
</p>
</div>
</div>
</div>
<?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
PK G[ W�@X X
edit-tags.phpnu �[��� <?php
/**
* Edit Tags Administration Screen.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
if ( ! $taxnow ) {
wp_die( __( 'Invalid taxonomy.' ) );
}
$tax = get_taxonomy( $taxnow );
if ( ! $tax ) {
wp_die( __( 'Invalid taxonomy.' ) );
}
if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ), true ) ) {
wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) );
}
if ( ! current_user_can( $tax->cap->manage_terms ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to manage terms in this taxonomy.' ) . '</p>',
403
);
}
/**
* $post_type is set when the WP_Terms_List_Table instance is created.
*
* @global string $post_type Global post type.
*/
global $post_type;
$wp_list_table = _get_list_table( 'WP_Terms_List_Table' );
$pagenum = $wp_list_table->get_pagenum();
$title = $tax->labels->name;
if ( 'post' !== $post_type ) {
$parent_file = ( 'attachment' === $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
$submenu_file = "edit-tags.php?taxonomy=$taxonomy&post_type=$post_type";
} elseif ( 'link_category' === $tax->name ) {
$parent_file = 'link-manager.php';
$submenu_file = 'edit-tags.php?taxonomy=link_category';
} else {
$parent_file = 'edit.php';
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
}
add_screen_option(
'per_page',
array(
'default' => 20,
'option' => 'edit_' . $tax->name . '_per_page',
)
);
get_current_screen()->set_screen_reader_content(
array(
'heading_pagination' => $tax->labels->items_list_navigation,
'heading_list' => $tax->labels->items_list,
)
);
$location = false;
$referer = wp_get_referer();
if ( ! $referer ) { // For POST requests.
$referer = wp_unslash( $_SERVER['REQUEST_URI'] );
}
$referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message', 'paged' ), $referer );
switch ( $wp_list_table->current_action() ) {
case 'add-tag':
check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to create terms in this taxonomy.' ) . '</p>',
403
);
}
$ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
if ( $ret && ! is_wp_error( $ret ) ) {
$location = add_query_arg( 'message', 1, $referer );
} else {
$location = add_query_arg(
array(
'error' => true,
'message' => 4,
),
$referer
);
}
break;
case 'delete':
if ( ! isset( $_REQUEST['tag_ID'] ) ) {
break;
}
$tag_ID = (int) $_REQUEST['tag_ID'];
check_admin_referer( 'delete-tag_' . $tag_ID );
if ( ! current_user_can( 'delete_term', $tag_ID ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to delete this item.' ) . '</p>',
403
);
}
wp_delete_term( $tag_ID, $taxonomy );
$location = add_query_arg( 'message', 2, $referer );
// When deleting a term, prevent the action from redirecting back to a term that no longer exists.
$location = remove_query_arg( array( 'tag_ID', 'action' ), $location );
break;
case 'bulk-delete':
check_admin_referer( 'bulk-tags' );
if ( ! current_user_can( $tax->cap->delete_terms ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to delete these items.' ) . '</p>',
403
);
}
$tags = (array) $_REQUEST['delete_tags'];
foreach ( $tags as $tag_ID ) {
wp_delete_term( $tag_ID, $taxonomy );
}
$location = add_query_arg( 'message', 6, $referer );
break;
case 'edit':
if ( ! isset( $_REQUEST['tag_ID'] ) ) {
break;
}
$term_id = (int) $_REQUEST['tag_ID'];
$term = get_term( $term_id );
if ( ! $term instanceof WP_Term ) {
wp_die( __( 'You attempted to edit an item that does not exist. Perhaps it was deleted?' ) );
}
wp_redirect( sanitize_url( get_edit_term_link( $term_id, $taxonomy, $post_type ) ) );
exit;
case 'editedtag':
$tag_ID = (int) $_POST['tag_ID'];
check_admin_referer( 'update-tag_' . $tag_ID );
if ( ! current_user_can( 'edit_term', $tag_ID ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
403
);
}
$tag = get_term( $tag_ID, $taxonomy );
if ( ! $tag ) {
wp_die( __( 'You attempted to edit an item that does not exist. Perhaps it was deleted?' ) );
}
$ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
if ( $ret && ! is_wp_error( $ret ) ) {
$location = add_query_arg( 'message', 3, $referer );
} else {
$location = add_query_arg(
array(
'error' => true,
'message' => 5,
),
$referer
);
}
break;
default:
if ( ! $wp_list_table->current_action() || ! isset( $_REQUEST['delete_tags'] ) ) {
break;
}
check_admin_referer( 'bulk-tags' );
$screen = get_current_screen()->id;
$tags = (array) $_REQUEST['delete_tags'];
/** This action is documented in wp-admin/edit.php */
$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $wp_list_table->current_action(), $tags ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
break;
}
if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
$location = remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) );
}
if ( $location ) {
if ( $pagenum > 1 ) {
$location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
}
if ( 1 === $pagenum ) {
$location = remove_query_arg( 'paged', $location );
}
/**
* Filters the taxonomy redirect destination URL.
*
* @since 4.6.0
*
* @param string $location The destination URL.
* @param WP_Taxonomy $tax The taxonomy object.
*/
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
exit;
}
$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
if ( $pagenum > $total_pages && $total_pages > 0 ) {
wp_redirect( add_query_arg( 'paged', $total_pages ) );
exit;
}
wp_enqueue_script( 'admin-tags' );
if ( current_user_can( $tax->cap->edit_terms ) ) {
wp_enqueue_script( 'inline-edit-tax' );
}
if ( 'category' === $taxonomy || 'link_category' === $taxonomy || 'post_tag' === $taxonomy ) {
$help = '';
if ( 'category' === $taxonomy ) {
$help = '<p>' . sprintf(
/* translators: %s: URL to Writing Settings screen. */
__( 'You can use categories to define sections of your site and group related posts. The default category is “Uncategorized” until you change it in your <a href="%s">writing settings</a>.' ),
'options-writing.php'
) . '</p>';
} elseif ( 'link_category' === $taxonomy ) {
$help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
} else {
$help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there is no relationship from one tag to another.' ) . '</p>';
}
if ( 'link_category' === $taxonomy ) {
$help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>';
} else {
$help .= '<p>' . __( 'What’s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
}
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => $help,
)
);
if ( 'category' === $taxonomy || 'post_tag' === $taxonomy ) {
if ( 'category' === $taxonomy ) {
$help = '<p>' . __( 'When adding a new category on this screen, you’ll fill in the following fields:' ) . '</p>';
} else {
$help = '<p>' . __( 'When adding a new tag on this screen, you’ll fill in the following fields:' ) . '</p>';
}
$help .= '<ul>' .
'<li>' . __( '<strong>Name</strong> — The name is how it appears on your site.' ) . '</li>';
$help .= '<li>' . __( '<strong>Slug</strong> — The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
if ( 'category' === $taxonomy ) {
$help .= '<li>' . __( '<strong>Parent</strong> — Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
}
$help .= '<li>' . __( '<strong>Description</strong> — The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
'</ul>' .
'<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'adding-terms',
'title' => 'category' === $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
'content' => $help,
)
);
}
$help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
if ( 'category' === $taxonomy ) {
$help .= '<p>' . __( '<a href="https://wordpress.org/documentation/article/posts-categories-screen/">Documentation on Categories</a>' ) . '</p>';
} elseif ( 'link_category' === $taxonomy ) {
$help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen">Documentation on Link Categories</a>' ) . '</p>';
} else {
$help .= '<p>' . __( '<a href="https://wordpress.org/documentation/article/posts-tags-screen/">Documentation on Tags</a>' ) . '</p>';
}
$help .= '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>';
get_current_screen()->set_help_sidebar( $help );
unset( $help );
}
require_once ABSPATH . 'wp-admin/admin-header.php';
// Also used by the Edit Tag form.
require_once ABSPATH . 'wp-admin/includes/edit-tag-messages.php';
if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) {
$import_link = admin_url( 'admin.php?import=wpcat2tag' );
} else {
$import_link = admin_url( 'import.php' );
}
?>
<div class="wrap nosubsub">
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
<?php
if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
echo '<span class="subtitle">';
printf(
/* translators: %s: Search query. */
__( 'Search results for: %s' ),
'<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>'
);
echo '</span>';
}
?>
<hr class="wp-header-end">
<?php
$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
if ( $message ) {
wp_admin_notice(
$message,
array(
'id' => 'message',
'additional_classes' => array( $class ),
'dismissible' => true,
)
);
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
}
?>
<div id="ajax-response"></div>
<form class="search-form wp-clearfix" method="get">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
<?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
</form>
<?php
$can_edit_terms = current_user_can( $tax->cap->edit_terms );
if ( $can_edit_terms ) {
?>
<div id="col-container" class="wp-clearfix">
<div id="col-left">
<div class="col-wrap">
<?php
if ( 'category' === $taxonomy ) {
/**
* Fires before the Add Category form.
*
* @since 2.1.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead.
*
* @param object $arg Optional arguments cast to an object.
*/
do_action_deprecated( 'add_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
} elseif ( 'link_category' === $taxonomy ) {
/**
* Fires before the link category form.
*
* @since 2.3.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead.
*
* @param object $arg Optional arguments cast to an object.
*/
do_action_deprecated( 'add_link_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
} else {
/**
* Fires before the Add Tag form.
*
* @since 2.5.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead.
*
* @param string $taxonomy The taxonomy slug.
*/
do_action_deprecated( 'add_tag_form_pre', array( $taxonomy ), '3.0.0', '{$taxonomy}_pre_add_form' );
}
/**
* Fires before the Add Term form for all taxonomies.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `category_pre_add_form`
* - `post_tag_pre_add_form`
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy slug.
*/
do_action( "{$taxonomy}_pre_add_form", $taxonomy );
?>
<div class="form-wrap">
<h2><?php echo $tax->labels->add_new_item; ?></h2>
<form id="addtag" method="post" action="edit-tags.php" class="validate"
<?php
/**
* Fires inside the Add Tag form tag.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `category_term_new_form_tag`
* - `post_tag_term_new_form_tag`
*
* @since 3.7.0
*/
do_action( "{$taxonomy}_term_new_form_tag" );
?>
>
<input type="hidden" name="action" value="add-tag" />
<input type="hidden" name="screen" value="<?php echo esc_attr( $current_screen->id ); ?>" />
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
<?php wp_nonce_field( 'add-tag', '_wpnonce_add-tag' ); ?>
<div class="form-field form-required term-name-wrap">
<label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" aria-describedby="name-description" />
<p id="name-description"><?php echo $tax->labels->name_field_description; ?></p>
</div>
<div class="form-field term-slug-wrap">
<label for="tag-slug"><?php _e( 'Slug' ); ?></label>
<input name="slug" id="tag-slug" type="text" value="" size="40" aria-describedby="slug-description" />
<p id="slug-description"><?php echo $tax->labels->slug_field_description; ?></p>
</div>
<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
<div class="form-field term-parent-wrap">
<label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label>
<?php
$dropdown_args = array(
'hide_empty' => 0,
'hide_if_empty' => false,
'taxonomy' => $taxonomy,
'name' => 'parent',
'orderby' => 'name',
'hierarchical' => true,
'show_option_none' => __( 'None' ),
);
/**
* Filters the taxonomy parent drop-down on the Edit Term page.
*
* @since 3.7.0
* @since 4.2.0 Added `$context` parameter.
*
* @param array $dropdown_args {
* An array of taxonomy parent drop-down arguments.
*
* @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0.
* @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false.
* @type string $taxonomy The taxonomy slug.
* @type string $name Value of the name attribute to use for the drop-down select element.
* Default 'parent'.
* @type string $orderby The field to order by. Default 'name'.
* @type bool $hierarchical Whether the taxonomy is hierarchical. Default true.
* @type string $show_option_none Label to display if there are no terms. Default 'None'.
* }
* @param string $taxonomy The taxonomy slug.
* @param string $context Filter context. Accepts 'new' or 'edit'.
*/
$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
$dropdown_args['aria_describedby'] = 'parent-description';
wp_dropdown_categories( $dropdown_args );
?>
<?php if ( 'category' === $taxonomy ) : ?>
<p id="parent-description"><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p>
<?php else : ?>
<p id="parent-description"><?php echo $tax->labels->parent_field_description; ?></p>
<?php endif; ?>
</div>
<?php endif; // is_taxonomy_hierarchical() ?>
<div class="form-field term-description-wrap">
<label for="tag-description"><?php _e( 'Description' ); ?></label>
<textarea name="description" id="tag-description" rows="5" cols="40" aria-describedby="description-description"></textarea>
<p id="description-description"><?php echo $tax->labels->desc_field_description; ?></p>
</div>
<?php
if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
/**
* Fires after the Add Tag form fields for non-hierarchical taxonomies.
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy slug.
*/
do_action( 'add_tag_form_fields', $taxonomy );
}
/**
* Fires after the Add Term form fields.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `category_add_form_fields`
* - `post_tag_add_form_fields`
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy slug.
*/
do_action( "{$taxonomy}_add_form_fields", $taxonomy );
?>
<p class="submit">
<?php submit_button( $tax->labels->add_new_item, 'primary', 'submit', false ); ?>
<span class="spinner"></span>
</p>
<?php
if ( 'category' === $taxonomy ) {
/**
* Fires at the end of the Edit Category form.
*
* @since 2.1.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead.
*
* @param object $arg Optional arguments cast to an object.
*/
do_action_deprecated( 'edit_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' );
} elseif ( 'link_category' === $taxonomy ) {
/**
* Fires at the end of the Edit Link form.
*
* @since 2.3.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead.
*
* @param object $arg Optional arguments cast to an object.
*/
do_action_deprecated( 'edit_link_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' );
} else {
/**
* Fires at the end of the Add Tag form.
*
* @since 2.7.0
* @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead.
*
* @param string $taxonomy The taxonomy slug.
*/
do_action_deprecated( 'add_tag_form', array( $taxonomy ), '3.0.0', '{$taxonomy}_add_form' );
}
/**
* Fires at the end of the Add Term form for all taxonomies.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `category_add_form`
* - `post_tag_add_form`
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy slug.
*/
do_action( "{$taxonomy}_add_form", $taxonomy );
?>
</form></div>
</div>
</div><!-- /col-left -->
<div id="col-right">
<div class="col-wrap">
<?php } ?>
<?php $wp_list_table->views(); ?>
<form id="posts-filter" method="post">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
<?php $wp_list_table->display(); ?>
</form>
<?php if ( 'category' === $taxonomy ) : ?>
<div class="form-wrap edit-term-notes">
<p>
<?php
printf(
/* translators: %s: Default category. */
__( 'Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the default category %s. The default category cannot be deleted.' ),
/** This filter is documented in wp-includes/category-template.php */
'<strong>' . apply_filters( 'the_category', get_cat_name( get_option( 'default_category' ) ), '', '' ) . '</strong>'
);
?>
</p>
<?php if ( current_user_can( 'import' ) ) : ?>
<p>
<?php
printf(
/* translators: %s: URL to Categories to Tags Converter tool. */
__( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ),
esc_url( $import_link )
);
?>
</p>
<?php endif; ?>
</div>
<?php elseif ( 'post_tag' === $taxonomy && current_user_can( 'import' ) ) : ?>
<div class="form-wrap edit-term-notes">
<p>
<?php
printf(
/* translators: %s: URL to Categories to Tags Converter tool. */
__( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ),
esc_url( $import_link )
);
?>
</p>
</div>
<?php
endif;
/**
* Fires after the taxonomy list table.
*
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
*
* Possible hook names include:
*
* - `after-category-table`
* - `after-post_tag-table`
*
* @since 3.0.0
*
* @param string $taxonomy The taxonomy name.
*/
do_action( "after-{$taxonomy}-table", $taxonomy ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
if ( $can_edit_terms ) {
?>
</div>
</div><!-- /col-right -->
</div><!-- /col-container -->
<?php } ?>
</div><!-- /wrap -->
<?php if ( ! wp_is_mobile() ) : ?>
<script type="text/javascript">
try{document.forms.addtag['tag-name'].focus();}catch(e){}
</script>
<?php
endif;
$wp_list_table->inline_edit();
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK G[@����( �( site-health.phpnu �[��� <?php
/**
* Tools Administration Screen.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
$tabs = array(
/* translators: Tab heading for Site Health Status page. */
'' => _x( 'Status', 'Site Health' ),
/* translators: Tab heading for Site Health Info page. */
'debug' => _x( 'Info', 'Site Health' ),
);
/**
* Filters the extra tabs for the Site Health navigation bar.
*
* Add a custom page to the Site Health screen, based on a tab slug and label.
* The label you provide will also be used as part of the site title.
*
* @since 5.8.0
*
* @param string[] $tabs An associative array of tab labels keyed by their slug.
*/
$tabs = apply_filters( 'site_health_navigation_tabs', $tabs );
$wrapper_classes = array(
'health-check-tabs-wrapper',
'hide-if-no-js',
'tab-count-' . count( $tabs ),
);
$current_tab = ( isset( $_GET['tab'] ) ? $_GET['tab'] : '' );
$title = sprintf(
// translators: %s: The currently displayed tab.
__( 'Site Health - %s' ),
( isset( $tabs[ $current_tab ] ) ? esc_html( $tabs[ $current_tab ] ) : esc_html( reset( $tabs ) ) )
);
if ( ! current_user_can( 'view_site_health_checks' ) ) {
wp_die( __( 'Sorry, you are not allowed to access site health information.' ), '', 403 );
}
wp_enqueue_style( 'site-health' );
wp_enqueue_script( 'site-health' );
if ( ! class_exists( 'WP_Site_Health' ) ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
}
if ( 'update_https' === $action ) {
check_admin_referer( 'wp_update_https' );
if ( ! current_user_can( 'update_https' ) ) {
wp_die( __( 'Sorry, you are not allowed to update this site to HTTPS.' ), 403 );
}
if ( ! wp_is_https_supported() ) {
wp_die( __( 'It looks like HTTPS is not supported for your website at this point.' ) );
}
$result = wp_update_urls_to_https();
wp_redirect( add_query_arg( 'https_updated', (int) $result, wp_get_referer() ) );
exit;
}
$health_check_site_status = WP_Site_Health::get_instance();
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'This screen allows you to obtain a health diagnosis of your site, and displays an overall rating of the status of your installation.' ) . '</p>' .
'<p>' . __( 'In the Status tab, you can see critical information about your WordPress configuration, along with anything else that requires your attention.' ) . '</p>' .
'<p>' . __( 'In the Info tab, you will find all the details about the configuration of your WordPress site, server, and database. There is also an export feature that allows you to copy all of the information about your site to the clipboard, to help solve problems on your site when obtaining support.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/site-health-screen/">Documentation on Site Health tool</a>' ) . '</p>'
);
// Start by checking if this is a special request checking for the existence of certain filters.
$health_check_site_status->check_wp_version_check_exists();
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="health-check-header">
<div class="health-check-title-section">
<h1>
<?php _e( 'Site Health' ); ?>
</h1>
</div>
<?php
if ( isset( $_GET['https_updated'] ) ) {
if ( $_GET['https_updated'] ) {
wp_admin_notice(
__( 'Site URLs switched to HTTPS.' ),
array(
'type' => 'success',
'id' => 'message',
'dismissible' => true,
)
);
} else {
wp_admin_notice(
__( 'Site URLs could not be switched to HTTPS.' ),
array(
'type' => 'error',
'id' => 'message',
'dismissible' => true,
)
);
}
}
?>
<div class="health-check-title-section site-health-progress-wrapper loading hide-if-no-js">
<div class="site-health-progress">
<svg aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
<circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
<circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
</svg>
</div>
<div class="site-health-progress-label">
<?php _e( 'Results are still loading…' ); ?>
</div>
</div>
<nav class="<?php echo implode( ' ', $wrapper_classes ); ?>" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<?php
$tabs_slice = $tabs;
/*
* If there are more than 4 tabs, only output the first 3 inline,
* the remaining links will be added to a sub-navigation.
*/
if ( count( $tabs ) > 4 ) {
$tabs_slice = array_slice( $tabs, 0, 3 );
}
foreach ( $tabs_slice as $slug => $label ) {
printf(
'<a href="%s" class="health-check-tab %s">%s</a>',
esc_url(
add_query_arg(
array(
'tab' => $slug,
),
admin_url( 'site-health.php' )
)
),
( $current_tab === $slug ? 'active' : '' ),
esc_html( $label )
);
}
?>
<?php if ( count( $tabs ) > 4 ) : ?>
<button type="button" class="health-check-tab health-check-offscreen-nav-wrapper" aria-haspopup="true">
<span class="dashicons dashicons-ellipsis"></span>
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
_e( 'Toggle extra menu items' );
?>
</span>
<div class="health-check-offscreen-nav">
<?php
// Remove the first few entries from the array as being already output.
$tabs_slice = array_slice( $tabs, 3 );
foreach ( $tabs_slice as $slug => $label ) {
printf(
'<a href="%s" class="health-check-tab %s">%s</a>',
esc_url(
add_query_arg(
array(
'tab' => $slug,
),
admin_url( 'site-health.php' )
)
),
( isset( $_GET['tab'] ) && $_GET['tab'] === $slug ? 'active' : '' ),
esc_html( $label )
);
}
?>
</div>
</button>
<?php endif; ?>
</nav>
</div>
<hr class="wp-header-end">
<?php
if ( isset( $_GET['tab'] ) && ! empty( $_GET['tab'] ) ) {
/**
* Fires when outputting the content of a custom Site Health tab.
*
* This action fires right after the Site Health header, and users are still subject to
* the capability checks for the Site Health page to view any custom tabs and their contents.
*
* @since 5.8.0
*
* @param string $tab The slug of the tab that was requested.
*/
do_action( 'site_health_tab_content', $_GET['tab'] );
require_once ABSPATH . 'wp-admin/admin-footer.php';
return;
} else {
wp_admin_notice(
__( 'The Site Health check requires JavaScript.' ),
array(
'type' => 'error',
'additional_classes' => array( 'hide-if-js' ),
)
);
?>
<div class="health-check-body health-check-status-tab hide-if-no-js">
<div class="site-status-all-clear hide">
<p class="icon">
<span class="dashicons dashicons-smiley" aria-hidden="true"></span>
</p>
<p class="encouragement">
<?php _e( 'Great job!' ); ?>
</p>
<p>
<?php _e( 'Everything is running smoothly here.' ); ?>
</p>
</div>
<div class="site-status-has-issues">
<h2>
<?php _e( 'Site Health Status' ); ?>
</h2>
<p><?php _e( 'The site health check shows information about your WordPress configuration and items that may need your attention.' ); ?></p>
<div class="site-health-issues-wrapper hidden" id="health-check-issues-critical">
<h3 class="site-health-issue-count-title">
<?php
/* translators: %s: Number of critical issues found. */
printf( _n( '%s critical issue', '%s critical issues', 0 ), '<span class="issue-count">0</span>' );
?>
</h3>
<p><?php _e( 'Critical issues are items that may have a high impact on your sites performance or security, and resolving these issues should be prioritized.' ); ?></p>
<div id="health-check-site-status-critical" class="health-check-accordion issues"></div>
</div>
<div class="site-health-issues-wrapper hidden" id="health-check-issues-recommended">
<h3 class="site-health-issue-count-title">
<?php
/* translators: %s: Number of recommended improvements. */
printf( _n( '%s recommended improvement', '%s recommended improvements', 0 ), '<span class="issue-count">0</span>' );
?>
</h3>
<p><?php _e( 'Recommended items are considered beneficial to your site, although not as important to prioritize as a critical issue, they may include improvements to things such as; Performance, user experience, and more.' ); ?></p>
<div id="health-check-site-status-recommended" class="health-check-accordion issues"></div>
</div>
</div>
<div class="site-health-view-more">
<button type="button" class="button site-health-view-passed" aria-expanded="false" aria-controls="health-check-issues-good">
<?php _e( 'Passed tests' ); ?>
<span class="icon"></span>
</button>
</div>
<div class="site-health-issues-wrapper hidden" id="health-check-issues-good">
<h3 class="site-health-issue-count-title">
<?php
/* translators: %s: Number of items with no issues. */
printf( _n( '%s item with no issues detected', '%s items with no issues detected', 0 ), '<span class="issue-count">0</span>' );
?>
</h3>
<div id="health-check-site-status-good" class="health-check-accordion issues"></div>
</div>
</div>
<script id="tmpl-health-check-issue" type="text/template">
<h4 class="health-check-accordion-heading">
<button aria-expanded="false" class="health-check-accordion-trigger" aria-controls="health-check-accordion-block-{{ data.test }}" type="button">
<span class="title">{{ data.label }}</span>
<# if ( data.badge ) { #>
<span class="badge {{ data.badge.color }}">{{ data.badge.label }}</span>
<# } #>
<span class="icon"></span>
</button>
</h4>
<div id="health-check-accordion-block-{{ data.test }}" class="health-check-accordion-panel" hidden="hidden">
{{{ data.description }}}
<# if ( data.actions ) { #>
<div class="actions">
{{{ data.actions }}}
</div>
<# } #>
</div>
</script>
<?php
}
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK G[ k���G �G install.phpnu �[��� <?php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/
// Confidence check.
if ( false ) {
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Error: PHP is not running</title>
</head>
<body class="wp-core-ui">
<p id="logo"><a href="https://wordpress.org/">WordPress</a></p>
<h1>Error: PHP is not running</h1>
<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
</body>
</html>
<?php
}
/**
* We are installing WordPress.
*
* @since 1.5.1
* @var bool
*/
define( 'WP_INSTALLING', true );
/** Load WordPress Bootstrap */
require_once dirname( __DIR__ ) . '/wp-load.php';
/** Load WordPress Administration Upgrade API */
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
/** Load WordPress Translation Install API */
require_once ABSPATH . 'wp-admin/includes/translation-install.php';
/** Load wpdb */
require_once ABSPATH . WPINC . '/class-wpdb.php';
nocache_headers();
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
/**
* Display installation header.
*
* @since 2.5.0
*
* @param string $body_classes
*/
function display_header( $body_classes = '' ) {
header( 'Content-Type: text/html; charset=utf-8' );
if ( is_rtl() ) {
$body_classes .= 'rtl';
}
if ( $body_classes ) {
$body_classes = ' ' . $body_classes;
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress › Installation' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui<?php echo $body_classes; ?>">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php
} // End display_header().
/**
* Displays installer setup form.
*
* @since 2.8.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string|null $error
*/
function display_setup_form( $error = null ) {
global $wpdb;
$user_table = ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $wpdb->users ) ) ) !== null );
// Ensure that sites appear in search engines by default.
$blog_public = 1;
if ( isset( $_POST['weblog_title'] ) ) {
$blog_public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : $blog_public;
}
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
$user_name = isset( $_POST['user_name'] ) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
$admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
if ( ! is_null( $error ) ) {
?>
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
<p class="message"><?php echo $error; ?></p>
<?php } ?>
<form id="setup" method="post" action="install.php?step=2" novalidate="novalidate">
<table class="form-table" role="presentation">
<tr>
<th scope="row"><label for="weblog_title"><?php _e( 'Site Title' ); ?></label></th>
<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>" /></td>
</tr>
<tr>
<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?></label></th>
<td>
<?php
if ( $user_table ) {
_e( 'User(s) already exists.' );
echo '<input name="user_name" type="hidden" value="admin" />';
} else {
?>
<input name="user_name" type="text" id="user_login" size="25" aria-describedby="user-name-desc" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
<p id="user-name-desc"><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
<?php
}
?>
</td>
</tr>
<?php if ( ! $user_table ) : ?>
<tr class="form-field form-required user-pass1-wrap">
<th scope="row">
<label for="pass1">
<?php _e( 'Password' ); ?>
</label>
</th>
<td>
<div class="wp-pwd">
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
<div class="password-input-wrapper">
<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result admin-password-desc" />
<div id="pass-strength-result" aria-live="polite"></div>
</div>
<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>
</div>
<p id="admin-password-desc"><span class="description important hide-if-no-js">
<strong><?php _e( 'Important:' ); ?></strong>
<?php /* translators: The non-breaking space prevents 1Password from thinking the text "log in" should trigger a password save prompt. */ ?>
<?php _e( 'You will need this password to log in. Please store it in a secure location.' ); ?></span></p>
</td>
</tr>
<tr class="form-field form-required user-pass2-wrap hide-if-js">
<th scope="row">
<label for="pass2"><?php _e( 'Repeat Password' ); ?>
<span class="description"><?php _e( '(required)' ); ?></span>
</label>
</th>
<td>
<input type="password" name="admin_password2" id="pass2" autocomplete="new-password" spellcheck="false" />
</td>
</tr>
<tr class="pw-weak">
<th scope="row"><?php _e( 'Confirm Password' ); ?></th>
<td>
<label>
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
<?php _e( 'Confirm use of weak password' ); ?>
</label>
</td>
</tr>
<?php endif; ?>
<tr>
<th scope="row"><label for="admin_email"><?php _e( 'Your Email' ); ?></label></th>
<td><input name="admin_email" type="email" id="admin_email" size="25" aria-describedby="admin-email-desc" value="<?php echo esc_attr( $admin_email ); ?>" />
<p id="admin-email-desc"><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
</tr>
<tr>
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><span>
<?php
has_action( 'blog_privacy_selector' )
/* translators: Hidden accessibility text. */
? _e( 'Site visibility' )
/* translators: Hidden accessibility text. */
: _e( 'Search engine visibility' );
?>
</span></legend>
<?php
if ( has_action( 'blog_privacy_selector' ) ) {
?>
<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
<label for="blog-public"><?php _e( 'Allow search engines to index this site' ); ?></label><br />
<input id="blog-norobots" type="radio" name="blog_public" aria-describedby="public-desc" value="0" <?php checked( 0, $blog_public ); ?> />
<label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
<p id="public-desc" class="description"><?php _e( 'Note: Discouraging search engines does not block access to your site — it is up to search engines to honor your request.' ); ?></p>
<?php
/** This action is documented in wp-admin/options-reading.php */
do_action( 'blog_privacy_selector' );
} else {
?>
<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" aria-describedby="privacy-desc" value="0" <?php checked( 0, $blog_public ); ?> />
<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
<p id="privacy-desc" class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
<?php } ?>
</fieldset>
</td>
</tr>
</table>
<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
</form>
<?php
} // End display_setup_form().
// Let's check to make sure WP isn't already installed.
if ( is_blog_installed() ) {
display_header();
die(
'<h1>' . __( 'Already Installed' ) . '</h1>' .
'<p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p>' .
'<p class="step"><a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log In' ) . '</a></p>' .
'</body></html>'
);
}
/**
* @global string $wp_version The WordPress version string.
* @global string $required_php_version The required PHP version string.
* @global string[] $required_php_extensions The names of required PHP extensions.
* @global string $required_mysql_version The required MySQL version string.
* @global wpdb $wpdb WordPress database abstraction object.
*/
global $wp_version, $required_php_version, $required_php_extensions, $required_mysql_version, $wpdb;
$php_version = PHP_VERSION;
$mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
$version_url = sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ),
sanitize_title( $wp_version )
);
$php_update_message = '</p><p>' . sprintf(
/* translators: %s: URL to Update PHP page. */
__( '<a href="%s">Learn more about updating PHP</a>.' ),
esc_url( wp_get_update_php_url() )
);
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
$php_update_message .= '</p><p><em>' . $annotation . '</em>';
}
if ( ! $mysql_compat && ! $php_compat ) {
$compat = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
__( 'You cannot install because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ),
$version_url,
$wp_version,
$required_php_version,
$required_mysql_version,
$php_version,
$mysql_version
) . $php_update_message;
} elseif ( ! $php_compat ) {
$compat = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
__( 'You cannot install because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.' ),
$version_url,
$wp_version,
$required_php_version,
$php_version
) . $php_update_message;
} elseif ( ! $mysql_compat ) {
$compat = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
__( 'You cannot install because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.' ),
$version_url,
$wp_version,
$required_mysql_version,
$mysql_version
);
}
if ( ! $mysql_compat || ! $php_compat ) {
display_header();
die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . $compat . '</p></body></html>' );
}
if ( isset( $required_php_extensions ) && is_array( $required_php_extensions ) ) {
$missing_extensions = array();
foreach ( $required_php_extensions as $extension ) {
if ( extension_loaded( $extension ) ) {
continue;
}
$missing_extensions[] = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: The PHP extension name needed. */
__( 'You cannot install because <a href="%1$s">WordPress %2$s</a> requires the %3$s PHP extension.' ),
$version_url,
$wp_version,
$extension
);
}
if ( count( $missing_extensions ) > 0 ) {
display_header();
die( '<h1>' . __( 'Requirements Not Met' ) . '</h1><p>' . implode( '</p><p>', $missing_extensions ) . '</p></body></html>' );
}
}
if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
display_header();
die(
'<h1>' . __( 'Configuration Error' ) . '</h1>' .
'<p>' . sprintf(
/* translators: %s: wp-config.php */
__( 'Your %s file has an empty database table prefix, which is not supported.' ),
'<code>wp-config.php</code>'
) . '</p></body></html>'
);
}
// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install.
if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
display_header();
die(
'<h1>' . __( 'Configuration Error' ) . '</h1>' .
'<p>' . sprintf(
/* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
__( 'The constant %s cannot be defined when installing WordPress.' ),
'<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
) . '</p></body></html>'
);
}
/**
* @global string $wp_local_package Locale code of the package.
* @global WP_Locale $wp_locale WordPress date and time locale object.
*/
$language = '';
if ( ! empty( $_REQUEST['language'] ) ) {
$language = sanitize_locale_name( $_REQUEST['language'] );
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
$language = $GLOBALS['wp_local_package'];
}
$scripts_to_print = array( 'jquery' );
switch ( $step ) {
case 0: // Step 0.
if ( wp_can_install_language_pack() && empty( $language ) ) {
$languages = wp_get_available_translations();
if ( $languages ) {
$scripts_to_print[] = 'language-chooser';
display_header( 'language-chooser' );
echo '<form id="setup" method="post" action="?step=1">';
wp_install_language_form( $languages );
echo '</form>';
break;
}
}
// Deliberately fall through if we can't reach the translations API.
case 1: // Step 1, direct link or from language chooser.
if ( ! empty( $language ) ) {
$loaded_language = wp_download_language_pack( $language );
if ( $loaded_language ) {
load_default_textdomain( $loaded_language );
$GLOBALS['wp_locale'] = new WP_Locale();
}
}
$scripts_to_print[] = 'user-profile';
display_header();
?>
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
<h2><?php _e( 'Information needed' ); ?></h2>
<p><?php _e( 'Please provide the following information. Do not worry, you can always change these settings later.' ); ?></p>
<?php
display_setup_form();
break;
case 2:
if ( ! empty( $language ) && load_default_textdomain( $language ) ) {
$loaded_language = $language;
$GLOBALS['wp_locale'] = new WP_Locale();
} else {
$loaded_language = 'en_US';
}
if ( ! empty( $wpdb->error ) ) {
wp_die( $wpdb->error->get_error_message() );
}
$scripts_to_print[] = 'user-profile';
display_header();
// Fill in the data we gathered.
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
$user_name = isset( $_POST['user_name'] ) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
$admin_password = isset( $_POST['admin_password'] ) ? wp_unslash( $_POST['admin_password'] ) : '';
$admin_password_check = isset( $_POST['admin_password2'] ) ? wp_unslash( $_POST['admin_password2'] ) : '';
$admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
$public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 1;
// Check email address.
$error = false;
if ( empty( $user_name ) ) {
// TODO: Poka-yoke.
display_setup_form( __( 'Please provide a valid username.' ) );
$error = true;
} elseif ( sanitize_user( $user_name, true ) !== $user_name ) {
display_setup_form( __( 'The username you provided has invalid characters.' ) );
$error = true;
} elseif ( $admin_password !== $admin_password_check ) {
// TODO: Poka-yoke.
display_setup_form( __( 'Your passwords do not match. Please try again.' ) );
$error = true;
} elseif ( empty( $admin_email ) ) {
// TODO: Poka-yoke.
display_setup_form( __( 'You must provide an email address.' ) );
$error = true;
} elseif ( ! is_email( $admin_email ) ) {
// TODO: Poka-yoke.
display_setup_form( __( 'Sorry, that is not a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
$error = true;
}
if ( false === $error ) {
$wpdb->show_errors();
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
?>
<h1><?php _e( 'Success!' ); ?></h1>
<p><?php _e( 'WordPress has been installed. Thank you, and enjoy!' ); ?></p>
<table class="form-table install-success">
<tr>
<th><?php _e( 'Username' ); ?></th>
<td><?php echo esc_html( sanitize_user( $user_name, true ) ); ?></td>
</tr>
<tr>
<th><?php _e( 'Password' ); ?></th>
<td>
<?php if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) : ?>
<code><?php echo esc_html( $result['password'] ); ?></code><br />
<?php endif; ?>
<p><?php echo $result['password_message']; ?></p>
</td>
</tr>
</table>
<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>
<?php
}
break;
}
if ( ! wp_is_mobile() ) {
?>
<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
<?php
}
wp_print_scripts( $scripts_to_print );
?>
<script type="text/javascript">
jQuery( function( $ ) {
$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
} );
</script>
</body>
</html>
PK G[h_U U upgrade-functions.phpnu �[��� <?php
/**
* WordPress Upgrade Functions. Old file, must not be used. Include
* wp-admin/includes/upgrade.php instead.
*
* @deprecated 2.5.0
* @package WordPress
* @subpackage Administration
*/
_deprecated_file( basename( __FILE__ ), '2.5.0', 'wp-admin/includes/upgrade.php' );
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
PK G[#�/ػ � maint/repair.phpnu �[��� <?php
/**
* Database Repair and Optimization Script.
*
* @package WordPress
* @subpackage Database
*/
define( 'WP_REPAIRING', true );
require_once dirname( __DIR__, 2 ) . '/wp-load.php';
header( 'Content-Type: text/html; charset=utf-8' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress › Database Repair' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui">
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></p>
<?php
if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
echo '<h1 class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Allow automatic database repair' ) .
'</h1>';
echo '<p>';
printf(
/* translators: %s: wp-config.php */
__( 'To allow use of this page to automatically repair database problems, please add the following line to your %s file. Once this line is added to your config, reload this page.' ),
'<code>wp-config.php</code>'
);
echo "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
$default_keys = array_unique(
array(
'put your unique phrase here',
/*
* translators: This string should only be translated if wp-config-sample.php is localized.
* You can check the localized release package or
* https://i18n.svn.wordpress.org/<locale code>/branches/<wp version>/dist/wp-config-sample.php
*/
__( 'put your unique phrase here' ),
)
);
$missing_key = false;
$duplicated_keys = array();
foreach ( array( 'AUTH_KEY', 'SECURE_AUTH_KEY', 'LOGGED_IN_KEY', 'NONCE_KEY', 'AUTH_SALT', 'SECURE_AUTH_SALT', 'LOGGED_IN_SALT', 'NONCE_SALT' ) as $key ) {
if ( defined( $key ) ) {
// Check for unique values of each key.
$duplicated_keys[ constant( $key ) ] = isset( $duplicated_keys[ constant( $key ) ] );
} else {
// If a constant is not defined, it's missing.
$missing_key = true;
}
}
// If at least one key uses a default value, consider it duplicated.
foreach ( $default_keys as $default_key ) {
if ( isset( $duplicated_keys[ $default_key ] ) ) {
$duplicated_keys[ $default_key ] = true;
}
}
// Weed out all unique, non-default values.
$duplicated_keys = array_filter( $duplicated_keys );
if ( $duplicated_keys || $missing_key ) {
echo '<h2 class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Check secret keys' ) .
'</h2>';
/* translators: 1: wp-config.php, 2: Secret key service URL. */
echo '<p>' . sprintf( __( 'While you are editing your %1$s file, take a moment to make sure you have all 8 keys and that they are unique. You can generate these using the <a href="%2$s">WordPress.org secret key service</a>.' ), '<code>wp-config.php</code>', 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '</p>';
}
} elseif ( isset( $_GET['repair'] ) ) {
echo '<h1 class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Database repair results' ) .
'</h1>';
$optimize = '2' === $_GET['repair'];
$okay = true;
$problems = array();
$tables = $wpdb->tables();
/**
* Filters additional database tables to repair.
*
* @since 3.0.0
*
* @param string[] $tables Array of prefixed table names to be repaired.
*/
$tables = array_merge( $tables, (array) apply_filters( 'tables_to_repair', array() ) );
// Loop over the tables, checking and repairing as needed.
foreach ( $tables as $table ) {
$check = $wpdb->get_row( "CHECK TABLE $table" );
echo '<p>';
if ( 'OK' === $check->Msg_text ) {
/* translators: %s: Table name. */
printf( __( 'The %s table is okay.' ), "<code>$table</code>" );
} else {
/* translators: 1: Table name, 2: Error message. */
printf( __( 'The %1$s table is not okay. It is reporting the following error: %2$s. WordPress will attempt to repair this table…' ), "<code>$table</code>", "<code>$check->Msg_text</code>" );
$repair = $wpdb->get_row( "REPAIR TABLE $table" );
echo '<br /> ';
if ( 'OK' === $repair->Msg_text ) {
/* translators: %s: Table name. */
printf( __( 'Successfully repaired the %s table.' ), "<code>$table</code>" );
} else {
/* translators: 1: Table name, 2: Error message. */
printf( __( 'Failed to repair the %1$s table. Error: %2$s' ), "<code>$table</code>", "<code>$repair->Msg_text</code>" ) . '<br />';
$problems[ $table ] = $repair->Msg_text;
$okay = false;
}
}
if ( $okay && $optimize ) {
$analyze = $wpdb->get_row( "ANALYZE TABLE $table" );
echo '<br /> ';
if ( 'Table is already up to date' === $analyze->Msg_text ) {
/* translators: %s: Table name. */
printf( __( 'The %s table is already optimized.' ), "<code>$table</code>" );
} else {
$optimize = $wpdb->get_row( "OPTIMIZE TABLE $table" );
echo '<br /> ';
if ( 'OK' === $optimize->Msg_text || 'Table is already up to date' === $optimize->Msg_text ) {
/* translators: %s: Table name. */
printf( __( 'Successfully optimized the %s table.' ), "<code>$table</code>" );
} else {
/* translators: 1: Table name. 2: Error message. */
printf( __( 'Failed to optimize the %1$s table. Error: %2$s' ), "<code>$table</code>", "<code>$optimize->Msg_text</code>" );
}
}
}
echo '</p>';
}
if ( $problems ) {
printf(
/* translators: %s: URL to "Fixing WordPress" forum. */
'<p>' . __( 'Some database problems could not be repaired. Please copy-and-paste the following list of errors to the <a href="%s">WordPress support forums</a> to get additional assistance.' ) . '</p>',
__( 'https://wordpress.org/support/forum/how-to-and-troubleshooting' )
);
$problem_output = '';
foreach ( $problems as $table => $problem ) {
$problem_output .= "$table: $problem\n";
}
echo '<p><textarea name="errors" id="errors" rows="20" cols="60">' . esc_textarea( $problem_output ) . '</textarea></p>';
} else {
echo '<p>' . __( 'Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.' ) . "</p><p><code>define('WP_ALLOW_REPAIR', true);</code></p>";
}
} else {
echo '<h1 class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'WordPress database repair' ) .
'</h1>';
if ( isset( $_GET['referrer'] ) && 'is_blog_installed' === $_GET['referrer'] ) {
echo '<p>' . __( 'One or more database tables are unavailable. To allow WordPress to attempt to repair these tables, press the “Repair Database” button. Repairing can take a while, so please be patient.' ) . '</p>';
} else {
echo '<p>' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '</p>';
}
?>
<p class="step"><a class="button button-large" href="repair.php?repair=1"><?php _e( 'Repair Database' ); ?></a></p>
<p><?php _e( 'WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.' ); ?></p>
<p class="step"><a class="button button-large" href="repair.php?repair=2"><?php _e( 'Repair and Optimize Database' ); ?></a></p>
<?php
}
?>
</body>
</html>
PK G[;p�Q� � user/index.phpnu �[��� <?php
/**
* User Dashboard Administration Screen
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/index.php';
PK G[� #w? ?
user/menu.phpnu �[��� <?php
/**
* Build User Administration Menu.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$menu[2] = array( __( 'Dashboard' ), 'exist', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
$menu[4] = array( '', 'exist', 'separator1', '', 'wp-menu-separator' );
$menu[70] = array( __( 'Profile' ), 'exist', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
$menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
$_wp_real_parent_file['users.php'] = 'profile.php';
$compat = array();
$submenu = array();
require_once ABSPATH . 'wp-admin/includes/menu.php';
PK G[ޟ user/credits.phpnu �[��� <?php
/**
* User Dashboard Credits administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/credits.php';
PK G[>i�� user/freedoms.phpnu �[��� <?php
/**
* User Dashboard Freedoms administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/freedoms.php';
PK G[Q�O user/contribute.phpnu �[��� <?php
/**
* User Dashboard Contribute administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 6.6.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/contribute.php';
PK G[:9h user/privacy.phpnu �[��� <?php
/**
* User Dashboard Privacy administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 4.9.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/privacy.php';
PK G[�D� user/about.phpnu �[��� <?php
/**
* User Dashboard About administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/about.php';
PK G[ ��a a user/admin.phpnu �[��� <?php
/**
* WordPress User Administration Bootstrap
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
define( 'WP_USER_ADMIN', true );
require_once dirname( __DIR__ ) . '/admin.php';
if ( ! is_multisite() ) {
wp_redirect( admin_url() );
exit;
}
$redirect_user_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) );
/**
* Filters whether to redirect the request to the User Admin in Multisite.
*
* @since 3.2.0
*
* @param bool $redirect_user_admin_request Whether the request should be redirected.
*/
$redirect_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request );
if ( $redirect_user_admin_request ) {
wp_redirect( user_admin_url() );
exit;
}
unset( $redirect_user_admin_request );
PK G[/J� � user/profile.phpnu �[��� <?php
/**
* User Profile Administration Screen.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/profile.php';
PK G[��� � user/user-edit.phpnu �[��� <?php
/**
* Edit user administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/user-edit.php';
PK G[^�� � index.phpnu �[��� <?php
/**
* Dashboard Administration Screen
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Bootstrap */
require_once __DIR__ . '/admin.php';
/** Load WordPress dashboard API */
require_once ABSPATH . 'wp-admin/includes/dashboard.php';
wp_dashboard_setup();
wp_enqueue_script( 'dashboard' );
if ( current_user_can( 'install_plugins' ) ) {
wp_enqueue_script( 'plugin-install' );
wp_enqueue_script( 'updates' );
}
if ( current_user_can( 'upload_files' ) ) {
wp_enqueue_script( 'media-upload' );
}
add_thickbox();
if ( wp_is_mobile() ) {
wp_enqueue_script( 'jquery-touch-punch' );
}
// Used in the HTML title tag.
$title = __( 'Dashboard' );
$parent_file = 'index.php';
$help = '<p>' . __( 'Welcome to your WordPress Dashboard!' ) . '</p>';
$help .= '<p>' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '</p>';
$screen = get_current_screen();
$screen->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => $help,
)
);
// Help tabs.
$help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>';
$help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-navigation',
'title' => __( 'Navigation' ),
'content' => $help,
)
);
$help = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '</p>';
$help .= '<p>' . __( '<strong>Screen Options</strong> — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '</p>';
$help .= '<p>' . __( '<strong>Drag and Drop</strong> — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '</p>';
$help .= '<p>' . __( '<strong>Box Controls</strong> — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-layout',
'title' => __( 'Layout' ),
'content' => $help,
)
);
$help = '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>';
if ( current_user_can( 'edit_theme_options' ) ) {
$help .= '<p>' . __( '<strong>Welcome</strong> — Shows links for some of the most common tasks when setting up a new site.' ) . '</p>';
}
if ( current_user_can( 'view_site_health_checks' ) ) {
$help .= '<p>' . __( '<strong>Site Health Status</strong> — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '</p>';
}
if ( current_user_can( 'edit_posts' ) ) {
$help .= '<p>' . __( '<strong>At a Glance</strong> — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>';
}
$help .= '<p>' . __( '<strong>Activity</strong> — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '</p>';
if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
$help .= '<p>' . __( "<strong>Quick Draft</strong> — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '</p>';
}
$help .= '<p>' . sprintf(
/* translators: %s: WordPress Planet URL. */
__( '<strong>WordPress Events and News</strong> — Upcoming events near you as well as the latest news from the official WordPress project and the <a href="%s">WordPress Planet</a>.' ),
__( 'https://planet.wordpress.org/' )
) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-content',
'title' => __( 'Content' ),
'content' => $help,
)
);
unset( $help );
$wp_version = get_bloginfo( 'version', 'display' );
/* translators: %s: WordPress version. */
$wp_version_text = sprintf( __( 'Version %s' ), $wp_version );
$is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version );
if ( ! $is_dev_version ) {
$version_url = sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ),
sanitize_title( $wp_version )
);
$wp_version_text = sprintf(
'<a href="%1$s">%2$s</a>',
$version_url,
$wp_version_text
);
}
$screen->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' .
'<p>' . $wp_version_text . '</p>'
);
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<?php
if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
/** This filter is documented in wp-login.php */
$remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
$postponed_time = get_option( 'admin_email_lifespan' );
/*
* Calculate how many seconds it's been since the reminder was postponed.
* This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
*/
$time_passed = time() - ( $postponed_time - $remind_interval );
// Only show the dashboard notice if it's been less than a minute since the message was postponed.
if ( $time_passed < MINUTE_IN_SECONDS ) :
$message = sprintf(
/* translators: %s: Human-readable time interval. */
__( 'The admin email verification page will reappear after %s.' ),
human_time_diff( time() + $remind_interval )
);
wp_admin_notice(
$message,
array(
'type' => 'success',
'dismissible' => true,
)
);
endif;
endif;
?>
<?php
if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
$classes = 'welcome-panel';
$option = (int) get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner.
$hide = ( 0 === $option || ( 2 === $option && wp_get_current_user()->user_email !== get_option( 'admin_email' ) ) );
if ( $hide ) {
$classes .= ' hidden';
}
?>
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
<?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
<a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the welcome panel' ); ?>"><?php _e( 'Dismiss' ); ?></a>
<?php
/**
* Fires when adding content to the welcome panel on the admin dashboard.
*
* To remove the default welcome panel, use remove_action():
*
* remove_action( 'welcome_panel', 'wp_welcome_panel' );
*
* @since 3.5.0
*/
do_action( 'welcome_panel' );
?>
</div>
<?php endif; ?>
<div id="dashboard-widgets-wrap">
<?php wp_dashboard(); ?>
</div><!-- dashboard-widgets-wrap -->
</div><!-- wrap -->
<?php
wp_print_community_events_templates();
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK G[�7/] export-personal-data.phpnu �[��� <?php
/**
* Privacy tools, Export Personal Data screen.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
if ( ! current_user_can( 'export_others_personal_data' ) ) {
wp_die( __( 'Sorry, you are not allowed to export personal data on this site.' ) );
}
// Used in the HTML title tag.
$title = __( 'Export Personal Data' );
// Contextual help - choose Help on the top right of admin panel to preview this.
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'This screen is where you manage requests for an export of personal data.' ) . '</p>' .
'<p>' . __( 'Privacy Laws around the world require businesses and online services to provide an export of some of the data they collect about an individual, and to deliver that export on request. The rights those laws enshrine are sometimes called the "Right of Data Portability". It allows individuals to obtain and reuse their personal data for their own purposes across different services. It allows them to move, copy or transfer personal data easily from one IT environment to another.' ) . '</p>' .
'<p>' . __( 'The tool associates data stored in WordPress with a supplied email address, including profile data and comments.' ) . '</p>' .
'<p><strong>' . __( 'Note: Since this tool only gathers data from WordPress and participating plugins, you may need to do more to comply with export requests. For example, you should also send the requester some of the data collected from or stored with the 3rd party services your organization uses.' ) . '</strong></p>',
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'default-data',
'title' => __( 'Default Data' ),
'content' =>
'<p>' . __( 'WordPress collects (but <em>never</em> publishes) a limited amount of data from registered users who have logged in to the site. Generally, these users are people who contribute to the site in some way -- content, store management, and so on. With rare exceptions, these users do not include occasional visitors who might have registered to comment on articles or buy products. The data WordPress retains can include:' ) . '</p>' .
'<p>' . __( '<strong>Profile Information</strong> — user email address, username, display name, nickname, first name, last name, description/bio, and registration date.' ) . '</p>' .
'<p>' . __( '<strong>Community Events Location</strong> — The IP Address of the user, which populates the Upcoming Community Events dashboard widget with relevant information.' ) . '</p>' .
'<p>' . __( '<strong>Session Tokens</strong> — User login information, IP Addresses, Expiration Date, User Agent (Browser/OS), and Last Login.' ) . '</p>' .
'<p>' . __( '<strong>Comments</strong> — For user comments, Email Address, IP Address, User Agent (Browser/OS), Date/Time, Comment Content, and Content URL.' ) . '</p>' .
'<p>' . __( '<strong>Media</strong> — A list of URLs for media files the user uploads.' ) . '</p>',
)
);
$privacy_policy_guide = '<p>' . sprintf(
/* translators: %s: URL to Privacy Policy Guide screen. */
__( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the <a href="%s">Privacy Policy Guide</a>.' ),
admin_url( 'options-privacy.php?tab=policyguide' )
) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'plugin-data',
'title' => __( 'Plugin Data' ),
'content' =>
'<p>' . __( 'Many plugins may collect or store personal data either in the WordPress database or remotely. Any Export Personal Data request should include data from plugins as well.' ) . '</p>' .
$privacy_policy_guide .
'<p>' . __( 'If you are a plugin author, you can learn more about <a href="https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-exporter-to-your-plugin/">how to add the Personal Data Exporter to a plugin</a>.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-export-personal-data-screen/">Documentation on Export Personal Data</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
// Handle list table actions.
_wp_personal_data_handle_actions();
// Cleans up failed and expired requests before displaying the list table.
_wp_personal_data_cleanup_requests();
wp_enqueue_script( 'privacy-tools' );
add_screen_option(
'per_page',
array(
'default' => 20,
'option' => 'export_personal_data_requests_per_page',
)
);
$_list_table_args = array(
'plural' => 'privacy_requests',
'singular' => 'privacy_request',
);
$requests_table = _get_list_table( 'WP_Privacy_Data_Export_Requests_List_Table', $_list_table_args );
$requests_table->screen->set_screen_reader_content(
array(
'heading_views' => __( 'Filter export personal data list' ),
'heading_pagination' => __( 'Export personal data list navigation' ),
'heading_list' => __( 'Export personal data list' ),
)
);
$requests_table->process_bulk_action();
$requests_table->prepare_items();
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap nosubsub">
<h1><?php esc_html_e( 'Export Personal Data' ); ?></h1>
<p><?php _e( 'This tool helps site owners comply with local laws and regulations by exporting known data for a given user in a .zip file.' ); ?></p>
<hr class="wp-header-end" />
<?php settings_errors(); ?>
<form action="<?php echo esc_url( admin_url( 'export-personal-data.php' ) ); ?>" method="post" class="wp-privacy-request-form">
<h2><?php esc_html_e( 'Add Data Export Request' ); ?></h2>
<div class="wp-privacy-request-form-field">
<table class="form-table">
<tr>
<th scope="row">
<label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label>
</th>
<td>
<input type="text" required class="regular-text ltr" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" />
</td>
</tr>
<tr>
<th scope="row">
<?php _e( 'Confirmation email' ); ?>
</th>
<td>
<label for="send_confirmation_email">
<input type="checkbox" name="send_confirmation_email" id="send_confirmation_email" value="1" checked="checked" />
<?php _e( 'Send personal data export confirmation email.' ); ?>
</label>
</td>
</tr>
</table>
<p class="submit">
<?php submit_button( __( 'Send Request' ), 'secondary', 'submit', false ); ?>
</p>
</div>
<?php wp_nonce_field( 'personal-data-request' ); ?>
<input type="hidden" name="action" value="add_export_personal_data_request" />
<input type="hidden" name="type_of_action" value="export_personal_data" />
</form>
<hr />
<?php $requests_table->views(); ?>
<form class="search-form wp-clearfix">
<?php $requests_table->search_box( __( 'Search Requests' ), 'requests' ); ?>
<input type="hidden" name="filter-status" value="<?php echo isset( $_REQUEST['filter-status'] ) ? esc_attr( sanitize_text_field( $_REQUEST['filter-status'] ) ) : ''; ?>" />
<input type="hidden" name="orderby" value="<?php echo isset( $_REQUEST['orderby'] ) ? esc_attr( sanitize_text_field( $_REQUEST['orderby'] ) ) : ''; ?>" />
<input type="hidden" name="order" value="<?php echo isset( $_REQUEST['order'] ) ? esc_attr( sanitize_text_field( $_REQUEST['order'] ) ) : ''; ?>" />
</form>
<form method="post">
<?php
$requests_table->display();
$requests_table->embed_scripts();
?>
</form>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK G[���'