Commit db767f88 authored by lechuck's avatar lechuck Committed by lechuck

Wordpress 3.5 Upgrade

parent b34d5668
......@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 3.4.2
<br /> Version 3.5
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......
<?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.
*
* @package WordPress
*/
/** Define ABSPATH as this file's directory */
define( 'WP_INSTALLING', true );
/** Sets up the WordPress Environment. */
......@@ -16,11 +24,21 @@ if ( is_object( $wp_object_cache ) )
do_action( 'activate_header' );
/**
* Adds an action hook specific to this page that fires on wp_head
*
* @since MU
*/
function do_activate_header() {
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );
/**
* Loads styles specific to this page.
*
* @since MU
*/
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
......@@ -77,7 +95,7 @@ get_header();
} else {
extract($result);
$url = get_blogaddress_by_id( (int) $blog_id);
$user = new WP_User( (int) $user_id);
$user = get_userdata( (int) $user_id);
?>
<h2><?php _e('Your account is now active!'); ?></h2>
......
This diff is collapsed.
......@@ -16,13 +16,16 @@
define( 'DOING_AJAX', true );
define( 'WP_ADMIN', true );
/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Allow for cross-domain requests (from the frontend). */
send_origin_headers();
// Require an action parameter
if ( empty( $_REQUEST['action'] ) )
die( '0' );
/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Load WordPress Administration APIs */
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
......@@ -33,6 +36,7 @@ require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
@header( 'X-Robots-Tag: noindex' );
send_nosniff_header();
nocache_headers();
do_action( 'admin_init' );
......@@ -50,7 +54,9 @@ $core_actions_post = array(
'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', 'wp-fullscreen-save-post',
'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment',
'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',
);
// Register core Ajax calls.
......
......@@ -15,17 +15,12 @@ if ( !defined('ABSPATH') )
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
<div id="footer">
<div id="wpfooter">
<?php do_action( 'in_admin_footer' ); ?>
<p id="footer-left" class="alignleft"><?php
$upgrade = apply_filters( 'update_footer', '' );
$footer_text = array(
'<span id="footer-thankyou">' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</span>',
);
echo apply_filters( 'admin_footer_text', implode( ' &bull; ', $footer_text ) );
unset( $footer_text );
echo apply_filters( 'admin_footer_text', '<span id="footer-thankyou">' . __( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ) . '</span>' );
?></p>
<p id="footer-upgrade" class="alignright"><?php echo $upgrade; ?></p>
<p id="footer-upgrade" class="alignright"><?php echo apply_filters( 'update_footer', '' ); ?></p>
<div class="clear"></div>
</div>
<?php
......
......@@ -50,12 +50,7 @@ $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var userSettings = {
'url': '<?php echo SITECOOKIEPATH; ?>',
'uid': '<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>',
'time':'<?php echo time() ?>'
},
ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
pagenow = '<?php echo $current_screen->id; ?>',
typenow = '<?php echo $current_screen->post_type; ?>',
adminpage = '<?php echo $admin_body_class; ?>',
......@@ -76,6 +71,9 @@ do_action('admin_head');
if ( get_user_setting('mfold') == 'f' )
$admin_body_class .= ' folded';
if ( !get_user_setting('unfold') )
$admin_body_class .= ' auto-fold';
if ( is_admin_bar_showing() )
$admin_body_class .= ' admin-bar';
......@@ -94,7 +92,7 @@ $admin_body_class .= ' no-customize-support';
?>
</head>
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<body class="wp-admin wp-core-ui no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<script type="text/javascript">
document.body.className = document.body.className.replace('no-js','js');
</script>
......@@ -107,6 +105,7 @@ if ( wp_script_is( 'customize-loader', 'queue' ) && current_user_can( 'edit_them
?>
<div id="wpwrap">
<a tabindex="1" href="#wpbody-content" class="screen-reader-shortcut"><?php _e('Skip to main content'); ?></a>
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
<div id="wpcontent">
......@@ -122,7 +121,7 @@ $current_screen->set_parentage( $parent_file );
?>
<div id="wpbody-content">
<div id="wpbody-content" aria-label="<?php esc_attr_e('Main content'); ?>" tabindex="0">
<?php
$current_screen->render_screen_meta();
......
......@@ -29,6 +29,8 @@ if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
require_once(dirname(dirname(__FILE__)) . '/wp-load.php');
nocache_headers();
if ( get_option('db_upgraded') ) {
flush_rewrite_rules();
update_option( 'db_upgraded', false );
......@@ -51,6 +53,7 @@ if ( get_option('db_upgraded') ) {
* @since 2.8.4b
*/
$c = get_blog_count();
// If 50 or fewer sites, run every time. Else, run "about ten percent" of the time. Shh, don't check that math.
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
require_once( ABSPATH . WPINC . '/http.php' );
$response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
......@@ -65,8 +68,6 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect();
nocache_headers();
// Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
......@@ -79,7 +80,6 @@ $time_format = get_option('time_format');
wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'text', 'trackback', 'pingback'));
wp_enqueue_script( 'common' );
wp_enqueue_script( 'jquery-color' );
$editing = false;
......@@ -187,6 +187,8 @@ if ( isset($plugin_page) ) {
exit;
}
do_action( 'load-importer-' . $importer );
$parent_file = 'tools.php';
$submenu_file = 'import.php';
$title = __('Import');
......
......@@ -13,21 +13,35 @@ if ( defined('ABSPATH') )
else
require_once('../wp-load.php');
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
require_once('./admin.php');
if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
// Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
$_COOKIE[AUTH_COOKIE] = $_REQUEST['auth_cookie'];
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie']) )
$_COOKIE[LOGGED_IN_COOKIE] = $_REQUEST['logged_in_cookie'];
unset($current_user);
}
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
require_once('./admin.php');
if ( !current_user_can('upload_files') )
wp_die(__('You do not have permission to upload files.'));
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
define( 'DOING_AJAX', true );
include ABSPATH . 'wp-admin/includes/ajax-actions.php';
send_nosniff_header();
nocache_headers();
wp_ajax_upload_attachment();
die( '0' );
}
// just fetch the detail form for that attachment
if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
$post = get_post( $id );
......@@ -37,19 +51,36 @@ if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id
if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) )
wp_die( __( 'You are not allowed to edit this item.' ) );
if ( 2 == $_REQUEST['fetch'] ) {
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => true ));
} else {
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id);
switch ( $_REQUEST['fetch'] ) {
case 3 :
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
echo '<div class="filename new"><span class="title">' . esc_html( wp_html_excerpt( $title, 60 ) ) . '</span></div>';
break;
case 2 :
add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id, array( 'send' => false, 'delete' => true ));
break;
default:
add_filter('attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2);
echo get_media_item($id);
break;
}
exit;
}
check_admin_referer('media-form');
$id = media_handle_upload('async-upload', $_REQUEST['post_id']);
$post_id = 0;
if ( isset( $_REQUEST['post_id'] ) ) {
$post_id = absint( $_REQUEST['post_id'] );
if ( ! get_post( $post_id ) || ! current_user_can( 'edit_post', $post_id ) )
$post_id = 0;
}
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error($id) ) {
echo '<div class="error-div">
<a class="dismiss" href="#" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __('Dismiss') . '</a>
......
......@@ -30,7 +30,7 @@ function wp_credits() {
if ( ! is_array( $results ) )
return false;
set_site_transient( 'wordpress_credits_' . $locale, $results, 86400 ); // One day
set_site_transient( 'wordpress_credits_' . $locale, $results, DAY_IN_SECONDS );
}
return $results;
......@@ -52,7 +52,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 to the latest version! WordPress %s is already making your website better, faster, and more attractive, just like you!' ), $display_version ); ?></div>
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! WordPress %s is more polished and enjoyable than ever before. We hope you like it.' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
......
.wp-color-result {
margin: 0 0 6px 6px;
padding-left: 0;
padding-right: 30px;
}
.wp-color-result:after {
border-radius: 0 0 1px 1px;
border-left: 0;
border-right: 1px solid #bbb;
left: auto;
right: 0;
}
.wp-color-result:hover {
border-color: #aaa;
}
.wp-color-result:hover:after {
border-left: 0;
border-right: 1px solid #999;
}
.wp-picker-container .button {
margin-left: 0;
margin-right: 6px;
}
.wp-color-result{margin:0 0 6px 6px;padding-left:0;padding-right:30px}.wp-color-result:after{border-radius:0 0 1px 1px;border-left:0;border-right:1px solid #bbb;left:auto;right:0}.wp-color-result:hover{border-color:#aaa}.wp-color-result:hover:after{border-left:0;border-right:1px solid #999}.wp-picker-container .button{margin-left:0;margin-right:6px}
\ No newline at end of file
.wp-color-picker {
width: 80px;
}
.wp-picker-container .hidden {
display: none;
}
.wp-color-result {
background-color: #f9f9f9;
border: 1px solid #bbb;
border-radius: 2px;
cursor: pointer;
display: inline-block;
height: 22px;
margin: 0 6px 6px 0px;
position: relative;
top: 1px;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
vertical-align: bottom;
display: inline-block;
padding-left: 30px;
}
.wp-color-result:after {
background: #f3f3f3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fefefe), to(#f4f4f4));
background-image: -webkit-linear-gradient(top, #fefefe, #f4f4f4);
background-image: -moz-linear-gradient(top, #fefefe, #f4f4f4);
background-image: -o-linear-gradient(top, #fefefe, #f4f4f4);
background-image: linear-gradient(to bottom, #fefefe, #f4f4f4);
color: #333;
text-shadow: 0 1px 0 #fff;
border-radius: 0 1px 1px 0;
border-left: 1px solid #bbb;
content: attr( title );
display: block;