Commit 976299de authored by root's avatar root Committed by lechuck

Import wordpress 3.3.1

parent 83a36747
<? phpinfo(); ?>
......@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
<br /> Version 3.2.1
<br /> Version 3.3.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......
......@@ -63,9 +63,9 @@ get_header();
<?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, network_site_url( 'wp-login.php?action=lostpassword', 'login' ) );
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() );
} 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, network_site_url( 'wp-login.php?action=lostpassword' ) );
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() );
}
echo '</p>';
} else {
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,10 +21,6 @@ if ( !defined('ABSPATH') )
$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>',
__( '<a href="http://codex.wordpress.org/">Documentation</a>' ),
sprintf( __( '<a href="%s">Freedoms</a>' ), admin_url( 'freedoms.php' ) ),
__('<a href="http://wordpress.org/support/forum/4">Feedback</a>'),
sprintf(__('<a href="%s">Credits</a>'), admin_url('credits.php') ),
);
echo apply_filters( 'admin_footer_text', implode( ' &bull; ', $footer_text ) );
unset( $footer_text );
......
......@@ -10,6 +10,14 @@
if ( ! defined( 'WP_ADMIN' ) )
require_once( './admin.php' );
// In case admin-header.php is included in a function.
global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone,
$current_site, $update_title, $total_update_count, $parent_file;
// Catch plugins that include admin-header.php before admin.php completes.
if ( empty( $current_screen ) )
set_current_screen();
get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
......@@ -29,26 +37,18 @@ $admin_title = apply_filters( 'admin_title', $admin_title, $title );
wp_user_settings();
_wp_admin_html_begin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php echo $admin_title; ?></title>
<?php
wp_admin_css( 'global' );
wp_admin_css();
wp_admin_css( 'colors' );
wp_admin_css( 'ie' );
if ( is_multisite() )
wp_admin_css( 'ms' );
wp_enqueue_style( 'colors' );
wp_enqueue_style( 'ie' );
wp_enqueue_script('utils');
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
?>
<script type="text/javascript">
//<![CDATA[
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; ?>',
......@@ -57,19 +57,14 @@ var userSettings = {
},
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
pagenow = '<?php echo $current_screen->id; ?>',
typenow = '<?php if ( isset($current_screen->post_type) ) echo $current_screen->post_type; ?>',
typenow = '<?php echo $current_screen->post_type; ?>',
adminpage = '<?php echo $admin_body_class; ?>',
thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>',
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
isRtl = <?php echo (int) is_rtl(); ?>;
//]]>
</script>
<?php
if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
wp_enqueue_script('quicktags');
}
do_action('admin_enqueue_scripts', $hook_suffix);
do_action("admin_print_styles-$hook_suffix");
do_action('admin_print_styles');
......@@ -87,7 +82,7 @@ if ( is_admin_bar_showing() )
if ( is_rtl() )
$admin_body_class .= ' rtl';
$admin_body_class .= ' branch-' . str_replace( '.', '-', floatval( $wp_version ) );
$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
......@@ -96,115 +91,28 @@ if ( $is_iphone ) { ?>
<?php } ?>
</head>
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
<script type="text/javascript">
//<![CDATA[
(function(){
var c = document.body.className;
c = c.replace(/no-js/, 'js');
document.body.className = c;
})();
//]]>
</script>
<script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script>
<div id="wpwrap">
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
<div id="wpcontent">
<div id="wphead">
<?php
if ( is_network_admin() )
$blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) );
elseif ( is_user_admin() )
$blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) );
else
$blog_name = get_bloginfo('name', 'display');
if ( '' == $blog_name ) {
$blog_name = __( 'Visit Site' );
} else {
$blog_name_excerpt = wp_html_excerpt($blog_name, 40);
if ( $blog_name != $blog_name_excerpt )
$blog_name_excerpt = trim($blog_name_excerpt) . '&hellip;';
$blog_name = $blog_name_excerpt;
unset($blog_name_excerpt);
}
$title_class = '';
if ( function_exists('mb_strlen') ) {
if ( mb_strlen($blog_name, 'UTF-8') > 30 )
$title_class = 'class="long-title"';
} else {
if ( strlen($blog_name) > 30 )
$title_class = 'class="long-title"';
}
?>
<img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />
<h1 id="site-heading" <?php echo $title_class ?>>
<a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
<span id="site-title"><?php echo $blog_name ?></span>
</a>
</h1>
<?php
do_action('in_admin_header');
$links = array();
// Generate user profile and info links.
$links[5] = sprintf( __('Howdy, %1$s'), $user_identity );
$links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';
if ( is_multisite() && is_super_admin() ) {
if ( !is_network_admin() )
$links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>';
else
$links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
}
$links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
$links = apply_filters( 'admin_user_info_links', $links, $current_user );
ksort( $links );
// Trim whitespace and pipes from links, then convert to list items.
$links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );
$howdy = array_shift( $links );
$links_no_js = implode( ' | ', $links );
$links_js = '<li>' . implode( '</li><li>', $links ) . '</li>';
?>
<div id="wphead-info">
<div id="user_info">
<p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p>
<div class="hide-if-no-js">
<p><?php echo $howdy; ?></p>
<div id="user_info_arrow"></div>
<div id="user_info_links_wrap"><div id="user_info_links">
<ul><?php echo $links_js; ?></ul>
</div></div>
</div>
</div>
</div>
</div>
<div id="wpbody">
<?php
unset($title_class, $blog_name, $total_update_count, $update_title);
$current_screen->parent_file = $parent_file;
$current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file);
$current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base);
$current_screen->set_parentage( $parent_file );
?>
<div id="wpbody-content">
<?php
screen_meta($current_screen);
$current_screen->render_screen_meta();
if ( is_network_admin() )
do_action('network_admin_notices');
......
......@@ -39,7 +39,7 @@ if ( get_option('db_upgraded') ) {
* @since 2.8
*/
do_action('after_db_upgrade');
} elseif ( get_option('db_version') != $wp_db_version ) {
} elseif ( get_option('db_version') != $wp_db_version && empty($_POST) ) {
if ( !is_multisite() ) {
wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
exit;
......@@ -88,13 +88,13 @@ if ( isset($_GET['page']) ) {
$plugin_page = plugin_basename($plugin_page);
}
if ( isset($_GET['post_type']) )
$typenow = sanitize_key($_GET['post_type']);
if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
$typenow = $_REQUEST['post_type'];
else
$typenow = '';
if ( isset($_GET['taxonomy']) )
$taxnow = sanitize_key($_GET['taxonomy']);
if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
$taxnow = $_REQUEST['taxonomy'];
else
$taxnow = '';
......@@ -183,13 +183,9 @@ if ( isset($plugin_page) ) {
exit;
}
// Allow plugins to define importers as well
if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) {
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
exit;
}
include(ABSPATH . "wp-admin/import/$importer.php");
if ( ! isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2]) ) {
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );
exit;
}
$parent_file = 'tools.php';
......@@ -211,8 +207,7 @@ if ( isset($plugin_page) ) {
include(ABSPATH . 'wp-admin/admin-footer.php');
// Make sure rules are flushed
global $wp_rewrite;
$wp_rewrite->flush_rules(false);
flush_rewrite_rules(false);
exit();
} else {
......
......@@ -23,7 +23,7 @@ if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie'])
unset($current_user);
require_once('./admin.php');
header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
header('Content-Type: text/html; charset=' . get_option('blog_charset'));
if ( !current_user_can('upload_files') )
wp_die(__('You do not have permission to upload files.'));
......
......@@ -45,8 +45,15 @@ switch( $action ) {
case 'editcomment' :
$title = __('Edit Comment');
add_contextual_help( $current_screen, '<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>' .
get_current_screen()->add_help_tab( array(
'id' => 'overview',
'title' => __('Overview'),
'content' =>
'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>'
) );
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="http://codex.wordpress.org/Administration_Screens#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'
......@@ -66,6 +73,9 @@ case 'editcomment' :
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.') );
if ( 'spam' == $comment->comment_approved )
comment_footer_die( __('This comment is marked as Spam. Please mark it as Not Spam if you want to edit it.') );
$comment = get_comment_to_edit( $comment_id );
include('./edit-form-comment.php');
......
......@@ -10,39 +10,6 @@
require_once( './admin.php' );
$title = __( 'Credits' );
$parent_file = 'index.php';
add_contextual_help($current_screen,
'<p>' . __('Each name or handle is a link to that person&#8217;s profile in the WordPress.org community directory.') . '</p>' .
'<p>' . __('You can register your own profile at <a href="http://wordpress.org/support/register.php" target="_blank">this link</a> to start contributing.') . '</p>' .
'<p>' . __('WordPress always needs more people to report bugs, patch bugs, test betas, work on UI design, translate strings, write documentation, and add questions/answers/suggestions to the Support Forums. Join in!') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Contributing_to_WordPress" target="_blank">Documentation on Contributing to WordPress</a>') . '</p>' .
'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
add_action( 'admin_head', '_wp_credits_add_css' );
function _wp_credits_add_css() { ?>
<style type="text/css">
div.wrap { max-width: 750px }
h3.wp-people-group, p.wp-credits-list { clear: both; }
ul.compact { margin-bottom: 0 }
<?php if ( is_rtl() ) { ?>
ul.wp-people-group { margin-bottom: 30px; float: right; clear: both; }
li.wp-person { float: right; height: 70px; width: 220px; margin-left: 10px; }
li.wp-person img.gravatar { float: right; margin-left: 10px; margin-bottom: 10px; }
<?php } else { ?>
li.wp-person { float: left; margin-right: 10px; }
li.wp-person img.gravatar { float: left; margin-right: 10px; margin-bottom: 10px; }
<?php } ?>
li.wp-person img.gravatar { width: 60px; height: 60px; }
ul.compact li.wp-person img.gravatar { width: 30px; height: 30px; }
li.wp-person { height: 70px; width: 220px; }
ul.compact li.wp-person { height: 40px; width: auto; white-space: nowrap }
li.wp-person a.web { font-size: 16px; text-decoration: none; }
</style>
<?php }
function wp_credits() {
global $wp_version;
......@@ -75,18 +42,34 @@ function _wp_credits_build_object_link( &$data ) {
$data = '<a href="' . esc_url( $data[1] ) . '">' . $data[0] . '</a>';
}
list( $display_version ) = explode( '-', $wp_version );
include( './admin-header.php' );
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e( 'WordPress Credits' ); ?></h2>
<div class="wrap about-wrap">
<h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
<div class="about-text"><?php printf( __( 'Thank you for updating to the latest version! Using WordPress %s will improve your looks, personality, and web publishing experience. Okay, just the last one, but still. :)' ), $display_version ); ?></div>
<div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
<h2 class="nav-tab-wrapper">
<a href="about.php" class="nav-tab">
<?php _e( 'What&#8217;s New' ); ?>
</a><a href="credits.php" class="nav-tab nav-tab-active">
<?php _e( 'Credits' ); ?>
</a><a href="freedoms.php" class="nav-tab">
<?php _e( 'Freedoms' ); ?>
</a>
</h2>
<?php
$credits = wp_credits();
if ( ! $credits ) {
echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
echo '<p class="about-description">' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
'http://wordpress.org/about/',
/* translators: Url to the codex documentation on contributing to WordPress used on the credits page */
__( 'http://codex.wordpress.org/Contributing_to_WordPress' ) ) . '</p>';
......@@ -94,7 +77,7 @@ if ( ! $credits ) {
exit;
}
echo '<p>' . __( 'WordPress is created by a worldwide team of passionate individuals. We couldn&#8217;t possibly list them all, but here some of the most influential people currently involved with the project:' ) . "</p>\n";
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
$gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/';
......@@ -109,7 +92,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
$title = translate( $group_data['name'] );
}
echo '<h3 class="wp-people-group">' . $title . "</h3>\n";
echo '<h4 class="wp-people-group">' . $title . "</h4>\n";
}
if ( ! empty( $group_data['shuffle'] ) )
......@@ -135,7 +118,7 @@ foreach ( $credits['groups'] as $group_slug => $group_data ) {
echo '<img src="' . $gravatar . $person_data[1] . '?s=' . $size . '" class="gravatar" alt="' . esc_attr( $person_data[0] ) . '" /></a>' . "\n\t";
echo '<a class="web" href="' . sprintf( $credits['data']['profiles'], $person_data[2] ) . '">' . $person_data[0] . "</a>\n\t";
if ( ! $compact )
echo '<br /><span class="title">' . translate( $person_data[3] ) . "</span>\n";
echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
echo "</li>\n";
}
echo "</ul>\n";
......@@ -158,11 +141,14 @@ return;
// These are strings returned by the API that we want to be translatable
__( 'Project Leaders' );
__( 'Extended Core Team' );
__( 'Core Developers' );
__( 'Recent Rockstars' );
__( 'Core Contributors to WordPress %s' );
__( 'Contributing Developers' );
__( 'Cofounder, Project Lead' );
__( 'Lead Developer' );
__( 'User Experience Lead' );
__( 'Core Developer' );
__( 'Core Committer' );
__( 'Guest Committer' );
__( 'Developer' );
......@@ -171,6 +157,5 @@ __( 'XML-RPC' );
__( 'Internationalization' );
__( 'External Libraries' );
__( 'Icon Design' );
__( 'Blue Color Scheme' );
?>
This diff is collapsed.