Make WordPress Core

Changes from tags/3.0.1 at r16644 to tags/3.0.2 at r16644


Ignore:
Location:
tags/3.0.2
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • tags/3.0.2/readme.html

    r16644 r16644  
    99<h1 id="logo">
    1010    <a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
    11     <br /> Version 3.0.1
     11    <br /> Version 3.0.2
    1212</h1>
    1313<p style="text-align: center">Semantic Personal Publishing Platform</p>
     
    103103
    104104<h1>Copyright</h1>
    105 <p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr>v2 (see <a href="license.txt">license.txt</a>).</p>
     105<p>WordPress is released under the <abbr title="GNU Public License">GPL</abbr> (see <a href="license.txt">license.txt</a>).</p>
    106106
    107107
  • tags/3.0.2/wp-admin/includes/file.php

    r16644 r16644  
    938938        if ( is_wp_error($error) )
    939939            $error_string = $error->get_error_message();
    940         echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
     940        echo '<div id="message" class="error"><p>' . esc_html( $error_string ) . '</p></div>';
    941941    }
    942942
  • tags/3.0.2/wp-admin/includes/plugin.php

    r16644 r16644  
    484484        include(WP_PLUGIN_DIR . '/' . $plugin);
    485485        do_action( 'activate_plugin', trim( $plugin) );
     486        do_action( 'activate_' . trim( $plugin ) );
    486487        if ( $network_wide ) {
    487488            $current[$plugin] = time();
     
    492493            update_option('active_plugins', $current);
    493494        }
    494         do_action( 'activate_' . trim( $plugin ) );
    495495        do_action( 'activated_plugin', trim( $plugin) );
    496496        if ( ob_get_length() > 0 ) {
  • tags/3.0.2/wp-admin/includes/update-core.php

    r16644 r16644  
    275275    $required_php_version = '4.3';
    276276    $required_mysql_version = '4.1.2';
    277     $wp_version = '3.0.1';
     277    $wp_version = '3.0.2';
    278278    $php_compat     = version_compare( $php_version, $required_php_version, '>=' );
    279279    $mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
  • tags/3.0.2/wp-admin/plugins.php

    r16644 r16644  
    256256                            if ( $plugin['is_uninstallable'] ) {
    257257                                /* translators: 1: plugin name, 2: plugin author */
    258                                 echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), $plugin['Name'], $plugin['Author'] ), '</li>';
     258                                echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), esc_html($plugin['Name']), esc_html($plugin['Author']) ), '</li>';
    259259                                $data_to_delete = true;
    260260                            } else {
    261261                                /* translators: 1: plugin name, 2: plugin author */
    262                                 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), $plugin['Name'], $plugin['Author'] ), '</li>';
     262                                echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), esc_html($plugin['Name']), esc_html($plugin['Author']) ), '</li>';
    263263                            }
    264264                        }
     
    290290                    <?php
    291291                        foreach ( (array)$files_to_delete as $file )
    292                             echo '<li>' . str_replace(WP_PLUGIN_DIR, '', $file) . '</li>';
     292                            echo '<li>' . esc_html(str_replace(WP_PLUGIN_DIR, '', $file)) . '</li>';
    293293                    ?>
    294294                    </ul>
  • tags/3.0.2/wp-includes/canonical.php

    r16644 r16644  
    104104            if ( $redirect_url = get_permalink(get_query_var('p')) )
    105105                $redirect['query'] = remove_query_arg(array('p', 'post_type'), $redirect['query']);
    106             if ( get_query_var( 'page' ) ) {
    107                 $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
    108                 $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
    109             }
    110106        } elseif ( is_single() && !empty($_GET['name'])  && ! $redirect_url ) {
    111107            if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) )
     
    181177            }
    182178        } elseif ( is_single() && strpos($wp_rewrite->permalink_structure, '%category%') !== false ) {
    183             $category = get_term_by('slug', get_query_var('category_name'), 'category');
     179            $category = get_category_by_path(get_query_var('category_name'));
    184180            $post_terms = wp_get_object_terms($wp_query->get_queried_object_id(), 'category', array('fields' => 'tt_ids'));
    185181            if ( (!$category || is_wp_error($category)) || ( !is_wp_error($post_terms) && !empty($post_terms) && !in_array($category->term_taxonomy_id, $post_terms) ) )
    186182                $redirect_url = get_permalink($wp_query->get_queried_object_id());
     183        }
     184
     185        // Post Paging
     186        if ( is_singular() && get_query_var('page') && $redirect_url ) {
     187            $redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
     188            $redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
    187189        }
    188190
  • tags/3.0.2/wp-includes/capabilities.php

    r16644 r16644  
    799799    case 'remove_user':
    800800        $caps[] = 'remove_users';
    801         break;
    802     case 'delete_user':
    803         $caps[] = 'delete_users';
    804801        break;
    805802    case 'promote_user':
     
    10291026    case 'delete_users':
    10301027        // If multisite these caps are allowed only for super admins.
    1031         if ( is_multisite() && !is_super_admin( $user_id ) )
     1028        if ( is_multisite() && !is_super_admin( $user_id ) ) {
    10321029            $caps[] = 'do_not_allow';
    1033         else
     1030        } else {
     1031            if ( 'delete_user' == $cap )
     1032                $cap = 'delete_users';
    10341033            $caps[] = $cap;
     1034        }
    10351035        break;
    10361036    case 'create_users':
     
    10801080    $current_user = wp_get_current_user();
    10811081
    1082     if ( is_multisite() && is_super_admin() )
    1083         return true;
    1084 
    10851082    if ( empty( $current_user ) )
    10861083        return false;
  • tags/3.0.2/wp-includes/comment.php

    r16644 r16644  
    1919 * then the check fails.
    2020 *
    21  * If the comment is a trackback and part of the blogroll, then the trackback is
    22  * automatically whitelisted. If the comment author was approved before, then
    23  * the comment is automatically whitelisted.
     21 * If the comment author was approved before, then the comment is
     22 * automatically whitelisted.
    2423 *
    2524 * If none of the checks fail, then the failback is to set the check to pass
     
    8180    // Comment whitelisting:
    8281    if ( 1 == get_option('comment_whitelist')) {
    83         if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
    84             $uri = parse_url($url);
    85             $domain = $uri['host'];
    86             $uri = parse_url( home_url() );
    87             $home_domain = $uri['host'];
    88             if ( $wpdb->get_var($wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_url LIKE (%s) LIMIT 1", '%'.$domain.'%')) || $domain == $home_domain )
    89                 return true;
    90             else
    91                 return false;
    92         } elseif ( $author != '' && $email != '' ) {
     82        if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) {
    9383            // expected_slashed ($author, $email)
    9484            $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");
     
    16551645                $pinged[] = $tb_ping;
    16561646            } else {
    1657                 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_ping', '')) WHERE ID = %d", $post_id) );
     1647                $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) );
    16581648            }
    16591649        }
  • tags/3.0.2/wp-includes/functions.php

    r16644 r16644  
    21262126    $upload_path = get_option( 'upload_path' );
    21272127    $upload_path = trim($upload_path);
    2128     $main_override = defined( 'MULTISITE' ) && is_main_site();
     2128    $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site();
    21292129    if ( empty($upload_path) ) {
    21302130        $dir = WP_CONTENT_DIR . '/uploads';
  • tags/3.0.2/wp-includes/load.php

    r16644 r16644  
    580580        return MULTISITE;
    581581
    582     if ( defined( 'VHOST' ) || defined( 'SUNRISE' ) )
     582    if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
    583583        return true;
    584584
  • tags/3.0.2/wp-includes/ms-files.php

    r16644 r16644  
    3030}
    3131
    32 $mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
     32$mime = wp_check_filetype( $file );
    3333if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
    3434    $mime[ 'type' ] = mime_content_type( $file );
     
    3737    $mimetype = $mime[ 'type' ];
    3838else
    39     $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 );
     39    $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
    4040
    4141header( 'Content-type: ' . $mimetype ); // always send this
  • tags/3.0.2/wp-includes/version.php

    r16644 r16644  
    99 * @global string $wp_version
    1010 */
    11 $wp_version = '3.0.1';
     11$wp_version = '3.0.2';
    1212
    1313/**
Note: See TracChangeset for help on using the changeset viewer.