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

Upgraded wordpress to 4.0

parent 1c0bbcf6
......@@ -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 3.9.2
<br /> Version 4.0
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......
......@@ -84,7 +84,7 @@ get_header();
<?php } else {
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup($key);
$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();
......@@ -105,18 +105,17 @@ get_header();
echo '<p>'.$result->get_error_message().'</p>';
}
} else {
extract($result);
$url = get_blogaddress_by_id( (int) $blog_id);
$user = get_userdata( (int) $user_id);
$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<div id="signup-welcome">
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
</div>
<?php if ( $url != network_home_url('', 'http') ) : ?>
<?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 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>
......@@ -129,4 +128,4 @@ get_header();
var key_input = document.getElementById('key');
key_input && key_input.focus();
</script>
<?php get_footer(); ?>
<?php get_footer();
This diff is collapsed.
......@@ -14,7 +14,9 @@
* @since 2.1.0
*/
define( 'DOING_AJAX', true );
define( 'WP_ADMIN', true );
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
......@@ -58,7 +60,8 @@ $core_actions_post = array(
'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',
'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
'parse-media-shortcode'
);
// Register core Ajax calls.
......
......@@ -177,8 +177,9 @@ $admin_body_class .= ' no-customize-support no-svg';
<?php
// Make sure the customize body classes are correct as early as possible.
if ( current_user_can( 'edit_theme_options' ) )
if ( current_user_can( 'customize' ) ) {
wp_customize_support_script();
}
?>
<div id="wpwrap">
......
......@@ -9,7 +9,9 @@
*/
/** We are located in WordPress Administration Screens */
define('WP_ADMIN', true);
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
......@@ -26,20 +28,44 @@ nocache_headers();
/** This action is documented in wp-admin/admin.php */
do_action( 'admin_init' );
$action = 'admin_post';
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
if ( !wp_validate_auth_cookie() )
$action .= '_nopriv';
if ( !empty($_REQUEST['action']) )
$action .= '_' . $_REQUEST['action'];
/**
* Fires the requested handler action.
*
* admin_post_nopriv_{$_REQUEST['action']} is called for not-logged-in users.
* admin_post_{$_REQUEST['action']} is called for logged-in users.
*
* @since 2.6.0
*/
do_action( $action );
if ( ! wp_validate_auth_cookie() ) {
if ( empty( $action ) ) {
/**
* Fires on a non-authenticated admin post request where no action was supplied.
*
* @since 2.6.0
*/
do_action( 'admin_post_nopriv' );
} else {
/**
* Fires on a non-authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, $action, refers to the given
* request action.
*
* @since 2.6.0
*/
do_action( "admin_post_nopriv_{$action}" );
}
} else {
if ( empty( $action ) ) {
/**
* Fires on an authenticated admin post request where no action was supplied.
*
* @since 2.6.0
*/
do_action( 'admin_post' );
} else {
/**
* Fires on an authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, $action, refers to the given
* request action.
*
* @since 2.6.0
*/
do_action( "admin_post_{$action}" );
}
}
......@@ -11,8 +11,9 @@
*
* @since 2.3.2
*/
if ( ! defined('WP_ADMIN') )
define('WP_ADMIN', true);
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( ! defined('WP_NETWORK_ADMIN') )
define('WP_NETWORK_ADMIN', false);
......@@ -50,8 +51,8 @@ if ( get_option('db_upgraded') ) {
* Filter 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, it is automatically fired, but only when this filter
* returns true.
* In multisite, the DB upgrade routine is automatically fired, but only
* when this filter returns true.
*
* If the network is 50 sites or less, it will run every time. Otherwise,
* it will throttle itself to reduce load.
......@@ -150,7 +151,8 @@ if ( isset($plugin_page) ) {
$the_parent = $pagenow;
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
// Backwards compatibility 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' ]) )
......@@ -204,8 +206,7 @@ if ( isset($plugin_page) ) {
/**
* Used to call the registered callback for a plugin screen.
*
* @access private
*
* @internal
* @since 1.5.0
*/
do_action( $page_hook );
......@@ -289,8 +290,9 @@ if ( isset($plugin_page) ) {
*
* @param bool false Whether to force data to be filtered through kses. Default false.
*/
if ( apply_filters( 'force_filtered_html_on_import', false ) )
if ( apply_filters( 'force_filtered_html_on_import', false ) ) {
kses_init_filters(); // Always filter imported data with kses on multisite.
}
call_user_func($wp_importers[$importer][2]);
......@@ -308,13 +310,17 @@ if ( isset($plugin_page) ) {
*
* The dynamic portion of the hook name, $pagenow, is a global variable
* referring to the filename of the current page, such as 'admin.php',
* 'post-new.php' etc. A complete hook for the latter would be 'load-post-new.php'.
* 'post-new.php' etc. A complete hook for the latter would be
* 'load-post-new.php'.
*
* @since 2.1.0
*/
do_action( 'load-' . $pagenow );
// Backwards compatibility with old load-page-new.php, load-page.php,
// and load-categories.php actions.
/*
* The following hooks are fired to ensure backward compatibility.
* In all other cases, 'load-' . $pagenow should be used instead.
*/
if ( $typenow == 'page' ) {
if ( $pagenow == 'post-new.php' )
do_action( 'load-page-new.php' );
......
......@@ -10,7 +10,9 @@ if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']
define( 'DOING_AJAX', true );
}
define('WP_ADMIN', true);
if ( ! defined( 'WP_ADMIN' ) ) {
define( 'WP_ADMIN', true );
}
if ( defined('ABSPATH') )
require_once(ABSPATH . 'wp-load.php');
......@@ -36,7 +38,7 @@ if ( !current_user_can('upload_files') )
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
include( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
send_nosniff_header();
nocache_headers();
......@@ -84,7 +86,7 @@ if ( isset( $_REQUEST['post_id'] ) ) {
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error($id) ) {
echo '<div class="error-div">
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 />' .
esc_html($id->get_error_message()) . '</div>';
......@@ -92,10 +94,10 @@ if ( is_wp_error($id) ) {
}
if ( $_REQUEST['short'] ) {
// short form response - attachment ID only
// Short form response - attachment ID only.
echo $id;
} else {
// long form response - big chunk o html
// Long form response - big chunk o html.
$type = $_REQUEST['type'];
/**
......
......@@ -111,7 +111,7 @@ case 'spam' :
$nonce_action .= $comment_id;
?>
<div class='wrap'>
<div class="wrap">
<div class="narrow">
......@@ -181,7 +181,7 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
<p><?php _e('Are you sure you want to do this?'); ?></p>
<form action='comment.php' method='get'>
<form action="comment.php" method="get">
<table width="100%">
<tr>
......@@ -191,9 +191,9 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
</table>
<?php wp_nonce_field( $nonce_action ); ?>
<input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' />
<input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' />
<input type='hidden' name='noredir' value='1' />
<input type="hidden" name="action" value="<?php echo esc_attr($formaction); ?>" />
<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID); ?>" />
<input type="hidden" name="noredir" value="1" />
</form>
</div>
......@@ -266,7 +266,6 @@ case 'unapprovecomment' :
wp_redirect( $redir );
die;
break;
case 'editedcomment' :
......@@ -291,11 +290,9 @@ case 'editedcomment' :
wp_redirect( $location );
exit();
break;
default:
wp_die( __('Unknown action.') );
break;
} // end switch
......
......@@ -82,7 +82,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s has lots of refinements we think you&#8217;ll love.' ), $display_version ); ?></div>
<div class="about-text"><?php printf( __( 'Thank you for updating! WordPress %s brings you a smoother writing and management experience.' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
......@@ -179,6 +179,7 @@ __( 'Core Contributors to WordPress %s' );
__( 'Contributing Developers' );
__( 'Cofounder, Project Lead' );
__( 'Lead Developer' );
__( 'Release Lead' );
__( 'User Experience Lead' );
__( 'Core Developer' );
__( 'Core Committer' );
......
......@@ -25,6 +25,7 @@
.about-wrap img {
margin: 0;
max-width: 100%;
height: auto;
vertical-align: middle;
}
......@@ -80,6 +81,10 @@
line-height: 1.5em;
}
.about-wrap h3.higher {
margin-top: .5em;
}
.customize h3 {
margin-top: 1.75em;
text-align: center;
......@@ -174,17 +179,16 @@
.about-overview {
margin-top: 40px;
margin-bottom: 40px;
text-align: center;
}
.about-overview .wp-video {
margin: 0 auto;
}
.changelog .wp-playlist .wp-playlist-current-item img {
height: 64px;
width: auto;
max-width: 100%;
.about-overview p {
margin: 1em auto 50px;
max-width: 770px;
font-size: 18px;
line-height: 1.5;
text-align: center;
}
.about-wrap .feature-section {
......@@ -194,8 +198,8 @@
.about-wrap .feature-section.two-col > div {
position: relative;
width: 47.5%;
margin-left: 4.999999999%;
width: 47.6%;
margin-left: 4.799999999%;
float: right;
}
......@@ -228,6 +232,31 @@
max-width: 20%;
}
/* responsive videos for 4.0 */
.about-video {
position: relative;
width: 100%;
height: 0;
}
.about-video-embed {
padding-bottom: 70.4%; /* 352 / 500 */
}
.about-video-focus {
padding-bottom: 56.2%; /* 281 / 500 */
}
.about-video .wp-video,
.about-video .mejs-container,
.about-video video {
position: absolute;
top: 0;
right: 0;
width: 100% !important;
height: 100% !important;
}
.about-wrap .changelog li {
list-style-type: disc;
margin-right: 3em;
......@@ -349,6 +378,24 @@
}
/* Responsive release video */
@media screen and ( max-width: 710px ) {
.about-overview {
position: relative;
padding-bottom: 56.25%; /* 360 / 640 */
width: 100%;
height: 0;
}
.about-overview embed {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
}
}
@media only screen and (max-width: 500px) {
.about-wrap {
margin-left: 20px;
......@@ -370,6 +417,17 @@
width: 100%;
}
.about-wrap h2.nav-tab-wrapper {
padding-right: 0;
border-bottom: 0;
}
.about-wrap h2 .nav-tab {
margin-top: 10px;
margin-left: 10px;
border-bottom: 1px solid #ccc;
}
.about-wrap .feature-section.three-col div {
width: 100%;
float: none;
......@@ -385,4 +443,4 @@
width: 100%;
float: none;
}
}
\ No newline at end of file
}
......@@ -25,6 +25,7 @@
.about-wrap img {
margin: 0;
max-width: 100%;
height: auto;
vertical-align: middle;
}
......@@ -80,6 +81,10 @@
line-height: 1.5em;
}
.about-wrap h3.higher {
margin-top: .5em;
}
.customize h3 {
margin-top: 1.75em;
text-align: center;
......@@ -174,17 +179,16 @@
.about-overview {
margin-top: 40px;
margin-bottom: 40px;
text-align: center;
}
.about-overview .wp-video {
margin: 0 auto;
}
.changelog .wp-playlist .wp-playlist-current-item img {
height: 64px;
width: auto;
max-width: 100%;
.about-overview p {
margin: 1em auto 50px;
max-width: 770px;
font-size: 18px;
line-height: 1.5;
text-align: center;
}
<