dvadf
PK �8P\^�� � index.phpnu �[��� <?php
/**
* Dashboard Administration Screen
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Bootstrap */
require_once __DIR__ . '/admin.php';
/** Load WordPress dashboard API */
require_once ABSPATH . 'wp-admin/includes/dashboard.php';
wp_dashboard_setup();
wp_enqueue_script( 'dashboard' );
if ( current_user_can( 'install_plugins' ) ) {
wp_enqueue_script( 'plugin-install' );
wp_enqueue_script( 'updates' );
}
if ( current_user_can( 'upload_files' ) ) {
wp_enqueue_script( 'media-upload' );
}
add_thickbox();
if ( wp_is_mobile() ) {
wp_enqueue_script( 'jquery-touch-punch' );
}
// Used in the HTML title tag.
$title = __( 'Dashboard' );
$parent_file = 'index.php';
$help = '<p>' . __( 'Welcome to your WordPress Dashboard!' ) . '</p>';
$help .= '<p>' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the “Help” tab above the screen title.' ) . '</p>';
$screen = get_current_screen();
$screen->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => $help,
)
);
// Help tabs.
$help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>';
$help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-navigation',
'title' => __( 'Navigation' ),
'content' => $help,
)
);
$help = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '</p>';
$help .= '<p>' . __( '<strong>Screen Options</strong> — Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '</p>';
$help .= '<p>' . __( '<strong>Drag and Drop</strong> — To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '</p>';
$help .= '<p>' . __( '<strong>Box Controls</strong> — Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.' ) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-layout',
'title' => __( 'Layout' ),
'content' => $help,
)
);
$help = '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>';
if ( current_user_can( 'edit_theme_options' ) ) {
$help .= '<p>' . __( '<strong>Welcome</strong> — Shows links for some of the most common tasks when setting up a new site.' ) . '</p>';
}
if ( current_user_can( 'view_site_health_checks' ) ) {
$help .= '<p>' . __( '<strong>Site Health Status</strong> — Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '</p>';
}
if ( current_user_can( 'edit_posts' ) ) {
$help .= '<p>' . __( '<strong>At a Glance</strong> — Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>';
}
$help .= '<p>' . __( '<strong>Activity</strong> — Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '</p>';
if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
$help .= '<p>' . __( "<strong>Quick Draft</strong> — Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '</p>';
}
$help .= '<p>' . sprintf(
/* translators: %s: WordPress Planet URL. */
__( '<strong>WordPress Events and News</strong> — Upcoming events near you as well as the latest news from the official WordPress project and the <a href="%s">WordPress Planet</a>.' ),
__( 'https://planet.wordpress.org/' )
) . '</p>';
$screen->add_help_tab(
array(
'id' => 'help-content',
'title' => __( 'Content' ),
'content' => $help,
)
);
unset( $help );
$wp_version = get_bloginfo( 'version', 'display' );
/* translators: %s: WordPress version. */
$wp_version_text = sprintf( __( 'Version %s' ), $wp_version );
$is_dev_version = preg_match( '/alpha|beta|RC/', $wp_version );
if ( ! $is_dev_version ) {
$version_url = sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ),
sanitize_title( $wp_version )
);
$wp_version_text = sprintf(
'<a href="%1$s">%2$s</a>',
$version_url,
$wp_version_text
);
}
$screen->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>' .
'<p>' . $wp_version_text . '</p>'
);
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<?php
if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
/** This filter is documented in wp-login.php */
$remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
$postponed_time = get_option( 'admin_email_lifespan' );
/*
* Calculate how many seconds it's been since the reminder was postponed.
* This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
*/
$time_passed = time() - ( $postponed_time - $remind_interval );
// Only show the dashboard notice if it's been less than a minute since the message was postponed.
if ( $time_passed < MINUTE_IN_SECONDS ) :
$message = sprintf(
/* translators: %s: Human-readable time interval. */
__( 'The admin email verification page will reappear after %s.' ),
human_time_diff( time() + $remind_interval )
);
wp_admin_notice(
$message,
array(
'type' => 'success',
'dismissible' => true,
)
);
endif;
endif;
?>
<?php
if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
$classes = 'welcome-panel';
$option = (int) get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner.
$hide = ( 0 === $option || ( 2 === $option && wp_get_current_user()->user_email !== get_option( 'admin_email' ) ) );
if ( $hide ) {
$classes .= ' hidden';
}
?>
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
<?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
<a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the welcome panel' ); ?>"><?php _e( 'Dismiss' ); ?></a>
<?php
/**
* Fires when adding content to the welcome panel on the admin dashboard.
*
* To remove the default welcome panel, use remove_action():
*
* remove_action( 'welcome_panel', 'wp_welcome_panel' );
*
* @since 3.5.0
*/
do_action( 'welcome_panel' );
?>
</div>
<?php endif; ?>
<div id="dashboard-widgets-wrap">
<?php wp_dashboard(); ?>
</div><!-- dashboard-widgets-wrap -->
</div><!-- wrap -->
<?php
wp_print_community_events_templates();
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK �8P\�v0)V V
import.phpnu �[��� <?php
/**
* Import WordPress Administration Screen
*
* @package WordPress
* @subpackage Administration
*/
define( 'WP_LOAD_IMPORTERS', true );
/** Load WordPress Bootstrap */
require_once __DIR__ . '/admin.php';
if ( ! current_user_can( 'import' ) ) {
wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) );
}
// Used in the HTML title tag.
$title = __( 'Import' );
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => '<p>' . __( 'This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.' ) . '</p>' .
'<p>' . __( 'In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/tools-import-screen/">Documentation on Import</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
if ( current_user_can( 'install_plugins' ) ) {
// List of popular importer plugins from the WordPress.org API.
$popular_importers = wp_get_popular_importers();
} else {
$popular_importers = array();
}
// Detect and redirect invalid importers like 'movabletype', which is registered as 'mt'.
if ( ! empty( $_GET['invalid'] ) && isset( $popular_importers[ $_GET['invalid'] ] ) ) {
$importer_id = $popular_importers[ $_GET['invalid'] ]['importer-id'];
if ( $importer_id !== $_GET['invalid'] ) { // Prevent redirect loops.
wp_redirect( admin_url( 'admin.php?import=' . $importer_id ) );
exit;
}
unset( $importer_id );
}
add_thickbox();
wp_enqueue_script( 'plugin-install' );
wp_enqueue_script( 'updates' );
require_once ABSPATH . 'wp-admin/admin-header.php';
$parent_file = 'tools.php';
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
<?php
if ( ! empty( $_GET['invalid'] ) ) :
$importer_not_installed = '<strong>' . __( 'Error:' ) . '</strong> ' . sprintf(
/* translators: %s: Importer slug. */
__( 'The %s importer is invalid or is not installed.' ),
'<strong>' . esc_html( $_GET['invalid'] ) . '</strong>'
);
wp_admin_notice(
$importer_not_installed,
array(
'additional_classes' => array( 'error' ),
)
);
endif;
?>
<p><?php _e( 'If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:' ); ?></p>
<?php
// Registered (already installed) importers. They're stored in the global $wp_importers.
$importers = get_importers();
// If a popular importer is not registered, create a dummy registration that links to the plugin installer.
foreach ( $popular_importers as $pop_importer => $pop_data ) {
if ( isset( $importers[ $pop_importer ] ) ) {
continue;
}
if ( isset( $importers[ $pop_data['importer-id'] ] ) ) {
continue;
}
// Fill the array of registered (already installed) importers with data of the popular importers from the WordPress.org API.
$importers[ $pop_data['importer-id'] ] = array(
$pop_data['name'],
$pop_data['description'],
'install' => $pop_data['plugin-slug'],
);
}
if ( empty( $importers ) ) {
echo '<p>' . __( 'No importers are available.' ) . '</p>'; // TODO: Make more helpful.
} else {
uasort( $importers, '_usort_by_first_member' );
?>
<table class="widefat importers striped">
<?php
foreach ( $importers as $importer_id => $data ) {
$plugin_slug = '';
$action = '';
$is_plugin_installed = false;
if ( isset( $data['install'] ) ) {
$plugin_slug = $data['install'];
if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin_slug ) ) {
// Looks like an importer is installed, but not active.
$plugins = get_plugins( '/' . $plugin_slug );
if ( ! empty( $plugins ) ) {
$keys = array_keys( $plugins );
$plugin_file = $plugin_slug . '/' . $keys[0];
$url = wp_nonce_url(
add_query_arg(
array(
'action' => 'activate',
'plugin' => $plugin_file,
'from' => 'import',
),
admin_url( 'plugins.php' )
),
'activate-plugin_' . $plugin_file
);
$action = sprintf(
'<a href="%s" aria-label="%s">%s</a>',
esc_url( $url ),
/* translators: %s: Importer name. */
esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
__( 'Run Importer' )
);
$is_plugin_installed = true;
}
}
if ( empty( $action ) ) {
if ( is_main_site() ) {
$url = wp_nonce_url(
add_query_arg(
array(
'action' => 'install-plugin',
'plugin' => $plugin_slug,
'from' => 'import',
),
self_admin_url( 'update.php' )
),
'install-plugin_' . $plugin_slug
);
$action = sprintf(
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
esc_url( $url ),
esc_attr( $plugin_slug ),
esc_attr( $data[0] ),
/* translators: %s: Importer name. */
esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $data[0] ) ),
_x( 'Install Now', 'plugin' )
);
} else {
$action = sprintf(
/* translators: %s: URL to Import screen on the main site. */
__( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ),
get_admin_url( get_current_network_id(), 'import.php' )
);
}
}
} else {
$url = add_query_arg(
array(
'import' => $importer_id,
),
self_admin_url( 'admin.php' )
);
$action = sprintf(
'<a href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( $url ),
/* translators: %s: Importer name. */
esc_attr( sprintf( __( 'Run %s' ), $data[0] ) ),
__( 'Run Importer' )
);
$is_plugin_installed = true;
}
if ( ! $is_plugin_installed && is_main_site() ) {
$url = add_query_arg(
array(
'tab' => 'plugin-information',
'plugin' => $plugin_slug,
'from' => 'import',
'TB_iframe' => 'true',
'width' => 600,
'height' => 550,
),
network_admin_url( 'plugin-install.php' )
);
$action .= sprintf(
' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
esc_url( $url ),
/* translators: %s: Importer name. */
esc_attr( sprintf( __( 'More information about %s' ), $data[0] ) ),
__( 'Details' )
);
}
echo "
<tr class='importer-item'>
<td class='import-system'>
<span class='importer-title'>{$data[0]}</span>
<span class='importer-action'>{$action}</span>
</td>
<td class='desc'>
<span class='importer-desc'>{$data[1]}</span>
</td>
</tr>";
}
?>
</table>
<?php
}
if ( current_user_can( 'install_plugins' ) ) {
echo '<p>' . sprintf(
/* translators: %s: URL to Add Plugins screen. */
__( 'If the importer you need is not listed, <a href="%s">search the plugin directory</a> to see if an importer is available.' ),
esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) )
) . '</p>';
}
/**
* Fires at the end of the Import screen.
*
* @since 6.8.0
*/
do_action( 'import_filters' );
?>
</div>
<?php
wp_print_request_filesystem_credentials_modal();
wp_print_admin_notice_templates();
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK �8P\�,�<7 7 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;
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_files[0] );
$plugin_name = $plugin_data['Name'];
// Handle fallback editing of file when JavaScript is not available.
$edit_error = null;
$posted_content = null;
if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
$edit_result = wp_edit_theme_plugin_file( wp_unslash( $_POST ) );
if ( is_wp_error( $edit_result ) ) {
$edit_error = $edit_result;
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 ) ) {
$extension = strtolower( $matches[1] );
// If extension is not in the acceptable list, skip it.
if ( ! in_array( $extension, $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, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) );
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 name. */
printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' );
} else {
/* translators: %s: Plugin name. */
printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' );
}
} else {
if ( is_writable( $real_file ) ) {
/* translators: %s: Plugin name. */
printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' );
} else {
/* translators: %s: Plugin name. */
printf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' );
}
}
?>
</h2>
<?php
printf(
/* translators: %s: File path. */
' <span><strong>' . __( 'File: %s' ) . '</strong></span>',
esc_html( $file )
);
?>
</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>
</li>
</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 �8P\;p�Q� � user/index.phpnu �[��� <?php
/**
* User Dashboard Administration Screen
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/index.php';
PK �8P\�D� user/about.phpnu �[��� <?php
/**
* User Dashboard About administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/about.php';
PK �8P\:9h user/privacy.phpnu �[��� <?php
/**
* User Dashboard Privacy administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 4.9.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/privacy.php';
PK �8P\ ��a a user/admin.phpnu �[��� <?php
/**
* WordPress User Administration Bootstrap
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
define( 'WP_USER_ADMIN', true );
require_once dirname( __DIR__ ) . '/admin.php';
if ( ! is_multisite() ) {
wp_redirect( admin_url() );
exit;
}
$redirect_user_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) );
/**
* Filters whether to redirect the request to the User Admin in Multisite.
*
* @since 3.2.0
*
* @param bool $redirect_user_admin_request Whether the request should be redirected.
*/
$redirect_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request );
if ( $redirect_user_admin_request ) {
wp_redirect( user_admin_url() );
exit;
}
unset( $redirect_user_admin_request );
PK �8P\>i�� user/freedoms.phpnu �[��� <?php
/**
* User Dashboard Freedoms administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/freedoms.php';
PK �8P\/J� � user/profile.phpnu �[��� <?php
/**
* User Profile Administration Screen.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/profile.php';
PK �8P\��� � user/user-edit.phpnu �[��� <?php
/**
* Edit user administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/user-edit.php';
PK �8P\ޟ user/credits.phpnu �[��� <?php
/**
* User Dashboard Credits administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 3.4.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/credits.php';
PK �8P\Q�O user/contribute.phpnu �[��� <?php
/**
* User Dashboard Contribute administration panel.
*
* @package WordPress
* @subpackage Administration
* @since 6.6.0
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
require ABSPATH . 'wp-admin/contribute.php';
PK �8P\� #w? ?
user/menu.phpnu �[��� <?php
/**
* Build User Administration Menu.
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$menu[2] = array( __( 'Dashboard' ), 'exist', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard' );
$menu[4] = array( '', 'exist', 'separator1', '', 'wp-menu-separator' );
$menu[70] = array( __( 'Profile' ), 'exist', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'dashicons-admin-users' );
$menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
$_wp_real_parent_file['users.php'] = 'profile.php';
$compat = array();
$submenu = array();
require_once ABSPATH . 'wp-admin/includes/menu.php';
PK �8P\q�K ms-delete-site.phpnu �[��� <?php
/**
* Multisite delete site panel.
*
* @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( 'delete_site' ) ) {
wp_die( __( 'Sorry, you are not allowed to delete this site.' ) );
}
if ( isset( $_GET['h'] ) && '' !== $_GET['h'] && false !== get_option( 'delete_blog_hash' ) ) {
if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
wpmu_delete_blog( get_current_blog_id() );
wp_die(
sprintf(
/* translators: %s: Network title. */
__( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ),
get_network()->site_name
)
);
} else {
wp_die( __( 'Sorry, the link you clicked is stale. Please select another option.' ) );
}
}
$blog = get_site();
$user = wp_get_current_user();
// Used in the HTML title tag.
$title = __( 'Delete Site' );
$parent_file = 'tools.php';
require_once ABSPATH . 'wp-admin/admin-header.php';
echo '<div class="wrap">';
echo '<h1>' . esc_html( $title ) . '</h1>';
if ( isset( $_POST['action'] ) && 'deleteblog' === $_POST['action'] && isset( $_POST['confirmdelete'] ) && '1' === $_POST['confirmdelete'] ) {
check_admin_referer( 'delete-blog' );
$hash = wp_generate_password( 20, false );
update_option( 'delete_blog_hash', $hash, false );
$url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );
$switched_locale = switch_to_locale( get_locale() );
/* translators: Do not translate USERNAME, URL_DELETE, SITENAME, SITEURL: those are placeholders. */
$content = __(
"Howdy ###USERNAME###,
You recently clicked the 'Delete Site' link on your site and filled in a
form on that page.
If you really want to delete your site, click the link below. You will not
be asked to confirm again so only click this link if you are absolutely certain:
###URL_DELETE###
If you delete your site, please consider opening a new site here some time in
the future! (But remember that your current site and username are gone forever.)
Thank you for using the site,
All at ###SITENAME###
###SITEURL###"
);
/**
* Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.
*
* The following strings have a special meaning and will get replaced dynamically:
*
* - `###USERNAME###` The current user's username.
* - `###URL_DELETE###` The link to click on to confirm the site deletion.
* - `###SITENAME###` The name of the site.
* - `###SITEURL###` The URL to the site.
*
* @since 3.0.0
*
* @param string $content The email text.
*/
$content = apply_filters( 'delete_site_email_content', $content );
$content = str_replace( '###USERNAME###', $user->user_login, $content );
$content = str_replace( '###URL_DELETE###', $url_delete, $content );
$content = str_replace( '###SITENAME###', get_network()->site_name, $content );
$content = str_replace( '###SITEURL###', network_home_url(), $content );
wp_mail(
get_option( 'admin_email' ),
sprintf(
/* translators: %s: Site title. */
__( '[%s] Delete My Site' ),
wp_specialchars_decode( get_option( 'blogname' ) )
),
$content
);
if ( $switched_locale ) {
restore_previous_locale();
}
?>
<p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ); ?></p>
<?php
} else {
?>
<p>
<?php
printf(
/* translators: %s: Network title. */
__( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.' ),
get_network()->site_name
);
?>
</p>
<p><?php _e( 'Remember, once deleted your site cannot be restored.' ); ?></p>
<form method="post" name="deletedirect">
<?php wp_nonce_field( 'delete-blog' ); ?>
<input type="hidden" name="action" value="deleteblog" />
<p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong>
<?php
printf(
/* translators: %s: Site address. */
__( "I'm sure I want to permanently delete my site, and I am aware I can never get it back or use %s again." ),
$blog->domain . $blog->path
);
?>
</strong></label></p>
<?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
</form>
<?php
}
echo '</div>';
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK �8P\C�;�/` /` user-new.phpnu �[��� <?php
/**
* New User Administration Screen.
*
* @package WordPress
* @subpackage Administration
*/
/** WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
if ( is_multisite() ) {
if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
403
);
}
} elseif ( ! current_user_can( 'create_users' ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
403
);
}
if ( is_multisite() ) {
add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );
}
if ( isset( $_REQUEST['action'] ) && 'adduser' === $_REQUEST['action'] ) {
check_admin_referer( 'add-user', '_wpnonce_add-user' );
$user_details = null;
$user_email = wp_unslash( $_REQUEST['email'] );
if ( str_contains( $user_email, '@' ) ) {
$user_details = get_user_by( 'email', $user_email );
} else {
if ( current_user_can( 'manage_network_users' ) ) {
$user_details = get_user_by( 'login', $user_email );
} else {
wp_redirect( add_query_arg( array( 'update' => 'enter_email' ), 'user-new.php' ) );
die();
}
}
if ( ! $user_details ) {
wp_redirect( add_query_arg( array( 'update' => 'does_not_exist' ), 'user-new.php' ) );
die();
}
if ( ! current_user_can( 'promote_user', $user_details->ID ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to add users to this network.' ) . '</p>',
403
);
}
// Adding an existing user to this blog.
$new_user_email = array();
$redirect = 'user-new.php';
$username = $user_details->user_login;
$user_id = $user_details->ID;
if ( array_key_exists( $blog_id, get_blogs_of_user( $user_id ) ) ) {
$redirect = add_query_arg( array( 'update' => 'addexisting' ), 'user-new.php' );
} else {
if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
wp_ensure_editable_role( $_REQUEST['role'] );
$result = add_existing_user_to_blog(
array(
'user_id' => $user_id,
'role' => $_REQUEST['role'],
)
);
if ( ! is_wp_error( $result ) ) {
$redirect = add_query_arg(
array(
'update' => 'addnoconfirmation',
'user_id' => $user_id,
),
'user-new.php'
);
} else {
$redirect = add_query_arg( array( 'update' => 'could_not_add' ), 'user-new.php' );
}
} else {
$newuser_key = wp_generate_password( 20, false );
add_option(
'new_user_' . $newuser_key,
array(
'user_id' => $user_id,
'email' => $user_details->user_email,
'role' => $_REQUEST['role'],
)
);
$roles = get_editable_roles();
$role = $roles[ $_REQUEST['role'] ];
/**
* Fires immediately after an existing user is invited to join the site, but before the notification is sent.
*
* @since 4.4.0
*
* @param int $user_id The invited user's ID.
* @param array $role Array containing role information for the invited user.
* @param string $newuser_key The key of the invitation.
*/
do_action( 'invite_user', $user_id, $role, $newuser_key );
$switched_locale = switch_to_user_locale( $user_id );
if ( '' !== get_option( 'blogname' ) ) {
$site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
} else {
$site_title = parse_url( home_url(), PHP_URL_HOST );
}
/* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */
$message = __(
'Hi,
You\'ve been invited to join \'%1$s\' at
%2$s with the role of %3$s.
Please click the following link to confirm the invite:
%4$s'
);
$new_user_email['to'] = $user_details->user_email;
$new_user_email['subject'] = sprintf(
/* translators: Joining confirmation notification email subject. %s: Site title. */
__( '[%s] Joining Confirmation' ),
$site_title
);
$new_user_email['message'] = sprintf(
$message,
get_option( 'blogname' ),
home_url(),
wp_specialchars_decode( translate_user_role( $role['name'] ) ),
home_url( "/newbloguser/$newuser_key/" )
);
$new_user_email['headers'] = '';
/**
* Filters the contents of the email sent when an existing user is invited to join the site.
*
* @since 5.6.0
*
* @param array $new_user_email {
* Used to build wp_mail().
*
* @type string $to The email address of the invited user.
* @type string $subject The subject of the email.
* @type string $message The content of the email.
* @type string $headers Headers.
* }
* @param int $user_id The invited user's ID.
* @param array $role Array containing role information for the invited user.
* @param string $newuser_key The key of the invitation.
*
*/
$new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key );
wp_mail(
$new_user_email['to'],
$new_user_email['subject'],
$new_user_email['message'],
$new_user_email['headers']
);
if ( $switched_locale ) {
restore_previous_locale();
}
$redirect = add_query_arg( array( 'update' => 'add' ), 'user-new.php' );
}
}
wp_redirect( $redirect );
die();
} elseif ( isset( $_REQUEST['action'] ) && 'createuser' === $_REQUEST['action'] ) {
check_admin_referer( 'create-user', '_wpnonce_create-user' );
if ( ! current_user_can( 'create_users' ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to create users.' ) . '</p>',
403
);
}
if ( ! is_multisite() ) {
$user_id = edit_user();
if ( is_wp_error( $user_id ) ) {
$add_user_errors = $user_id;
} else {
if ( current_user_can( 'list_users' ) ) {
$redirect = 'users.php?update=add&id=' . $user_id;
} else {
$redirect = add_query_arg( 'update', 'add', 'user-new.php' );
}
wp_redirect( $redirect );
die();
}
} else {
// Adding a new user to this site.
$new_user_email = wp_unslash( $_REQUEST['email'] );
$user_details = wpmu_validate_user_signup( $_REQUEST['user_login'], $new_user_email );
if ( is_wp_error( $user_details['errors'] ) && $user_details['errors']->has_errors() ) {
$add_user_errors = $user_details['errors'];
} else {
/** This filter is documented in wp-includes/user.php */
$new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) );
if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email.
add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email.
}
wp_ensure_editable_role( $_REQUEST['role'] );
wpmu_signup_user(
$new_user_login,
$new_user_email,
array(
'add_to_blog' => get_current_blog_id(),
'new_role' => $_REQUEST['role'],
)
);
if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) {
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) );
$new_user = wpmu_activate_signup( $key );
if ( is_wp_error( $new_user ) ) {
$redirect = add_query_arg( array( 'update' => 'addnoconfirmation' ), 'user-new.php' );
} elseif ( ! is_user_member_of_blog( $new_user['user_id'] ) ) {
$redirect = add_query_arg( array( 'update' => 'created_could_not_add' ), 'user-new.php' );
} else {
$redirect = add_query_arg(
array(
'update' => 'addnoconfirmation',
'user_id' => $new_user['user_id'],
),
'user-new.php'
);
}
} else {
$redirect = add_query_arg( array( 'update' => 'newuserconfirmation' ), 'user-new.php' );
}
wp_redirect( $redirect );
die();
}
}
}
// Used in the HTML title tag.
$title = __( 'Add User' );
$parent_file = 'users.php';
$do_both = false;
if ( is_multisite() && current_user_can( 'promote_users' ) && current_user_can( 'create_users' ) ) {
$do_both = true;
}
$help = '<p>' . __( 'To add a new user to your site, fill in the form on this screen and click the Add User button at the bottom.' ) . '</p>';
if ( is_multisite() ) {
$help .= '<p>' . __( 'Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user’s name to Edit the user profile under Network Admin > All Users.' ) . '</p>' .
'<p>' . __( 'New users will receive an email letting them know they’ve been added as a user for your site. This email will also contain their password. Check the box if you do not want the user to receive a welcome email.' ) . '</p>';
} else {
$help .= '<p>' . __( 'New users are automatically assigned a password, which they can change after logging in. You can view or edit the assigned password by clicking the Show Password button. The username cannot be changed once the user has been added.' ) . '</p>' .
'<p>' . __( 'By default, new users will receive an email letting them know they’ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you do not want to send the new user a welcome email.' ) . '</p>';
}
$help .= '<p>' . __( 'Remember to click the Add User button at the bottom of this screen when you are finished.' ) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'overview',
'title' => __( 'Overview' ),
'content' => $help,
)
);
get_current_screen()->add_help_tab(
array(
'id' => 'user-roles',
'title' => __( 'User Roles' ),
'content' => '<p>' . __( 'Here is a basic overview of the different user roles and the permissions associated with each one:' ) . '</p>' .
'<ul>' .
'<li>' . __( 'Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.' ) . '</li>' .
'<li>' . __( 'Contributors can write and manage their posts but not publish posts or upload media files.' ) . '</li>' .
'<li>' . __( 'Authors can publish and manage their own posts, and are able to upload files.' ) . '</li>' .
'<li>' . __( 'Editors can publish posts, manage posts as well as manage other people’s posts, etc.' ) . '</li>' .
'<li>' . __( 'Administrators have access to all the administration features.' ) . '</li>' .
'</ul>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/documentation/article/users-add-new-screen/">Documentation on Adding New Users</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
);
wp_enqueue_script( 'wp-ajax-response' );
wp_enqueue_script( 'user-profile' );
/**
* Filters whether to enable user auto-complete for non-super admins in Multisite.
*
* @since 3.4.0
*
* @param bool $enable Whether to enable auto-complete for non-super admins. Default false.
*/
if ( is_multisite() && current_user_can( 'promote_users' ) && ! wp_is_large_network( 'users' )
&& ( current_user_can( 'manage_network_users' ) || apply_filters( 'autocomplete_users_for_site_admins', false ) )
) {
wp_enqueue_script( 'user-suggest' );
}
require_once ABSPATH . 'wp-admin/admin-header.php';
if ( isset( $_GET['update'] ) ) {
$messages = array();
if ( is_multisite() ) {
$edit_link = '';
if ( ( isset( $_GET['user_id'] ) ) ) {
$user_id_new = absint( $_GET['user_id'] );
if ( $user_id_new ) {
$edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), get_edit_user_link( $user_id_new ) ) );
}
}
switch ( $_GET['update'] ) {
case 'newuserconfirmation':
$messages[] = __( 'Invitation email sent to new user. A confirmation link must be clicked before their account is created.' );
break;
case 'add':
$messages[] = __( 'Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.' );
break;
case 'addnoconfirmation':
$message = __( 'User has been added to your site.' );
if ( $edit_link ) {
$message .= sprintf( ' <a href="%s">%s</a>', $edit_link, __( 'Edit user' ) );
}
$messages[] = $message;
break;
case 'addexisting':
$messages[] = __( 'That user is already a member of this site.' );
break;
case 'could_not_add':
$add_user_errors = new WP_Error( 'could_not_add', __( 'That user could not be added to this site.' ) );
break;
case 'created_could_not_add':
$add_user_errors = new WP_Error( 'created_could_not_add', __( 'User has been created, but could not be added to this site.' ) );
break;
case 'does_not_exist':
$add_user_errors = new WP_Error( 'does_not_exist', __( 'The requested user does not exist.' ) );
break;
case 'enter_email':
$add_user_errors = new WP_Error( 'enter_email', __( 'Please enter a valid email address.' ) );
break;
}
} else {
if ( 'add' === $_GET['update'] ) {
$messages[] = __( 'User added.' );
}
}
}
?>
<div class="wrap">
<h1 id="add-new-user">
<?php
if ( current_user_can( 'create_users' ) ) {
_e( 'Add User' );
} elseif ( current_user_can( 'promote_users' ) ) {
_e( 'Add Existing User' );
}
?>
</h1>
<?php
if ( isset( $errors ) && is_wp_error( $errors ) ) :
$error_message = '';
foreach ( $errors->get_error_messages() as $err ) {
$error_message .= "<li>$err</li>\n";
}
wp_admin_notice(
'<ul>' . $error_message . '</ul>',
array(
'additional_classes' => array( 'error' ),
'paragraph_wrap' => false,
)
);
endif;
if ( ! empty( $messages ) ) {
foreach ( $messages as $msg ) {
wp_admin_notice(
$msg,
array(
'id' => 'message',
'additional_classes' => array( 'updated' ),
'dismissible' => true,
)
);
}
}
?>
<?php
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) :
$error_message = '';
foreach ( $add_user_errors->get_error_messages() as $message ) {
$error_message .= "<p>$message</p>\n";
}
wp_admin_notice(
$error_message,
array(
'additional_classes' => array( 'error' ),
'paragraph_wrap' => false,
)
);
endif;
?>
<div id="ajax-response"></div>
<?php
if ( is_multisite() && current_user_can( 'promote_users' ) ) {
if ( $do_both ) {
echo '<h2 id="add-existing-user">' . __( 'Add Existing User' ) . '</h2>';
}
if ( ! current_user_can( 'manage_network_users' ) ) {
echo '<p>' . __( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
$label = __( 'Email' );
$type = 'email';
} else {
echo '<p>' . __( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '</p>';
$label = __( 'Email or Username' );
$type = 'text';
}
?>
<form method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"
<?php
/**
* Fires inside the adduser form tag.
*
* @since 3.0.0
*/
do_action( 'user_new_form_tag' );
?>
>
<input name="action" type="hidden" value="adduser" />
<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ); ?>
<table class="form-table" role="presentation">
<tr class="form-field form-required">
<th scope="row"><label for="adduser-email"><?php echo esc_html( $label ); ?></label></th>
<td><input name="email" type="<?php echo esc_attr( $type ); ?>" id="adduser-email" class="wp-suggest-user" value="" /></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="adduser-role"><?php _e( 'Role' ); ?></label></th>
<td><select name="role" id="adduser-role">
<?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
</select>
</td>
</tr>
<?php if ( current_user_can( 'manage_network_users' ) ) { ?>
<tr>
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
<td>
<input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" />
<label for="adduser-noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation' ); ?></label>
</td>
</tr>
<?php } ?>
</table>
<?php
/**
* Fires at the end of the new user form.
*
* Passes a contextual string to make both types of new user forms
* uniquely targetable. Contexts are 'add-existing-user' (Multisite),
* and 'add-new-user' (single site and network admin).
*
* @since 3.7.0
*
* @param string $type A contextual string specifying which type of new user form the hook follows.
*/
do_action( 'user_new_form', 'add-existing-user' );
?>
<?php submit_button( __( 'Add Existing User' ), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?>
</form>
<?php
} // End if is_multisite().
if ( current_user_can( 'create_users' ) ) {
if ( $do_both ) {
echo '<h2 id="create-new-user">' . __( 'Add User' ) . '</h2>';
}
?>
<p><?php _e( 'Create a brand new user and add them to this site.' ); ?></p>
<form method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"
<?php
/** This action is documented in wp-admin/user-new.php */
do_action( 'user_new_form_tag' );
?>
>
<input name="action" type="hidden" value="createuser" />
<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?>
<?php
// Load up the passed data, else set to a default.
$creating = isset( $_POST['createuser'] );
$new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : '';
$new_user_firstname = $creating && isset( $_POST['first_name'] ) ? wp_unslash( $_POST['first_name'] ) : '';
$new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_POST['last_name'] ) : '';
$new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : '';
$new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : '';
$new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : '';
$new_user_send_notification = $creating && ! isset( $_POST['send_user_notification'] ) ? false : true;
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : '';
?>
<table class="form-table" role="presentation">
<tr class="form-field form-required">
<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" autocomplete="off" maxlength="60" /></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td><input name="email" type="email" id="email" value="<?php echo esc_attr( $new_user_email ); ?>" /></td>
</tr>
<?php if ( ! is_multisite() ) { ?>
<tr class="form-field">
<th scope="row"><label for="first_name"><?php _e( 'First Name' ); ?> </label></th>
<td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr( $new_user_firstname ); ?>" /></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="last_name"><?php _e( 'Last Name' ); ?> </label></th>
<td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr( $new_user_lastname ); ?>" /></td>
</tr>
<tr class="form-field">
<th scope="row"><label for="url"><?php _e( 'Website' ); ?></label></th>
<td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td>
</tr>
<?php
$languages = get_available_languages();
if ( $languages ) :
?>
<tr class="form-field user-language-wrap">
<th scope="row">
<label for="locale">
<?php /* translators: The user language selection field label. */ ?>
<?php _e( 'Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></span>
</label>
</th>
<td>
<?php
wp_dropdown_languages(
array(
'name' => 'locale',
'id' => 'locale',
'selected' => 'site-default',
'languages' => $languages,
'show_available_translations' => false,
'show_option_site_default' => true,
)
);
?>
</td>
</tr>
<?php endif; ?>
<tr class="form-field form-required user-pass1-wrap">
<th scope="row">
<label for="pass1">
<?php _e( 'Password' ); ?>
<span class="description hide-if-js"><?php _e( '(required)' ); ?></span>
</label>
</th>
<td>
<input type="hidden" value=" " /><!-- #24364 workaround -->
<button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate password' ); ?></button>
<div class="wp-pwd">
<?php $initial_password = wp_generate_password( 24 ); ?>
<div class="password-input-wrapper">
<input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="new-password" spellcheck="false" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
<div style="display:none" id="pass-strength-result" aria-live="polite"></div>
</div>
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
<span class="text"><?php _e( 'Hide' ); ?></span>
</button>
</div>
</td>
</tr>
<tr class="form-field form-required user-pass2-wrap hide-if-js">
<th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td>
<input type="password" name="pass2" id="pass2" autocomplete="new-password" spellcheck="false" aria-describedby="pass2-desc" />
<p class="description" id="pass2-desc"><?php _e( 'Type the password again.' ); ?></p>
</td>
</tr>
<tr class="pw-weak">
<th><?php _e( 'Confirm Password' ); ?></th>
<td>
<label>
<input type="checkbox" name="pw_weak" class="pw-checkbox" />
<?php _e( 'Confirm use of weak password' ); ?>
</label>
</td>
</tr>
<tr>
<th scope="row"><?php _e( 'Send User Notification' ); ?></th>
<td>
<input type="checkbox" name="send_user_notification" id="send_user_notification" value="1" <?php checked( $new_user_send_notification ); ?> />
<label for="send_user_notification"><?php _e( 'Send the new user an email about their account' ); ?></label>
</td>
</tr>
<?php } // End if ! is_multisite(). ?>
<?php if ( current_user_can( 'promote_users' ) ) { ?>
<tr class="form-field">
<th scope="row"><label for="role"><?php _e( 'Role' ); ?></label></th>
<td><select name="role" id="role">
<?php
if ( ! $new_user_role ) {
$new_user_role = get_option( 'default_role' );
}
wp_dropdown_roles( $new_user_role );
?>
</select>
</td>
</tr>
<?php } ?>
<?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?>
<tr>
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
<td>
<input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> />
<label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation' ); ?></label>
</td>
</tr>
<?php } ?>
</table>
<?php
/** This action is documented in wp-admin/user-new.php */
do_action( 'user_new_form', 'add-new-user' );
?>
<?php submit_button( __( 'Add User' ), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?>
</form>
<?php } // End if current_user_can( 'create_users' ). ?>
</div>
<?php
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK �8P\M@ M@ 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( '-', wp_get_wp_version() );
$display_major_version = '6.9';
$release_notes_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ),
sanitize_title( $display_major_version )
);
$field_guide_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://make.wordpress.org/core/wordpress-%s-field-guide/' ),
sanitize_title( $display_major_version )
);
$release_page_url = sprintf(
/* translators: %s: WordPress version number. */
__( 'https://wordpress.org/download/releases/%s/' ),
sanitize_title( $display_major_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 Release' ); ?></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.',
49
),
'6.9.1',
49
);
?>
<?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.9.1' )
)
);
?>
</p>
</div>
</div>
<div class="about__section">
<div class="column">
<h2><?php _e( 'Welcome to WordPress 6.9' ); ?></h2>
<p class="is-subheading"><?php _e( 'WordPress 6.9 introduces a more intuitive way to create content, together. Every detail is designed to fit your creative flow, from Notes that let you collaborate directly in the editor to a powerful Command Palette that helps you reach every part of your site.' ); ?></p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<h3><?php _ex( 'Notes', 'about page section title' ); ?></h3>
<p>
<strong><?php _e( 'Leave feedback right where you’re working.' ); ?></strong><br />
<?php _e( 'With notes attached directly to blocks, your team can stay aligned, track changes, and turn feedback into action all in one place. Whether you’re working on copy or refining design, collaboration happens seamlessly on the canvas itself.' ); ?>
</p>
</div>
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/01-notes.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.9/02-visual-drag-drop.webp" alt="" height="436" width="436" />
</div>
</div>
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Visual drag and drop' ); ?></h3>
<p>
<strong><?php _e( 'Design flows naturally.' ); ?></strong><br />
<?php _e( 'Building layouts is now more intuitive and flexible with clear drag handles and a live preview that shows exactly what you’re moving—a faster way to build pages.' ); ?>
</p>
</div>
</div>
<div class="about__section has-2-columns">
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Command Palette, everywhere' ); ?></h3>
<p>
<strong><?php _e( 'Your tools are always at hand.' ); ?></strong><br />
<?php _e( 'Access the Command Palette from any part of your site, whether you’re writing your latest post, deep in design in the Site Editor, or browsing your plugins. Everything you need, just a few keystrokes away.' ); ?>
</p>
</div>
<div class="column is-vertically-aligned-center">
<div class="about__image">
<img src="https://s.w.org/images/core/6.9/03-command-palette-everywhere.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.9/04-fit-text.webp" alt="" height="436" width="436" />
</div>
</div>
<div class="column is-vertically-aligned-center">
<h3><?php _e( 'Fit text to container' ); ?></h3>
<p>
<strong><?php _e( 'Content that adapts.' ); ?></strong><br />
<?php _e( 'A new typography option for text-based blocks, starting with the Paragraph and Heading blocks, that automatically adjusts font size to fill its container perfectly. Ideal for banners, callouts, and standout moments in your design. No manual tweaks, just an instant clean design.' ); ?>
</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">
<path fill="#1e1e1e" d="M32.455 17.72a1.592 1.592 0 0 1 .599 2.195l-7.637 12.99a1.653 1.653 0 0 1-2.235.589 1.592 1.592 0 0 1-.599-2.195l7.637-12.99a1.653 1.653 0 0 1 2.235-.589ZM13.774 23.21a1.653 1.653 0 0 0-2.236.589 1.592 1.592 0 0 0 .6 2.195l.944.536c.783.444 1.783.18 2.235-.588a1.592 1.592 0 0 0-.599-2.196l-.944-.535ZM16.432 17.72a1.653 1.653 0 0 1 2.236.588l.545.928a1.592 1.592 0 0 1-.599 2.196 1.653 1.653 0 0 1-2.235-.588l-.546-.928a1.592 1.592 0 0 1 .6-2.196ZM25.637 16.5c0-.888-.733-1.607-1.637-1.607s-1.636.72-1.636 1.607v1.071c0 .888.732 1.608 1.636 1.608.904 0 1.637-.72 1.637-1.608V16.5Z"/>
<path fill="#1e1e1e" fill-rule="evenodd" d="M4.91 27.75C4.91 17.395 13.455 9 24 9s19.091 8.395 19.091 18.75c0 3.909-1.22 7.542-3.305 10.548l-.488.702H8.702l-.488-.702A18.438 18.438 0 0 1 4.91 27.75ZM24 12.214c-8.736 0-15.818 6.956-15.818 15.536 0 2.943.832 5.692 2.277 8.036h27.082a15.25 15.25 0 0 0 2.277-8.036c0-8.58-7.082-15.536-15.818-15.536Z" clip-rule="evenodd"/>
</svg>
</div>
<h3><?php _e( 'Performance updates' ); ?></h3>
<p><?php _e( 'WordPress 6.9 includes a broad set of performance enhancements. A better <abbr>LCP</abbr> (Largest Contentful Paint) metric is achieved through improved loading of conditional and inlined stylesheets, script loading with fetchpriority support, and additional core optimizations. Editor advances include fixes for layout shifts caused by the Video block and faster loading of the terms selector.' ); ?></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">
<path fill="#1e1e1e" d="M24 13.84c-.752 0-1.397-.287-1.936-.86a2.902 2.902 0 0 1-.809-2.06c0-.8.27-1.487.809-2.06S23.248 8 24 8c.753 0 1.398.287 1.937.86.54.573.809 1.26.809 2.06s-.27 1.487-.809 2.06-1.184.86-1.937.86ZM19.976 40V18.68a69.562 69.562 0 0 1-4.945-.56 45.877 45.877 0 0 1-4.57-.92l.565-2.4a46.79 46.79 0 0 0 6.356 1.14c2.106.227 4.312.34 6.618.34 2.307 0 4.513-.113 6.62-.34a46.786 46.786 0 0 0 6.355-1.14l.564 2.4c-1.454.373-2.977.68-4.57.92a69.55 69.55 0 0 1-4.945.56V40h-2.256V29.6h-3.535V40h-2.257Z"/>
</svg>
</div>
<h3><?php _e( 'Accessibility improvements' ); ?></h3>
<p><?php _e( '70+ accessibility fixes and enhancements focus on central areas of the WordPress experience. From globally hiding CSS-generated content from assistive technology and improvements to screen reader announcements and user experience, to fixing cursor position and keeping typing focus when clicking on an autocomplete suggestion item.' ); ?></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
printf(
/* translators: %s: Version number. */
__( 'For a comprehensive overview of all the new features and enhancements in WordPress %s, please visit the feature-showcase website.' ),
$display_major_version
);
?>
</p>
</div>
<div class="column aligncenter">
<div class="about__image">
<a href="<?php echo esc_url( $release_page_url ); ?>" 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.9' ) ); ?>" 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_major_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">
<path fill="#1e1e1e" d="M32 15.5H16v3h16v-3ZM16 22h16v3H16v-3ZM28 28.5H16v3h12v-3Z"/>
<path fill="#1e1e1e" fill-rule="evenodd" d="M34 8H14a4 4 0 0 0-4 4v24a4 4 0 0 0 4 4h20a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4Zm-20 3h20a1 1 0 0 1 1 1v24a1 1 0 0 1-1 1H14a1 1 0 0 1-1-1V12a1 1 0 0 1 1-1Z" clip-rule="evenodd"/>
</svg>
</div>
<h4 style="margin-top: calc(var(--gap) / 2); margin-bottom: calc(var(--gap) / 2);">
<a href="<?php echo esc_url( $release_notes_url ); ?>">
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'WordPress %s Release Notes' ),
$display_major_version
);
?>
</a>
</h4>
<p>
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'Read the WordPress %s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes.' ),
$display_major_version
);
?>
</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">
<path fill="#1e1e1e" stroke="#fff" stroke-width=".5" d="M26.5 24.25h13.75v11.5h-14v8h-3.5v-8H12.604L8.09 31.237a1.75 1.75 0 0 1 0-2.474l4.513-4.513H22.75v-4.5h-14V8.25h14v-4h3.5v4h10.146l4.513 4.513a1.75 1.75 0 0 1 0 2.474l-4.513 4.513H26.25v4.5h.25ZM12.25 16v.25h22.704l.073-.073 1.293-1.293a1.25 1.25 0 0 0 0-1.768l-1.293-1.293-.073-.073H12.25V16Zm1.723 16.177.073.073H36.75v-4.5H14.046l-.073.073-1.293 1.293a1.25 1.25 0 0 0 0 1.768l1.293 1.293Z"/>
</svg>
</div>
<h4 style="margin-top: calc(var(--gap) / 2); margin-bottom: calc(var(--gap) / 2);">
<a href="<?php echo esc_url( $field_guide_url ); ?>">
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'WordPress %s Field Guide' ),
$display_major_version
);
?>
</a>
</h4>
<p>
<?php
printf(
/* translators: %s: WordPress version number. */
__( 'Explore the WordPress %s Field Guide. Learn about the changes in this release with detailed developer notes to help you build with WordPress.' ),
$display_major_version
);
?>
</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 �8P\G:�@ upgrade.phpnu �[��� <?php
/**
* Upgrade WordPress Page.
*
* @package WordPress
* @subpackage Administration
*/
/**
* We are upgrading WordPress.
*
* @since 1.5.1
* @var bool
*/
define( 'WP_INSTALLING', true );
/** Load WordPress Bootstrap */
require dirname( __DIR__ ) . '/wp-load.php';
nocache_headers();
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
delete_site_transient( 'update_core' );
if ( isset( $_GET['step'] ) ) {
$step = $_GET['step'];
} else {
$step = 0;
}
// Do it. No output.
if ( 'upgrade_db' === $step ) {
wp_upgrade();
die( '0' );
}
/**
* @global string $wp_version The WordPress version string.
* @global string $required_php_version The minimum required PHP version string.
* @global string[] $required_php_extensions The names of required PHP extensions.
* @global string $required_mysql_version The minimum required MySQL version string.
* @global wpdb $wpdb WordPress database abstraction object.
*/
global $wp_version, $required_php_version, $required_php_extensions, $required_mysql_version, $wpdb;
$step = (int) $step;
$php_version = PHP_VERSION;
$mysql_version = $wpdb->db_version();
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
$mysql_compat = true;
} else {
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
}
$missing_extensions = array();
if ( isset( $required_php_extensions ) && is_array( $required_php_extensions ) ) {
foreach ( $required_php_extensions as $extension ) {
if ( extension_loaded( $extension ) ) {
continue;
}
$missing_extensions[] = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: The PHP extension name needed. */
__( 'You cannot upgrade because <a href="%1$s">WordPress %2$s</a> requires the %3$s PHP extension.' ),
$version_url,
$wp_version,
$extension
);
}
}
header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
<meta name="robots" content="noindex,nofollow" />
<title><?php _e( 'WordPress › Update' ); ?></title>
<?php wp_admin_css( 'install', true ); ?>
</head>
<body class="wp-core-ui">
<p id="logo"><?php _e( 'WordPress' ); ?></p>
<?php if ( (int) get_option( 'db_version' ) === $wp_db_version || ! is_blog_installed() ) : ?>
<h1><?php _e( 'No Update Required' ); ?></h1>
<p><?php _e( 'Your WordPress database is already up to date!' ); ?></p>
<p class="step"><a class="button button-large" href="<?php echo esc_url( get_option( 'home' ) ); ?>/"><?php _e( 'Continue' ); ?></a></p>
<?php
elseif ( ! $php_compat || ! $mysql_compat ) :
$version_url = sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ),
sanitize_title( $wp_version )
);
$php_update_message = '</p><p>' . sprintf(
/* translators: %s: URL to Update PHP page. */
__( '<a href="%s">Learn more about updating PHP</a>.' ),
esc_url( wp_get_update_php_url() )
);
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
$php_update_message .= '</p><p><em>' . $annotation . '</em>';
}
if ( ! $mysql_compat && ! $php_compat ) {
$message = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Minimum required MySQL version number, 5: Current PHP version number, 6: Current MySQL version number. */
__( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher and MySQL version %4$s or higher. You are running PHP version %5$s and MySQL version %6$s.' ),
$version_url,
$wp_version,
$required_php_version,
$required_mysql_version,
$php_version,
$mysql_version
) . $php_update_message;
} elseif ( ! $php_compat ) {
$message = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required PHP version number, 4: Current PHP version number. */
__( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires PHP version %3$s or higher. You are running version %4$s.' ),
$version_url,
$wp_version,
$required_php_version,
$php_version
) . $php_update_message;
} elseif ( ! $mysql_compat ) {
$message = sprintf(
/* translators: 1: URL to WordPress release notes, 2: WordPress version number, 3: Minimum required MySQL version number, 4: Current MySQL version number. */
__( 'You cannot update because <a href="%1$s">WordPress %2$s</a> requires MySQL version %3$s or higher. You are running version %4$s.' ),
$version_url,
$wp_version,
$required_mysql_version,
$mysql_version
);
}
echo '<p>' . $message . '</p>';
elseif ( count( $missing_extensions ) > 0 ) :
echo '<p>' . implode( '</p><p>', $missing_extensions ) . '</p>';
else :
switch ( $step ) :
case 0:
$goback = wp_get_referer();
if ( $goback ) {
$goback = sanitize_url( $goback );
$goback = urlencode( $goback );
}
?>
<h1><?php _e( 'Database Update Required' ); ?></h1>
<p><?php _e( 'WordPress has been updated! Next and final step is to update your database to the newest version.' ); ?></p>
<p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p>
<p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
<?php
break;
case 1:
wp_upgrade();
$backto = ! empty( $_GET['backto'] ) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
$backto = esc_url( $backto );
$backto = wp_validate_redirect( $backto, __get_option( 'home' ) . '/' );
?>
<h1><?php _e( 'Update Complete' ); ?></h1>
<p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
<p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
<?php
break;
endswitch;
endif;
?>
</body>
</html>
PK �8P\��ғ�
�
post-new.phpnu �[��� <?php
/**
* New Post Administration Screen.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once __DIR__ . '/admin.php';
/**
* @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;
if ( ! isset( $_GET['post_type'] ) ) {
$post_type = 'post';
} elseif ( in_array( $_GET['post_type'], get_post_types( array( 'show_ui' => true ) ), true ) ) {
$post_type = $_GET['post_type'];
} else {
wp_die( __( 'Invalid post type.' ) );
}
$post_type_object = get_post_type_object( $post_type );
if ( 'post' === $post_type ) {
$parent_file = 'edit.php';
$submenu_file = 'post-new.php';
} elseif ( 'attachment' === $post_type ) {
if ( wp_redirect( admin_url( 'media-new.php' ) ) ) {
exit;
}
} else {
$submenu_file = "post-new.php?post_type=$post_type";
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && true !== $post_type_object->show_in_menu ) {
$parent_file = $post_type_object->show_in_menu;
// What if there isn't a post-new.php item for this post type?
if ( ! isset( $_registered_pages[ get_plugin_page_hookname( "post-new.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
if ( isset( $_registered_pages[ get_plugin_page_hookname( "edit.php?post_type=$post_type", $post_type_object->show_in_menu ) ] ) ) {
// Fall back to edit.php for that post type, if it exists.
$submenu_file = "edit.php?post_type=$post_type";
} else {
// Otherwise, give up and highlight the parent.
$submenu_file = $parent_file;
}
}
} else {
$parent_file = "edit.php?post_type=$post_type";
}
}
$title = $post_type_object->labels->add_new_item;
$editing = true;
if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_can( $post_type_object->cap->create_posts ) ) {
wp_die(
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
403
);
}
$post = get_default_post_to_edit( $post_type, true );
$post_ID = $post->ID;
/** This filter is documented in wp-admin/post.php */
if ( apply_filters( 'replace_editor', false, $post ) !== true ) {
if ( use_block_editor_for_post( $post ) ) {
require ABSPATH . 'wp-admin/edit-form-blocks.php';
} else {
wp_enqueue_script( 'autosave' );
require ABSPATH . 'wp-admin/edit-form-advanced.php';
}
} else {
// Flag that we're not loading the block editor.
$current_screen = get_current_screen();
$current_screen->is_block_editor( false );
}
require_once ABSPATH . 'wp-admin/admin-footer.php';
PK �8P\�#K'