Файловый менеджер - Редактировать - /home/elecjxjk/tumaninvestigators.com/index/wp-admin.zip
Назад
PK (6wY�2�01 1 admin.phpnu �[��� <?php /** * WordPress Administration Bootstrap * * @package WordPress * @subpackage Administration */ /** * In WordPress Administration Screens * * @since 2.3.2 */ if ( ! defined( 'WP_ADMIN' ) ) { define( 'WP_ADMIN', true ); } if ( ! defined( 'WP_NETWORK_ADMIN' ) ) { define( 'WP_NETWORK_ADMIN', false ); } if ( ! defined( 'WP_USER_ADMIN' ) ) { define( 'WP_USER_ADMIN', false ); } if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { define( 'WP_BLOG_ADMIN', true ); } if ( isset( $_GET['import'] ) && ! defined( 'WP_LOAD_IMPORTERS' ) ) { define( 'WP_LOAD_IMPORTERS', true ); } require_once dirname( __DIR__ ) . '/wp-load.php'; nocache_headers(); if ( get_option( 'db_upgraded' ) ) { flush_rewrite_rules(); update_option( 'db_upgraded', false ); /** * Fires on the next page load after a successful DB upgrade. * * @since 2.8.0 */ do_action( 'after_db_upgrade' ); } elseif ( ! wp_doing_ajax() && empty( $_POST ) && (int) get_option( 'db_version' ) !== $wp_db_version ) { if ( ! is_multisite() ) { wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); exit; } /** * Filters whether to attempt to perform the multisite DB upgrade routine. * * In single site, the user would be redirected to wp-admin/upgrade.php. * In multisite, the DB upgrade routine is automatically fired, but only * when this filter returns true. * * If the network is 50 sites or less, it will run every time. Otherwise, * it will throttle itself to reduce load. * * @since MU (3.0.0) * * @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true. */ if ( apply_filters( 'do_mu_upgrade', true ) ) { $c = get_blog_count(); /* * If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load: * attempt to do no more than threshold value, with some +/- allowed. */ if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) === 1 ) ) { require_once ABSPATH . WPINC . '/http.php'; $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1', ) ); /** This action is documented in wp-admin/network/upgrade.php */ do_action( 'after_mu_upgrade', $response ); unset( $response ); } unset( $c ); } } require_once ABSPATH . 'wp-admin/includes/admin.php'; auth_redirect(); // Schedule Trash collection. if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) { wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' ); } // Schedule transient cleanup. if ( ! wp_next_scheduled( 'delete_expired_transients' ) && ! wp_installing() ) { wp_schedule_event( time(), 'daily', 'delete_expired_transients' ); } set_screen_options(); $date_format = __( 'F j, Y' ); $time_format = __( 'g:i a' ); wp_enqueue_script( 'common' ); /** * $pagenow is set in vars.php. * $wp_importers is sometimes set in wp-admin/includes/import.php. * The remaining variables are imported as globals elsewhere, declared as globals here. * * @global string $pagenow The filename of the current screen. * @global array $wp_importers * @global string $hook_suffix * @global string $plugin_page * @global string $typenow The post type of the current screen. * @global string $taxnow The taxonomy of the current screen. */ global $pagenow, $wp_importers, $hook_suffix, $plugin_page, $typenow, $taxnow; $page_hook = null; $editing = false; if ( isset( $_GET['page'] ) ) { $plugin_page = wp_unslash( $_GET['page'] ); $plugin_page = plugin_basename( $plugin_page ); } if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) { $typenow = $_REQUEST['post_type']; } else { $typenow = ''; } if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) ) { $taxnow = $_REQUEST['taxonomy']; } else { $taxnow = ''; } if ( WP_NETWORK_ADMIN ) { require ABSPATH . 'wp-admin/network/menu.php'; } elseif ( WP_USER_ADMIN ) { require ABSPATH . 'wp-admin/user/menu.php'; } else { require ABSPATH . 'wp-admin/menu.php'; } if ( current_user_can( 'manage_options' ) ) { wp_raise_memory_limit( 'admin' ); } /** * Fires as an admin screen or script is being initialized. * * Note, this does not just run on user-facing admin screens. * It runs on admin-ajax.php and admin-post.php as well. * * This is roughly analogous to the more general {@see 'init'} hook, which fires earlier. * * @since 2.5.0 */ do_action( 'admin_init' ); if ( isset( $plugin_page ) ) { if ( ! empty( $typenow ) ) { $the_parent = $pagenow . '?post_type=' . $typenow; } else { $the_parent = $pagenow; } $page_hook = get_plugin_page_hook( $plugin_page, $the_parent ); if ( ! $page_hook ) { $page_hook = get_plugin_page_hook( $plugin_page, $plugin_page ); // Back-compat for plugins using add_management_page(). if ( empty( $page_hook ) && 'edit.php' === $pagenow && get_plugin_page_hook( $plugin_page, 'tools.php' ) ) { // There could be plugin specific params on the URL, so we need the whole query string. if ( ! empty( $_SERVER['QUERY_STRING'] ) ) { $query_string = $_SERVER['QUERY_STRING']; } else { $query_string = 'page=' . $plugin_page; } wp_redirect( admin_url( 'tools.php?' . $query_string ) ); exit; } } unset( $the_parent ); } $hook_suffix = ''; if ( isset( $page_hook ) ) { $hook_suffix = $page_hook; } elseif ( isset( $plugin_page ) ) { $hook_suffix = $plugin_page; } elseif ( isset( $pagenow ) ) { $hook_suffix = $pagenow; } set_current_screen(); // Handle plugin admin pages. if ( isset( $plugin_page ) ) { if ( $page_hook ) { /** * Fires before a particular screen is loaded. * * The load-* hook fires in a number of contexts. This hook is for plugin screens * where a callback is provided when the screen is registered. * * The dynamic portion of the hook name, `$page_hook`, refers to a mixture of plugin * page information including: * 1. The page type. If the plugin page is registered as a submenu page, such as for * Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'. * 2. A separator of '_page_'. * 3. The plugin basename minus the file extension. * * Together, the three parts form the `$page_hook`. Citing the example above, * the hook name used would be 'load-settings_page_pluginbasename'. * * @see get_plugin_page_hook() * * @since 2.1.0 */ do_action( "load-{$page_hook}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores if ( ! isset( $_GET['noheader'] ) ) { require_once ABSPATH . 'wp-admin/admin-header.php'; } /** * Used to call the registered callback for a plugin screen. * * This hook uses a dynamic hook name, `$page_hook`, which refers to a mixture of plugin * page information including: * 1. The page type. If the plugin page is registered as a submenu page, such as for * Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'. * 2. A separator of '_page_'. * 3. The plugin basename minus the file extension. * * Together, the three parts form the `$page_hook`. Citing the example above, * the hook name used would be 'settings_page_pluginbasename'. * * @see get_plugin_page_hook() * * @since 1.5.0 */ do_action( $page_hook ); } else { if ( validate_file( $plugin_page ) ) { wp_die( __( 'Invalid plugin page.' ) ); } if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) && ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) ) { /* translators: %s: Admin page generated by a plugin. */ wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) ); } /** * Fires before a particular screen is loaded. * * The load-* hook fires in a number of contexts. This hook is for plugin screens * where the file to load is directly included, rather than the use of a function. * * The dynamic portion of the hook name, `$plugin_page`, refers to the plugin basename. * * @see plugin_basename() * * @since 1.5.0 */ do_action( "load-{$plugin_page}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores if ( ! isset( $_GET['noheader'] ) ) { require_once ABSPATH . 'wp-admin/admin-header.php'; } if ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) { include WPMU_PLUGIN_DIR . "/$plugin_page"; } else { include WP_PLUGIN_DIR . "/$plugin_page"; } } require_once ABSPATH . 'wp-admin/admin-footer.php'; exit; } elseif ( isset( $_GET['import'] ) ) { $importer = $_GET['import']; if ( ! current_user_can( 'import' ) ) { wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) ); } if ( validate_file( $importer ) ) { wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); exit; } if ( ! isset( $wp_importers[ $importer ] ) || ! is_callable( $wp_importers[ $importer ][2] ) ) { wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); exit; } /** * Fires before an importer screen is loaded. * * The dynamic portion of the hook name, `$importer`, refers to the importer slug. * * Possible hook names include: * * - `load-importer-blogger` * - `load-importer-wpcat2tag` * - `load-importer-livejournal` * - `load-importer-mt` * - `load-importer-rss` * - `load-importer-tumblr` * - `load-importer-wordpress` * * @since 3.5.0 */ do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores // Used in the HTML title tag. $title = __( 'Import' ); $parent_file = 'tools.php'; $submenu_file = 'import.php'; if ( ! isset( $_GET['noheader'] ) ) { require_once ABSPATH . 'wp-admin/admin-header.php'; } require_once ABSPATH . 'wp-admin/includes/upgrade.php'; define( 'WP_IMPORTING', true ); /** * Filters whether to filter imported data through kses on import. * * Multisite uses this hook to filter all data through kses by default, * as a super administrator may be assisting an untrusted user. * * @since 3.1.0 * * @param bool $force Whether to force data to be filtered through kses. Default false. */ if ( apply_filters( 'force_filtered_html_on_import', false ) ) { kses_init_filters(); // Always filter imported data with kses on multisite. } call_user_func( $wp_importers[ $importer ][2] ); require_once ABSPATH . 'wp-admin/admin-footer.php'; // Make sure rules are flushed. flush_rewrite_rules( false ); exit; } else { /** * Fires before a particular screen is loaded. * * The load-* hook fires in a number of contexts. This hook is for core screens. * * The dynamic portion of the hook name, `$pagenow`, is a global variable * referring to the filename of the current screen, such as 'admin.php', * 'post-new.php' etc. A complete hook for the latter would be * 'load-post-new.php'. * * @since 2.1.0 */ do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores /* * The following hooks are fired to ensure backward compatibility. * In all other cases, 'load-' . $pagenow should be used instead. */ if ( 'page' === $typenow ) { if ( 'post-new.php' === $pagenow ) { do_action( 'load-page-new.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } elseif ( 'post.php' === $pagenow ) { do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } } elseif ( 'edit-tags.php' === $pagenow ) { if ( 'category' === $taxnow ) { do_action( 'load-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } elseif ( 'link_category' === $taxnow ) { do_action( 'load-edit-link-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } } elseif ( 'term.php' === $pagenow ) { do_action( 'load-edit-tags.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } } if ( ! empty( $_REQUEST['action'] ) ) { $action = $_REQUEST['action']; /** * Fires when an 'action' request variable is sent. * * The dynamic portion of the hook name, `$action`, refers to * the action derived from the `GET` or `POST` request. * * @since 2.6.0 */ do_action( "admin_action_{$action}" ); } PK (6wY�f- f- comment.phpnu �[��� <?php /** * Comment Management Screen * * @package WordPress * @subpackage Administration */ /** Load WordPress Bootstrap */ require_once __DIR__ . '/admin.php'; $parent_file = 'edit-comments.php'; $submenu_file = 'edit-comments.php'; /** * @global string $action */ global $action; $action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : ''; if ( isset( $_POST['deletecomment'] ) ) { $action = 'deletecomment'; } if ( 'cdc' === $action ) { $action = 'delete'; } elseif ( 'mac' === $action ) { $action = 'approve'; } if ( isset( $_GET['dt'] ) ) { if ( 'spam' === $_GET['dt'] ) { $action = 'spam'; } elseif ( 'trash' === $_GET['dt'] ) { $action = 'trash'; } } if ( isset( $_REQUEST['c'] ) ) { $comment_id = absint( $_REQUEST['c'] ); $comment = get_comment( $comment_id ); // Prevent actions on a comment associated with a trashed post. if ( $comment && 'trash' === get_post_status( $comment->comment_post_ID ) ) { wp_die( __( 'You cannot edit this comment because the associated post is in the Trash. Please restore the post first, then try again.' ) ); } } else { $comment = null; } switch ( $action ) { case 'editcomment': // Used in the HTML title tag. $title = __( 'Edit Comment' ); get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' . '<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/comments-screen/">Documentation on Comments</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); wp_enqueue_script( 'comment' ); require_once ABSPATH . 'wp-admin/admin-header.php'; if ( ! $comment ) { comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) ); } if ( ! current_user_can( 'edit_comment', $comment_id ) ) { comment_footer_die( __( 'Sorry, you are not allowed to edit this comment.' ) ); } if ( 'trash' === $comment->comment_approved ) { comment_footer_die( __( 'This comment is in the Trash. Please move it out of the Trash if you want to edit it.' ) ); } $comment = get_comment_to_edit( $comment_id ); require ABSPATH . 'wp-admin/edit-form-comment.php'; break; case 'delete': case 'approve': case 'trash': case 'spam': // Used in the HTML title tag. $title = __( 'Moderate Comment' ); if ( ! $comment ) { wp_redirect( admin_url( 'edit-comments.php?error=1' ) ); die(); } if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { wp_redirect( admin_url( 'edit-comments.php?error=2' ) ); die(); } // No need to re-approve/re-trash/re-spam a comment. if ( str_replace( '1', 'approve', $comment->comment_approved ) === $action ) { wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) ); die(); } require_once ABSPATH . 'wp-admin/admin-header.php'; $formaction = $action . 'comment'; $nonce_action = ( 'approve' === $action ) ? 'approve-comment_' : 'delete-comment_'; $nonce_action .= $comment_id; ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <?php switch ( $action ) { case 'spam': $caution_msg = __( 'You are about to mark the following comment as spam:' ); $button = _x( 'Mark as spam', 'comment' ); break; case 'trash': $caution_msg = __( 'You are about to move the following comment to the Trash:' ); $button = __( 'Move to Trash' ); break; case 'delete': $caution_msg = __( 'You are about to delete the following comment:' ); $button = __( 'Permanently delete comment' ); break; default: $caution_msg = __( 'You are about to approve the following comment:' ); $button = __( 'Approve comment' ); break; } if ( '0' !== $comment->comment_approved ) { // If not unapproved. $message = ''; switch ( $comment->comment_approved ) { case '1': $message = __( 'This comment is currently approved.' ); break; case 'spam': $message = __( 'This comment is currently marked as spam.' ); break; case 'trash': $message = __( 'This comment is currently in the Trash.' ); break; } if ( $message ) { wp_admin_notice( $message, array( 'type' => 'info', 'id' => 'message', ) ); } } wp_admin_notice( '<strong>' . __( 'Caution:' ) . '</strong> ' . $caution_msg, array( 'type' => 'warning', 'id' => 'message', ) ); ?> <table class="form-table comment-ays"> <tr> <th scope="row"><?php _e( 'Author' ); ?></th> <td><?php comment_author( $comment ); ?></td> </tr> <?php if ( get_comment_author_email( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'Email' ); ?></th> <td><?php comment_author_email( $comment ); ?></td> </tr> <?php } ?> <?php if ( get_comment_author_url( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'URL' ); ?></th> <td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td> </tr> <?php } ?> <tr> <th scope="row"><?php /* translators: Column name or table row header. */ _e( 'In response to' ); ?></th> <td> <?php $post_id = $comment->comment_post_ID; if ( current_user_can( 'edit_post', $post_id ) ) { $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>"; $post_link .= esc_html( get_the_title( $post_id ) ) . '</a>'; } else { $post_link = esc_html( get_the_title( $post_id ) ); } echo $post_link; if ( $comment->comment_parent ) { $parent = get_comment( $comment->comment_parent ); $parent_link = esc_url( get_comment_link( $parent ) ); $name = get_comment_author( $parent ); printf( /* translators: %s: Comment link. */ ' | ' . __( 'In reply to %s.' ), '<a href="' . $parent_link . '">' . $name . '</a>' ); } ?> </td> </tr> <tr> <th scope="row"><?php _e( 'Submitted on' ); ?></th> <td> <?php $submitted = sprintf( /* translators: 1: Comment date, 2: Comment time. */ __( '%1$s at %2$s' ), /* translators: Comment date format. See https://www.php.net/manual/datetime.format.php */ get_comment_date( __( 'Y/m/d' ), $comment ), /* translators: Comment time format. See https://www.php.net/manual/datetime.format.php */ get_comment_date( __( 'g:i a' ), $comment ) ); if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) { echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>'; } else { echo $submitted; } ?> </td> </tr> <tr> <th scope="row"><?php /* translators: Field name in comment form. */ _ex( 'Comment', 'noun' ); ?></th> <td class="comment-content"> <?php comment_text( $comment ); ?> <p class="edit-comment"> <a href="<?php echo esc_url( admin_url( "comment.php?action=editcomment&c={$comment->comment_ID}" ) ); ?>"><?php esc_html_e( 'Edit' ); ?></a> </p> </td> </tr> </table> <form action="comment.php" method="get" class="comment-ays-submit"> <p> <?php submit_button( $button, 'primary', 'submit', false ); ?> <a href="<?php echo esc_url( admin_url( 'edit-comments.php' ) ); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a> </p> <?php wp_nonce_field( $nonce_action ); ?> <input type="hidden" name="action" value="<?php echo esc_attr( $formaction ); ?>" /> <input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" /> <input type="hidden" name="noredir" value="1" /> </form> </div> <?php break; case 'deletecomment': case 'trashcomment': case 'untrashcomment': case 'spamcomment': case 'unspamcomment': case 'approvecomment': case 'unapprovecomment': $comment_id = absint( $_REQUEST['c'] ); if ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ), true ) ) { check_admin_referer( 'approve-comment_' . $comment_id ); } else { check_admin_referer( 'delete-comment_' . $comment_id ); } $noredir = isset( $_REQUEST['noredir'] ); $comment = get_comment( $comment_id ); if ( ! $comment ) { comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'edit-comments.php' ) ); } if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { comment_footer_die( __( 'Sorry, you are not allowed to edit comments on this post.' ) ); } if ( wp_get_referer() && ! $noredir && ! str_contains( wp_get_referer(), 'comment.php' ) ) { $redir = wp_get_referer(); } elseif ( wp_get_original_referer() && ! $noredir ) { $redir = wp_get_original_referer(); } elseif ( in_array( $action, array( 'approvecomment', 'unapprovecomment' ), true ) ) { $redir = admin_url( 'edit-comments.php?p=' . absint( $comment->comment_post_ID ) ); } else { $redir = admin_url( 'edit-comments.php' ); } $redir = remove_query_arg( array( 'spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids', 'approved', 'unapproved' ), $redir ); switch ( $action ) { case 'deletecomment': wp_delete_comment( $comment ); $redir = add_query_arg( array( 'deleted' => '1' ), $redir ); break; case 'trashcomment': wp_trash_comment( $comment ); $redir = add_query_arg( array( 'trashed' => '1', 'ids' => $comment_id, ), $redir ); break; case 'untrashcomment': wp_untrash_comment( $comment ); $redir = add_query_arg( array( 'untrashed' => '1' ), $redir ); break; case 'spamcomment': wp_spam_comment( $comment ); $redir = add_query_arg( array( 'spammed' => '1', 'ids' => $comment_id, ), $redir ); break; case 'unspamcomment': wp_unspam_comment( $comment ); $redir = add_query_arg( array( 'unspammed' => '1' ), $redir ); break; case 'approvecomment': wp_set_comment_status( $comment, 'approve' ); $redir = add_query_arg( array( 'approved' => 1 ), $redir ); break; case 'unapprovecomment': wp_set_comment_status( $comment, 'hold' ); $redir = add_query_arg( array( 'unapproved' => 1 ), $redir ); break; } wp_redirect( $redir ); die; case 'editedcomment': $comment_id = absint( $_POST['comment_ID'] ); $comment_post_id = absint( $_POST['comment_post_ID'] ); check_admin_referer( 'update-comment_' . $comment_id ); $updated = edit_comment(); if ( is_wp_error( $updated ) ) { wp_die( $updated->get_error_message() ); } $location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id; /** * Filters the URI the user is redirected to after editing a comment in the admin. * * @since 2.1.0 * * @param string $location The URI the user will be redirected to. * @param int $comment_id The ID of the comment being edited. */ $location = apply_filters( 'comment_edit_redirect', $location, $comment_id ); wp_redirect( $location ); exit; default: wp_die( __( 'Unknown action.' ) ); } // End switch. require_once ABSPATH . 'wp-admin/admin-footer.php'; PK (6wYޭ�=, , export.phpnu �[��� <?php /** * WordPress Export Administration Screen * * @package WordPress * @subpackage Administration */ /** Load WordPress Bootstrap */ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'export' ) ) { wp_die( __( 'Sorry, you are not allowed to export the content of this site.' ) ); } /** Load WordPress export API */ require_once ABSPATH . 'wp-admin/includes/export.php'; // Used in the HTML title tag. $title = __( 'Export' ); /** * Display JavaScript on the page. * * @since 3.5.0 */ function export_add_js() { ?> <script type="text/javascript"> jQuery( function($) { var form = $('#export-filters'), filters = form.find('.export-filters'); filters.hide(); form.find('input:radio').on( 'change', function() { filters.slideUp('fast'); switch ( $(this).val() ) { case 'attachment': $('#attachment-filters').slideDown(); break; case 'posts': $('#post-filters').slideDown(); break; case 'pages': $('#page-filters').slideDown(); break; } }); } ); </script> <?php } add_action( 'admin_head', 'export_add_js' ); get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.' ) . '</p>' . '<p>' . __( 'Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-export-screen/">Documentation on Export</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); // If the 'download' URL parameter is set, a WXR export file is baked and returned. if ( isset( $_GET['download'] ) ) { $args = array(); if ( ! isset( $_GET['content'] ) || 'all' === $_GET['content'] ) { $args['content'] = 'all'; } elseif ( 'posts' === $_GET['content'] ) { $args['content'] = 'post'; if ( $_GET['cat'] ) { $args['category'] = (int) $_GET['cat']; } if ( $_GET['post_author'] ) { $args['author'] = (int) $_GET['post_author']; } if ( $_GET['post_start_date'] || $_GET['post_end_date'] ) { $args['start_date'] = $_GET['post_start_date']; $args['end_date'] = $_GET['post_end_date']; } if ( $_GET['post_status'] ) { $args['status'] = $_GET['post_status']; } } elseif ( 'pages' === $_GET['content'] ) { $args['content'] = 'page'; if ( $_GET['page_author'] ) { $args['author'] = (int) $_GET['page_author']; } if ( $_GET['page_start_date'] || $_GET['page_end_date'] ) { $args['start_date'] = $_GET['page_start_date']; $args['end_date'] = $_GET['page_end_date']; } if ( $_GET['page_status'] ) { $args['status'] = $_GET['page_status']; } } elseif ( 'attachment' === $_GET['content'] ) { $args['content'] = 'attachment'; if ( $_GET['attachment_start_date'] || $_GET['attachment_end_date'] ) { $args['start_date'] = $_GET['attachment_start_date']; $args['end_date'] = $_GET['attachment_end_date']; } } else { $args['content'] = $_GET['content']; } /** * Filters the export args. * * @since 3.5.0 * * @param array $args The arguments to send to the exporter. */ $args = apply_filters( 'export_args', $args ); export_wp( $args ); die(); } require_once ABSPATH . 'wp-admin/admin-header.php'; /** * Creates the date options fields for exporting a given post type. * * @since 3.1.0 * * @global wpdb $wpdb WordPress database abstraction object. * @global WP_Locale $wp_locale WordPress date and time locale object. * * @param string $post_type The post type. Default 'post'. */ function export_date_options( $post_type = 'post' ) { global $wpdb, $wp_locale; $months = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month FROM $wpdb->posts WHERE post_type = %s AND post_status != 'auto-draft' ORDER BY post_date DESC", $post_type ) ); $month_count = count( $months ); if ( ! $month_count || ( 1 === $month_count && 0 === (int) $months[0]->month ) ) { return; } foreach ( $months as $date ) { if ( 0 === (int) $date->year ) { continue; } $month = zeroise( $date->month, 2 ); printf( '<option value="%1$s">%2$s</option>', esc_attr( $date->year . '-' . $month ), $wp_locale->get_month( $month ) . ' ' . $date->year ); } } ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <p><?php _e( 'When you click the button below WordPress will create an XML file for you to save to your computer.' ); ?></p> <p><?php _e( 'This format, which is called WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.' ); ?></p> <p><?php _e( 'Once you’ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.' ); ?></p> <h2><?php _e( 'Choose what to export' ); ?></h2> <form method="get" id="export-filters"> <fieldset> <legend class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Content to export' ); ?> </legend> <input type="hidden" name="download" value="true" /> <p><label><input type="radio" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e( 'All content' ); ?></label></p> <p class="description" id="all-content-desc"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus, and custom posts.' ); ?></p> <p><label><input type="radio" name="content" value="posts" /> <?php _ex( 'Posts', 'post type general name' ); ?></label></p> <ul id="post-filters" class="export-filters"> <li> <label><span class="label-responsive"><?php _e( 'Categories:' ); ?></span> <?php wp_dropdown_categories( array( 'show_option_all' => __( 'All' ) ) ); ?> </label> </li> <li> <label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span> <?php $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'post'" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'post_author', 'multi' => true, 'show_option_all' => __( 'All' ), 'show' => 'display_name_with_login', ) ); ?> </label> </li> <li> <fieldset> <legend class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Date range:' ) ?> </legend> <label for="post-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label> <select name="post_start_date" id="post-start-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options(); ?> </select> <label for="post-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label> <select name="post_end_date" id="post-end-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options(); ?> </select> </fieldset> </li> <li> <label for="post-status" class="label-responsive"><?php _e( 'Status:' ); ?></label> <select name="post_status" id="post-status"> <option value="0"><?php _e( 'All' ); ?></option> <?php $post_statuses = get_post_stati( array( 'internal' => false ), 'objects' ); foreach ( $post_statuses as $status ) : ?> <option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option> <?php endforeach; ?> </select> </li> </ul> <p><label><input type="radio" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p> <ul id="page-filters" class="export-filters"> <li> <label><span class="label-responsive"><?php _e( 'Authors:' ); ?></span> <?php $authors = $wpdb->get_col( "SELECT DISTINCT post_author FROM {$wpdb->posts} WHERE post_type = 'page'" ); wp_dropdown_users( array( 'include' => $authors, 'name' => 'page_author', 'multi' => true, 'show_option_all' => __( 'All' ), 'show' => 'display_name_with_login', ) ); ?> </label> </li> <li> <fieldset> <legend class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Date range:' ); ?> </legend> <label for="page-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label> <select name="page_start_date" id="page-start-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options( 'page' ); ?> </select> <label for="page-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label> <select name="page_end_date" id="page-end-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options( 'page' ); ?> </select> </fieldset> </li> <li> <label for="page-status" class="label-responsive"><?php _e( 'Status:' ); ?></label> <select name="page_status" id="page-status"> <option value="0"><?php _e( 'All' ); ?></option> <?php foreach ( $post_statuses as $status ) : ?> <option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option> <?php endforeach; ?> </select> </li> </ul> <?php foreach ( get_post_types( array( '_builtin' => false, 'can_export' => true, ), 'objects' ) as $post_type ) : ?> <p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p> <?php endforeach; ?> <p><label><input type="radio" name="content" value="attachment" /> <?php _e( 'Media' ); ?></label></p> <ul id="attachment-filters" class="export-filters"> <li> <fieldset> <legend class="screen-reader-text"> <?php /* translators: Hidden accessibility text. */ _e( 'Date range:' ); ?> </legend> <label for="attachment-start-date" class="label-responsive"><?php _e( 'Start date:' ); ?></label> <select name="attachment_start_date" id="attachment-start-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options( 'attachment' ); ?> </select> <label for="attachment-end-date" class="label-responsive"><?php _e( 'End date:' ); ?></label> <select name="attachment_end_date" id="attachment-end-date"> <option value="0"><?php _e( '— Select —' ); ?></option> <?php export_date_options( 'attachment' ); ?> </select> </fieldset> </li> </ul> </fieldset> <?php /** * Fires at the end of the export filters form. * * @since 3.5.0 */ do_action( 'export_filters' ); ?> <?php submit_button( __( 'Download Export File' ) ); ?> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> PK (6wY�#�U�r �r edit-form-advanced.phpnu �[��� <?php /** * Post advanced form for inclusion in the administration panels. * * @package WordPress * @subpackage Administration */ // Don't load directly. if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } /** * @global string $post_type Global post type. * @global WP_Post_Type $post_type_object Global post type object. * @global WP_Post $post Global post object. */ global $post_type, $post_type_object, $post; // Flag that we're not loading the block editor. $current_screen = get_current_screen(); $current_screen->is_block_editor( false ); if ( is_multisite() ) { add_action( 'admin_footer', '_admin_notice_post_locked' ); } else { $check_users = get_users( array( 'fields' => 'ID', 'number' => 2, ) ); if ( count( $check_users ) > 1 ) { add_action( 'admin_footer', '_admin_notice_post_locked' ); } unset( $check_users ); } wp_enqueue_script( 'post' ); $_wp_editor_expand = false; $_content_editor_dfw = false; if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() && ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) ) { /** * Filters whether to enable the 'expand' functionality in the post editor. * * @since 4.0.0 * @since 4.1.0 Added the `$post_type` parameter. * * @param bool $expand Whether to enable the 'expand' functionality. Default true. * @param string $post_type Post type. */ if ( apply_filters( 'wp_editor_expand', true, $post_type ) ) { wp_enqueue_script( 'editor-expand' ); $_content_editor_dfw = true; $_wp_editor_expand = ( 'on' === get_user_setting( 'editor_expand', 'on' ) ); } } if ( wp_is_mobile() ) { wp_enqueue_script( 'jquery-touch-punch' ); } /** * Post ID global * * @name $post_ID * @var int */ $post_ID = isset( $post_ID ) ? (int) $post_ID : 0; $user_ID = isset( $user_ID ) ? (int) $user_ID : 0; $action = isset( $action ) ? $action : ''; if ( (int) get_option( 'page_for_posts' ) === $post->ID && empty( $post->post_content ) ) { add_action( 'edit_form_after_title', '_wp_posts_page_notice' ); remove_post_type_support( $post_type, 'editor' ); } $thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ); if ( ! $thumbnail_support && 'attachment' === $post_type && $post->post_mime_type ) { if ( wp_attachment_is( 'audio', $post ) ) { $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' ); } elseif ( wp_attachment_is( 'video', $post ) ) { $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' ); } } if ( $thumbnail_support ) { add_thickbox(); wp_enqueue_media( array( 'post' => $post->ID ) ); } // Add the local autosave notice HTML. add_action( 'admin_footer', '_local_storage_notice' ); /* * @todo Document the $messages array(s). */ $permalink = get_permalink( $post->ID ); if ( ! $permalink ) { $permalink = ''; } $messages = array(); $preview_post_link_html = ''; $scheduled_post_link_html = ''; $view_post_link_html = ''; $preview_page_link_html = ''; $scheduled_page_link_html = ''; $view_page_link_html = ''; $preview_url = get_preview_post_link( $post ); $viewable = is_post_type_viewable( $post_type_object ); if ( $viewable ) { // Preview post link. $preview_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', esc_url( $preview_url ), __( 'Preview post' ) ); // Scheduled post preview link. $scheduled_post_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', esc_url( $permalink ), __( 'Preview post' ) ); // View post link. $view_post_link_html = sprintf( ' <a href="%1$s">%2$s</a>', esc_url( $permalink ), __( 'View post' ) ); // Preview page link. $preview_page_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', esc_url( $preview_url ), __( 'Preview page' ) ); // Scheduled page preview link. $scheduled_page_link_html = sprintf( ' <a target="_blank" href="%1$s">%2$s</a>', esc_url( $permalink ), __( 'Preview page' ) ); // View page link. $view_page_link_html = sprintf( ' <a href="%1$s">%2$s</a>', esc_url( $permalink ), __( 'View page' ) ); } $scheduled_date = sprintf( /* translators: Publish box date string. 1: Date, 2: Time. */ __( '%1$s at %2$s' ), /* translators: Publish box date format, see https://www.php.net/manual/datetime.format.php */ date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $post->post_date ) ), /* translators: Publish box time format, see https://www.php.net/manual/datetime.format.php */ date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $post->post_date ) ) ); $messages['post'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Post updated.' ) . $view_post_link_html, 2 => __( 'Custom field updated.' ), 3 => __( 'Custom field deleted.' ), 4 => __( 'Post updated.' ), /* translators: %s: Date and time of the revision. */ 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Post restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Post published.' ) . $view_post_link_html, 7 => __( 'Post saved.' ), 8 => __( 'Post submitted.' ) . $preview_post_link_html, /* translators: %s: Scheduled date for the post. */ 9 => sprintf( __( 'Post scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html, 10 => __( 'Post draft updated.' ) . $preview_post_link_html, ); $messages['page'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Page updated.' ) . $view_page_link_html, 2 => __( 'Custom field updated.' ), 3 => __( 'Custom field deleted.' ), 4 => __( 'Page updated.' ), /* translators: %s: Date and time of the revision. */ 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Page published.' ) . $view_page_link_html, 7 => __( 'Page saved.' ), 8 => __( 'Page submitted.' ) . $preview_page_link_html, /* translators: %s: Scheduled date for the page. */ 9 => sprintf( __( 'Page scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_page_link_html, 10 => __( 'Page draft updated.' ) . $preview_page_link_html, ); $messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now. /** * Filters the post updated messages. * * @since 3.0.0 * * @param array[] $messages Post updated messages. For defaults see `$messages` declarations above. */ $messages = apply_filters( 'post_updated_messages', $messages ); $message = false; if ( isset( $_GET['message'] ) ) { $_GET['message'] = absint( $_GET['message'] ); if ( isset( $messages[ $post_type ][ $_GET['message'] ] ) ) { $message = $messages[ $post_type ][ $_GET['message'] ]; } elseif ( ! isset( $messages[ $post_type ] ) && isset( $messages['post'][ $_GET['message'] ] ) ) { $message = $messages['post'][ $_GET['message'] ]; } } $notice = false; $form_extra = ''; if ( 'auto-draft' === $post->post_status ) { if ( 'edit' === $action ) { $post->post_title = ''; } $autosave = false; $form_extra .= "<input type='hidden' id='auto_draft' name='auto_draft' value='1' />"; } else { $autosave = wp_get_post_autosave( $post->ID ); } $form_action = 'editpost'; $nonce_action = 'update-post_' . $post->ID; $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr( $post->ID ) . "' />"; // Detect if there exists an autosave newer than the post and if that autosave is different than the post. if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { foreach ( _wp_post_revision_fields( $post ) as $autosave_field => $_autosave_field ) { if ( normalize_whitespace( $autosave->$autosave_field ) !== normalize_whitespace( $post->$autosave_field ) ) { $notice = sprintf( /* translators: %s: URL to view the autosave. */ __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>' ), get_edit_post_link( $autosave->ID ) ); break; } } // If this autosave isn't different from the current post, begone. if ( ! $notice ) { wp_delete_post_revision( $autosave->ID ); } unset( $autosave_field, $_autosave_field ); } $post_type_object = get_post_type_object( $post_type ); // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). require_once ABSPATH . 'wp-admin/includes/meta-boxes.php'; register_and_do_post_meta_boxes( $post ); add_screen_option( 'layout_columns', array( 'max' => 2, 'default' => 2, ) ); if ( 'post' === $post_type ) { $customize_display = '<p>' . __( 'The title field and the big Post Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to unhide more boxes (Excerpt, Send Trackbacks, Custom Fields, Discussion, Slug, Author) or to choose a 1- or 2-column layout for this screen.' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'customize-display', 'title' => __( 'Customizing This Display' ), 'content' => $customize_display, ) ); $title_and_editor = '<p>' . __( '<strong>Title</strong> — Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.' ) . '</p>'; $title_and_editor .= '<p>' . __( '<strong>Post editor</strong> — Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab.' ) . '</p>'; $title_and_editor .= '<p>' . __( 'Visual mode gives you an editor that is similar to a word processor. Click the Toolbar Toggle button to get a second row of controls.' ) . '</p>'; $title_and_editor .= '<p>' . __( 'The Text mode allows you to enter HTML along with your post text. Note that <p> and <br> tags are converted to line breaks when switching to the Text editor to make it less cluttered. When you type, a single line break can be used instead of typing <br>, and two line breaks instead of paragraph tags. The line breaks are converted back to tags automatically.' ) . '</p>'; $title_and_editor .= '<p>' . __( 'You can insert media files by clicking the button above the post editor and following the directions. You can align or edit images using the inline formatting toolbar available in Visual mode.' ) . '</p>'; $title_and_editor .= '<p>' . __( 'You can enable distraction-free writing mode using the icon to the right. This feature is not available for old browsers or devices with small screens, and requires that the full-height editor be enabled in Screen Options.' ) . '</p>'; $title_and_editor .= '<p>' . sprintf( /* translators: %s: Alt + F10 */ __( 'Keyboard users: When you are working in the visual editor, you can use %s to access the toolbar.' ), '<kbd>Alt + F10</kbd>' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'title-post-editor', 'title' => __( 'Title and Post Editor' ), 'content' => $title_and_editor, ) ); get_current_screen()->set_help_sidebar( '<p>' . sprintf( /* translators: %s: URL to Press This bookmarklet. */ __( 'You can also create posts with the <a href="%s">Press This bookmarklet</a>.' ), 'tools.php' ) . '</p>' . '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/write-posts-classic-editor/">Documentation on Writing and Editing Posts</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); } elseif ( 'page' === $post_type ) { $about_pages = '<p>' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.' ) . '</p>' . '<p>' . __( 'Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Text modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'about-pages', 'title' => __( 'About Pages' ), 'content' => $about_pages, ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/pages-add-new-screen/">Documentation on Adding New Pages</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/pages-screen/">Documentation on Editing Pages</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); } elseif ( 'attachment' === $post_type ) { get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'This screen allows you to edit fields for metadata in a file within the media library.' ) . '</p>' . '<p>' . __( 'For images only, you can click on Edit Image under the thumbnail to expand out an inline image editor with icons for cropping, rotating, or flipping the image as well as for undoing and redoing. The boxes on the right give you more options for scaling the image, for cropping it, and for cropping the thumbnail in a different way than you crop the original image. You can click on Help in those boxes to get more information.' ) . '</p>' . '<p>' . __( 'Note that you crop the image by clicking on it (the Crop icon is already selected) and dragging the cropping frame to select the desired part. Then click Save to retain the cropping.' ) . '</p>' . '<p>' . __( 'Remember to click Update to save metadata entered or changed.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/edit-media/">Documentation on Edit Media</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); } if ( 'post' === $post_type || 'page' === $post_type ) { $inserting_media = '<p>' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the “Create a new gallery” button.' ) . '</p>'; $inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. <a href="https://wordpress.org/documentation/article/embeds/">Learn more about embeds</a>.' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'inserting-media', 'title' => __( 'Inserting Media' ), 'content' => $inserting_media, ) ); } if ( 'post' === $post_type ) { $publish_box = '<p>' . __( 'Several boxes on this screen contain settings for how your content will be published, including:' ) . '</p>'; $publish_box .= '<ul><li>' . __( '<strong>Publish</strong> — You can set the terms of publishing your post in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a post or making it stay at the top of your blog indefinitely (sticky). The Password protected option allows you to set an arbitrary password for each post. The Private option hides the post from everyone except editors and administrators. Publish (immediately) allows you to set a future or past date and time, so you can schedule a post to be published in the future or backdate a post.' ) . '</li>'; if ( current_theme_supports( 'post-formats' ) && post_type_supports( 'post', 'post-formats' ) ) { $publish_box .= '<li>' . __( '<strong>Format</strong> — Post Formats designate how your theme will display a specific post. For example, you could have a <em>standard</em> blog post with a title and paragraphs, or a short <em>aside</em> that omits the title and contains a short text blurb. Your theme could enable all or some of 10 possible formats. <a href="https://developer.wordpress.org/advanced-administration/wordpress/post-formats/#supported-formats">Learn more about each post format</a>.' ) . '</li>'; } if ( current_theme_supports( 'post-thumbnails' ) && post_type_supports( 'post', 'thumbnail' ) ) { $publish_box .= '<li>' . sprintf( /* translators: %s: Featured image. */ __( '<strong>%s</strong> — This allows you to associate an image with your post without inserting it. This is usually useful only if your theme makes use of the image as a post thumbnail on the home page, a custom header, etc.' ), esc_html( $post_type_object->labels->featured_image ) ) . '</li>'; } $publish_box .= '</ul>'; get_current_screen()->add_help_tab( array( 'id' => 'publish-box', 'title' => __( 'Publish Settings' ), 'content' => $publish_box, ) ); $discussion_settings = '<p>' . __( '<strong>Send Trackbacks</strong> — Trackbacks are a way to notify legacy blog systems that you’ve linked to them. Enter the URL(s) you want to send trackbacks. If you link to other WordPress sites they’ll be notified automatically using pingbacks, and this field is unnecessary.' ) . '</p>'; $discussion_settings .= '<p>' . __( '<strong>Discussion</strong> — You can turn comments and pings on or off, and if there are comments on the post, you can see them here and moderate them.' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'discussion-settings', 'title' => __( 'Discussion Settings' ), 'content' => $discussion_settings, ) ); } elseif ( 'page' === $post_type ) { $page_attributes = '<p>' . __( '<strong>Parent</strong> — You can arrange your pages in hierarchies. For example, you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how many levels you can nest pages.' ) . '</p>' . '<p>' . __( '<strong>Template</strong> — Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them in this dropdown menu.' ) . '</p>' . '<p>' . __( '<strong>Order</strong> — Pages are usually ordered alphabetically, but you can choose your own order by entering a number (1 for first, etc.) in this field.' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'page-attributes', 'title' => __( 'Page Attributes' ), 'content' => $page_attributes, ) ); } require_once ABSPATH . 'wp-admin/admin-header.php'; ?> <div class="wrap"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title ); ?> </h1> <?php if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) { echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>'; } ?> <hr class="wp-header-end"> <?php if ( $notice ) : wp_admin_notice( '<p id="has-newer-autosave">' . $notice . '</p>', array( 'type' => 'warning', 'id' => 'notice', 'paragraph_wrap' => false, ) ); endif; if ( $message ) : wp_admin_notice( $message, array( 'type' => 'success', 'dismissible' => true, 'id' => 'message', 'additional_classes' => array( 'updated' ), ) ); endif; $connection_lost_message = sprintf( '<span class="spinner"></span> %1$s <span class="hide-if-no-sessionstorage">%2$s</span>', __( '<strong>Connection lost.</strong> Saving has been disabled until you are reconnected.' ), __( 'This post is being backed up in your browser, just in case.' ) ); wp_admin_notice( $connection_lost_message, array( 'id' => 'lost-connection-notice', 'additional_classes' => array( 'error', 'hidden' ), ) ); ?> <form name="post" action="post.php" method="post" id="post" <?php /** * Fires inside the post editor form tag. * * @since 3.0.0 * * @param WP_Post $post Post object. */ do_action( 'post_edit_form_tag', $post ); $referer = wp_get_referer(); ?> > <?php wp_nonce_field( $nonce_action ); ?> <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID; ?>" /> <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr( $form_action ); ?>" /> <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" /> <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" /> <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr( $post->post_status ); ?>" /> <input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" /> <?php if ( ! empty( $active_post_lock ) ) { ?> <input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" /> <?php } if ( 'draft' !== get_post_status( $post ) ) { wp_original_referer_field( true, 'previous' ); } echo $form_extra; wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> <?php /** * Fires at the beginning of the edit form. * * At this point, the required hidden fields and nonces have already been output. * * @since 3.7.0 * * @param WP_Post $post Post object. */ do_action( 'edit_form_top', $post ); ?> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-<?php echo ( 1 === get_current_screen()->get_columns() ) ? '1' : '2'; ?>"> <div id="post-body-content"> <?php if ( post_type_supports( $post_type, 'title' ) ) { ?> <div id="titlediv"> <div id="titlewrap"> <?php /** * Filters the title field placeholder text. * * @since 3.1.0 * * @param string $text Placeholder text. Default 'Add title'. * @param WP_Post $post Post object. */ $title_placeholder = apply_filters( 'enter_title_here', __( 'Add title' ), $post ); ?> <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label> <input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" /> </div> <?php /** * Fires before the permalink field in the edit form. * * @since 4.1.0 * * @param WP_Post $post Post object. */ do_action( 'edit_form_before_permalink', $post ); ?> <div class="inside"> <?php if ( $viewable ) : $sample_permalink_html = $post_type_object->public ? get_sample_permalink_html( $post->ID ) : ''; // As of 4.4, the Get Shortlink button is hidden by default. if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) { $shortlink = wp_get_shortlink( $post->ID, 'post' ); if ( ! empty( $shortlink ) && $shortlink !== $permalink && home_url( '?page_id=' . $post->ID ) !== $permalink ) { $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" />' . '<button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>'; } } if ( $post_type_object->public && ! ( 'pending' === get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) { $has_sample_permalink = $sample_permalink_html && 'auto-draft' !== $post->post_status; ?> <div id="edit-slug-box" class="hide-if-no-js"> <?php if ( $has_sample_permalink ) { echo $sample_permalink_html; } ?> </div> <?php } endif; ?> </div> <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> </div><!-- /titlediv --> <?php } /** * Fires after the title field. * * @since 3.5.0 * * @param WP_Post $post Post object. */ do_action( 'edit_form_after_title', $post ); if ( post_type_supports( $post_type, 'editor' ) ) { $_wp_editor_expand_class = ''; if ( $_wp_editor_expand ) { $_wp_editor_expand_class = ' wp-editor-expand'; } ?> <div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>"> <?php wp_editor( $post->post_content, 'content', array( '_content_editor_dfw' => $_content_editor_dfw, 'drag_drop_upload' => true, 'tabfocus_elements' => 'content-html,save-post', 'editor_height' => 300, 'tinymce' => array( 'resize' => false, 'wp_autoresize_on' => $_wp_editor_expand, 'add_unload_trigger' => false, 'wp_keep_scroll_position' => ! $is_IE, ), ) ); ?> <table id="post-status-info"><tbody><tr> <td id="wp-word-count" class="hide-if-no-js"> <?php printf( /* translators: %s: Number of words. */ __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?> </td> <td class="autosave-info"> <span class="autosave-message"> </span> <?php if ( 'auto-draft' !== $post->post_status ) { echo '<span id="last-edit">'; $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) ); if ( $last_user ) { printf( /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); } else { printf( /* translators: 1: Post edited date, 2: Post edited time. */ __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); } echo '</span>'; } ?> </td> <td id="content-resize-handle" class="hide-if-no-js"><br /></td> </tr></tbody></table> </div> <?php } /** * Fires after the content editor. * * @since 3.5.0 * * @param WP_Post $post Post object. */ do_action( 'edit_form_after_editor', $post ); ?> </div><!-- /post-body-content --> <div id="postbox-container-1" class="postbox-container"> <?php if ( 'page' === $post_type ) { /** * Fires before meta boxes with 'side' context are output for the 'page' post type. * * The submitpage box is a meta box with 'side' context, so this hook fires just before it is output. * * @since 2.5.0 * * @param WP_Post $post Post object. */ do_action( 'submitpage_box', $post ); } else { /** * Fires before meta boxes with 'side' context are output for all post types other than 'page'. * * The submitpost box is a meta box with 'side' context, so this hook fires just before it is output. * * @since 2.5.0 * * @param WP_Post $post Post object. */ do_action( 'submitpost_box', $post ); } do_meta_boxes( $post_type, 'side', $post ); ?> </div> <div id="postbox-container-2" class="postbox-container"> <?php do_meta_boxes( null, 'normal', $post ); if ( 'page' === $post_type ) { /** * Fires after 'normal' context meta boxes have been output for the 'page' post type. * * @since 1.5.0 * * @param WP_Post $post Post object. */ do_action( 'edit_page_form', $post ); } else { /** * Fires after 'normal' context meta boxes have been output for all post types other than 'page'. * * @since 1.5.0 * * @param WP_Post $post Post object. */ do_action( 'edit_form_advanced', $post ); } do_meta_boxes( null, 'advanced', $post ); ?> </div> <?php /** * Fires after all meta box sections have been output, before the closing #post-body div. * * @since 2.1.0 * * @param WP_Post $post Post object. */ do_action( 'dbx_post_sidebar', $post ); ?> </div><!-- /post-body --> <br class="clear" /> </div><!-- /poststuff --> </form> </div> <?php if ( post_type_supports( $post_type, 'comments' ) ) { wp_comment_reply(); } ?> <?php if ( ! wp_is_mobile() && post_type_supports( $post_type, 'title' ) && '' === $post->post_title ) : ?> <script type="text/javascript"> try{document.post.title.focus();}catch(e){} </script> <?php endif; ?> PK (6wY��s�� � load-scripts.phpnu �[��� <?php /* * Disable error reporting. * * Set this to error_reporting( -1 ) for debugging. */ error_reporting( 0 ); // Set ABSPATH for execution. if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __DIR__ ) . '/' ); } define( 'WPINC', 'wp-includes' ); $protocol = $_SERVER['SERVER_PROTOCOL']; if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { $protocol = 'HTTP/1.0'; } $load = $_GET['load']; if ( is_array( $load ) ) { ksort( $load ); $load = implode( '', $load ); } $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load ); $load = array_unique( explode( ',', $load ) ); if ( empty( $load ) ) { header( "$protocol 400 Bad Request" ); exit; } require ABSPATH . 'wp-admin/includes/noop.php'; require ABSPATH . WPINC . '/script-loader.php'; require ABSPATH . WPINC . '/version.php'; $expires_offset = 31536000; // 1 year. $out = ''; $wp_scripts = new WP_Scripts(); wp_default_scripts( $wp_scripts ); wp_default_packages_vendor( $wp_scripts ); wp_default_packages_scripts( $wp_scripts ); $etag = "WP:{$wp_version};"; foreach ( $load as $handle ) { if ( ! array_key_exists( $handle, $wp_scripts->registered ) ) { continue; } $ver = $wp_scripts->registered[ $handle ]->ver ? $wp_scripts->registered[ $handle ]->ver : $wp_version; $etag .= "{$handle}:{$ver};"; } /* * This is not intended to be cryptographically secure, just a fast way to get * a fixed length string based on the script versions. As this file does not * load the full WordPress environment, it is not possible to use the salted * wp_hash() function. */ $etag = 'W/"' . md5( $etag ) . '"'; if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) { header( "$protocol 304 Not Modified" ); exit; } foreach ( $load as $handle ) { if ( ! array_key_exists( $handle, $wp_scripts->registered ) ) { continue; } $path = ABSPATH . $wp_scripts->registered[ $handle ]->src; $out .= get_file( $path ) . "\n"; } header( "Etag: $etag" ); header( 'Content-Type: application/javascript; charset=UTF-8' ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); header( "Cache-Control: public, max-age=$expires_offset" ); echo $out; exit; PK (6wY��翌B �B about.phpnu �[��� <?php /** * About This Version administration panel. * * @package WordPress * @subpackage Administration */ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; // Used in the HTML title tag. /* translators: Page title of the About WordPress page in the admin. */ $title = _x( 'About', 'page title' ); 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 printf( /* translators: %s: Version number. */ __( 'WordPress %s' ), $display_version ); ?> </h1> </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 nav-tab-active" aria-current="page"><?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"><?php _e( 'Privacy' ); ?></a> <a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a> </nav> <div class="about__section changelog has-subtle-background-color"> <div class="column"> <h2><?php _e( 'Maintenance and Security Releases' ); ?></h2> <p> <?php printf( /* translators: 1: WordPress version number, 2: Plural number of bugs. */ _n( '<strong>Version %1$s</strong> addressed %2$s bug.', '<strong>Version %1$s</strong> addressed %2$s bugs.', 26 ), '6.6.2', '26' ); ?> <?php printf( /* translators: %s: HelpHub URL. */ __( 'For more information, see <a href="%s">the release notes</a>.' ), sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ), sanitize_title( '6.6.2' ) ) ); ?> </p> <p> <?php printf( /* translators: 1: WordPress version number, 2: Plural number of bugs. */ _n( '<strong>Version %1$s</strong> addressed %2$s bug.', '<strong>Version %1$s</strong> addressed %2$s bugs.', 16 ), '6.6.1', '16' ); ?> <?php printf( /* translators: %s: HelpHub URL. */ __( 'For more information, see <a href="%s">the release notes</a>.' ), sprintf( /* translators: %s: WordPress version. */ esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ), sanitize_title( '6.6.1' ) ) ); ?> </p> </div> </div> <div class="about__section"> <div class="column"> <h2> <?php printf( /* translators: %s: Version number. */ __( 'Welcome to WordPress %s' ), $display_version ); ?> </h2> <p class="is-subheading"> <?php _e( 'Create and deploy beautiful and coherent design elements across your sites with WordPress 6.6. A new rollback option for auto-updating plugins gives you control, flexibility, and peace of mind.' ); ?> </p> </div> </div> <div class="about__section has-2-columns"> <div class="column is-vertically-aligned-center"> <h3><?php _e( 'Color palettes & font sets' ); ?></h3> <p><strong><?php _e( 'Add more design options to any block theme.' ); ?></strong> <?php _e( 'Block theme authors can create unlimited individual color or font sets to offer more specific design options within the same theme. These sets provide more contained design possibilities, allowing for customization without changing the site’s broader styling, beyond color or typography settings.' ); ?></p> </div> <div class="column is-vertically-aligned-center"> <div class="about__image"> <img src="https://s.w.org/images/core/6.6/color-palettes.webp" alt="" height="436" width="436" /> </div> </div> </div> <div class="about__section has-2-columns"> <div class="column is-vertically-aligned-center"> <div class="about__image"> <img src="https://s.w.org/images/core/6.6/page-previews.webp" alt="" height="436" width="436" /> </div> </div> <div class="column is-vertically-aligned-center"> <h3><?php _e( 'Quick previews for pages' ); ?></h3> <p><strong><?php _e( 'Simplify your workflow with a new layout built for pages.' ); ?></strong> <?php _e( 'See all of your pages and a preview of any selected page before you edit via a new side-by-side layout in the Site Editor.' ); ?></p> </div> </div> <div class="about__section has-2-columns"> <div class="column is-vertically-aligned-center"> <h3><?php _e( 'Rollbacks for plugin auto-updates' ); ?></h3> <p><strong><?php _e( 'Auto-update your plugins with peace of mind.' ); ?></strong> <?php _e( 'Enjoy the ease of plugin auto-updates with the safety of rollbacks if anything goes wrong, improving your site’s security while minimizing potential downtime.' ); ?></p> </div> <div class="column is-vertically-aligned-center"> <div class="about__image"> <img src="https://s.w.org/images/core/6.6/feature-rollbacks.webp" alt="" height="436" width="436" /> </div> </div> </div> <div class="about__section has-2-columns"> <div class="column is-vertically-aligned-center"> <div class="about__image"> <img src="https://s.w.org/images/core/6.6/overrides.webp" alt="" height="436" width="436" /> </div> </div> <div class="column is-vertically-aligned-center"> <h3><?php _e( 'Overrides' ); ?></h3> <p><strong><?php _e( 'Add the ability to customize content in synced patterns.' ); ?></strong> <?php _e( 'Allow specific pieces of content to be customized in each instance of a synced pattern while keeping a consistent style for all instances, simplifying future updates. Currently, you can set overrides for Heading, Paragraph, Button, and Image blocks.' ); ?></p> </div> </div> <hr class="is-invisible is-large" /> <div class="about__section has-2-columns"> <div class="column"> <div class="about__image"> <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> <rect width="48" height="48" rx="4"/> <path d="M28.4287 20.6507C28.8387 20.8874 28.9791 21.4116 28.7424 21.8215L24.7424 28.7498C24.5057 29.1597 23.9815 29.3002 23.5715 29.0635C23.1616 28.8268 23.0211 28.3026 23.2578 27.8926L27.2578 20.9644C27.4945 20.5544 28.0187 20.414 28.4287 20.6507Z" fill="#1e1e1e"/> <path d="M18.6433 23.579C18.2333 23.3423 17.7091 23.4828 17.4724 23.8927C17.2357 24.3027 17.3761 24.8269 17.7861 25.0636L18.281 25.3493C18.691 25.586 19.2152 25.4456 19.4519 25.0356C19.6886 24.6256 19.5481 24.1014 19.1381 23.8647L18.6433 23.579Z" fill="#1e1e1e"/> <path d="M20.0358 20.6508C20.4458 20.4141 20.97 20.5546 21.2067 20.9645L21.4924 21.4594C21.7291 21.8694 21.5887 22.3936 21.1787 22.6303C20.7687 22.867 20.2445 22.7265 20.0078 22.3166L19.7221 21.8217C19.4854 21.4117 19.6259 20.8875 20.0358 20.6508Z" fill="#1e1e1e"/> <path d="M24.8571 20C24.8571 19.5266 24.4734 19.1429 24 19.1429C23.5266 19.1429 23.1429 19.5266 23.1429 20V20.5714C23.1429 21.0448 23.5266 21.4286 24 21.4286C24.4734 21.4286 24.8571 21.0448 24.8571 20.5714V20Z" fill="#1e1e1e"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M14 26C14 20.4772 18.4772 16 24 16C29.5228 16 34 20.4772 34 26C34 28.0846 33.3612 30.0225 32.2686 31.6256L32.0135 32H15.9865L15.7314 31.6256C14.6388 30.0225 14 28.0846 14 26ZM24 17.7143C19.4239 17.7143 15.7143 21.4239 15.7143 26C15.7143 27.5698 16.1501 29.0357 16.9072 30.2857H31.0928C31.8499 29.0357 32.2857 27.5698 32.2857 26C32.2857 21.4239 28.5761 17.7143 24 17.7143Z" fill="#1e1e1e"/> </svg> </div> <h3><?php _e( 'Performance updates' ); ?></h3> <p> <?php printf( /* translators: %1$s: code-formatted "WP_Theme_JSON", %2$s: code-formatted "data-wp-on-async", %%: escaped percent sign, leave as %%. */ __( 'WordPress 6.6 includes important updates like removing redundant %1$s calls, disabling autoload for large options, eliminating unnecessary polyfill dependencies, lazy loading post embeds, introducing the %2$s directive, and a 33%% reduction in template loading time in the editor.' ), '<code>WP_Theme_JSON</code>', '<code>data-wp-on-async</code>' ); ?> </p> </div> <div class="column"> <div class="about__image"> <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> <rect width="48" height="48" rx="4"/> <path d="M24 18.285C23.55 18.285 23.1637 18.1237 22.8412 17.8012C22.5187 17.4788 22.3575 17.0925 22.3575 16.6425C22.3575 16.1925 22.5187 15.8062 22.8412 15.4837C23.1637 15.1612 23.55 15 24 15C24.45 15 24.8362 15.1612 25.1587 15.4837C25.4812 15.8062 25.6425 16.1925 25.6425 16.6425C25.6425 17.0925 25.4812 17.4788 25.1587 17.8012C24.8362 18.1237 24.45 18.285 24 18.285ZM21.5925 33V21.0075C20.5725 20.9325 19.5862 20.8275 18.6337 20.6925C17.6812 20.5575 16.77 20.385 15.9 20.175L16.2375 18.825C17.5125 19.125 18.78 19.3387 20.04 19.4662C21.3 19.5938 22.62 19.6575 24 19.6575C25.38 19.6575 26.7 19.5938 27.96 19.4662C29.22 19.3387 30.4875 19.125 31.7625 18.825L32.1 20.175C31.23 20.385 30.3187 20.5575 29.3662 20.6925C28.4137 20.8275 27.4275 20.9325 26.4075 21.0075V33H25.0575V27.15H22.9425V33H21.5925Z" fill="#1e1e1e"/> </svg> </div> <h3><?php _e( 'Accessibility improvements' ); ?></h3> <p><?php _e( '55+ accessibility fixes and enhancements focus on foundational aspects of the WordPress experience, particularly the data views component powering the new site editing experience and areas like the Inserter that provide a key way of interacting with blocks and patterns.' ); ?></p> </div> </div> <hr class="is-invisible is-large" style="margin-bottom:calc(2 * var(--gap));" /> <div class="about__section has-2-columns is-wider-left is-feature" style="background-color:var(--background);border-radius:var(--border-radius);"> <h3 class="is-section-header"><?php _e( 'And much more' ); ?></h3> <div class="column"> <p><?php _e( 'For a comprehensive overview of all the new features and enhancements in WordPress 6.6, please visit the feature-showcase website.' ); ?></p> </div> <div class="column aligncenter"> <div class="about__image"> <a href="<?php echo esc_url( __( 'https://wordpress.org/download/releases/6-6/' ) ); ?>" class="button button-primary button-hero"><?php _e( 'See everything new' ); ?></a> </div> </div> </div> <hr class="is-large" style="margin-top:calc(2 * var(--gap));" /> <div class="about__section has-3-columns"> <div class="column about__image is-vertically-aligned-top"> <img src="<?php echo esc_url( admin_url( 'images/about-release-badge.svg?ver=6.6' ) ); ?>" alt="" height="280" width="280" /> </div> <div class="column is-vertically-aligned-center" style="grid-column-end:span 2"> <h3> <?php printf( /* translators: %s: Version number. */ __( 'Learn more about WordPress %s' ), $display_version ); ?> </h3> <p> <?php printf( /* translators: 1: Learn WordPress link, 2: Workshops link. */ __( '<a href="%1$s">Learn WordPress</a> is a free resource for new and experienced WordPress users. Learn is stocked with how-to videos on using various features in WordPress, <a href="%2$s">interactive workshops</a> for exploring topics in-depth, and lesson plans for diving deep into specific areas of WordPress.' ), 'https://learn.wordpress.org/', 'https://learn.wordpress.org/online-workshops/' ); ?> </p> </div> </div> <div class="about__section has-2-columns"> <div class="column"> <div class="about__image"> <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> <rect width="48" height="48" rx="4"/> <path d="M23 34v-4h-5l-2.293-2.293a1 1 0 0 1 0-1.414L18 24h5v-2h-7v-6h7v-2h2v2h5l2.293 2.293a1 1 0 0 1 0 1.414L30 22h-5v2h7v6h-7v4h-2Zm-5-14h11.175l.646-.646a.5.5 0 0 0 0-.708L29.175 18H18v2Zm.825 8H30v-2H18.825l-.646.646a.5.5 0 0 0 0 .708l.646.646Z" fill="#1e1e1e"/> </svg> </div> <p style="margin-top:calc(var(--gap) / 2);"> <?php printf( /* translators: 1: WordPress Field Guide link, 2: WordPress version number. */ __( 'Explore the <a href="%1$s">WordPress %2$s Field Guide</a>. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ), esc_url( __( 'https://make.wordpress.org/core/wordpress-6-6-field-guide/' ) ), '6.6' ); ?> </p> </div> <div class="column"> <div class="about__image"> <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"> <rect width="48" height="48" rx="4"/> <path d="M28 19.75h-8v1.5h8v-1.5ZM20 23h8v1.5h-8V23ZM26 26.25h-6v1.5h6v-1.5Z" fill="#151515"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M29 16H19a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V18a2 2 0 0 0-2-2Zm-10 1.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H19a.5.5 0 0 1-.5-.5V18a.5.5 0 0 1 .5-.5Z" fill="#1e1e1e"/> </svg> </div> <p style="margin-top:calc(var(--gap) / 2);"> <?php printf( /* translators: 1: WordPress Release Notes link, 2: WordPress version number. */ __( '<a href="%1$s">Read the WordPress %2$s Release Notes</a> for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.' ), sprintf( /* translators: %s: WordPress version number. */ esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ), '6-6' ), '6.6' ); ?> </p> </div> </div> <hr class="is-large" /> <div class="return-to-dashboard"> <?php if ( isset( $_GET['updated'] ) && current_user_can( 'update_core' ) ) { printf( '<a href="%1$s">%2$s</a> | ', esc_url( self_admin_url( 'update-core.php' ) ), is_multisite() ? __( 'Go to Updates' ) : __( 'Go to Dashboard → Updates' ) ); } printf( '<a href="%1$s">%2$s</a>', esc_url( self_admin_url() ), is_blog_admin() ? __( 'Go to Dashboard → Home' ) : __( 'Go to Dashboard' ) ); ?> </div> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> <?php // These are strings we may use to describe maintenance/security releases, where we aim for no new strings. return; __( 'Maintenance Release' ); __( 'Maintenance Releases' ); __( 'Security Release' ); __( 'Security Releases' ); __( 'Maintenance and Security Release' ); __( 'Maintenance and Security Releases' ); /* translators: %s: WordPress version number. */ __( '<strong>Version %s</strong> addressed one security issue.' ); /* translators: %s: WordPress version number. */ __( '<strong>Version %s</strong> addressed some security issues.' ); /* translators: 1: WordPress version number, 2: Plural number of bugs. */ _n_noop( '<strong>Version %1$s</strong> addressed %2$s bug.', '<strong>Version %1$s</strong> addressed %2$s bugs.' ); /* translators: 1: WordPress version number, 2: Plural number of bugs. Singular security issue. */ _n_noop( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.', '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.' ); /* translators: 1: WordPress version number, 2: Plural number of bugs. More than one security issue. */ _n_noop( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.', '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.' ); /* translators: %s: Documentation URL. */ __( 'For more information, see <a href="%s">the release notes</a>.' ); /* translators: 1: WordPress version number, 2: Link to update WordPress */ __( 'Important! Your version of WordPress (%1$s) is no longer supported, you will not receive any security updates for your website. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' ); /* translators: 1: WordPress version number, 2: Link to update WordPress */ __( 'Important! Your version of WordPress (%1$s) will stop receiving security updates in the near future. To keep your site secure, please <a href="%2$s">update to the latest version of WordPress</a>.' ); /* translators: %s: The major version of WordPress for this branch. */ __( 'This is the final release of WordPress %s' ); /* translators: The localized WordPress download URL. */ __( 'https://wordpress.org/download/' ); PK (6wYqP{$3 $3 update.phpnu �[��� <?php /** * Update/Install Plugin/Theme administration panel. * * @package WordPress * @subpackage Administration */ if ( ! defined( 'IFRAME_REQUEST' ) && isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'update-selected', 'activate-plugin', 'update-selected-themes' ), true ) ) { define( 'IFRAME_REQUEST', true ); } /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; wp_enqueue_script( 'wp-a11y' ); if ( isset( $_GET['action'] ) ) { $plugin = isset( $_REQUEST['plugin'] ) ? trim( $_REQUEST['plugin'] ) : ''; $theme = isset( $_REQUEST['theme'] ) ? urldecode( $_REQUEST['theme'] ) : ''; $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : ''; if ( 'update-selected' === $action ) { if ( ! current_user_can( 'update_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) ); } check_admin_referer( 'bulk-update-plugins' ); if ( isset( $_GET['plugins'] ) ) { $plugins = explode( ',', stripslashes( $_GET['plugins'] ) ); } elseif ( isset( $_POST['checked'] ) ) { $plugins = (array) $_POST['checked']; } else { $plugins = array(); } $plugins = array_map( 'urldecode', $plugins ); $url = 'update.php?action=update-selected&plugins=' . urlencode( implode( ',', $plugins ) ); $nonce = 'bulk-update-plugins'; wp_enqueue_script( 'updates' ); iframe_header(); $upgrader = new Plugin_Upgrader( new Bulk_Plugin_Upgrader_Skin( compact( 'nonce', 'url' ) ) ); $upgrader->bulk_upgrade( $plugins ); iframe_footer(); } elseif ( 'upgrade-plugin' === $action ) { if ( ! current_user_can( 'update_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) ); } check_admin_referer( 'upgrade-plugin_' . $plugin ); // Used in the HTML title tag. $title = __( 'Update Plugin' ); $parent_file = 'plugins.php'; $submenu_file = 'plugins.php'; wp_enqueue_script( 'updates' ); require_once ABSPATH . 'wp-admin/admin-header.php'; $nonce = 'upgrade-plugin_' . $plugin; $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin ); $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) ) ); $upgrader->upgrade( $plugin ); require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'activate-plugin' === $action ) { if ( ! current_user_can( 'update_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) ); } check_admin_referer( 'activate-plugin_' . $plugin ); if ( ! isset( $_GET['failure'] ) && ! isset( $_GET['success'] ) ) { wp_redirect( admin_url( 'update.php?action=activate-plugin&failure=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) ); activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true ); wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) ); die(); } iframe_header( __( 'Plugin Reactivation' ), true ); if ( isset( $_GET['success'] ) ) { echo '<p>' . __( 'Plugin reactivated successfully.' ) . '</p>'; } if ( isset( $_GET['failure'] ) ) { echo '<p>' . __( 'Plugin failed to reactivate due to a fatal error.' ) . '</p>'; error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); ini_set( 'display_errors', true ); // Ensure that fatal errors are displayed. wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); include WP_PLUGIN_DIR . '/' . $plugin; } iframe_footer(); } elseif ( 'install-plugin' === $action ) { if ( ! current_user_can( 'install_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); } require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // For plugins_api(). check_admin_referer( 'install-plugin_' . $plugin ); $api = plugins_api( 'plugin_information', array( 'slug' => $plugin, 'fields' => array( 'sections' => false, ), ) ); if ( is_wp_error( $api ) ) { wp_die( $api ); } // Used in the HTML title tag. $title = __( 'Plugin Installation' ); $parent_file = 'plugins.php'; $submenu_file = 'plugin-install.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: Plugin name and version. */ $title = sprintf( __( 'Installing Plugin: %s' ), $api->name . ' ' . $api->version ); $nonce = 'install-plugin_' . $plugin; $url = 'update.php?action=install-plugin&plugin=' . urlencode( $plugin ); if ( isset( $_GET['from'] ) ) { $url .= '&from=' . urlencode( stripslashes( $_GET['from'] ) ); } $type = 'web'; // Install plugin type, From Web or an Upload. $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) ); $upgrader->install( $api->download_link ); require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'upload-plugin' === $action ) { if ( ! current_user_can( 'upload_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); } check_admin_referer( 'plugin-upload' ); if ( isset( $_FILES['pluginzip']['name'] ) && ! str_ends_with( strtolower( $_FILES['pluginzip']['name'] ), '.zip' ) ) { wp_die( __( 'Only .zip archives may be uploaded.' ) ); } $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' ); // Used in the HTML title tag. $title = __( 'Upload Plugin' ); $parent_file = 'plugins.php'; $submenu_file = 'plugin-install.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: File name. */ $title = sprintf( __( 'Installing plugin from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) ); $nonce = 'plugin-upload'; $url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-plugin' ); $type = 'upload'; // Install plugin type, From Web or an Upload. $overwrite = isset( $_GET['overwrite'] ) ? sanitize_text_field( $_GET['overwrite'] ) : ''; $overwrite = in_array( $overwrite, array( 'update-plugin', 'downgrade-plugin' ), true ) ? $overwrite : ''; $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact( 'type', 'title', 'nonce', 'url', 'overwrite' ) ) ); $result = $upgrader->install( $file_upload->package, array( 'overwrite_package' => $overwrite ) ); if ( $result || is_wp_error( $result ) ) { $file_upload->cleanup(); } require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'upload-plugin-cancel-overwrite' === $action ) { if ( ! current_user_can( 'upload_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to install plugins on this site.' ) ); } check_admin_referer( 'plugin-upload-cancel-overwrite' ); // Make sure the attachment still exists, or File_Upload_Upgrader will call wp_die() // that shows a generic "Please select a file" error. if ( ! empty( $_GET['package'] ) ) { $attachment_id = (int) $_GET['package']; if ( get_post( $attachment_id ) ) { $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' ); $file_upload->cleanup(); } } wp_redirect( self_admin_url( 'plugin-install.php' ) ); exit; } elseif ( 'upgrade-theme' === $action ) { if ( ! current_user_can( 'update_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) ); } check_admin_referer( 'upgrade-theme_' . $theme ); wp_enqueue_script( 'updates' ); // Used in the HTML title tag. $title = __( 'Update Theme' ); $parent_file = 'themes.php'; $submenu_file = 'themes.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; $nonce = 'upgrade-theme_' . $theme; $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme ); $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) ); $upgrader->upgrade( $theme ); require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'update-selected-themes' === $action ) { if ( ! current_user_can( 'update_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) ); } check_admin_referer( 'bulk-update-themes' ); if ( isset( $_GET['themes'] ) ) { $themes = explode( ',', stripslashes( $_GET['themes'] ) ); } elseif ( isset( $_POST['checked'] ) ) { $themes = (array) $_POST['checked']; } else { $themes = array(); } $themes = array_map( 'urldecode', $themes ); $url = 'update.php?action=update-selected-themes&themes=' . urlencode( implode( ',', $themes ) ); $nonce = 'bulk-update-themes'; wp_enqueue_script( 'updates' ); iframe_header(); $upgrader = new Theme_Upgrader( new Bulk_Theme_Upgrader_Skin( compact( 'nonce', 'url' ) ) ); $upgrader->bulk_upgrade( $themes ); iframe_footer(); } elseif ( 'install-theme' === $action ) { if ( ! current_user_can( 'install_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); } require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // For themes_api(). check_admin_referer( 'install-theme_' . $theme ); $api = themes_api( 'theme_information', array( 'slug' => $theme, 'fields' => array( 'sections' => false, 'tags' => false, ), ) ); // Save on a bit of bandwidth. if ( is_wp_error( $api ) ) { wp_die( $api ); } // Used in the HTML title tag. $title = __( 'Install Themes' ); $parent_file = 'themes.php'; $submenu_file = 'themes.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: Theme name and version. */ $title = sprintf( __( 'Installing Theme: %s' ), $api->name . ' ' . $api->version ); $nonce = 'install-theme_' . $theme; $url = 'update.php?action=install-theme&theme=' . urlencode( $theme ); $type = 'web'; // Install theme type, From Web or an Upload. $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'title', 'url', 'nonce', 'plugin', 'api' ) ) ); $upgrader->install( $api->download_link ); require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'upload-theme' === $action ) { if ( ! current_user_can( 'upload_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); } check_admin_referer( 'theme-upload' ); if ( isset( $_FILES['themezip']['name'] ) && ! str_ends_with( strtolower( $_FILES['themezip']['name'] ), '.zip' ) ) { wp_die( __( 'Only .zip archives may be uploaded.' ) ); } $file_upload = new File_Upload_Upgrader( 'themezip', 'package' ); // Used in the HTML title tag. $title = __( 'Upload Theme' ); $parent_file = 'themes.php'; $submenu_file = 'theme-install.php'; require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: File name. */ $title = sprintf( __( 'Installing theme from uploaded file: %s' ), esc_html( basename( $file_upload->filename ) ) ); $nonce = 'theme-upload'; $url = add_query_arg( array( 'package' => $file_upload->id ), 'update.php?action=upload-theme' ); $type = 'upload'; // Install theme type, From Web or an Upload. $overwrite = isset( $_GET['overwrite'] ) ? sanitize_text_field( $_GET['overwrite'] ) : ''; $overwrite = in_array( $overwrite, array( 'update-theme', 'downgrade-theme' ), true ) ? $overwrite : ''; $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact( 'type', 'title', 'nonce', 'url', 'overwrite' ) ) ); $result = $upgrader->install( $file_upload->package, array( 'overwrite_package' => $overwrite ) ); if ( $result || is_wp_error( $result ) ) { $file_upload->cleanup(); } require_once ABSPATH . 'wp-admin/admin-footer.php'; } elseif ( 'upload-theme-cancel-overwrite' === $action ) { if ( ! current_user_can( 'upload_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); } check_admin_referer( 'theme-upload-cancel-overwrite' ); // Make sure the attachment still exists, or File_Upload_Upgrader will call wp_die() // that shows a generic "Please select a file" error. if ( ! empty( $_GET['package'] ) ) { $attachment_id = (int) $_GET['package']; if ( get_post( $attachment_id ) ) { $file_upload = new File_Upload_Upgrader( 'themezip', 'package' ); $file_upload->cleanup(); } } wp_redirect( self_admin_url( 'theme-install.php' ) ); exit; } else { /** * Fires when a custom plugin or theme update request is received. * * The dynamic portion of the hook name, `$action`, refers to the action * provided in the request for wp-admin/update.php. Can be used to * provide custom update functionality for themes and plugins. * * @since 2.8.0 */ do_action( "update-custom_{$action}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } } PK (6wY�K�� � network.phpnu �[��� <?php /** * Network installation administration panel. * * A multi-step process allowing the user to enable a network of WordPress sites. * * @since 3.0.0 * * @package WordPress * @subpackage Administration */ define( 'WP_INSTALLING_NETWORK', true ); /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'setup_network' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } if ( is_multisite() ) { if ( ! is_network_admin() ) { wp_redirect( network_admin_url( 'setup.php' ) ); exit; } if ( ! defined( 'MULTISITE' ) ) { wp_die( __( 'The Network creation panel is not for WordPress MU networks.' ) ); } } require_once __DIR__ . '/includes/network.php'; // We need to create references to ms global tables to enable Network. foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) { $wpdb->$table = $prefixed_table; } if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) ) { wp_die( printf( /* translators: 1: WP_ALLOW_MULTISITE, 2: wp-config.php */ __( 'You must define the %1$s constant as true in your %2$s file to allow creation of a Network.' ), '<code>WP_ALLOW_MULTISITE</code>', '<code>wp-config.php</code>' ) ); } if ( is_network_admin() ) { // Used in the HTML title tag. $title = __( 'Network Setup' ); $parent_file = 'settings.php'; } else { // Used in the HTML title tag. $title = __( 'Create a Network of WordPress Sites' ); $parent_file = 'tools.php'; } $network_help = '<p>' . __( 'This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.' ) . '</p>' . '<p>' . __( 'Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your installation. Fill out the network details, and click Install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).' ) . '</p>' . '<p>' . __( 'The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.' ) . '</p>' . '<p>' . __( 'Add the designated lines of code to wp-config.php (just before <code>/*...stop editing...*/</code>) and <code>.htaccess</code> (replacing the existing WordPress rules).' ) . '</p>' . '<p>' . __( 'Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.' ) . '</p>' . '<p>' . __( 'The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed in a future version.' ) . '</p>' . '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/create-network/">Documentation on Creating a Network</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-network-screen/">Documentation on the Network Screen</a>' ) . '</p>'; get_current_screen()->add_help_tab( array( 'id' => 'network', 'title' => __( 'Network' ), 'content' => $network_help, ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/multisite/create-network/">Documentation on Creating a Network</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-network-screen/">Documentation on the Network Screen</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); require_once ABSPATH . 'wp-admin/admin-header.php'; ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <?php if ( $_POST ) { check_admin_referer( 'install-network-1' ); require_once ABSPATH . 'wp-admin/includes/upgrade.php'; // Create network tables. install_network(); $base = parse_url( trailingslashit( get_option( 'home' ) ), PHP_URL_PATH ); $subdomain_install = allow_subdomain_install() ? ! empty( $_POST['subdomain_install'] ) : false; if ( ! network_domain_check() ) { $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install ); if ( is_wp_error( $result ) ) { if ( 1 === count( $result->get_error_codes() ) && 'no_wildcard_dns' === $result->get_error_code() ) { network_step2( $result ); } else { network_step1( $result ); } } else { network_step2(); } } else { network_step2(); } } elseif ( is_multisite() || network_domain_check() ) { network_step2(); } else { network_step1(); } ?> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?> PK (6wY�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 (6wYa�"Z� � my-sites.phpnu �[��� <?php /** * My Sites dashboard. * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ require_once __DIR__ . '/admin.php'; if ( ! is_multisite() ) { wp_die( __( 'Multisite support is not enabled.' ) ); } if ( ! current_user_can( 'read' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ) ); } $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; $blogs = get_blogs_of_user( $current_user->ID ); $updated = false; if ( 'updateblogsettings' === $action && isset( $_POST['primary_blog'] ) ) { check_admin_referer( 'update-my-sites' ); $blog = get_site( (int) $_POST['primary_blog'] ); if ( $blog && isset( $blog->domain ) ) { update_user_meta( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'] ); $updated = true; } else { wp_die( __( 'The primary site you chose does not exist.' ) ); } } // Used in the HTML title tag. $title = __( 'My Sites' ); $parent_file = 'index.php'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); require_once ABSPATH . 'wp-admin/admin-header.php'; if ( $updated ) { wp_admin_notice( '<strong>' . __( 'Settings saved.' ) . '</strong>', array( 'type' => 'success', 'dismissible' => true, 'id' => 'message', ) ); } ?> <div class="wrap"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title ); ?> </h1> <?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ), true ) ) { /** This filter is documented in wp-login.php */ $sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html__( 'Add New Site' ) ); } if ( empty( $blogs ) ) : wp_admin_notice( '<strong>' . __( 'You must be a member of at least one site to use this page.' ) . '</strong>', array( 'type' => 'error', 'dismissible' => true, ) ); ?> <?php else : ?> <hr class="wp-header-end"> <form id="myblogs" method="post"> <?php choose_primary_blog(); /** * Fires before the sites list on the My Sites screen. * * @since 3.0.0 */ do_action( 'myblogs_allblogs_options' ); ?> <br clear="all" /> <ul class="my-sites striped"> <?php /** * Filters the settings HTML markup in the Global Settings section on the My Sites screen. * * By default, the Global Settings section is hidden. Passing a non-empty * string to this filter will enable the section, and allow new settings * to be added, either globally or for specific sites. * * @since MU (3.0.0) * * @param string $settings_html The settings HTML markup. Default empty. * @param string $context Context of the setting (global or site-specific). Default 'global'. */ $settings_html = apply_filters( 'myblogs_options', '', 'global' ); if ( $settings_html ) { echo '<h3>' . __( 'Global Settings' ) . '</h3>'; echo $settings_html; } reset( $blogs ); foreach ( $blogs as $user_blog ) { switch_to_blog( $user_blog->userblog_id ); echo '<li>'; echo "<h3>{$user_blog->blogname}</h3>"; $actions = "<a href='" . esc_url( home_url() ) . "'>" . __( 'Visit' ) . '</a>'; if ( current_user_can( 'read' ) ) { $actions .= " | <a href='" . esc_url( admin_url() ) . "'>" . __( 'Dashboard' ) . '</a>'; } /** * Filters the row links displayed for each site on the My Sites screen. * * @since MU (3.0.0) * * @param string $actions The HTML site link markup. * @param object $user_blog An object containing the site data. */ $actions = apply_filters( 'myblogs_blog_actions', $actions, $user_blog ); echo "<p class='my-sites-actions'>" . $actions . '</p>'; /** This filter is documented in wp-admin/my-sites.php */ echo apply_filters( 'myblogs_options', '', $user_blog ); echo '</li>'; restore_current_blog(); } ?> </ul> <?php if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) { ?> <input type="hidden" name="action" value="updateblogsettings" /> <?php wp_nonce_field( 'update-my-sites' ); submit_button(); } ?> </form> <?php endif; ?> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; PK (6wYM���5 �5 plugin-editor.phpnu �[��� <?php /** * Edit plugin file editor administration panel. * * @package WordPress * @subpackage Administration */ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; if ( is_multisite() && ! is_network_admin() ) { wp_redirect( network_admin_url( 'plugin-editor.php' ) ); exit; } if ( ! current_user_can( 'edit_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to edit plugins for this site.' ) ); } // Used in the HTML title tag. $title = __( 'Edit Plugins' ); $parent_file = 'plugins.php'; $plugins = get_plugins(); if ( empty( $plugins ) ) { require_once ABSPATH . 'wp-admin/admin-header.php'; ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <?php wp_admin_notice( __( 'No plugins are currently available.' ), array( 'id' => 'message', 'additional_classes' => array( 'error' ), ) ); ?> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; exit; } $file = ''; $plugin = ''; if ( isset( $_REQUEST['file'] ) ) { $file = wp_unslash( $_REQUEST['file'] ); } if ( isset( $_REQUEST['plugin'] ) ) { $plugin = wp_unslash( $_REQUEST['plugin'] ); } if ( empty( $plugin ) ) { if ( $file ) { // Locate the plugin for a given plugin file being edited. $file_dirname = dirname( $file ); foreach ( array_keys( $plugins ) as $plugin_candidate ) { if ( $plugin_candidate === $file || ( '.' !== $file_dirname && dirname( $plugin_candidate ) === $file_dirname ) ) { $plugin = $plugin_candidate; break; } } // Fallback to the file as the plugin. if ( empty( $plugin ) ) { $plugin = $file; } } else { $plugin = array_keys( $plugins ); $plugin = $plugin[0]; } } $plugin_files = get_plugin_files( $plugin ); if ( empty( $file ) ) { $file = $plugin_files[0]; } $file = validate_file_to_edit( $file, $plugin_files ); $real_file = WP_PLUGIN_DIR . '/' . $file; // Handle fallback editing of file when JavaScript is not available. $edit_error = null; $posted_content = null; if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) { $r = wp_edit_theme_plugin_file( wp_unslash( $_POST ) ); if ( is_wp_error( $r ) ) { $edit_error = $r; if ( check_ajax_referer( 'edit-plugin_' . $file, 'nonce', false ) && isset( $_POST['newcontent'] ) ) { $posted_content = wp_unslash( $_POST['newcontent'] ); } } else { wp_redirect( add_query_arg( array( 'a' => 1, // This means "success" for some reason. 'plugin' => $plugin, 'file' => $file, ), admin_url( 'plugin-editor.php' ) ) ); exit; } } // List of allowable extensions. $editable_extensions = wp_get_plugin_file_editable_extensions( $plugin ); if ( ! is_file( $real_file ) ) { wp_die( sprintf( '<p>%s</p>', __( 'File does not exist! Please double check the name and try again.' ) ) ); } else { // Get the extension of the file. if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) { $ext = strtolower( $matches[1] ); // If extension is not in the acceptable list, skip it. if ( ! in_array( $ext, $editable_extensions, true ) ) { wp_die( sprintf( '<p>%s</p>', __( 'Files of this type are not editable.' ) ) ); } } } get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'You can use the plugin file editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.' ) . '</p>' . '<p>' . __( 'Choose a plugin to edit from the dropdown menu and click the Select button. Click once on any file name to load it in the editor, and make your changes. Do not forget to save your changes (Update File) when you are finished.' ) . '</p>' . '<p>' . __( 'The documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Look Up takes you to a web page about that particular function.' ) . '</p>' . '<p id="editor-keyboard-trap-help-1">' . __( 'When using a keyboard to navigate:' ) . '</p>' . '<ul>' . '<li id="editor-keyboard-trap-help-2">' . __( 'In the editing area, the Tab key enters a tab character.' ) . '</li>' . '<li id="editor-keyboard-trap-help-3">' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '</li>' . '<li id="editor-keyboard-trap-help-4">' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '</li>' . '</ul>' . '<p>' . __( 'If you want to make changes but do not want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.' ) . '</p>' . ( is_network_admin() ? '<p>' . __( 'Any edits to files from this screen will be reflected on all sites in the network.' ) . '</p>' : '' ), ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://developer.wordpress.org/advanced-administration/plugins/editor-screen/">Documentation on Editing Plugins</a>' ) . '</p>' . '<p>' . __( '<a href="https://developer.wordpress.org/plugins/">Documentation on Writing Plugins</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); $settings = array( 'codeEditor' => wp_enqueue_code_editor( array( 'file' => $real_file ) ), ); wp_enqueue_script( 'wp-theme-plugin-editor' ); wp_add_inline_script( 'wp-theme-plugin-editor', sprintf( 'jQuery( function( $ ) { wp.themePluginEditor.init( $( "#template" ), %s ); } )', wp_json_encode( $settings ) ) ); wp_add_inline_script( 'wp-theme-plugin-editor', sprintf( 'wp.themePluginEditor.themeOrPlugin = "plugin";' ) ); require_once ABSPATH . 'wp-admin/admin-header.php'; update_recently_edited( WP_PLUGIN_DIR . '/' . $file ); if ( ! empty( $posted_content ) ) { $content = $posted_content; } else { $content = file_get_contents( $real_file ); } if ( str_ends_with( $real_file, '.php' ) ) { $functions = wp_doc_link_parse( $content ); if ( ! empty( $functions ) ) { $docs_select = '<select name="docs-list" id="docs-list">'; $docs_select .= '<option value="">' . esc_html__( 'Function Name…' ) . '</option>'; foreach ( $functions as $function ) { $docs_select .= '<option value="' . esc_attr( $function ) . '">' . esc_html( $function ) . '()</option>'; } $docs_select .= '</select>'; } } $content = esc_textarea( $content ); ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <?php if ( isset( $_GET['a'] ) ) : wp_admin_notice( __( 'File edited successfully.' ), array( 'additional_classes' => array( 'updated', 'is-dismissible' ), 'id' => 'message', ) ); elseif ( is_wp_error( $edit_error ) ) : $error = esc_html( $edit_error->get_error_message() ? $edit_error->get_error_message() : $edit_error->get_error_code() ); $message = '<p>' . __( 'There was an error while trying to update the file. You may need to fix something and try updating again.' ) . '</p> <pre>' . $error . '</pre>'; wp_admin_notice( $message, array( 'type' => 'error', 'id' => 'message', 'paragraph_wrap' => false, ) ); endif; ?> <div class="fileedit-sub"> <div class="alignleft"> <h2> <?php if ( is_plugin_active( $plugin ) ) { if ( is_writable( $real_file ) ) { /* translators: %s: Plugin file name. */ printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' ); } else { /* translators: %s: Plugin file name. */ printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $file ) . '</strong>' ); } } else { if ( is_writable( $real_file ) ) { /* translators: %s: Plugin file name. */ printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' ); } else { /* translators: %s: Plugin file name. */ printf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $file ) . '</strong>' ); } } ?> </h2> </div> <div class="alignright"> <form action="plugin-editor.php" method="get"> <label for="plugin" id="theme-plugin-editor-selector"><?php _e( 'Select plugin to edit:' ); ?> </label> <select name="plugin" id="plugin"> <?php foreach ( $plugins as $plugin_key => $a_plugin ) { $plugin_name = $a_plugin['Name']; if ( $plugin_key === $plugin ) { $selected = " selected='selected'"; } else { $selected = ''; } $plugin_name = esc_attr( $plugin_name ); $plugin_key = esc_attr( $plugin_key ); echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; } ?> </select> <?php submit_button( __( 'Select' ), '', 'Submit', false ); ?> </form> </div> <br class="clear" /> </div> <div id="templateside"> <h2 id="plugin-files-label"><?php _e( 'Plugin Files' ); ?></h2> <?php $plugin_editable_files = array(); foreach ( $plugin_files as $plugin_file ) { if ( preg_match( '/\.([^.]+)$/', $plugin_file, $matches ) && in_array( $matches[1], $editable_extensions, true ) ) { $plugin_editable_files[] = $plugin_file; } } ?> <ul role="tree" aria-labelledby="plugin-files-label"> <li role="treeitem" tabindex="-1" aria-expanded="true" aria-level="1" aria-posinset="1" aria-setsize="1"> <ul role="group"> <?php wp_print_plugin_file_tree( wp_make_plugin_file_tree( $plugin_editable_files ) ); ?> </ul> </ul> </div> <form name="template" id="template" action="plugin-editor.php" method="post"> <?php wp_nonce_field( 'edit-plugin_' . $file, 'nonce' ); ?> <div> <label for="newcontent" id="theme-plugin-editor-label"><?php _e( 'Selected file content:' ); ?></label> <textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"><?php echo $content; ?></textarea> <input type="hidden" name="action" value="update" /> <input type="hidden" name="file" value="<?php echo esc_attr( $file ); ?>" /> <input type="hidden" name="plugin" value="<?php echo esc_attr( $plugin ); ?>" /> </div> <?php if ( ! empty( $docs_select ) ) : ?> <div id="documentation" class="hide-if-no-js"> <label for="docs-list"><?php _e( 'Documentation:' ); ?></label> <?php echo $docs_select; ?> <input disabled id="docs-lookup" type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' !== jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_user_locale() ); ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&redirect=true'); }" /> </div> <?php endif; ?> <?php if ( is_writable( $real_file ) ) : ?> <div class="editor-notices"> <?php if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) { wp_admin_notice( __( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ), array( 'type' => 'warning', 'additional_classes' => array( 'inline', 'active-plugin-edit-warning' ), ) ); } ?> </div> <p class="submit"> <?php submit_button( __( 'Update File' ), 'primary', 'submit', false ); ?> <span class="spinner"></span> </p> <?php else : ?> <p> <?php printf( /* translators: %s: Documentation URL. */ __( 'You need to make this file writable before you can save your changes. See <a href="%s">Changing File Permissions</a> for more information.' ), __( 'https://developer.wordpress.org/advanced-administration/server/file-permissions/' ) ); ?> </p> <?php endif; ?> <?php wp_print_file_editor_templates(); ?> </form> <br class="clear" /> </div> <?php $dismissed_pointers = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) ); if ( ! in_array( 'plugin_editor_notice', $dismissed_pointers, true ) ) : // Get a back URL. $referer = wp_get_referer(); $excluded_referer_basenames = array( 'plugin-editor.php', 'wp-login.php' ); $return_url = admin_url( '/' ); if ( $referer ) { $referer_path = parse_url( $referer, PHP_URL_PATH ); if ( is_string( $referer_path ) && ! in_array( basename( $referer_path ), $excluded_referer_basenames, true ) ) { $return_url = $referer; } } ?> <div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden"> <div class="notification-dialog-background"></div> <div class="notification-dialog"> <div class="file-editor-warning-content"> <div class="file-editor-warning-message"> <h1><?php _e( 'Heads up!' ); ?></h1> <p><?php _e( 'You appear to be making direct edits to your plugin in the WordPress dashboard. Editing plugins directly is not recommended as it may introduce incompatibilities that break your site and your changes may be lost in future updates.' ); ?></p> <p><?php _e( 'If you absolutely have to make direct edits to this plugin, use a file manager to create a copy with a new name and hang on to the original. That way, you can re-enable a functional version if something goes wrong.' ); ?></p> </div> <p> <a class="button file-editor-warning-go-back" href="<?php echo esc_url( $return_url ); ?>"><?php _e( 'Go back' ); ?></a> <button type="button" class="file-editor-warning-dismiss button button-primary"><?php _e( 'I understand' ); ?></button> </p> </div> </div> </div> <?php endif; // Editor warning notice. require_once ABSPATH . 'wp-admin/admin-footer.php'; PK (6wYH�S�� � media-new.phpnu �[��� <?php /** * Manage media uploaded file. * * There are many filters in here for media. Plugins can extend functionality * by hooking into the filters. * * @package WordPress * @subpackage Administration */ /** Load WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'upload_files' ) ) { wp_die( __( 'Sorry, you are not allowed to upload files.' ) ); } wp_enqueue_script( 'plupload-handlers' ); $post_id = 0; if ( isset( $_REQUEST['post_id'] ) ) { $post_id = absint( $_REQUEST['post_id'] ); if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) ) { $post_id = 0; } } if ( $_POST ) { if ( isset( $_POST['html-upload'] ) && ! empty( $_FILES ) ) { check_admin_referer( 'media-form' ); // Upload File button was clicked. $upload_id = media_handle_upload( 'async-upload', $post_id ); if ( is_wp_error( $upload_id ) ) { wp_die( $upload_id ); } } wp_redirect( admin_url( 'upload.php' ) ); exit; } // Used in the HTML title tag. $title = __( 'Upload New Media' ); $parent_file = 'upload.php'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:' ) . '</p>' . '<ul>' . '<li>' . __( '<strong>Drag and drop</strong> your files into the area below. Multiple files are allowed.' ) . '</li>' . '<li>' . __( 'Clicking <strong>Select Files</strong> opens a navigation window showing you files in your operating system. Selecting <strong>Open</strong> after clicking on the file you want activates a progress bar on the uploader screen.' ) . '</li>' . '<li>' . __( 'Revert to the <strong>Browser Uploader</strong> by clicking the link below the drag and drop box.' ) . '</li>' . '</ul>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://wordpress.org/documentation/article/media-add-new-screen/">Documentation on Uploading Media Files</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' ); require_once ABSPATH . 'wp-admin/admin-header.php'; $form_class = 'media-upload-form type-form validate'; if ( get_user_setting( 'uploader' ) || isset( $_GET['browser-uploader'] ) ) { $form_class .= ' html-uploader'; } ?> <div class="wrap"> <h1><?php echo esc_html( $title ); ?></h1> <form enctype="multipart/form-data" method="post" action="<?php echo esc_url( admin_url( 'media-new.php' ) ); ?>" class="<?php echo esc_attr( $form_class ); ?>" id="file-form"> <?php media_upload_form(); ?> <script type="text/javascript"> var post_id = <?php echo absint( $post_id ); ?>, shortform = 3; </script> <input type="hidden" name="post_id" id="post_id" value="<?php echo absint( $post_id ); ?>" /> <?php wp_nonce_field( 'media-form' ); ?> <div id="media-items" class="hide-if-no-js"></div> </form> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; PK (6wY�p�z z load-styles.phpnu �[��� <?php /* * Disable error reporting. * * Set this to error_reporting( -1 ) for debugging. */ error_reporting( 0 ); // Set ABSPATH for execution. if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', dirname( __DIR__ ) . '/' ); } define( 'WPINC', 'wp-includes' ); define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); require ABSPATH . 'wp-admin/includes/noop.php'; require ABSPATH . WPINC . '/theme.php'; require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php'; require ABSPATH . WPINC . '/global-styles-and-settings.php'; require ABSPATH . WPINC . '/script-loader.php'; require ABSPATH . WPINC . '/version.php'; $protocol = $_SERVER['SERVER_PROTOCOL']; if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) { $protocol = 'HTTP/1.0'; } $load = $_GET['load']; if ( is_array( $load ) ) { ksort( $load ); $load = implode( '', $load ); } $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load ); $load = array_unique( explode( ',', $load ) ); if ( empty( $load ) ) { header( "$protocol 400 Bad Request" ); exit; } $rtl = ( isset( $_GET['dir'] ) && 'rtl' === $_GET['dir'] ); $expires_offset = 31536000; // 1 year. $out = ''; $wp_styles = new WP_Styles(); wp_default_styles( $wp_styles ); $etag = "WP:{$wp_version};"; foreach ( $load as $handle ) { if ( ! array_key_exists( $handle, $wp_styles->registered ) ) { continue; } $ver = $wp_styles->registered[ $handle ]->ver ? $wp_styles->registered[ $handle ]->ver : $wp_version; $etag .= "{$handle}:{$ver};"; } /* * This is not intended to be cryptographically secure, just a fast way to get * a fixed length string based on the script versions. As this file does not * load the full WordPress environment, it is not possible to use the salted * wp_hash() function. */ $etag = 'W/"' . md5( $etag ) . '"'; if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) { header( "$protocol 304 Not Modified" ); exit; } foreach ( $load as $handle ) { if ( ! array_key_exists( $handle, $wp_styles->registered ) ) { continue; } $style = $wp_styles->registered[ $handle ]; if ( empty( $style->src ) ) { continue; } $path = ABSPATH . $style->src; if ( $rtl && ! empty( $style->extra['rtl'] ) ) { // All default styles have fully independent RTL files. $path = str_replace( '.min.css', '-rtl.min.css', $path ); } $content = get_file( $path ) . "\n"; // Note: str_starts_with() is not used here, as wp-includes/compat.php is not loaded in this file. if ( 0 === strpos( $style->src, '/' . WPINC . '/css/' ) ) { $content = str_replace( '../images/', '../' . WPINC . '/images/', $content ); $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content ); $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content ); $out .= $content; } else { $out .= str_replace( '../images/', 'images/', $content ); } } header( "Etag: $etag" ); header( 'Content-Type: text/css; charset=UTF-8' ); header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); header( "Cache-Control: public, max-age=$expires_offset" ); echo $out; exit; PK (6wY ��E�B �B menu.phpnu �[��� <?php /** * Build Administration Menu. * * @package WordPress * @subpackage Administration */ /** * Constructs the admin menu. * * The elements in the array are: * 0: Menu item name. * 1: Minimum level or capability required. * 2: The URL of the item's file. * 3: Page title. * 4: Classes. * 5: ID. * 6: Icon for top level menu. * * @global array $menu */ $menu[2] = array( __( 'Dashboard' ), 'read', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' ); $submenu['index.php'][0] = array( __( 'Home' ), 'read', 'index.php' ); if ( is_multisite() ) { $submenu['index.php'][5] = array( __( 'My Sites' ), 'read', 'my-sites.php' ); } if ( ! is_multisite() || current_user_can( 'update_core' ) ) { $update_data = wp_get_update_data(); } if ( ! is_multisite() ) { if ( current_user_can( 'update_core' ) ) { $cap = 'update_core'; } elseif ( current_user_can( 'update_plugins' ) ) { $cap = 'update_plugins'; } elseif ( current_user_can( 'update_themes' ) ) { $cap = 'update_themes'; } else { $cap = 'update_languages'; } $submenu['index.php'][10] = array( sprintf( /* translators: %s: Number of pending updates. */ __( 'Updates %s' ), sprintf( '<span class="update-plugins count-%s"><span class="update-count">%s</span></span>', $update_data['counts']['total'], number_format_i18n( $update_data['counts']['total'] ) ) ), $cap, 'update-core.php', ); unset( $cap ); } $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); // $menu[5] = Posts. $menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' ); $submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' ); $submenu['upload.php'][10] = array( __( 'Add New Media File' ), 'upload_files', 'media-new.php' ); $i = 15; foreach ( get_taxonomies_for_attachments( 'objects' ) as $tax ) { if ( ! $tax->show_ui || ! $tax->show_in_menu ) { continue; } $submenu['upload.php'][ $i++ ] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name . '&post_type=attachment' ); } unset( $tax, $i ); $menu[15] = array( __( 'Links' ), 'manage_links', 'link-manager.php', '', 'menu-top menu-icon-links', 'menu-links', 'dashicons-admin-links' ); $submenu['link-manager.php'][5] = array( _x( 'All Links', 'admin menu' ), 'manage_links', 'link-manager.php' ); $submenu['link-manager.php'][10] = array( __( 'Add New Link' ), 'manage_links', 'link-add.php' ); $submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' ); // $menu[20] = Pages. // Avoid the comment count query for users who cannot edit_posts. if ( current_user_can( 'edit_posts' ) ) { $awaiting_mod = wp_count_comments(); $awaiting_mod = $awaiting_mod->moderated; $awaiting_mod_i18n = number_format_i18n( $awaiting_mod ); /* translators: %s: Number of comments. */ $awaiting_mod_text = sprintf( _n( '%s Comment in moderation', '%s Comments in moderation', $awaiting_mod ), $awaiting_mod_i18n ); $menu[25] = array( /* translators: %s: Number of comments. */ sprintf( __( 'Comments %s' ), '<span class="awaiting-mod count-' . absint( $awaiting_mod ) . '"><span class="pending-count" aria-hidden="true">' . $awaiting_mod_i18n . '</span><span class="comments-in-moderation-text screen-reader-text">' . $awaiting_mod_text . '</span></span>' ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'dashicons-admin-comments', ); unset( $awaiting_mod ); } $submenu['edit-comments.php'][0] = array( __( 'All Comments' ), 'edit_posts', 'edit-comments.php' ); $_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group. $types = (array) get_post_types( array( 'show_ui' => true, '_builtin' => false, 'show_in_menu' => true, ) ); $builtin = array( 'post', 'page' ); foreach ( array_merge( $builtin, $types ) as $ptype ) { $ptype_obj = get_post_type_object( $ptype ); // Check if it should be a submenu. if ( true !== $ptype_obj->show_in_menu ) { continue; } $ptype_menu_position = is_int( $ptype_obj->menu_position ) ? $ptype_obj->menu_position : ++$_wp_last_object_menu; // If we're to use $_wp_last_object_menu, increment it first. $ptype_for_id = sanitize_html_class( $ptype ); $menu_icon = 'dashicons-admin-post'; if ( is_string( $ptype_obj->menu_icon ) ) { // Special handling for an empty div.wp-menu-image, data:image/svg+xml, and Dashicons. if ( 'none' === $ptype_obj->menu_icon || 'div' === $ptype_obj->menu_icon || str_starts_with( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || str_starts_with( $ptype_obj->menu_icon, 'dashicons-' ) ) { $menu_icon = $ptype_obj->menu_icon; } else { $menu_icon = esc_url( $ptype_obj->menu_icon ); } } elseif ( in_array( $ptype, $builtin, true ) ) { $menu_icon = 'dashicons-admin-' . $ptype; } $menu_class = 'menu-top menu-icon-' . $ptype_for_id; // 'post' special case. if ( 'post' === $ptype ) { $menu_class .= ' open-if-no-js'; $ptype_file = 'edit.php'; $post_new_file = 'post-new.php'; $edit_tags_file = 'edit-tags.php?taxonomy=%s'; } else { $ptype_file = "edit.php?post_type=$ptype"; $post_new_file = "post-new.php?post_type=$ptype"; $edit_tags_file = "edit-tags.php?taxonomy=%s&post_type=$ptype"; } if ( in_array( $ptype, $builtin, true ) ) { $ptype_menu_id = 'menu-' . $ptype_for_id . 's'; } else { $ptype_menu_id = 'menu-posts-' . $ptype_for_id; } /* * If $ptype_menu_position is already populated or will be populated * by a hard-coded value below, increment the position. */ $core_menu_positions = array( 59, 60, 65, 70, 75, 80, 85, 99 ); while ( isset( $menu[ $ptype_menu_position ] ) || in_array( $ptype_menu_position, $core_menu_positions, true ) ) { ++$ptype_menu_position; } $menu[ $ptype_menu_position ] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon ); $submenu[ $ptype_file ][5] = array( $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, $ptype_file ); $submenu[ $ptype_file ][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->create_posts, $post_new_file ); $i = 15; foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { if ( ! $tax->show_ui || ! $tax->show_in_menu || ! in_array( $ptype, (array) $tax->object_type, true ) ) { continue; } $submenu[ $ptype_file ][ $i++ ] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, sprintf( $edit_tags_file, $tax->name ) ); } } unset( $ptype, $ptype_obj, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax, $post_new_file ); $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' ); $appearance_cap = current_user_can( 'switch_themes' ) ? 'switch_themes' : 'edit_theme_options'; $menu[60] = array( __( 'Appearance' ), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' ); $count = ''; if ( ! is_multisite() && current_user_can( 'update_themes' ) ) { if ( ! isset( $update_data ) ) { $update_data = wp_get_update_data(); } $count = sprintf( '<span class="update-plugins count-%s"><span class="theme-count">%s</span></span>', $update_data['counts']['themes'], number_format_i18n( $update_data['counts']['themes'] ) ); } /* translators: %s: Number of available theme updates. */ $submenu['themes.php'][5] = array( sprintf( __( 'Themes %s' ), $count ), $appearance_cap, 'themes.php' ); if ( wp_is_block_theme() ) { $submenu['themes.php'][6] = array( _x( 'Editor', 'site editor menu item' ), 'edit_theme_options', 'site-editor.php' ); } else { $submenu['themes.php'][6] = array( _x( 'Patterns', 'patterns menu item' ), 'edit_theme_options', 'site-editor.php?path=/patterns' ); } $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' ); // Hide Customize link on block themes unless a plugin or theme // is using 'customize_register' to add a setting. if ( ! wp_is_block_theme() || has_action( 'customize_register' ) ) { $submenu['themes.php'][7] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' ); } if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) { $submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' ); } if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize' ) ) { $customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $customize_url ); $submenu['themes.php'][15] = array( _x( 'Header', 'custom image header' ), $appearance_cap, esc_url( $customize_header_url ), '', 'hide-if-no-customize' ); } if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize' ) ) { $customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url ); $submenu['themes.php'][20] = array( _x( 'Background', 'custom background' ), $appearance_cap, esc_url( $customize_background_url ), '', 'hide-if-no-customize' ); } unset( $customize_url ); unset( $appearance_cap ); // Add 'Theme File Editor' to the bottom of the Appearance (non-block themes) or Tools (block themes) menu. if ( ! is_multisite() ) { // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook. add_action( 'admin_menu', '_add_themes_utility_last', 101 ); } /** * Adds the 'Theme File Editor' menu item to the bottom of the Appearance (non-block themes) * or Tools (block themes) menu. * * @access private * @since 3.0.0 * @since 5.9.0 Renamed 'Theme Editor' to 'Theme File Editor'. * Relocates to Tools for block themes. */ function _add_themes_utility_last() { add_submenu_page( wp_is_block_theme() ? 'tools.php' : 'themes.php', __( 'Theme File Editor' ), __( 'Theme File Editor' ), 'edit_themes', 'theme-editor.php' ); } /** * Adds the 'Plugin File Editor' menu item after the 'Themes File Editor' in Tools * for block themes. * * @access private * @since 5.9.0 */ function _add_plugin_file_editor_to_tools() { if ( ! wp_is_block_theme() ) { return; } add_submenu_page( 'tools.php', __( 'Plugin File Editor' ), __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); } $count = ''; if ( ! is_multisite() && current_user_can( 'update_plugins' ) ) { if ( ! isset( $update_data ) ) { $update_data = wp_get_update_data(); } $count = sprintf( '<span class="update-plugins count-%s"><span class="plugin-count">%s</span></span>', $update_data['counts']['plugins'], number_format_i18n( $update_data['counts']['plugins'] ) ); } /* translators: %s: Number of available plugin updates. */ $menu[65] = array( sprintf( __( 'Plugins %s' ), $count ), 'activate_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'dashicons-admin-plugins' ); $submenu['plugins.php'][5] = array( __( 'Installed Plugins' ), 'activate_plugins', 'plugins.php' ); if ( ! is_multisite() ) { $submenu['plugins.php'][10] = array( __( 'Add New Plugin' ), 'install_plugins', 'plugin-install.php' ); if ( wp_is_block_theme() ) { // Place the menu item below the Theme File Editor menu item. add_action( 'admin_menu', '_add_plugin_file_editor_to_tools', 101 ); } else { $submenu['plugins.php'][15] = array( __( 'Plugin File Editor' ), 'edit_plugins', 'plugin-editor.php' ); } } unset( $update_data ); if ( current_user_can( 'list_users' ) ) { $menu[70] = array( __( 'Users' ), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' ); } else { $menu[70] = array( __( 'Profile' ), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' ); } if ( current_user_can( 'list_users' ) ) { $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. $submenu['users.php'][5] = array( __( 'All Users' ), 'list_users', 'users.php' ); if ( current_user_can( 'create_users' ) ) { $submenu['users.php'][10] = array( __( 'Add New User' ), 'create_users', 'user-new.php' ); } elseif ( is_multisite() ) { $submenu['users.php'][10] = array( __( 'Add New User' ), 'promote_users', 'user-new.php' ); } $submenu['users.php'][15] = array( __( 'Profile' ), 'read', 'profile.php' ); } else { $_wp_real_parent_file['users.php'] = 'profile.php'; $submenu['profile.php'][5] = array( __( 'Profile' ), 'read', 'profile.php' ); if ( current_user_can( 'create_users' ) ) { $submenu['profile.php'][10] = array( __( 'Add New User' ), 'create_users', 'user-new.php' ); } elseif ( is_multisite() ) { $submenu['profile.php'][10] = array( __( 'Add New User' ), 'promote_users', 'user-new.php' ); } } $site_health_count = ''; if ( ! is_multisite() && current_user_can( 'view_site_health_checks' ) ) { $get_issues = get_transient( 'health-check-site-status-result' ); $issue_counts = array(); if ( false !== $get_issues ) { $issue_counts = json_decode( $get_issues, true ); } if ( ! is_array( $issue_counts ) || ! $issue_counts ) { $issue_counts = array( 'good' => 0, 'recommended' => 0, 'critical' => 0, ); } $site_health_count = sprintf( '<span class="menu-counter site-health-counter count-%s"><span class="count">%s</span></span>', $issue_counts['critical'], number_format_i18n( $issue_counts['critical'] ) ); } $menu[75] = array( __( 'Tools' ), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'dashicons-admin-tools' ); $submenu['tools.php'][5] = array( __( 'Available Tools' ), 'edit_posts', 'tools.php' ); $submenu['tools.php'][10] = array( __( 'Import' ), 'import', 'import.php' ); $submenu['tools.php'][15] = array( __( 'Export' ), 'export', 'export.php' ); /* translators: %s: Number of critical Site Health checks. */ $submenu['tools.php'][20] = array( sprintf( __( 'Site Health %s' ), $site_health_count ), 'view_site_health_checks', 'site-health.php' ); $submenu['tools.php'][25] = array( __( 'Export Personal Data' ), 'export_others_personal_data', 'export-personal-data.php' ); $submenu['tools.php'][30] = array( __( 'Erase Personal Data' ), 'erase_others_personal_data', 'erase-personal-data.php' ); if ( is_multisite() && ! is_main_site() ) { $submenu['tools.php'][35] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' ); } if ( ! is_multisite() && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) { $submenu['tools.php'][50] = array( __( 'Network Setup' ), 'setup_network', 'network.php' ); } $menu[80] = array( __( 'Settings' ), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'dashicons-admin-settings' ); $submenu['options-general.php'][10] = array( _x( 'General', 'settings screen' ), 'manage_options', 'options-general.php' ); $submenu['options-general.php'][15] = array( __( 'Writing' ), 'manage_options', 'options-writing.php' ); $submenu['options-general.php'][20] = array( __( 'Reading' ), 'manage_options', 'options-reading.php' ); $submenu['options-general.php'][25] = array( __( 'Discussion' ), 'manage_options', 'options-discussion.php' ); $submenu['options-general.php'][30] = array( __( 'Media' ), 'manage_options', 'options-media.php' ); $submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' ); $submenu['options-general.php'][45] = array( __( 'Privacy' ), 'manage_privacy_options', 'options-privacy.php' ); $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group. $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' ); // Back-compat for old top-levels. $_wp_real_parent_file['post.php'] = 'edit.php'; $_wp_real_parent_file['post-new.php'] = 'edit.php'; $_wp_real_parent_file['edit-pages.php'] = 'edit.php?post_type=page'; $_wp_real_parent_file['page-new.php'] = 'edit.php?post_type=page'; $_wp_real_parent_file['wpmu-admin.php'] = 'tools.php'; $_wp_real_parent_file['ms-admin.php'] = 'tools.php'; // Ensure backward compatibility. $compat = array( 'index' => 'dashboard', 'edit' => 'posts', 'post' => 'posts', 'upload' => 'media', 'link-manager' => 'links', 'edit-pages' => 'pages', 'page' => 'pages', 'edit-comments' => 'comments', 'options-general' => 'settings', 'themes' => 'appearance', ); require_once ABSPATH . 'wp-admin/includes/menu.php'; PK (6wY�ڸzO>