Compare commits

...

58 Commits

Author SHA1 Message Date
Dion Hulse
6cf15a2f7c Update Akismet externals
git-svn-id: http://core.svn.wordpress.org/branches/3.3@35107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 17:19:01 +00:00
Bot (Translations)
c0b3d38052 POT, generated from r24100
git-svn-id: http://core.svn.wordpress.org/branches/3.3@24104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-26 13:58:40 +00:00
Bot (Translations)
ac2f7319ed POT, generated from r23230
git-svn-id: http://core.svn.wordpress.org/branches/3.3@23240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-01 00:19:36 +00:00
Bot (Translations)
b1fab0ceb7 POT, generated from r23230
git-svn-id: http://core.svn.wordpress.org/branches/3.3@23235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-01 00:19:25 +00:00
Andrew Nacin
f09538ae9e Add page templates to the Twenty Twelve POT file. Remove tags from theme POT files. fixes #22016.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@22067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 17:51:53 +00:00
nacin
ab714614cb 3.3.3 package.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-27 19:30:09 +00:00
nacin
42fdb31121 Bump
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 21:53:20 +00:00
nacin
cbf762dd69 Use stylesheet to identify themes, not template. Sanity check values before switching.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 21:47:41 +00:00
nacin
c34f076fd6 Update the version numbers for wp_explain_nonce() deprecation. see #21076.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 21:26:42 +00:00
nacin
27f936b4fd Deprecate wp_explain_nonce(). see #21076 for 3.3.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-26 20:59:13 +00:00
markjaquith
c0fff0adf6 Fix warning when processing read_post cap. Props duck_. fixes #20917 for the 3.3 branch.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 17:54:13 +00:00
markjaquith
f457931f04 Restrict post IDs
Backports [21048] for the 3.3 branch.


git-svn-id: http://core.svn.wordpress.org/branches/3.3@21087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 17:52:59 +00:00
markjaquith
57a69f8c10 In excerpt view, show the excerpt only if the user can read_post.
Backports [21047] for the 3.3 branch.


git-svn-id: http://core.svn.wordpress.org/branches/3.3@21086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 17:50:50 +00:00
markjaquith
cc03fcb8f3 Make read_post more useful. Map read_post to edit_post for posts with protected post states. This makes read_post work naturally for draft, future, and pending posts belonging to other users. If the current user cannot edit these non-public posts then the user should not be able to read them either.
Backports [21046] for the 3.3 branch.


git-svn-id: http://core.svn.wordpress.org/branches/3.3@21085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 17:48:01 +00:00
markjaquith
1f0cd2b054 Always escape the output of get_pagenum_link(). fixes #14556 for the 3.3 branch.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 17:02:39 +00:00
markjaquith
c7d8109fc6 Escape editable_slug as a textarea. For 3.3 branch.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 16:57:32 +00:00
nacin
70f76acb28 Don't allow unfiltered HTML comments from a frame. fixes #20812 for the 3.3 branch.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@21082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-15 16:53:15 +00:00
nacin
7cb64ff174 Add space between 'Plugins' title and 'Add New' button on plugins.php, like all other screens.
git-svn-id: http://core.svn.wordpress.org/branches/3.3@20868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-24 07:01:52 +00:00
nacin
727e28df2e 3.3.2
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-20 14:49:49 +00:00
nacin
b96565a94e Version bumps
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-20 12:44:18 +00:00
nacin
6bcfccda17 Rolling upgrade to set the welcome_user_email network-wide option via the welcome_user_msg_filter() callback. Fixes ability to save the welcome user email when no entry exists in the database. see #20116 for the 3.3 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 23:00:36 +00:00
nacin
adb10595f1 Revert a piece of [19424], go back to cloning a div for adding images in Press This. props azaozz, fixes #19498 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 21:58:20 +00:00
nacin
4a493cbd8e Handle multiple feed: schemes.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 21:52:24 +00:00
nacin
28df32495e Add missing variable.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 06:39:24 +00:00
nacin
a3b3dd96f1 Do not deactivate plugins which are already deactivated.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 03:43:56 +00:00
nacin
ef6f792e52 Update swfupload. see [20501], [20502]
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-18 13:41:09 +00:00
nacin
5b381bfd15 Update swfobject
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-18 13:36:47 +00:00
ryan
060e3f39ef Update swfobject
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-17 23:13:20 +00:00
ryan
368d9ceaab Don't attempt to make links inside attributes clickable.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-17 20:02:49 +00:00
ryan
5d5db6bccf Update Plupload to 1.5.4
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-16 22:46:36 +00:00
nacin
f43ae6a957 Use wp_safe_redirect(). No need to allow offsite redirects.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-16 22:12:25 +00:00
nacin
04c707d2ba Escape special characters when outputting DB failures. see #13839 for the 3.3 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-16 22:03:46 +00:00
nacin
cd4f6634ad Do sanity checks for register_globals and magic quotes in setup-config.php. see #13839 for the 3.3 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-16 22:02:54 +00:00
nacin
027972ec8a $userdata should be null for anonymous requests. props duck_. fixes #19769 for 3.3. see #19595.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@20087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-02 21:02:22 +00:00
nacin
bc67a641c0 Update POT files. Reflects a change in the makepot script to ensure consistency when files are generated. Remove duplicate header comments.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-10 16:38:48 +00:00
potbot
5b04e96fb9 POT, generated from r19767
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-27 14:48:19 +00:00
potbot
709f0e5a50 POT, generated from r19762
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-27 14:29:05 +00:00
nacin
bb7f5def49 15 bugs fixed in 3.3.1.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:45:03 +00:00
ryan
90ff07836f Fix header/message alignment in Press This. fixes #19725 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:44:01 +00:00
ryan
db3aa34eb7 3.3.1 bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:35:03 +00:00
ryan
7c048e745b Fix tabbing for comment reply and edit. fixes #19727 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 20:29:17 +00:00
ryan
afc218c988 Bumpity bump
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:35:03 +00:00
ryan
61c109e030 Fix widget count on dashboard to account for orphaned widgets. fixes #19553 for trunk
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:31:52 +00:00
ryan
cad54bba34 Remove esc_js() as this content now gets json encoded rather than a straight echo. props ocean90. fixes #19644, for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:29:02 +00:00
ryan
1f28b09d74 Properly handle a blank nav menu custom URL when determining what page we're on. fixes #19699 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 18:27:59 +00:00
nacin
056e32340f Revert half of [19639]. If the blog_upload_space site_option is '0', restore 50 as a default. see #19538 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 17:54:50 +00:00
ryan
77c7c21043 Bump some vers
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-03 17:01:50 +00:00
ryan
9f6201cbf4 Trigger the wp_print_syles action from wp_print_styles() only when handles are not passed. Prevents front-end styles from leaking into the admin. Props nacin. see #19510 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 22:34:31 +00:00
ryan
434b4605eb Immediately close a flyout when opening another one. Prevents brief occurrence of two flyouts at once. Props SergeyBiryukov. fixes #19575 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:51:35 +00:00
ryan
c52e2c100d Only allow _multisite_ super admins to demote themselves on a site. props linuxologos, fixes #19684 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:45:38 +00:00
ryan
8c7f681a75 Better checking for values for multisite upload limits. fixes #19538 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:41:56 +00:00
ryan
c15548e05e Make sure that _render() is only called with a valid root object. As in, render() can only be validly called once and must not fail on the second call. props SergeyBiryukov, fixes #19642 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:37:16 +00:00
ryan
61aef00dc4 An empty database prefix is not supported for multisite. <small>Add a sanity check anyway.</small> fixes #19566 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-02 21:31:27 +00:00
nacin
f50c0c90cc Define json_encode() in load-scripts.php. fixes #19524 for 3.3.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 23:01:16 +00:00
azaozz
fd2cfdfcda Replace background image with CSS3 gradient in wp_die(), fixes #19701 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 22:29:47 +00:00
ryan
b5bb8c72a8 Don't cast objects to int.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-30 19:34:59 +00:00
ryan
97ebc17ca8 Assign the full WP_User object to the userdata global. Props scribu. fixes #19595 for 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-21 20:08:31 +00:00
ryan
c51dfe7bfe Branching 3.3
git-svn-id: http://svn.automattic.com/wordpress/branches/3.3@19591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-12 22:22:04 +00:00
47 changed files with 749 additions and 591 deletions

View File

@@ -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.3
<br /> Version 3.3.3
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@@ -33,6 +33,22 @@ include( './admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 3 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 8 ), '3.3.3', number_format_i18n( 8 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.3' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 12 ), '3.3.2', number_format_i18n( 12 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.2' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.', 15 ), '3.3.1', number_format_i18n( 15 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.1' ); ?>
</p>
</div>
<div class="changelog">
<h3><?php _e( 'Easier Uploading' ); ?></h3>

View File

@@ -527,9 +527,8 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
<td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states( $post ); ?></strong>
<?php
if ( 'excerpt' == $mode ) {
if ( 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) )
the_excerpt();
}
}
$actions = array();

View File

@@ -146,7 +146,7 @@ class WP_Themes_List_Table extends WP_List_Table {
$preview_text = esc_attr( sprintf( __( 'Preview of &#8220;%s&#8221;' ), $title ) );
$tags = $themes[$theme_name]['Tags'];
$thickbox_class = 'thickbox thickbox-preview';
$activate_link = wp_nonce_url( "themes.php?action=activate&amp;template=".urlencode( $template )."&amp;stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template );
$activate_link = wp_nonce_url( "themes.php?action=activate&amp;template=".urlencode( $template )."&amp;stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
$activate_text = esc_attr( sprintf( __( 'Activate &#8220;%s&#8221;' ), $title ) );
$actions = array();
$actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';

View File

@@ -1415,7 +1415,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
$template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
$preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1, 'TB_iframe' => 'true' ), trailingslashit(esc_url(get_option('home'))) ) );
$activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
$activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $stylesheet);
$install_actions = array(
'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>',
@@ -1423,7 +1423,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
);
if ( is_network_admin() && current_user_can( 'manage_network_themes' ) )
$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . $template, 'enable-theme_' . $template ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
$install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&amp;theme=' . $stylesheet, 'enable-theme_' . $stylesheet ) ) . '" title="' . esc_attr__( 'Enable this theme for all sites in this network' ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>';
if ( $this->type == 'web' )
$install_actions['themes_page'] = '<a href="' . self_admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>';

View File

@@ -395,7 +395,7 @@ function wp_dashboard_right_now() {
$sidebars_widgets = wp_get_sidebars_widgets();
$num_widgets = 0;
foreach ( (array) $sidebars_widgets as $k => $v ) {
if ( 'wp_inactive_widgets' == $k )
if ( 'wp_inactive_widgets' == $k || 'orphaned_widgets' == substr( $k, 0, 16 ) )
continue;
if ( is_array($v) )
$num_widgets = $num_widgets + count($v);

View File

@@ -385,9 +385,11 @@ function get_upload_space_available() {
*/
function get_space_allowed() {
$space_allowed = get_option( 'blog_upload_space' );
if ( $space_allowed === false )
if ( ! is_numeric( $space_allowed ) )
$space_allowed = get_site_option( 'blog_upload_space' );
if ( empty( $space_allowed ) || !is_numeric( $space_allowed ) )
if ( empty( $space_allowed ) || ! is_numeric( $space_allowed ) )
$space_allowed = 50;
return $space_allowed;

View File

@@ -334,7 +334,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
<div id="replycontainer">
<?php
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
wp_editor( '', 'replycontent', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings, 'tabindex' => 104 ) );
?>
</div>
@@ -1761,11 +1761,11 @@ final class WP_Internal_Pointers {
}
public static function pointer_wp330_toolbar() {
$content = '<h3>' . esc_js( __( 'New Feature: Toolbar' ) ). '</h3>';
$content .= '<p>' . esc_js( __( 'We&#8217;ve combined the admin bar and the old Dashboard header into one persistent toolbar. Hover over the toolbar items to see what&#8217;s new.' ) ) . '</p>';
$content = '<h3>' . __( 'New Feature: Toolbar' ) . '</h3>';
$content .= '<p>' . __( 'We&#8217;ve combined the admin bar and the old Dashboard header into one persistent toolbar. Hover over the toolbar items to see what&#8217;s new.' ) . '</p>';
if ( is_multisite() && is_super_admin() )
$content .= '<p>' .esc_js( __( 'Network Admin is now located in the My Sites menu.' ) ) . '</p>';
$content .= '<p>' . __( 'Network Admin is now located in the My Sites menu.' ) . '</p>';
WP_Internal_Pointers::print_js( 'wp330_toolbar', '#wpadminbar', array(
'content' => $content,
@@ -1779,8 +1779,8 @@ final class WP_Internal_Pointers {
* @since 3.3.0
*/
public static function pointer_wp330_media_uploader() {
$content = '<h3>' . esc_js( __( 'Updated Media Uploader' ) ) . '</h3>';
$content .= '<p>' . esc_js( __( 'The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.' ) ) . '</p>';
$content = '<h3>' . __( 'Updated Media Uploader' ) . '</h3>';
$content .= '<p>' . __( 'The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.' ) . '</p>';
WP_Internal_Pointers::print_js( 'wp330_media_uploader', '#content-add_media', array(
'content' => $content,
@@ -1794,8 +1794,8 @@ final class WP_Internal_Pointers {
* @since 3.3.0
*/
public static function pointer_wp330_saving_widgets() {
$content = '<h3>' . esc_js( __( 'New Feature: Saving Widgets' ) ) . '</h3>';
$content .= '<p>' . esc_js( __( 'If you change your mind and revert to your previous theme, we&#8217;ll put the widgets back the way you had them.' ) ) . '</p>';
$content = '<h3>' . __( 'New Feature: Saving Widgets' ) . '</h3>';
$content .= '<p>' . __( 'If you change your mind and revert to your previous theme, we&#8217;ll put the widgets back the way you had them.' ). '</p>';
WP_Internal_Pointers::print_js( 'wp330_saving_widgets', '#message2', array(
'content' => $content,

View File

@@ -406,7 +406,7 @@ function update_core($from, $to) {
$mysql_version = $wpdb->db_version();
$required_php_version = '5.2.4';
$required_mysql_version = '5.0';
$wp_version = '3.3';
$wp_version = '3.3.3';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
$mysql_compat = true;

View File

@@ -209,6 +209,7 @@ $(document).ready( function() {
else if ( m.css('marginTop') )
m.css({'marginTop':''});
menu.find('.wp-submenu').removeClass('sub-open');
m.addClass('sub-open');
},
out: function(){

File diff suppressed because one or more lines are too long

View File

@@ -92,6 +92,13 @@ function includes_url() {}
*/
function wp_guess_url() {}
if ( ! function_exists( 'json_encode' ) ) :
/**
* @ignore
*/
function json_encode() {}
endif;
function get_file($path) {
if ( function_exists('realpath') )

View File

@@ -36,6 +36,9 @@ if ( isset($action) && $action == 'edit' && !$ID )
if ( isset($_GET['inline']) ) {
$errors = array();
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
check_admin_referer('media-form');
// Upload File button was clicked
@@ -58,6 +61,9 @@ if ( isset($_GET['inline']) ) {
exit;
}
if ( isset( $_REQUEST['post_id'] ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
$title = __('Upload New Media');
$parent_file = 'upload.php';
get_current_screen()->add_help_tab( array(
@@ -115,6 +121,8 @@ if ( isset($_GET['inline']) ) {
include('./admin-footer.php');
} else {
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
// upload type: image, video, file, ..?
if ( isset($_GET['type']) )

View File

@@ -154,6 +154,10 @@ if ( $action ) {
wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
check_admin_referer('deactivate-plugin_' . $plugin);
if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
}
deactivate_plugins($plugin);
update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated'));
if ( headers_sent() )
@@ -169,7 +173,13 @@ if ( $action ) {
check_admin_referer('bulk-plugins');
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
$plugins = array_filter($plugins, 'is_plugin_active'); //Do not deactivate plugins which are already deactivated.
// Do not deactivate plugins which are already deactivated.
if ( is_network_admin() ) {
$plugins = array_filter( $plugins, 'is_plugin_active_for_network' );
} else {
$plugins = array_filter( $plugins, 'is_plugin_active' );
$plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) );
}
if ( empty($plugins) ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
@@ -392,7 +402,7 @@ if ( !empty($invalid) )
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title );
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
<?php }
if ( $s )
printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>

View File

@@ -314,6 +314,20 @@ var photostorage = false;
do_action('admin_print_scripts');
do_action('admin_head');
?>
<style type="text/css">
#message {
margin: 10px 0;
}
#title,
.press-this #wphead {
margin-left: 0;
margin-right: 0;
}
.rtl.press-this #header-logo,
.rtl.press-this #wphead h1 {
float: right;
}
</style>
<script type="text/javascript">
var wpActiveEditor = 'content';
@@ -376,24 +390,15 @@ var photostorage = false;
function setup_photo_actions() {
jQuery('.close').click(function() {
jQuery('#extra-fields').hide();
jQuery('body').append( jQuery('#photo-add-url-div') );
jQuery('#extra-fields').html('');
});
jQuery('.refresh').click(function() {
photostorage = false;
jQuery('body').append( jQuery('#photo-add-url-div') );
show('photo');
});
jQuery('#photo-add-url').click(function(){
var container = jQuery('#img_container');
if ( container.children('#photo-add-url-div:visible').length ) {
container.children('a').show();
jQuery('#photo-add-url-div').hide();
} else {
container.children('a').hide();
container.append( jQuery('#photo-add-url-div').show() );
}
var form = jQuery('#photo-add-url-div').clone();
jQuery('#img_container').empty().append( form.show() );
});
jQuery('#waiting').hide();
jQuery('#extra-fields').show();
@@ -444,7 +449,7 @@ var photostorage = false;
});
</script>
</head>
<body class="press-this wp-admin">
<body class="press-this wp-admin<?php if ( is_rtl() ) echo ' rtl'; ?>">
<form action="press-this.php?action=post" method="post">
<div id="poststuff" class="metabox-holder">
<div id="side-sortables" class="press-this-sidebar">

View File

@@ -44,10 +44,13 @@ define('WP_DEBUG', false);
require_once(ABSPATH . WPINC . '/load.php');
require_once(ABSPATH . WPINC . '/version.php');
wp_check_php_mysql_versions();
wp_unregister_GLOBALS();
require_once(ABSPATH . WPINC . '/compat.php');
require_once(ABSPATH . WPINC . '/functions.php');
require_once(ABSPATH . WPINC . '/class-wp-error.php');
require_once(ABSPATH . WPINC . '/formatting.php');
wp_magic_quotes();
if (!file_exists(ABSPATH . 'wp-config-sample.php'))
wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');

View File

@@ -16,7 +16,17 @@ $wp_list_table = _get_list_table('WP_Themes_List_Table');
if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
if ( 'activate' == $_GET['action'] ) {
check_admin_referer('switch-theme_' . $_GET['template']);
check_admin_referer('switch-theme_' . $_GET['stylesheet']);
$themes = get_allowed_themes();
foreach ( $themes as $theme ) {
if ( $theme['Stylesheet'] == $_GET['stylesheet'] &&
$theme['Template'] == $_GET['template'] ) {
$found = true;
break;
}
}
if ( empty( $found ) )
wp_die( __( 'Cheatin&#8217; uh?' ) );
switch_theme($_GET['template'], $_GET['stylesheet']);
wp_redirect( admin_url('themes.php?activated=true') );
exit;

View File

@@ -100,10 +100,11 @@ case 'promote':
if ( ! current_user_can('promote_user', $id) )
wp_die(__('You can&#8217;t edit that user.'));
// The new role of the current user must also have the promote_users cap or be a super admin
if ( $id == $current_user->ID && ! is_super_admin() && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users') ) {
$update = 'err_admin_role';
continue;
// The new role of the current user must also have the promote_users cap or be a multisite super admin
if ( $id == $current_user->ID && ! $wp_roles->role_objects[ $_REQUEST['new_role'] ]->has_cap('promote_users')
&& ! ( is_multisite() && is_super_admin() ) ) {
$update = 'err_admin_role';
continue;
}
// If the user doesn't already belong to the blog, bail.

View File

@@ -100,6 +100,6 @@ if ( !$user->ID ) {
$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
$location = apply_filters('comment_post_redirect', $location, $comment);
wp_redirect($location);
wp_safe_redirect( $location );
exit;
?>

View File

@@ -1,212 +1,85 @@
# Copyright (C) 2010 Twenty Eleven
# This file is distributed under the same license as the Twenty Eleven package.
# Copyright (C) 2013 the WordPress team
# This file is distributed under the GNU General Public License.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven 1.3\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyeleven\n"
"POT-Creation-Date: 2011-12-10 19:47:15+00:00\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyeleven\n"
"POT-Creation-Date: 2013-04-26 13:58:39+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: content-quote.php:14 showcase.php:115 showcase.php:194 content.php:15
#: content.php:19 content-image.php:15 content-gallery.php:16
#: content-gallery.php:48 content-aside.php:16 content-status.php:15
#: inc/widgets.php:89 content-link.php:16 content-featured.php:14
msgid "Permalink to %s"
#: 404.php:17
msgid "This is somewhat embarrassing, isn&rsquo;t it?"
msgstr ""
#: content-quote.php:15
msgid "Quote"
#: 404.php:21
msgid ""
"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
"searching, or one of the links below, can help."
msgstr ""
#: content-quote.php:24 content.php:30 content-image.php:21
#: content-aside.php:22 content-status.php:21 content-link.php:22
msgid "Reply"
#: 404.php:28
msgid "Most Used Categories"
msgstr ""
#: content-quote.php:24 content.php:30 content-image.php:21
#: content-aside.php:22 content-status.php:21 content-link.php:22
msgctxt "comments number"
msgid "1"
#. translators: %1$s: smilie
#: 404.php:36
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: content-quote.php:24 content.php:30 content-image.php:21
#: content-aside.php:22 content-status.php:21 content-link.php:22
msgctxt "comments number"
msgid "%"
#: archive.php:25
msgid "Daily Archives: %s"
msgstr ""
#: content-quote.php:35 content.php:41 content-image.php:27
#: content-gallery.php:32 content-aside.php:33 functions.php:327
#: content-status.php:34 content-link.php:33
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
#: archive.php:27
msgid "Monthly Archives: %s"
msgstr ""
#: content-quote.php:36 content.php:42 content-image.php:28
#: content-single.php:24 content-intro.php:18 content-gallery.php:54
#: content-aside.php:34 image.php:90 content-status.php:35 content-page.php:18
#: content-link.php:34 content-featured.php:23
msgid "Pages:"
#: archive.php:27
msgctxt "monthly archives date format"
msgid "F Y"
msgstr ""
#. translators: used between list items, there is a space after the comma
#: content-quote.php:44 content-quote.php:54 content.php:51 content.php:61
#: content-image.php:47 content-image.php:56 content-single.php:30
#: content-single.php:33 content-gallery.php:62 content-gallery.php:72
#: content-featured.php:29 content-featured.php:38
msgid ", "
#: archive.php:29
msgid "Yearly Archives: %s"
msgstr ""
#: content-quote.php:48 content.php:55 content-image.php:51
#: content-gallery.php:66
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
#: archive.php:29
msgctxt "yearly archives date format"
msgid "Y"
msgstr ""
#: content-quote.php:60 content.php:67 content-image.php:59
#: content-gallery.php:78
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
#: archive.php:31
msgid "Blog Archives"
msgstr ""
#: content-quote.php:69 showcase.php:196 content.php:77 content-image.php:64
#: content-gallery.php:87 content-aside.php:42 content-status.php:43
#: content-link.php:42
msgid "Leave a reply"
msgstr ""
#: content-quote.php:69 showcase.php:196 content.php:77 content-image.php:64
#: content-gallery.php:87 content-aside.php:42 content-status.php:43
#: content-link.php:42
msgid "<b>1</b> Reply"
msgstr ""
#: content-quote.php:69 showcase.php:196 content.php:77 content-image.php:64
#: content-gallery.php:87 content-aside.php:42 content-status.php:43
#: content-link.php:42
msgid "<b>%</b> Replies"
msgstr ""
#: content-quote.php:72 content.php:80 content-image.php:68
#: content-single.php:52 content-intro.php:19 content-gallery.php:90
#: content-aside.php:44 image.php:41 functions.php:505 functions.php:533
#: content-status.php:45 content-page.php:21 content-link.php:44
#: content-featured.php:45
msgid "Edit"
msgstr ""
#: showcase.php:72
msgid "Featured Post"
msgstr ""
#: showcase.php:145
msgid "Featuring: %s"
msgstr ""
#: showcase.php:155
msgid "Recent Posts"
msgstr ""
#: index.php:37 category.php:50 tag.php:50 author.php:74 search.php:42
#: archive.php:57
#: archive.php:57 author.php:74 category.php:50 index.php:37 search.php:42
#: tag.php:50
msgid "Nothing Found"
msgstr ""
#: index.php:41 category.php:54 tag.php:54 author.php:78 archive.php:61
#: archive.php:61 author.php:78 category.php:54 index.php:41 tag.php:54
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: content.php:16
msgid "Featured"
#: author.php:28
msgid "Author Archives: %s"
msgstr ""
#. #-#-#-#-# twentyeleven.pot (Twenty Eleven 1.3) #-#-#-#-#
#. Author URI of the plugin/theme
#: footer.php:27
msgid "http://wordpress.org/"
msgstr ""
#: footer.php:27
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: footer.php:27
msgid "Proudly powered by %s"
#: author.php:49 content-single.php:60
msgid "About %s"
msgstr ""
#: category.php:19
msgid "Category Archives: %s"
msgstr ""
#: content-image.php:16
msgid "Image"
msgstr ""
#: content-image.php:34
msgid ""
"<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s"
"\" pubdate>%3$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by "
"</span> <span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" "
"title=\"%5$s\" rel=\"author\">%6$s</a></span></span>"
msgstr ""
#: content-image.php:39 functions.php:570
msgid "View all posts by %s"
msgstr ""
#: sidebar.php:19
msgid "Archives"
msgstr ""
#: sidebar.php:26
msgid "Meta"
msgstr ""
#: content-single.php:35
msgid ""
"This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. "
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
#: content-single.php:37
msgid ""
"This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a "
"href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:39
msgid ""
"This entry was posted by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3"
"$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:60 author.php:49
msgid "About %s"
msgstr ""
#: content-single.php:64
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: tag.php:19
msgid "Tag Archives: %s"
msgstr ""
#: content-gallery.php:17
msgid "Gallery"
msgstr ""
#: content-gallery.php:47
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: comments.php:17
msgid ""
"This post is password protected. Enter the password to view any comments."
@@ -234,47 +107,180 @@ msgstr ""
msgid "Comments are closed."
msgstr ""
#: content-aside.php:16 content-featured.php:14 content-gallery.php:16
#: content-gallery.php:48 content-image.php:15 content-link.php:16
#: content-quote.php:14 content-status.php:15 content.php:15 content.php:19
#: inc/widgets.php:89 showcase.php:115 showcase.php:194
msgid "Permalink to %s"
msgstr ""
#: content-aside.php:17
msgid "Aside"
msgstr ""
#: 404.php:17
msgid "This is somewhat embarrassing, isn&rsquo;t it?"
#: content-aside.php:22 content-image.php:21 content-link.php:22
#: content-quote.php:24 content-status.php:21 content.php:30
msgid "Reply"
msgstr ""
#: 404.php:21
#: content-aside.php:22 content-image.php:21 content-link.php:22
#: content-quote.php:24 content-status.php:21 content.php:30
msgctxt "comments number"
msgid "1"
msgstr ""
#: content-aside.php:22 content-image.php:21 content-link.php:22
#: content-quote.php:24 content-status.php:21 content.php:30
msgctxt "comments number"
msgid "%"
msgstr ""
#: content-aside.php:33 content-gallery.php:32 content-image.php:27
#: content-link.php:33 content-quote.php:35 content-status.php:34
#: content.php:41 functions.php:327
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content-aside.php:34 content-featured.php:23 content-gallery.php:54
#: content-image.php:28 content-intro.php:18 content-link.php:34
#: content-page.php:18 content-quote.php:36 content-single.php:24
#: content-status.php:35 content.php:42 image.php:90
msgid "Pages:"
msgstr ""
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
#: content-link.php:42 content-quote.php:69 content-status.php:43
#: content.php:77 showcase.php:196
msgid "Leave a reply"
msgstr ""
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
#: content-link.php:42 content-quote.php:69 content-status.php:43
#: content.php:77 showcase.php:196
msgid "<b>1</b> Reply"
msgstr ""
#: content-aside.php:42 content-gallery.php:87 content-image.php:64
#: content-link.php:42 content-quote.php:69 content-status.php:43
#: content.php:77 showcase.php:196
msgid "<b>%</b> Replies"
msgstr ""
#: content-aside.php:44 content-featured.php:45 content-gallery.php:90
#: content-image.php:68 content-intro.php:19 content-link.php:44
#: content-page.php:21 content-quote.php:72 content-single.php:52
#: content-status.php:45 content.php:80 functions.php:505 functions.php:533
#: image.php:41
msgid "Edit"
msgstr ""
#. translators: used between list items, there is a space after the comma
#: content-featured.php:29 content-featured.php:38 content-gallery.php:62
#: content-gallery.php:72 content-image.php:47 content-image.php:56
#: content-quote.php:44 content-quote.php:54 content-single.php:30
#: content-single.php:33 content.php:51 content.php:61
msgid ", "
msgstr ""
#: content-featured.php:31
msgid ""
"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
"searching, or one of the links below, can help."
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
"title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: 404.php:28
msgid "Most Used Categories"
msgstr ""
#. translators: %1$s: smilie
#: 404.php:36
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: image.php:18
msgid "Image navigation"
msgstr ""
#: image.php:19
msgid "&larr; Previous"
msgstr ""
#: image.php:20
msgid "Next &rarr;"
msgstr ""
#: image.php:30
#: content-featured.php:33
msgid ""
"<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class="
"\"entry-date\"><abbr class=\"published\" title=\"%1$s\">%2$s</abbr></span> "
"at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s &times; %5$s</a> "
"in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>"
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-gallery.php:17
msgid "Gallery"
msgstr ""
#: content-gallery.php:47
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: content-gallery.php:66 content-image.php:51 content-quote.php:48
#: content.php:55
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: content-gallery.php:78 content-image.php:59 content-quote.php:60
#: content.php:67
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr ""
#: content-image.php:16
msgid "Image"
msgstr ""
#: content-image.php:34
msgid ""
"<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s"
"\" pubdate>%3$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by "
"</span> <span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" "
"title=\"%5$s\" rel=\"author\">%6$s</a></span></span>"
msgstr ""
#: content-image.php:39 functions.php:570
msgid "View all posts by %s"
msgstr ""
#: content-link.php:17
msgid "Link"
msgstr ""
#: content-quote.php:15
msgid "Quote"
msgstr ""
#: content-single.php:35
msgid ""
"This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. "
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
#: content-single.php:37
msgid ""
"This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a "
"href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:39
msgid ""
"This entry was posted by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href="
"\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:64
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content-status.php:16
msgid "Status"
msgstr ""
#: content.php:16
msgid "Featured"
msgstr ""
#. #-#-#-#-# twentyeleven.pot (Twenty Eleven 1.3) #-#-#-#-#
#. Author URI of the plugin/theme
#: footer.php:27
msgid "http://wordpress.org/"
msgstr ""
#: footer.php:27
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: footer.php:27
msgid "Proudly powered by %s"
msgstr ""
#: functions.php:101
@@ -408,12 +414,24 @@ msgstr ""
msgid "Skip to secondary content"
msgstr ""
#: author.php:28
msgid "Author Archives: %s"
#: image.php:18
msgid "Image navigation"
msgstr ""
#: content-status.php:16
msgid "Status"
#: image.php:19
msgid "&larr; Previous"
msgstr ""
#: image.php:20
msgid "Next &rarr;"
msgstr ""
#: image.php:30
msgid ""
"<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class="
"\"entry-date\"><abbr class=\"published\" title=\"%1$s\">%2$s</abbr></span> "
"at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s &times; %5$s</a> "
"in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>"
msgstr ""
#: inc/theme-options.php:61
@@ -566,46 +584,28 @@ msgid ""
"different keywords."
msgstr ""
#: archive.php:25
msgid "Daily Archives: %s"
#: searchform.php:11 searchform.php:12 searchform.php:13
msgid "Search"
msgstr ""
#: archive.php:27
msgid "Monthly Archives: %s"
#: showcase.php:72
msgid "Featured Post"
msgstr ""
#: archive.php:27
msgctxt "monthly archives date format"
msgid "F Y"
#: showcase.php:145
msgid "Featuring: %s"
msgstr ""
#: archive.php:29
msgid "Yearly Archives: %s"
#: showcase.php:155
msgid "Recent Posts"
msgstr ""
#: archive.php:29
msgctxt "yearly archives date format"
msgid "Y"
#: sidebar.php:19
msgid "Archives"
msgstr ""
#: archive.php:31
msgid "Blog Archives"
msgstr ""
#: content-link.php:17
msgid "Link"
msgstr ""
#: content-featured.php:31
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
"title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-featured.php:33
msgid ""
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
#: sidebar.php:26
msgid "Meta"
msgstr ""
#: single.php:19
@@ -616,8 +616,8 @@ msgstr ""
msgid "Next <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: searchform.php:11 searchform.php:12 searchform.php:13
msgid "Search"
#: tag.php:19
msgid "Tag Archives: %s"
msgstr ""
#. Theme Name of the plugin/theme
@@ -646,12 +646,3 @@ msgstr ""
#. Author of the plugin/theme
msgid "the WordPress team"
msgstr ""
#. Tags of the plugin/theme
msgid ""
"dark, light, white, black, gray, one-column, two-columns, left-sidebar, "
"right-sidebar, fixed-width, flexible-width, custom-background, custom-"
"colors, custom-header, custom-menu, editor-style, featured-image-header, "
"featured-images, full-width-template, microformats, post-formats, rtl-"
"language-support, sticky-post, theme-options, translation-ready"
msgstr ""

View File

@@ -1,89 +1,65 @@
# Copyright (C) 2010 Twenty Ten
# This file is distributed under the same license as the Twenty Ten package.
# Copyright (C) 2013 the WordPress team
# This file is distributed under the GNU General Public License.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 1.3\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyten\n"
"POT-Creation-Date: 2011-12-10 19:27:25+00:00\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyten\n"
"POT-Creation-Date: 2013-01-01 00:19:25+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: loop-attachment.php:21
msgid "Return to %s"
#: 404.php:16 loop.php:33
msgid "Not Found"
msgstr ""
#. translators: %s - title of parent post
#: loop-attachment.php:23
msgid "<span class=\"meta-nav\">&larr;</span> %s"
#: 404.php:18
msgid ""
"Apologies, but the page you requested could not be found. Perhaps searching "
"will help."
msgstr ""
#: loop-attachment.php:32
msgid "<span class=\"%1$s\">By</span> %2$s"
#: archive.php:33
msgid "Daily Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:36 functions.php:476
msgid "View all posts by %s"
#: archive.php:35
msgid "Monthly Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:43
msgid "<span class=\"%1$s\">Published</span> %2$s"
#: archive.php:35
msgctxt "monthly archives date format"
msgid "F Y"
msgstr ""
#: loop-attachment.php:53
msgid "Full size is %s pixels"
#: archive.php:37
msgid "Yearly Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:56
msgid "Link to full-size image"
#: archive.php:37
msgctxt "yearly archives date format"
msgid "Y"
msgstr ""
#: loop-attachment.php:63 loop-attachment.php:111 loop.php:100 loop.php:123
#: loop.php:165 loop-page.php:30 loop-single.php:56
msgid "Edit"
#: archive.php:39
msgid "Blog Archives"
msgstr ""
#: loop-attachment.php:104 loop.php:115 loop.php:143 functions.php:248
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
#: author.php:27
msgid "Author Archives: %s"
msgstr ""
#: loop-attachment.php:105 loop.php:144 loop-page.php:29 loop-single.php:34
msgid "Pages:"
msgstr ""
#. #-#-#-#-# twentyten.pot (Twenty Ten 1.3) #-#-#-#-#
#. Theme URI of the plugin/theme
#: footer.php:33
msgid "http://wordpress.org/"
msgstr ""
#: footer.php:33
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: footer.php:33
msgid "Proudly powered by %s."
#: author.php:37 loop-single.php:43
msgid "About %s"
msgstr ""
#: category.php:16
msgid "Category Archives: %s"
msgstr ""
#: sidebar.php:27
msgid "Archives"
msgstr ""
#: sidebar.php:34
msgid "Meta"
msgstr ""
#: tag.php:16
msgid "Tag Archives: %s"
msgstr ""
#: comments.php:18
msgid ""
"This post is password protected. Enter the password to view any comments."
@@ -107,80 +83,18 @@ msgstr ""
msgid "Comments are closed."
msgstr ""
#: 404.php:16 loop.php:33
msgid "Not Found"
#. #-#-#-#-# twentyten.pot (Twenty Ten 1.3) #-#-#-#-#
#. Theme URI of the plugin/theme
#: footer.php:33
msgid "http://wordpress.org/"
msgstr ""
#: 404.php:18
msgid ""
"Apologies, but the page you requested could not be found. Perhaps searching "
"will help."
#: footer.php:33
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: loop.php:25 loop.php:178
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: loop.php:26 loop.php:179
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: loop.php:35
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: loop.php:60 loop.php:95 loop.php:96
msgctxt "gallery category slug"
msgid "gallery"
msgstr ""
#: loop.php:62 loop.php:83 loop.php:131
msgid "Permalink to %s"
msgstr ""
#: loop.php:82
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: loop.php:93
msgid "View Galleries"
msgstr ""
#: loop.php:93 loop.php:96
msgid "More Galleries"
msgstr ""
#: loop.php:96
msgid "View posts in the Gallery category"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "Leave a comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "1 Comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "% Comments"
msgstr ""
#: loop.php:106
msgctxt "asides category slug"
msgid "asides"
msgstr ""
#: loop.php:151
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: loop.php:160
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
#: footer.php:33
msgid "Proudly powered by %s."
msgstr ""
#: functions.php:100
@@ -227,6 +141,10 @@ msgstr ""
msgid "Sunset"
msgstr ""
#: functions.php:248 loop-attachment.php:104 loop.php:115 loop.php:143
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: functions.php:330
msgid "%s <span class=\"says\">says:</span>"
msgstr ""
@@ -302,6 +220,10 @@ msgid ""
"span> %3$s"
msgstr ""
#: functions.php:476 loop-attachment.php:36
msgid "View all posts by %s"
msgstr ""
#: functions.php:493
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
@@ -328,26 +250,38 @@ msgstr ""
msgid "Skip to content"
msgstr ""
#: author.php:27
msgid "Author Archives: %s"
#: loop-attachment.php:21
msgid "Return to %s"
msgstr ""
#: author.php:37 loop-single.php:43
msgid "About %s"
#. translators: %s - title of parent post
#: loop-attachment.php:23
msgid "<span class=\"meta-nav\">&larr;</span> %s"
msgstr ""
#: search.php:16
msgid "Search Results for: %s"
#: loop-attachment.php:32
msgid "<span class=\"%1$s\">By</span> %2$s"
msgstr ""
#: search.php:26
msgid "Nothing Found"
#: loop-attachment.php:43
msgid "<span class=\"%1$s\">Published</span> %2$s"
msgstr ""
#: search.php:28
msgid ""
"Sorry, but nothing matched your search criteria. Please try again with some "
"different keywords."
#: loop-attachment.php:53
msgid "Full size is %s pixels"
msgstr ""
#: loop-attachment.php:56
msgid "Link to full-size image"
msgstr ""
#: loop-attachment.php:63 loop-attachment.php:111 loop-page.php:30
#: loop-single.php:56 loop.php:100 loop.php:123 loop.php:165
msgid "Edit"
msgstr ""
#: loop-attachment.php:105 loop-page.php:29 loop-single.php:34 loop.php:144
msgid "Pages:"
msgstr ""
#: loop-single.php:21 loop-single.php:61
@@ -364,30 +298,96 @@ msgstr ""
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: archive.php:33
msgid "Daily Archives: <span>%s</span>"
#: loop.php:25 loop.php:178
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: archive.php:35
msgid "Monthly Archives: <span>%s</span>"
#: loop.php:26 loop.php:179
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: archive.php:35
msgctxt "monthly archives date format"
msgid "F Y"
#: loop.php:35
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: archive.php:37
msgid "Yearly Archives: <span>%s</span>"
#: loop.php:60 loop.php:95 loop.php:96
msgctxt "gallery category slug"
msgid "gallery"
msgstr ""
#: archive.php:37
msgctxt "yearly archives date format"
msgid "Y"
#: loop.php:62 loop.php:83 loop.php:131
msgid "Permalink to %s"
msgstr ""
#: archive.php:39
msgid "Blog Archives"
#: loop.php:82
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: loop.php:93
msgid "View Galleries"
msgstr ""
#: loop.php:93 loop.php:96
msgid "More Galleries"
msgstr ""
#: loop.php:96
msgid "View posts in the Gallery category"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "Leave a comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "1 Comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "% Comments"
msgstr ""
#: loop.php:106
msgctxt "asides category slug"
msgid "asides"
msgstr ""
#: loop.php:151
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: loop.php:160
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr ""
#: search.php:16
msgid "Search Results for: %s"
msgstr ""
#: search.php:26
msgid "Nothing Found"
msgstr ""
#: search.php:28
msgid ""
"Sorry, but nothing matched your search criteria. Please try again with some "
"different keywords."
msgstr ""
#: sidebar.php:27
msgid "Archives"
msgstr ""
#: sidebar.php:34
msgid "Meta"
msgstr ""
#: tag.php:16
msgid "Tag Archives: %s"
msgstr ""
#. Theme Name of the plugin/theme
@@ -409,10 +409,3 @@ msgstr ""
#. Author of the plugin/theme
msgid "the WordPress team"
msgstr ""
#. Tags of the plugin/theme
msgid ""
"black, blue, white, two-columns, fixed-width, custom-header, custom-"
"background, threaded-comments, sticky-post, translation-ready, microformats, "
"rtl-language-support, editor-style, custom-menu"
msgstr ""

View File

@@ -487,10 +487,15 @@ class WP_User {
static function get_data_by( $field, $value ) {
global $wpdb;
if ( 'id' == $field )
if ( 'id' == $field ) {
// Make sure the value is numeric to avoid casting objects, for example,
// to int 1.
if ( ! is_numeric( $value ) )
return false;
$value = absint( $value );
else
} else {
$value = trim( $value );
}
if ( !$value )
return false;
@@ -1060,7 +1065,8 @@ function map_meta_cap( $cap, $user_id ) {
break;
}
if ( 'private' != $post->post_status ) {
$status_obj = get_post_status_object( $post->post_status );
if ( $status_obj->public ) {
$caps[] = $post_type->cap->read;
break;
}
@@ -1074,8 +1080,10 @@ function map_meta_cap( $cap, $user_id ) {
if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID )
$caps[] = $post_type->cap->read;
else
elseif ( $status_obj->private )
$caps[] = $post_type->cap->read_private_posts;
else
$caps = map_meta_cap( 'edit_post', $user_id, $post->ID );
break;
case 'edit_post_meta':
case 'delete_post_meta':

View File

@@ -196,7 +196,8 @@ class WP_Admin_Bar {
public function render() {
$root = $this->_bind();
$this->_render( $root );
if ( $root )
$this->_render( $root );
}
final protected function _bind() {

View File

@@ -816,8 +816,10 @@ function wp_comment_form_unfiltered_html_nonce() {
if ( !empty($post) )
$post_id = $post->ID;
if ( current_user_can('unfiltered_html') )
wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false);
if ( current_user_can( 'unfiltered_html' ) ) {
wp_nonce_field( 'unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment_disabled', false );
echo "<script>(function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();</script>\n";
}
}
/**

View File

@@ -193,6 +193,7 @@ add_filter( 'the_posts', '_close_comments_for_old_posts', 10, 2);
add_filter( 'comments_open', '_close_comments_for_old_post', 10, 2 );
add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 );
add_filter( 'editable_slug', 'urldecode' );
add_filter( 'editable_slug', 'esc_textarea' );
add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
// Actions

View File

@@ -1350,9 +1350,17 @@ function antispambot($emailaddy, $mailto=0) {
*/
function _make_url_clickable_cb($matches) {
$url = $matches[2];
$suffix = '';
/** Include parentheses in the URL only if paired **/
if ( ')' == $matches[3] && strpos( $url, '(' ) ) {
// If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL.
// Then we can let the parenthesis balancer do its thing below.
$url .= $matches[3];
$suffix = '';
} else {
$suffix = $matches[3];
}
// Include parentheses in the URL only if paired
while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
$suffix = strrchr( $url, ')' ) . $suffix;
$url = substr( $url, 0, strrpos( $url, ')' ) );
@@ -1418,23 +1426,117 @@ function _make_email_clickable_cb($matches) {
*
* @since 0.71
*
* @param string $ret Content to convert URIs.
* @param string $text Content to convert URIs.
* @return string Content with converted URIs.
*/
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$save = @ini_set('pcre.recursion_limit', 10000);
$retval = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]{1,2000}|[\'*(+.,;:!=&$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
if (null !== $retval )
$ret = $retval;
@ini_set('pcre.recursion_limit', $save);
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
$ret = preg_replace("#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i", "$1$3</a>", $ret);
$ret = trim($ret);
return $ret;
function make_clickable( $text ) {
$r = '';
$textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
foreach ( $textarr as $piece ) {
if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {
$r .= $piece;
continue;
}
// Long strings might contain expensive edge cases ...
if ( 10000 < strlen( $piece ) ) {
// ... break it up
foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses
if ( 2101 < strlen( $chunk ) ) {
$r .= $chunk; // Too big, no whitespace: bail.
} else {
$r .= make_clickable( $chunk );
}
}
} else {
$ret = " $piece "; // Pad with whitespace to simplify the regexes
$url_clickable = '~
([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation
( # 2: URL
[\\w]{1,20}+:// # Scheme and hier-part prefix
(?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character
(?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character
[\'.,;:!?)] # Punctuation URL character
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character
)*
)
(\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing)
~xS'; // The regex is a non-anchored pattern and does not have a single fixed starting character.
// Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
$ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret );
$ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.
$r .= $ret;
}
}
// Cleanup of accidental links within links
$r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
return $r;
}
/**
* Breaks a string into chunks by splitting at whitespace characters.
* The length of each returned chunk is as close to the specified length goal as possible,
* with the caveat that each chunk includes its trailing delimiter.
* Chunks longer than the goal are guaranteed to not have any inner whitespace.
*
* Joining the returned chunks with empty delimiters reconstructs the input string losslessly.
*
* Input string must have no null characters (or eventual transformations on output chunks must not care about null characters)
*
* <code>
* _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234 890 123456789 1234567890a 45678 1 3 5 7 90 ", 10 ) ==
* array (
* 0 => '1234 67890 ', // 11 characters: Perfect split
* 1 => '1234 ', // 5 characters: '1234 67890a' was too long
* 2 => '67890a cd ', // 10 characters: '67890a cd 1234' was too long
* 3 => '1234 890 ', // 11 characters: Perfect split
* 4 => '123456789 ', // 10 characters: '123456789 1234567890a' was too long
* 5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split
* 6 => ' 45678 ', // 11 characters: Perfect split
* 7 => '1 3 5 7 9', // 9 characters: End of $string
* );
* </code>
*
* @since 3.4.0
* @access private
*
* @param string $string The string to split
* @param int $goal The desired chunk length.
* @return array Numeric array of chunks.
*/
function _split_str_by_whitespace( $string, $goal ) {
$chunks = array();
$string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );
while ( $goal < strlen( $string_nullspace ) ) {
$pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" );
if ( false === $pos ) {
$pos = strpos( $string_nullspace, "\000", $goal + 1 );
if ( false === $pos ) {
break;
}
}
$chunks[] = substr( $string, 0, $pos + 1 );
$string = substr( $string, $pos + 1 );
$string_nullspace = substr( $string_nullspace, $pos + 1 );
}
if ( $string ) {
$chunks[] = $string;
}
return $chunks;
}
/**

View File

@@ -2628,99 +2628,17 @@ function get_allowed_mime_types() {
/**
* Retrieve nonce action "Are you sure" message.
*
* The action is split by verb and noun. The action format is as follows:
* verb-action_extra. The verb is before the first dash and has the format of
* letters and no spaces and numbers. The noun is after the dash and before the
* underscore, if an underscore exists. The noun is also only letters.
*
* The filter will be called for any action, which is not defined by WordPress.
* You may use the filter for your plugin to explain nonce actions to the user,
* when they get the "Are you sure?" message. The filter is in the format of
* 'explain_nonce_$verb-$noun' with the $verb replaced by the found verb and the
* $noun replaced by the found noun. The two parameters that are given to the
* hook are the localized "Are you sure you want to do this?" message with the
* extra text (the text after the underscore).
*
* @package WordPress
* @subpackage Security
* @since 2.0.4
* @deprecated 3.3.3
* @deprecated Use wp_nonce_ays()
* @see wp_nonce_ays()
*
* @param string $action Nonce action.
* @return string Are you sure message.
*/
function wp_explain_nonce( $action ) {
if ( $action !== -1 && preg_match( '/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches ) ) {
$verb = $matches[1];
$noun = $matches[2];
$trans = array();
$trans['update']['attachment'] = array( __( 'Your attempt to edit this attachment: &#8220;%s&#8221; has failed.' ), 'get_the_title' );
$trans['add']['category'] = array( __( 'Your attempt to add this category has failed.' ), false );
$trans['delete']['category'] = array( __( 'Your attempt to delete this category: &#8220;%s&#8221; has failed.' ), 'get_cat_name' );
$trans['update']['category'] = array( __( 'Your attempt to edit this category: &#8220;%s&#8221; has failed.' ), 'get_cat_name' );
$trans['delete']['comment'] = array( __( 'Your attempt to delete this comment: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['unapprove']['comment'] = array( __( 'Your attempt to unapprove this comment: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['approve']['comment'] = array( __( 'Your attempt to approve this comment: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['update']['comment'] = array( __( 'Your attempt to edit this comment: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['bulk']['comments'] = array( __( 'Your attempt to bulk modify comments has failed.' ), false );
$trans['moderate']['comments'] = array( __( 'Your attempt to moderate comments has failed.' ), false );
$trans['add']['bookmark'] = array( __( 'Your attempt to add this link has failed.' ), false );
$trans['delete']['bookmark'] = array( __( 'Your attempt to delete this link: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['update']['bookmark'] = array( __( 'Your attempt to edit this link: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['bulk']['bookmarks'] = array( __( 'Your attempt to bulk modify links has failed.' ), false );
$trans['add']['page'] = array( __( 'Your attempt to add this page has failed.' ), false );
$trans['delete']['page'] = array( __( 'Your attempt to delete this page: &#8220;%s&#8221; has failed.' ), 'get_the_title' );
$trans['update']['page'] = array( __( 'Your attempt to edit this page: &#8220;%s&#8221; has failed.' ), 'get_the_title' );
$trans['edit']['plugin'] = array( __( 'Your attempt to edit this plugin file: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['activate']['plugin'] = array( __( 'Your attempt to activate this plugin: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['deactivate']['plugin'] = array( __( 'Your attempt to deactivate this plugin: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['upgrade']['plugin'] = array( __( 'Your attempt to update this plugin: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['add']['post'] = array( __( 'Your attempt to add this post has failed.' ), false );
$trans['delete']['post'] = array( __( 'Your attempt to delete this post: &#8220;%s&#8221; has failed.' ), 'get_the_title' );
$trans['update']['post'] = array( __( 'Your attempt to edit this post: &#8220;%s&#8221; has failed.' ), 'get_the_title' );
$trans['add']['user'] = array( __( 'Your attempt to add this user has failed.' ), false );
$trans['delete']['users'] = array( __( 'Your attempt to delete users has failed.' ), false );
$trans['bulk']['users'] = array( __( 'Your attempt to bulk modify users has failed.' ), false );
$trans['update']['user'] = array( __( 'Your attempt to edit this user: &#8220;%s&#8221; has failed.' ), 'get_the_author_meta', 'display_name' );
$trans['update']['profile'] = array( __( 'Your attempt to modify the profile for: &#8220;%s&#8221; has failed.' ), 'get_the_author_meta', 'display_name' );
$trans['update']['options'] = array( __( 'Your attempt to edit your settings has failed.' ), false );
$trans['update']['permalink'] = array( __( 'Your attempt to change your permalink structure to: %s has failed.' ), 'use_id' );
$trans['edit']['file'] = array( __( 'Your attempt to edit this file: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['edit']['theme'] = array( __( 'Your attempt to edit this theme file: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['switch']['theme'] = array( __( 'Your attempt to switch to this theme: &#8220;%s&#8221; has failed.' ), 'use_id' );
$trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'sitename' ) ), false );
if ( isset( $trans[$verb][$noun] ) ) {
if ( !empty( $trans[$verb][$noun][1] ) ) {
$lookup = $trans[$verb][$noun][1];
if ( isset($trans[$verb][$noun][2]) )
$lookup_value = $trans[$verb][$noun][2];
$object = $matches[4];
if ( 'use_id' != $lookup ) {
if ( isset( $lookup_value ) )
$object = call_user_func( $lookup, $lookup_value, $object );
else
$object = call_user_func( $lookup, $object );
}
return sprintf( $trans[$verb][$noun][0], esc_html($object) );
} else {
return $trans[$verb][$noun][0];
}
}
return apply_filters( 'explain_nonce_' . $verb . '-' . $noun, __( 'Are you sure you want to do this?' ), isset($matches[4]) ? $matches[4] : '' );
} else {
return apply_filters( 'explain_nonce_' . $action, __( 'Are you sure you want to do this?' ) );
}
_deprecated_function( __FUNCTION__, '3.3.3', 'wp_nonce_ays()' );
return __( 'Are you sure you want to do this?' );
}
/**
@@ -2737,11 +2655,14 @@ function wp_explain_nonce( $action ) {
*/
function wp_nonce_ays( $action ) {
$title = __( 'WordPress Failure Notice' );
$html = esc_html( wp_explain_nonce( $action ) );
if ( 'log-out' == $action )
$html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
elseif ( wp_get_referer() )
$html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
if ( 'log-out' == $action ) {
$html = sprintf( __( 'You are attempting to log out of %s' ), get_bloginfo( 'name' ) ) . '</p><p>';
$html .= sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() );
} else {
$html = __( 'Are you sure you want to do this?' );
if ( wp_get_referer() )
$html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>";
}
wp_die( $html, $title, array('response' => 403) );
}
@@ -2896,6 +2817,13 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
background-color: #f5f5f5;
background-image: -ms-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
background-image: linear-gradient(top, #ffffff, #f2f2f2);
}
.button:hover {
@@ -2903,13 +2831,15 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
border-color: #666;
}
.button {
background: #f2f2f2 url(<?php echo wp_guess_url(); ?>/wp-admin/images/white-grad.png) repeat-x scroll left top;
.button:active {
background-image: -ms-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -moz-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -o-linear-gradient(top, #f2f2f2, #ffffff);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#ffffff));
background-image: -webkit-linear-gradient(top, #f2f2f2, #ffffff);
background-image: linear-gradient(top, #f2f2f2, #ffffff);
}
.button:active {
background: #eee url(<?php echo wp_guess_url(); ?>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
}
<?php if ( 'rtl' == $text_direction ) : ?>
body { font-family: Tahoma, Arial; }
<?php endif; ?>

View File

@@ -18,10 +18,12 @@
* @return bool True on success, false on failure.
*/
function wp_print_styles( $handles = false ) {
do_action( 'wp_print_styles' );
if ( '' === $handles ) // for wp_head
$handles = false;
if ( ! $handles )
do_action( 'wp_print_styles' );
global $wp_styles;
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
if ( ! did_action( 'init' ) )

View File

@@ -1,3 +1,37 @@
Version 1.5.4 (2012-04-12)
Flash: Disable scripting if swf was loaded from another domain.
Version 1.5.3 (2012-04-05)
HTML5: Check if xhr object is initialized, before calling abort() on it.
HTML4: Postpone form removal until uploaders state changes, to avoid error on resuming stopped uploads.
BrowserPlus: Fix mechanical typo, that caused error during mime type check.
BrowserPlus: browserPlus.Uploader.Cancel() has two required parameters, dies with the error if not passed.
Flash: Improve runtime's behaviour during upload cancellation.
Flash: Survive the case when GPSVersionID contains unexpected value.
Flash: Fix random freeze in Chrome's bundled Flash Player.
Flash: Avoid the silent break when URLStream not yet open, but close is called on it.
Flash: Move Destroy handler out of Flash:Init handler, since it might be called not only after Flash:Init but also before it.
Flash: Avoid warning during build with mxmlc.
Try removeEventListener first in IE and only if it fails - detachEvent.
Fix plupload.getPos to return proper value in IE8+.
Do not initiate plupload.STARTED state, if file queue is empty.
Additional language packs: Estonian, Polish, Korean, French-Canadian, Greek, Persian/Farsi.
Version 1.5.2 (2012-01-06)
UI Widget: Do not show UI if no runtime can be initialized.
UI Widget: Timely update file size and total size if resize in action.
UI Widget: Constrain renaming feature to queued files only.
UI Widget: Disable Add button properly, if requested, rather then just hide.
HTML4/HTML5/BrowserPlus: Avoid adding mime type twice to dialog trigger.
HTML5: fix regression, when unresized images were failing on FF3.6.
HTML5: Constrain Gecko 2,5,6 workaround to multipart mode only.
HTML5/Flash: Take into account weird possibilities of ExifVersion being a string, rather then standard Undefined.
Flash: Simplify event dispatching in BitmapDataUnlimited class, in order to avoid freezing on resizing in FP11.
Add ability to disable file dialog trigger on request (uploader.disableBrowse(true/false)).
Support for immediate abort of upload process, be it chunked upload or regular one.
Abort all activity, before destroying uploader.
Revive temporary file removal logic in upload.php.
Fix potential vulnerability in dump.php and upload.php.
Additional MIME types: application/vnd.openxmlformats-officedocument.*, application/x-javascript, application/json, text/css,css, application/vnd.oasis.opendocument.formula-templat.
Additional language packs: Hungarian, Croatian, Serbian, Romanian.
Version 1.5.1.1 (2011-09-27)
HTML5: Fix mechanical typo, that successfully broke drag and drop, wherever could.
Version 1.5.1 (2011-09-26)

View File

@@ -44,11 +44,13 @@ function fileUploading(up, file) {
if ( max > hundredmb && file.size > hundredmb ) {
setTimeout(function(){
if ( file.status == 2 && file.loaded == 0 ) { // not uploading
wpFileError(file, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
var done;
if ( up.current && up.current.file.id == file.id && up.current.xhr.abort )
up.current.xhr.abort();
if ( file.status < 3 && file.loaded == 0 ) { // not uploading
wpFileError(file, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
up.stop(); // stops the whole queue
up.removeFile(file);
up.start(); // restart the queue
}
}, 10000); // wait for 10 sec. for the file to start uploading
}

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){y.click();C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"999px"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.body.innerHTML;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit();B.parentNode.removeChild(B)});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){if(!y.disabled){y.click()}C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.body.innerHTML;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit()});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}else{if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(i.files,function(A,y){if(A.status===b.DONE||A.status===b.FAILED){var B=e("form_"+A.id);if(B){B.parentNode.removeChild(B)}}})});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(i,A){var y=a.getElementById("input_"+q);if(y){y.disabled=A}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -927,12 +927,15 @@ function wp_kses_check_attr_val($value, $vless, $checkname, $checkvalue) {
*/
function wp_kses_bad_protocol($string, $allowed_protocols) {
$string = wp_kses_no_null($string);
$string2 = $string.'a';
$iterations = 0;
while ($string != $string2) {
$string2 = $string;
do {
$original_string = $string;
$string = wp_kses_bad_protocol_once($string, $allowed_protocols);
} # while
} while ( $original_string != $string && ++$iterations < 6 );
if ( $original_string != $string )
return '';
return $string;
}
@@ -1031,10 +1034,20 @@ function wp_kses_html_error($string) {
* @param string $allowed_protocols Allowed protocols
* @return string Sanitized content
*/
function wp_kses_bad_protocol_once($string, $allowed_protocols) {
function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1 ) {
$string2 = preg_split( '/:|&#0*58;|&#x0*3a;/i', $string, 2 );
if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) )
$string = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols ) . trim( $string2[1] );
if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
$string = trim( $string2[1] );
$protocol = wp_kses_bad_protocol_once2( $string2[0], $allowed_protocols );
if ( 'feed:' == $protocol ) {
if ( $count > 2 )
return '';
$string = wp_kses_bad_protocol_once( $string, $allowed_protocols, ++$count );
if ( empty( $string ) )
return $string;
}
$string = $protocol . $string;
}
return $string;
}
@@ -1302,10 +1315,15 @@ function wp_filter_nohtml_kses($data) {
* @uses add_filter() See description for what functions are added to what hooks.
*/
function kses_init_filters() {
// Normal filtering.
add_filter('pre_comment_content', 'wp_filter_kses');
// Normal filtering
add_filter('title_save_pre', 'wp_filter_kses');
// Comment filtering
if ( current_user_can( 'unfiltered_html' ) )
add_filter( 'pre_comment_content', 'wp_filter_post_kses' );
else
add_filter( 'pre_comment_content', 'wp_filter_kses' );
// Post filtering
add_filter('content_save_pre', 'wp_filter_post_kses');
add_filter('excerpt_save_pre', 'wp_filter_post_kses');
@@ -1325,10 +1343,13 @@ function kses_init_filters() {
* @since 2.0.6
*/
function kses_remove_filters() {
// Normal filtering.
remove_filter('pre_comment_content', 'wp_filter_kses');
// Normal filtering
remove_filter('title_save_pre', 'wp_filter_kses');
// Comment filtering
remove_filter( 'pre_comment_content', 'wp_filter_post_kses' );
remove_filter( 'pre_comment_content', 'wp_filter_kses' );
// Post filtering
remove_filter('content_save_pre', 'wp_filter_post_kses');
remove_filter('excerpt_save_pre', 'wp_filter_post_kses');

View File

@@ -1375,9 +1375,11 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
* @since 1.5.0
*
* @param int $pagenum Optional. Page ID.
* @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
* Otherwise, prepares the URL with esc_url_raw().
* @return string
*/
function get_pagenum_link($pagenum = 1) {
function get_pagenum_link($pagenum = 1, $escape = true ) {
global $wp_rewrite;
$pagenum = (int) $pagenum;
@@ -1428,7 +1430,10 @@ function get_pagenum_link($pagenum = 1) {
$result = apply_filters('get_pagenum_link', $result);
return $result;
if ( $escape )
return esc_url( $result );
else
return esc_url_raw( $result );
}
/**

View File

@@ -1896,7 +1896,8 @@ add_filter('option_users_can_register', 'users_can_register_signup_filter');
*/
function welcome_user_msg_filter( $text ) {
if ( !$text ) {
return __( 'Dear User,
remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
$text = __( 'Dear User,
Your new account is set up.
@@ -1908,6 +1909,7 @@ LOGINLINK
Thanks!
--The Team @ SITE_NAME' );
update_site_option( 'welcome_user_email', $text );
}
return $text;
}

View File

@@ -362,10 +362,11 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
} elseif ( 'custom' == $menu_item->object ) {
$_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] );
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current;
$item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
$raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url;
$item_url = untrailingslashit( $raw_item_url );
$_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
if ( in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
$classes[] = 'current-menu-item';
$menu_items[$key]->current = true;
$_anc_id = (int) $menu_item->db_id;

View File

@@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111130', 1 );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20120102', 1 );
$scripts->localize( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
) );
@@ -179,7 +179,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.8-20110113');
$scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.2');
$scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.2-20120417');
// common bits for both uploaders
$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;

View File

@@ -696,7 +696,7 @@ function get_blogs_of_user( $user_id, $all = false ) {
foreach ( $keys as $key ) {
if ( 'capabilities' !== substr( $key, -12 ) )
continue;
if ( 0 !== strpos( $key, $wpdb->base_prefix ) )
if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) )
continue;
$blog_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
if ( ! is_numeric( $blog_id ) )
@@ -931,7 +931,7 @@ function setup_userdata($for_user_id = '') {
else
$user = new WP_User($for_user_id);
$userdata = $user->data;
$userdata = null;
$user_ID = (int) $user->ID;
$user_level = (int) isset($user->user_level) ? $user->user_level : 0;
@@ -940,6 +940,7 @@ function setup_userdata($for_user_id = '') {
return;
}
$userdata = $user;
$user_login = $user->user_login;
$user_email = $user->user_email;
$user_url = $user->user_url;

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '3.3';
$wp_version = '3.3.3';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@@ -752,7 +752,7 @@ class wpdb {
<li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>
<li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>
</ul>
<p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser ), 'db_select_fail' );
<p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' );
return;
}
}
@@ -1046,7 +1046,7 @@ class wpdb {
<li>Are you sure that the database server is running?</li>
</ul>
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
"/*/WP_I18N_DB_CONN_ERROR*/, htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );
return;
}