Ticket #5418: 5418.rep4.2.diff

File 5418.rep4.2.diff, 13.0 KB (added by DD32, 4 years ago)
  • wp-admin/custom-header.php

     
    228228 
    229229                if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { 
    230230                        set_theme_mod('header_image', clean_url($url)); 
    231                         apply_filters('wp_create_file_in_uploads', $file, $id); // For replication 
     231                        do_action('wp_create_file_in_uploads', $file, $id); // For replication 
    232232                        return $this->finished(); 
    233233                } elseif ( $width > HEADER_IMAGE_WIDTH ) { 
    234234                        $oitar = $width / HEADER_IMAGE_WIDTH; 
  • wp-admin/import/wordpress.php

     
    106106                                        continue; 
    107107                                } 
    108108                                if ( false !== strpos($importline, '</item>') ) { 
    109                                         $num++; 
    110109                                        $doing_entry = false; 
    111110                                        if ($process_post_func) 
    112111                                                call_user_func($process_post_func, $this->post); 
     
    400399 
    401400                        $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor 
    402401 
    403                         $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'post_name', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt', 'guid', 'post_parent', 'menu_order', 'post_type'); 
     402                        $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent', 'menu_order', 'post_type'); 
    404403                        if ($post_type == 'attachment') { 
    405404                                $remote_url = $this->get_tag( $post, 'wp:attachment_url' ); 
    406405                                if ( !$remote_url ) 
  • wp-admin/import/wp-cat2tag.php

     
    114114        } 
    115115 
    116116        function _category_exists($cat_id) { 
    117                 global $wpdb; 
    118  
    119117                $cat_id = (int) $cat_id; 
    120118 
    121119                $maybe_exists = category_exists($cat_id); 
  • wp-admin/includes/file.php

     
    112112 
    113113        // If you override this, you must provide $ext and $type!!!! 
    114114        $test_type = true; 
     115        $mimes = false; 
    115116 
    116117        // Install user overrides. Did we mention that this voids your warranty? 
    117118        if ( is_array( $overrides ) ) 
  • wp-admin/includes/misc.php

     
    130130 
    131131// If siteurl or home changed, flush rewrite rules. 
    132132function update_home_siteurl( $old_value, $value ) { 
    133         global $wp_rewrite, $user_login, $user_pass_md5; 
     133        global $wp_rewrite; 
    134134 
    135135        if ( defined( "WP_INSTALLING" ) ) 
    136136                return; 
  • wp-admin/includes/template.php

     
    102102                echo ' checked="checked"'; 
    103103} 
    104104 
    105 // TODO: Remove? 
    106 function documentation_link( $for ) { 
    107         return; 
    108 } 
    109  
    110105function selected( $selected, $current) { 
    111106        if ( $selected == $current) 
    112107                echo ' selected="selected"'; 
  • wp-admin/includes/update.php

     
    22 
    33// The admin side of our 1.0 update system 
    44 
    5 function core_update_footer( $msg ) { 
     5function core_update_footer( $msg = '' ) { 
    66        if ( !current_user_can('manage_options') ) 
    77                return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); 
    88 
  • wp-admin/link-import.php

     
    123123} // end else 
    124124 
    125125if ( ! $blogrolling ) 
    126         apply_filters( 'wp_delete_file', $opml_url); 
     126        do_action( 'wp_delete_file', $opml_url); 
    127127        @unlink($opml_url); 
    128128?> 
    129129</div> 
  • wp-app.php

     
    425425                $url = $file['url']; 
    426426                $file = $file['file']; 
    427427 
    428                 apply_filters('wp_create_file_in_uploads', $file); // replicate 
     428                do_action('wp_create_file_in_uploads', $file); // replicate 
    429429 
    430430                // Construct the attachment array 
    431431                $attachment = array( 
  • wp-includes/category-template.php

     
    6666} 
    6767 
    6868function get_the_category($id = false) { 
    69         global $post, $term_cache; 
     69        global $post; 
    7070 
    7171        $id = (int) $id; 
    7272        if ( !$id ) 
  • wp-includes/classes.php

     
    740740 
    741741                $r = wp_parse_args( $args, $defaults ); 
    742742                extract( $r, EXTR_SKIP ); 
    743                 $postition = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); 
     743                $position = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); 
    744744 
    745745                if ( is_wp_error($id) ) { 
    746746                        $data = $id; 
  • wp-includes/comment-template.php

     
    340340 * 
    341341 * @since 0.71 
    342342 * 
    343  * @param string $file Not Used 
    344  * @param bool $echo Not Used 
     343 * @param string $deprecated Not Used 
     344 * @param bool $deprecated Not Used 
    345345 */ 
    346 function comments_link( $file = '', $echo = true ) { 
     346function comments_link( $deprecated = '', $deprecated = '' ) { 
    347347        echo get_comments_link(); 
    348348} 
    349349 
     
    357357 * @return int The number of comments a post has 
    358358 */ 
    359359function get_comments_number( $post_id = 0 ) { 
     360        global $id; 
    360361        $post_id = (int) $post_id; 
    361362 
    362363        if ( !$post_id ) 
     
    536537 * 
    537538 * @since 0.71 
    538539 * 
    539  * @param int $timezone Not used 
     540 * @param int $deprecated Not used (Was $timezone = 0) 
    540541 */ 
    541 function trackback_rdf($timezone = 0) { 
     542function trackback_rdf($deprecated = '') { 
    542543        if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { 
    543544                echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
    544545                                xmlns:dc="http://purl.org/dc/elements/1.1/" 
  • wp-includes/comment.php

     
    105105 
    106106// Deprecate in favor of get_comment()? 
    107107function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries 
    108         global $postc, $id, $wpdb; 
     108        global $postc, $wpdb; 
    109109        if ( $no_cache ) { 
    110110                $query = $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $comment_ID); 
    111111                if ( false == $include_unapproved ) 
     
    130130 
    131131function get_lastcommentmodified($timezone = 'server') { 
    132132        global $cache_lastcommentmodified, $wpdb; 
    133         $add_seconds_blog = get_option('gmt_offset') * 3600; 
    134133        $add_seconds_server = date('Z'); 
    135134        $now = current_time('mysql', 1); 
    136135        if ( !isset($cache_lastcommentmodified[$timezone]) ) { 
     
    177176        "total_comments"        => 0 
    178177    );  
    179178 
    180     foreach ( $totals as $i => $row ) {  
     179    foreach ( $totals as $row ) {  
    181180        switch ( $row['comment_approved'] ) {  
    182181            case 'spam':  
    183182                $comment_count['spam'] = $row['total'];  
     
    519518 
    520519        $comment_date_gmt = get_gmt_from_date($comment_date); 
    521520 
    522         $result = $wpdb->query( 
     521        $wpdb->query( 
    523522                "UPDATE $wpdb->comments SET 
    524523                        comment_content      = '$comment_content', 
    525524                        comment_author       = '$comment_author', 
     
    609608        $pingback_str_dquote = 'rel="pingback"'; 
    610609        $pingback_str_squote = 'rel=\'pingback\''; 
    611610        $x_pingback_str = 'x-pingback: '; 
    612         $pingback_href_original_pos = 27; 
    613611 
    614612        extract(parse_url($url), EXTR_SKIP); 
    615613 
  • wp-includes/deprecated.php

     
    911911 * 
    912912 * @param string $file 
    913913 */ 
    914 function permalink_single_rss($file = '') { 
     914function permalink_single_rss($deprecated = '') { 
    915915        _deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()'); 
    916916        the_permalink_rss(); 
    917917} 
     
    12061206function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { 
    12071207        _deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()'); 
    12081208 
    1209         $link = get_category_feed_link($cat_ID, $feed = 'rss2'); 
     1209        $link = get_category_feed_link($cat_ID, 'rss2'); 
    12101210 
    12111211        if ( $echo ) 
    12121212                echo $link; 
     
    12631263        return wp_create_user($username, $password, $email); 
    12641264} 
    12651265 
     1266/** 
     1267 * documentation_link() - Unused Admin function 
     1268 * @since 2.0 
     1269 * @param string $deprecated Unknown 
     1270 * @deprecated 2.4 
     1271 */ 
     1272function documentation_link( $deprecated = '' ) { 
     1273        _deprecated_function( __FUNCTION__, '2.4', '' ); 
     1274        return; 
     1275} 
     1276 
    12661277?> 
     1278 No newline at end of file 
  • wp-includes/functions.php

     
    115115        $day = mktime( 0, 0, 0, $md, $mm, $my ); 
    116116        $weekday = date( 'w', $day ); 
    117117        $i = 86400; 
    118         if( !is_numeric($a) ) 
     118        if( !is_numeric($start_of_week) ) 
    119119                $start_of_week = get_option( 'start_of_week' ); 
    120120 
    121121        if ( $weekday < $start_of_week ) 
  • wp-includes/link-template.php

     
    3232        global $post; 
    3333        switch ( strtolower($mode) ) { 
    3434                case 'title': 
    35                         $title = sanitize_title($post->post_title) . '-' . $id; 
     35                        $title = sanitize_title($post->post_title) . '-' . $post->ID; 
    3636                        echo '<a id="'.$title.'"></a>'; 
    3737                        break; 
    3838                case 'id': 
     
    316316        if ( '' == $permalink_structure ) { 
    317317                $link = get_option('home') . '?feed=rss2&amp;author=' . $author_id; 
    318318        } else { 
    319                 $link = get_author_posts_url($author_id, $author_nicename); 
     319                $link = get_author_posts_url($author_id); 
    320320                $link = trailingslashit($link) . user_trailingslashit('feed', 'feed'); 
    321321        } 
    322322 
  • wp-includes/pluggable.php

     
    291291endif; 
    292292 
    293293if ( !function_exists('wp_login') ) : 
    294 function wp_login($username, $password, $deprecated = false) { 
    295         global $wpdb, $error; 
     294function wp_login($username, $password, $deprecated = '') { 
     295        global $error; 
    296296 
    297297        $username = sanitize_user($username); 
    298298 
     
    802802// Deprecated. Use wp_set_auth_cookie() 
    803803if ( !function_exists('wp_setcookie') ) : 
    804804function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 
     805        _deprecated_function( __FUNCTION__, '2.4', 'wp_set_auth_cookie()' ); 
    805806        $user = get_userdatabylogin($username); 
    806807        wp_set_auth_cookie($user->ID, $remember); 
    807808} 
     
    810811// Deprecated. Use wp_clear_auth_cookie() 
    811812if ( !function_exists('wp_clearcookie') ) : 
    812813function wp_clearcookie() { 
     814        _deprecated_function( __FUNCTION__, '2.4', 'wp_clear_auth_cookie()' ); 
    813815        wp_clear_auth_cookie(); 
    814816} 
    815817endif; 
     
    817819// Deprecated.  No alternative. 
    818820if ( !function_exists('wp_get_cookie_login') ): 
    819821function wp_get_cookie_login() { 
     822        _deprecated_function( __FUNCTION__, '2.4', '' ); 
    820823        return false; 
    821824} 
    822825endif; 
  • wp-includes/post.php

     
    25292529 * @param int $post_id Not Used. Can be set to null. 
    25302530 * @param object $post Object type containing the post information 
    25312531 */ 
    2532 function _future_post_hook($post_id, $post) { 
     2532function _future_post_hook($deprecated = '', $post) { 
    25332533        wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); 
    25342534        wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); 
    25352535} 
  • wp-includes/taxonomy.php

     
    806806                         
    807807        } else if ( 'rss' == $context ) { 
    808808                $value = apply_filters("term_${field}_rss", $value, $taxonomy); 
    809                 $value = apply_filters("${taxonomy}_$field_rss", $value); 
     809                $value = apply_filters("${taxonomy}_${field}_rss", $value); 
    810810        } else { 
    811811                // Use display filters by default. 
    812812                $value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context);