Commit caeee14c authored by lucha's avatar lucha

Updated Wordpress 4.6.1

parent e636ca21
......@@ -9,7 +9,7 @@
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 4.5.3
<br /> Version 4.6.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......@@ -53,15 +53,15 @@
<h2>System Requirements</h2>
<ul>
<li><a href="http://php.net/">PHP</a> version <strong>5.2.4</strong> or higher.</li>
<li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.2.4</strong> or higher.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
</ul>
<h3>Recommendations</h3>
<ul>
<li><a href="http://php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
<li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
<li>The <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>5.6</strong> or higher.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.6</strong> or higher.</li>
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
</ul>
......@@ -83,7 +83,7 @@
<h2>Final Notes</h2>
<ul>
<li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/">Support Forums</a>.</li>
<li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://codex.wordpress.org/Plugin_API" title="WordPress plugin API">plugin documentation in the Codex</a>. You shouldn&#8217;t modify any of the core code.</li>
<li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
</ul>
<h2>Share the Love</h2>
......
......@@ -32,13 +32,17 @@ $wp_query->is_404 = false;
do_action( 'activate_header' );
/**
* Adds an action hook specific to this page that fires on wp_head
* Adds an action hook specific to this page.
*
* Fires on {@see 'wp_head'}.
*
* @since MU
*/
function do_activate_header() {
/**
* Fires before the Site Activation page is loaded, but on the wp_head action.
/**
* Fires before the Site Activation page is loaded.
*
* Fires on the {@see 'wp_head'} action.
*
* @since 3.0.0
*/
......@@ -88,22 +92,37 @@ get_header( 'wp-activate' );
$result = wpmu_activate_signup( $key );
if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data();
$signup = $result->get_error_data();
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
network_site_url( 'wp-login.php', 'login' ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
} else {
printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
printf(
/* translators: 1: site URL, 2: site domain, 3: username, 4: user email, 5: lost password URL */
__( 'Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.' ),
'http://' . $signup->domain,
$signup->domain,
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
} else {
?>
<h2><?php _e('An error occurred during the activation'); ?></h2>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<p><?php echo $result->get_error_message(); ?></p>
<?php
echo '<p>'.$result->get_error_message().'</p>';
}
} else {
$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
......@@ -121,9 +140,15 @@ get_header( 'wp-activate' );
$login_url = wp_login_url();
restore_current_blog();
?>
<p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) ); ?></p>
<p class="view"><?php
/* translators: 1: site URL, 2: login URL */
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) );
?></p>
<?php else: ?>
<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
<p class="view"><?php
/* translators: 1: login URL, 2: network home URL */
printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
?></p>
<?php endif;
}
}
......
This diff is collapsed.
<?php
/**
* WordPress AJAX Process Execution.
* WordPress Ajax Process Execution
*
* @package WordPress
* @subpackage Administration
......@@ -9,7 +9,7 @@
*/
/**
* Executing AJAX process.
* Executing Ajax process.
*
* @since 2.1.0
*/
......@@ -62,7 +62,9 @@ $core_actions_post = array(
'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin', 'press-this-save-post',
'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username',
'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username', 'delete-plugin',
'search-plugins', 'search-install-plugins', 'activate-plugin', 'update-theme', 'delete-theme',
'install-theme', 'get-post-thumbnail-html',
);
// Deprecated
......@@ -79,20 +81,20 @@ add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
if ( is_user_logged_in() ) {
/**
* Fires authenticated AJAX actions for logged-in users.
* Fires authenticated Ajax actions for logged-in users.
*
* The dynamic portion of the hook name, `$_REQUEST['action']`,
* refers to the name of the AJAX action callback being fired.
* refers to the name of the Ajax action callback being fired.
*
* @since 2.1.0
*/
do_action( 'wp_ajax_' . $_REQUEST['action'] );
} else {
/**
* Fires non-authenticated AJAX actions for logged-out users.
* Fires non-authenticated Ajax actions for logged-out users.
*
* The dynamic portion of the hook name, `$_REQUEST['action']`,
* refers to the name of the AJAX action callback being fired.
* refers to the name of the Ajax action callback being fired.
*
* @since 2.8.0
*/
......
......@@ -9,6 +9,11 @@
// don't load directly
if ( !defined('ABSPATH') )
die('-1');
/**
* @global string $hook_suffix
*/
global $hook_suffix;
?>
<div class="clear"></div></div><!-- wpbody-content -->
......@@ -28,7 +33,7 @@ if ( !defined('ABSPATH') )
<?php
$text = sprintf( __( 'Thank you for creating with <a href="%s">WordPress</a>.' ), __( 'https://wordpress.org/' ) );
/**
* Filter the "Thank you" text displayed in the admin footer.
* Filters the "Thank you" text displayed in the admin footer.
*
* @since 2.8.0
*
......@@ -40,7 +45,7 @@ if ( !defined('ABSPATH') )
<p id="footer-upgrade" class="alignright">
<?php
/**
* Filter the version/update text displayed in the admin footer.
* Filters the version/update text displayed in the admin footer.
*
* WordPress prints the current version and update information,
* using core_update_footer() at priority 10.
......@@ -58,7 +63,7 @@ if ( !defined('ABSPATH') )
</div>
<?php
/**
* Print scripts or data before the default footer scripts.
* Prints scripts or data before the default footer scripts.
*
* @since 1.2.0
*
......@@ -66,6 +71,20 @@ if ( !defined('ABSPATH') )
*/
do_action( 'admin_footer', '' );
/**
* Prints scripts and data queued for the footer.
*
* The dynamic portion of the hook name, `$hook_suffix`,
* refers to the global hook suffix of the current page.
*
* @since 4.6.0
*
* @global string $hook_suffix
*
* @param string $hook_suffix The current admin page.
*/
do_action( "admin_print_footer_scripts-$hook_suffix" );
/**
* Prints any scripts and data queued for the footer.
*
......@@ -74,9 +93,9 @@ do_action( 'admin_footer', '' );
do_action( 'admin_print_footer_scripts' );
/**
* Print scripts or data after the default footer scripts.
* Prints scripts or data after the default footer scripts.
*
* The dynamic portion of the hook name, `$GLOBALS['hook_suffix']`,
* The dynamic portion of the hook name, `$hook_suffix`,
* refers to the global hook suffix of the current page.
*
* @since 2.8.0
......@@ -84,7 +103,7 @@ do_action( 'admin_print_footer_scripts' );
* @global string $hook_suffix
* @param string $hook_suffix The current admin page.
*/
do_action( "admin_footer-" . $GLOBALS['hook_suffix'] );
do_action( "admin_footer-$hook_suffix" );
// get_site_option() won't exist when auto upgrading from <= 2.7
if ( function_exists('get_site_option') ) {
......
......@@ -9,7 +9,7 @@
* @subpackage Administration
*/
_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/admin.php' );
_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/admin.php' );
/** WordPress Administration API: Includes all Administration functions. */
require_once(ABSPATH . 'wp-admin/includes/admin.php');
......@@ -46,7 +46,7 @@ else
$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
/**
* Filter the title tag content for an admin page.
* Filters the title tag content for an admin page.
*
* @since 3.1.0
*
......@@ -174,7 +174,7 @@ $admin_body_class .= ' no-customize-support no-svg';
</head>
<?php
/**
* Filter the CSS classes for the body tag in the admin.
* Filters the CSS classes for the body tag in the admin.
*
* This filter differs from the {@see 'post_class'} and {@see 'body_class'} filters
* in two important ways:
......@@ -229,21 +229,21 @@ $current_screen->render_screen_meta();
if ( is_network_admin() ) {
/**
* Print network admin screen notices.
* Prints network admin screen notices.
*
* @since 3.1.0
*/
do_action( 'network_admin_notices' );
} elseif ( is_user_admin() ) {
/**
* Print user admin screen notices.
* Prints user admin screen notices.
*
* @since 3.1.0
*/
do_action( 'user_admin_notices' );
} else {
/**
* Print admin screen notices.
* Prints admin screen notices.
*
* @since 3.1.0
*/
......@@ -251,7 +251,7 @@ if ( is_network_admin() ) {
}
/**
* Print generic admin screen notices.
* Prints generic admin screen notices.
*
* @since 3.1.0
*/
......
......@@ -48,7 +48,7 @@ if ( get_option('db_upgraded') ) {
exit;
/**
* Filter whether to attempt to perform the multisite DB upgrade routine.
* 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
......@@ -138,21 +138,7 @@ else
require(ABSPATH . 'wp-admin/menu.php');
if ( current_user_can( 'manage_options' ) ) {
/**
* Filter the maximum memory limit available for administration screens.
*
* This only applies to administrators, who may require more memory for tasks like updates.
* Memory limits when processing images (uploaded or edited by users of any role) are
* handled separately.
*
* The WP_MAX_MEMORY_LIMIT constant specifically defines the maximum memory limit available
* when in the administration back end. The default is 256M, or 256 megabytes of memory.
*
* @since 3.0.0
*
* @param string 'WP_MAX_MEMORY_LIMIT' The maximum WordPress memory limit. Default 256M.
*/
@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
wp_raise_memory_limit( 'admin' );
}
/**
......@@ -161,7 +147,7 @@ if ( current_user_can( 'manage_options' ) ) {
* 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 'init' hook, which fires earlier.
* This is roughly analogous to the more general {@see 'init'} hook, which fires earlier.
*
* @since 2.5.0
*/
......@@ -175,7 +161,7 @@ if ( isset($plugin_page) ) {
if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) {
$page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
// Backwards compatibility for plugins using add_management_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' ]) )
......@@ -271,8 +257,9 @@ if ( isset($plugin_page) ) {
$importer = $_GET['import'];
if ( ! current_user_can('import') )
wp_die(__('You are not allowed to import.'));
if ( ! current_user_can( 'import' ) ) {
wp_die( __( 'Sorry, you are not allowed to import content.' ) );
}
if ( validate_file($importer) ) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
......
......@@ -45,7 +45,7 @@ if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']
}
if ( ! current_user_can( 'upload_files' ) ) {
wp_die( __( 'You do not have permission to upload files.' ) );
wp_die( __( 'Sorry, you are not allowed to upload files.' ) );
}
// just fetch the detail form for that attachment
......@@ -54,7 +54,7 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( 'attachment' != $post->post_type )
wp_die( __( 'Unknown post type.' ) );
if ( ! current_user_can( 'edit_post', $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );
switch ( $_REQUEST['fetch'] ) {
case 3 :
......@@ -105,7 +105,7 @@ if ( $_REQUEST['short'] ) {
$type = $_REQUEST['type'];
/**
* Filter the returned ID of an uploaded attachment.
* Filters the returned ID of an uploaded attachment.
*
* The dynamic portion of the hook name, `$type`, refers to the attachment type,
* such as 'image', 'audio', 'video', 'file', etc.
......
......@@ -61,7 +61,7 @@ case 'editcomment' :
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( __('You are not allowed to edit this comment.') );
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.') );
......@@ -197,7 +197,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
<?php
/* translators: 1: comment date, 2: comment time */
$submitted = sprintf( __( '%1$s at %2$s' ),
/* translators: comment date format. See http://php.net/date */
/* translators: comment date format. See https://secure.php.net/date */
get_comment_date( __( 'Y/m/d' ), $comment ),
get_comment_date( __( 'g:i a' ), $comment )
);
......@@ -254,7 +254,7 @@ case 'unapprovecomment' :
if ( !$comment = get_comment($comment_id) )
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( __('You are not allowed to edit comments on this post.') );
comment_footer_die( __('Sorry, you are not allowed to edit comments on this post.') );
if ( '' != wp_get_referer() && ! $noredir && false === strpos(wp_get_referer(), 'comment.php') )
$redir = wp_get_referer();
......@@ -313,7 +313,7 @@ case 'editedcomment' :
$location = ( empty( $_POST['referredby'] ) ? "edit-comments.php?p=$comment_post_id" : $_POST['referredby'] ) . '#comment-' . $comment_id;
/**