Commit fc360bce authored by lechuck's avatar lechuck Committed by lucha

Upgrade wordpress 4.5.2

parent 9e790437
WordPress - Web publishing software
Copyright 2015 by the contributors
Copyright 2011-2016 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -9,15 +9,15 @@
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 4.3.1
<br /> Version 4.5.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
<h1>First Things First</h1>
<h2>First Things First</h2>
<p>Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I&#8217;m proud to be a part of. Thousands of hours have gone into WordPress, and we&#8217;re dedicated to making it better every day. Thank you for making it part of your world.</p>
<p style="text-align: right">&#8212; Matt Mullenweg</p>
<h1>Installation: Famous 5-minute install</h1>
<h2>Installation: Famous 5-minute install</h2>
<ol>
<li>Unzip the package in an empty directory and upload everything.</li>
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser. It will take you through the process to set up a <code>wp-config.php</code> file with your database connection details.
......@@ -32,15 +32,15 @@
<li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on &#8220;Profile&#8221; to change the password.</li>
</ol>
<h1>Updating</h1>
<h2>Using the Automatic Updater</h2>
<h2>Updating</h2>
<h3>Using the Automatic Updater</h3>
<p>If you are updating from version 2.7 or higher, you can use the automatic updater:</p>
<ol>
<li>Open <span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span> in your browser and follow the instructions.</li>
<li>You wanted more, perhaps? That&#8217;s it!</li>
</ol>
<h2>Updating Manually</h2>
<h3>Updating Manually</h3>
<ol>
<li>Before you update anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</li>
<li>Delete your old WordPress files, saving ones you&#8217;ve modified.</li>
......@@ -48,24 +48,24 @@
<li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a>.</span></li>
</ol>
<h1>Migrating from other systems</h1>
<h2>Migrating from other systems</h2>
<p>WordPress can <a href="https://codex.wordpress.org/Importing_Content">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php" title="Import to WordPress">our import tools</a>.</p>
<h1>System Requirements</h1>
<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>
</ul>
<h2>Recommendations</h2>
<h3>Recommendations</h3>
<ul>
<li><a href="http://php.net/">PHP</a> version <strong>5.4</strong> or higher.</li>
<li><a href="http://www.mysql.com/">MySQL</a> version <strong>5.5</strong> or higher.</li>
<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 link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
</ul>
<h1>Online Resources</h1>
<h2>Online Resources</h2>
<p>If you have any questions that aren&#8217;t addressed in this document, please take advantage of WordPress&#8217; numerous online resources:</p>
<dl>
<dt><a href="https://codex.wordpress.org/">The WordPress Codex</a></dt>
......@@ -80,18 +80,18 @@
<dd>There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a>)</dd>
</dl>
<h1>Final Notes</h1>
<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>
</ul>
<h1>Share the Love</h1>
<h2>Share the Love</h2>
<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better&#8212;you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.</p>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;log</a>, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/" title="Donate to WordPress">donating</a>.</p>
<h1>License</h1>
<h2>License</h2>
<p>WordPress is free software, and is released under the terms of the <abbr title="GNU General Public License">GPL</abbr> version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
</body>
......
<?php
/**
* Confirms that the activation key that is sent in an email after a user signs
* up for a new blog matches the key for that user and then displays confirmation.
* up for a new site matches the key for that user and then displays confirmation.
*
* @package WordPress
*/
......@@ -14,7 +14,7 @@ require( dirname(__FILE__) . '/wp-load.php' );
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
if ( !is_multisite() ) {
wp_redirect( site_url( '/wp-login.php?action=register' ) );
wp_redirect( wp_registration_url() );
die();
}
......@@ -58,16 +58,17 @@ function wpmu_activate_stylesheet() {
#submit, #key { width: 90%; font-size: 24px; }
#language { margin-top: .5em; }
.error { background: #f66; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; font-weight: bold; color: #333; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: bold; }
</style>
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
get_header();
get_header( 'wp-activate' );
?>
<div id="content" class="widecolumn">
<div id="signup-content" class="widecolumn">
<div class="wp-activate-container">
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
<h2><?php _e('Activation Key Required') ?></h2>
......@@ -115,17 +116,22 @@ get_header();
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
</div>
<?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
<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, $url . 'wp-login.php' ); ?></p>
<?php if ( $url && $url != network_home_url( '', 'http' ) ) :
switch_to_blog( (int) $result['blog_id'] );
$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>
<?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>
<?php endif;
}
}
?>
</div>
</div>
<script type="text/javascript">
var key_input = document.getElementById('key');
key_input && key_input.focus();
</script>
<?php get_footer();
<?php get_footer( 'wp-activate' );
This diff is collapsed.
......@@ -21,7 +21,7 @@ if ( ! defined( 'WP_ADMIN' ) ) {
/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Allow for cross-domain requests (from the frontend). */
/** Allow for cross-domain requests (from the front end). */
send_origin_headers();
// Require an action parameter
......@@ -56,13 +56,13 @@ $core_actions_post = array(
'hidden-columns', 'update-welcome-panel', 'menu-get-metabox', 'wp-link-ajax',
'menu-locations-save', 'menu-quick-search', 'meta-box-order', 'get-permalink',
'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order',
'save-widget', 'set-post-thumbnail', 'date_format', 'time_format',
'save-widget', 'delete-inactive-widgets', 'set-post-thumbnail', 'date_format', 'time_format',
'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
'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',
'press-this-add-category', 'crop-image', 'generate-password', 'save-wporg-username',
);
// Deprecated
......
......@@ -18,7 +18,7 @@ if ( defined('ABSPATH') )
else
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Allow for cross-domain requests (from the frontend). */
/** Allow for cross-domain requests (from the front end). */
send_origin_headers();
require_once(ABSPATH . 'wp-admin/includes/admin.php');
......
......@@ -59,7 +59,7 @@ if ( get_option('db_upgraded') ) {
*
* @since 3.0.0
*
* @param bool true Whether to perform the Multisite upgrade routine. Default true.
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
*/
} elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
$c = get_blog_count();
......@@ -84,13 +84,13 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect();
// Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
set_screen_options();
$date_format = get_option('date_format');
$time_format = get_option('time_format');
$date_format = __( 'F j, Y' );
$time_format = __( 'g:i a' );
wp_enqueue_script( 'common' );
......@@ -146,7 +146,7 @@ if ( current_user_can( 'manage_options' ) ) {
* 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.
* when in the administration back end. The default is 256M, or 256 megabytes of memory.
*
* @since 3.0.0
*
......@@ -161,7 +161,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 analgous to the more general 'init' hook, which fires earlier.
* This is roughly analogous to the more general 'init' hook, which fires earlier.
*
* @since 2.5.0
*/
......@@ -312,7 +312,7 @@ if ( isset($plugin_page) ) {
*
* @since 3.1.0
*
* @param bool false Whether to force data to be filtered through kses. Default false.
* @param bool $force Whether to force data to be filtered through kses. Default false.
*/
if ( apply_filters( 'force_filtered_html_on_import', false ) ) {
kses_init_filters(); // Always filter imported data with kses on multisite.
......@@ -355,6 +355,8 @@ if ( isset($plugin_page) ) {
do_action( 'load-categories.php' );
elseif ( $taxnow == 'link_category' )
do_action( 'load-edit-link-categories.php' );
} elseif( 'term.php' === $pagenow ) {
do_action( 'load-edit-tags.php' );
}
}
......
......@@ -61,7 +61,10 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) )
echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
$title = $post->post_title ? $post->post_title : wp_basename( $post->guid ); // title shouldn't ever be empty, but use filename just in cas.e
// Title shouldn't ever be empty, but use filename just in case.
$file = get_attached_file( $post->ID );
$title = $post->post_title ? $post->post_title : wp_basename( $file );
echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60, '&hellip;' ) ) . '</span></div>';
break;
case 2 :
......@@ -89,7 +92,7 @@ $id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error($id) ) {
echo '<div class="error-div error">
<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
<strong>' . sprintf(__('&#8220;%s&#8221; has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
<strong>' . sprintf(__('&#8220;%s&#8221; has failed to upload.'), esc_html($_FILES['async-upload']['name']) ) . '</strong><br />' .
esc_html($id->get_error_message()) . '</div>';
exit;
}
......
......@@ -33,17 +33,6 @@ if ( isset( $_GET['dt'] ) ) {
$action = 'trash';
}
/**
* Display error message at bottom of comments.
*
* @param string $msg Error Message. Assumed to contain HTML and be sanitized.
*/
function comment_footer_die( $msg ) {
echo "<div class='wrap'><p>$msg</p></div>";
include( ABSPATH . 'wp-admin/admin-footer.php' );
die;
}
switch( $action ) {
case 'editcomment' :
......@@ -92,7 +81,7 @@ case 'spam' :
$comment_id = absint( $_GET['c'] );
if ( !$comment = get_comment_to_edit( $comment_id ) ) {
if ( ! $comment = get_comment( $comment_id ) ) {
wp_redirect( admin_url('edit-comments.php?error=1') );
die();
}
......@@ -153,27 +142,27 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
break;
}
if ( $message ) {
echo '<div class="notice notice-info"><p>' . $message . '</p></div>';
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
}
}
?>
<p><strong><?php _e('Caution:'); ?></strong> <?php echo $caution_msg; ?></p>
<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
<table class="form-table comment-ays">
<tr>
<th scope="row"><?php _e('Author'); ?></th>
<td><?php echo $comment->comment_author; ?></td>
<td><?php comment_author( $comment ); ?></td>
</tr>
<?php if ( $comment->comment_author_email ) { ?>
<?php if ( get_comment_author_email( $comment ) ) { ?>
<tr>
<th scope="row"><?php _e('E-mail'); ?></th>
<td><?php echo $comment->comment_author_email; ?></td>
<th scope="row"><?php _e('Email'); ?></th>
<td><?php comment_author_email( $comment ); ?></td>
</tr>
<?php } ?>
<?php if ( $comment->comment_author_url ) { ?>
<?php if ( get_comment_author_url( $comment ) ) { ?>
<tr>
<th scope="row"><?php _e('URL'); ?></th>
<td><a href="<?php echo $comment->comment_author_url; ?>"><?php echo $comment->comment_author_url; ?></a></td>
<td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
</tr>
<?php } ?>
<tr>
......@@ -191,9 +180,13 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
if ( $comment->comment_parent ) {
$parent = get_comment( $comment->comment_parent );
$parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
$name = get_comment_author( $parent->comment_ID );
printf( ' | ' . __( 'In reply to <a href="%1$s">%2$s</a>.' ), $parent_link, $name );
$parent_link = esc_url( get_comment_link( $parent ) );
$name = get_comment_author( $parent );
printf(
/* translators: %s: comment link */
' | ' . __( 'In reply to %s.' ),
'<a href="' . $parent_link . '">' . $name . '</a>'
);
}
?>
</td>
......@@ -202,19 +195,26 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved