WordPress.org

Make WordPress Core

Ticket #7493: deprecated.php.patch

File deprecated.php.patch, 17.3 KB (added by docwhat, 7 years ago)
  • wp-includes/deprecated.php

    diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php
    index 066e62c..5d6e4e9 100644
    a b $tablepostmeta = $wpdb->postmeta; 
    8686 * @return array 
    8787 */ 
    8888function get_postdata($postid) { 
    89         _deprecated_function(__FUNCTION__, '0.0', 'get_post()'); 
     89        _deprecated_function(__FUNCTION__, '0.71', 'get_post()'); 
    9090 
    9191        $post = &get_post($postid); 
    9292 
    function start_wp() { 
    139139 * @return null|int 
    140140 */ 
    141141function the_category_ID($echo = true) { 
    142         _deprecated_function(__FUNCTION__, '0.0', 'get_the_category()'); 
     142        _deprecated_function(__FUNCTION__, '0.71', 'get_the_category()'); 
    143143 
    144144        // Grab the first cat in the list. 
    145145        $categories = get_the_category(); 
    function the_category_ID($echo = true) { 
    164164function the_category_head($before='', $after='') { 
    165165        global $currentcat, $previouscat; 
    166166 
    167         _deprecated_function(__FUNCTION__, '0.0', 'get_the_category_by_ID()'); 
     167        _deprecated_function(__FUNCTION__, '0.71', 'get_the_category_by_ID()'); 
    168168 
    169169        // Grab the first cat in the list. 
    170170        $categories = get_the_category(); 
    function the_category_head($before='', $after='') { 
    193193 */ 
    194194function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') { 
    195195 
    196         _deprecated_function(__FUNCTION__, '0.0', 'previous_post_link()'); 
     196        _deprecated_function(__FUNCTION__, '1.5', 'previous_post_link()'); 
    197197 
    198198        if ( empty($in_same_cat) || 'no' == $in_same_cat ) 
    199199                $in_same_cat = false; 
    function previous_post($format='%', $previous='previous post: ', $title='yes', $ 
    228228 * @param string $excluded_categories 
    229229 */ 
    230230function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { 
    231         _deprecated_function(__FUNCTION__, '0.0', 'next_post_link()'); 
     231        _deprecated_function(__FUNCTION__, '0.71', 'next_post_link()'); 
    232232 
    233233        if ( empty($in_same_cat) || 'no' == $in_same_cat ) 
    234234                $in_same_cat = false; 
    function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat= 
    261261 * @return bool 
    262262 */ 
    263263function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') { 
    264         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     264        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    265265 
    266266        $author_data = get_userdata($user_id); 
    267267        return ($author_data->user_level > 1); 
    function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') { 
    280280 * @return bool 
    281281 */ 
    282282function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') { 
    283         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     283        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    284284 
    285285        $author_data = get_userdata($user_id); 
    286286        return ($author_data->user_level >= 1); 
    function user_can_edit_post($user_id, $post_id, $blog_id = 1) { 
    327327 * @return bool 
    328328 */ 
    329329function user_can_delete_post($user_id, $post_id, $blog_id = 1) { 
    330         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     330        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    331331 
    332332        // right now if one can edit, one can delete 
    333333        return user_can_edit_post($user_id, $post_id, $blog_id); 
    function user_can_delete_post($user_id, $post_id, $blog_id = 1) { 
    346346 * @return bool 
    347347 */ 
    348348function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') { 
    349         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     349        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    350350 
    351351        $author_data = get_userdata($user_id); 
    352352        return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id)); 
    function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') { 
    366366 * @return bool 
    367367 */ 
    368368function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) { 
    369         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     369        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    370370 
    371371        $author_data = get_userdata($user_id); 
    372372        return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id)); 
    function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) { 
    386386 * @return bool 
    387387 */ 
    388388function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { 
    389         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     389        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    390390 
    391391        // right now if one can edit a post, one can edit comments made on it 
    392392        return user_can_edit_post($user_id, $post_id, $blog_id); 
    function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) { 
    406406 * @return bool 
    407407 */ 
    408408function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { 
    409         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     409        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    410410 
    411411        // right now if one can edit comments, one can delete comments 
    412412        return user_can_edit_post_comments($user_id, $post_id, $blog_id); 
    function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) { 
    424424 * @return bool 
    425425 */ 
    426426function user_can_edit_user($user_id, $other_user) { 
    427         _deprecated_function(__FUNCTION__, '0.0', 'current_user_can()'); 
     427        _deprecated_function(__FUNCTION__, '1.5', 'current_user_can()'); 
    428428 
    429429        $user  = get_userdata($user_id); 
    430430        $other = get_userdata($other_user); 
    function user_can_edit_user($user_id, $other_user) { 
    457457function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', 
    458458                                                 $show_description = true, $show_rating = false, 
    459459                                                 $limit = -1, $show_updated = 0) { 
    460         _deprecated_function(__FUNCTION__, '0.0', 'get_links()'); 
     460        _deprecated_function(__FUNCTION__, '0.71', 'get_links()'); 
    461461 
    462462        $cat_id = -1; 
    463463        $cat = get_term_by('name', $cat_name, 'link_category'); 
    function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', 
    479479 * @return bool|null 
    480480 */ 
    481481function wp_get_linksbyname($category, $args = '') { 
    482         _deprecated_function(__FUNCTION__, '0.0', 'wp_get_links()'); 
     482        _deprecated_function(__FUNCTION__, '1.0.1', 'wp_get_links()'); 
    483483 
    484484        $cat = get_term_by('name', $category, 'link_category'); 
    485485        if ( !$cat ) 
    function wp_get_linksbyname($category, $args = '') { 
    512512 * @return unknown 
    513513 */ 
    514514function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) { 
    515         _deprecated_function(__FUNCTION__, '0.0', 'get_linkobjects()'); 
     515        _deprecated_function(__FUNCTION__, '1.0.1', 'get_linkobjects()'); 
    516516 
    517517        $cat_id = -1; 
    518518        $cat = get_term_by('name', $cat_name, 'link_category'); 
    function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit 
    565565 * @return unknown 
    566566 */ 
    567567function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { 
    568         _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); 
     568        _deprecated_function(__FUNCTION__, '1.0.1', 'get_bookmarks()'); 
    569569 
    570570        $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit"); 
    571571 
    function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { 
    598598 */ 
    599599function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ", 
    600600                                                                        $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { 
    601         _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); 
     601        _deprecated_function(__FUNCTION__, '0.71', 'get_bookmarks()'); 
    602602 
    603603        get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); 
    604604} 
    function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = 
    625625 */ 
    626626function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, 
    627627                                                          $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { 
    628         _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); 
     628        _deprecated_function(__FUNCTION__, '0.71', 'get_bookmarks()'); 
    629629 
    630630        get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); 
    631631} 
    function get_links_withrating($category = -1, $before = '', $after = '<br />', $ 
    640640 * @return int Only returns 0. 
    641641 */ 
    642642function get_autotoggle($id = 0) { 
    643         _deprecated_function(__FUNCTION__, '0.0' ); 
     643        _deprecated_function(__FUNCTION__, '0.71' ); 
    644644        return 0; 
    645645} 
    646646 
    function get_autotoggle($id = 0) { 
    672672function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, 
    673673                                   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, 
    674674                                   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { 
    675         _deprecated_function(__FUNCTION__, '0.0', 'wp_list_categories()'); 
     675        _deprecated_function(__FUNCTION__, '0.71', 'wp_list_categories()'); 
    676676 
    677677        $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children', 
    678678                'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); 
    function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde 
    688688 * @return unknown 
    689689 */ 
    690690function wp_list_cats($args = '') { 
    691         _deprecated_function(__FUNCTION__, '0.0', 'wp_list_categories()'); 
     691        _deprecated_function(__FUNCTION__, '1.2', 'wp_list_categories()'); 
    692692 
    693693        $r = wp_parse_args( $args ); 
    694694 
    function wp_list_cats($args = '') { 
    730730function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', 
    731731                $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false, 
    732732                $selected = 0, $exclude = 0) { 
    733         _deprecated_function(__FUNCTION__, '0.0', 'wp_dropdown_categories()'); 
     733        _deprecated_function(__FUNCTION__, '0.71', 'wp_dropdown_categories()'); 
    734734 
    735735        $show_option_all = ''; 
    736736        if ( $optionall ) 
    function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = ' 
    753753 * @see WP_Scripts 
    754754 */ 
    755755function tinymce_include() { 
    756         _deprecated_function(__FUNCTION__, '0.0', 'wp_print_scripts()/WP_Scripts'); 
     756        _deprecated_function(__FUNCTION__, '2.1', 'wp_print_scripts()/WP_Scripts'); 
    757757 
    758758        wp_print_script('wp_tiny_mce'); 
    759759} 
    function tinymce_include() { 
    772772 * @return unknown 
    773773 */ 
    774774function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { 
    775         _deprecated_function(__FUNCTION__, '0.0', 'wp_list_authors()'); 
     775        _deprecated_function(__FUNCTION__, '1.2', 'wp_list_authors()'); 
    776776 
    777777        $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); 
    778778        return wp_list_authors($args); 
    function list_authors($optioncount = false, $exclude_admin = true, $show_fullnam 
    788788 * @return unknown 
    789789 */ 
    790790function wp_get_post_cats($blogid = '1', $post_ID = 0) { 
    791         _deprecated_function(__FUNCTION__, '0.0', 'wp_get_post_categories()'); 
     791        _deprecated_function(__FUNCTION__, '1.0.1', 'wp_get_post_categories()'); 
    792792        return wp_get_post_categories($post_ID); 
    793793} 
    794794 
    function wp_get_post_cats($blogid = '1', $post_ID = 0) { 
    805805 * @return unknown 
    806806 */ 
    807807function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) { 
    808         _deprecated_function(__FUNCTION__, '0.0', 'wp_set_post_categories()'); 
     808        _deprecated_function(__FUNCTION__, '1.0.1', 'wp_set_post_categories()'); 
    809809        return wp_set_post_categories($post_ID, $post_categories); 
    810810} 
    811811 
    function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array( 
    823823 * @return unknown 
    824824 */ 
    825825function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { 
    826         _deprecated_function(__FUNCTION__, '0.0', 'wp_get_archives()'); 
     826        _deprecated_function(__FUNCTION__, '0.71', 'wp_get_archives()'); 
    827827        $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); 
    828828        return wp_get_archives($args); 
    829829} 
    function get_archives($type='', $limit='', $format='html', $before = '', $after 
    841841 * @return string|null 
    842842 */ 
    843843function get_author_link($echo = false, $author_id, $author_nicename = '') { 
    844         _deprecated_function(__FUNCTION__, '0.0', 'get_author_posts_url()'); 
     844        _deprecated_function(__FUNCTION__, '1.2', 'get_author_posts_url()'); 
    845845 
    846846        $link = get_author_posts_url($author_id, $author_nicename); 
    847847 
    function get_author_link($echo = false, $author_id, $author_nicename = '') { 
    868868 */ 
    869869function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', 
    870870                                        $pagelink='%', $more_file='') { 
    871         _deprecated_function(__FUNCTION__, '0.0', 'wp_link_pages()'); 
     871        _deprecated_function(__FUNCTION__, '0.71', 'wp_link_pages()'); 
    872872 
    873873        $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file'); 
    874874        return wp_link_pages($args); 
    function link_pages($before='<br />', $after='<br />', $next_or_number='number', 
    885885 * @return string 
    886886 */ 
    887887function get_settings($option) { 
    888         _deprecated_function(__FUNCTION__, '0.0', 'get_option()'); 
     888        _deprecated_function(__FUNCTION__, '0.71', 'get_option()'); 
    889889 
    890890        return get_option($option); 
    891891} 
    function get_settings($option) { 
    898898 * @see the_permalink() 
    899899 */ 
    900900function permalink_link() { 
    901         _deprecated_function(__FUNCTION__, '0.0', 'the_permalink()'); 
     901        _deprecated_function(__FUNCTION__, '0.71', 'the_permalink()'); 
    902902        the_permalink(); 
    903903} 
    904904 
    function permalink_link() { 
    912912 * @param string $file 
    913913 */ 
    914914function permalink_single_rss($deprecated = '') { 
    915         _deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()'); 
     915        _deprecated_function(__FUNCTION__, '0.71', 'the_permalink_rss()'); 
    916916        the_permalink_rss(); 
    917917} 
    918918 
    function permalink_single_rss($deprecated = '') { 
    928928 * @return null|string 
    929929 */ 
    930930function wp_get_links($args = '') { 
    931         _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); 
     931        _deprecated_function(__FUNCTION__, '1.0.1', 'get_bookmarks()'); 
    932932 
    933933        if ( strpos( $args, '=' ) === false ) { 
    934934                $cat_id = $args; 
    function wp_get_links($args = '') { 
    976976 */ 
    977977function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name', 
    978978                        $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) { 
    979         _deprecated_function(__FUNCTION__, '0.0', 'get_bookmarks()'); 
     979        _deprecated_function(__FUNCTION__, '0.71', 'get_bookmarks()'); 
    980980 
    981981        $order = 'ASC'; 
    982982        if ( substr($orderby, 0, 1) == '_' ) { 
    function get_links($category = -1, $before = '', $after = '<br />', $between = ' 
    10711071 * @param string $$deprecated Not Used 
    10721072 */ 
    10731073function get_links_list($order = 'name', $deprecated = '') { 
    1074         _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()'); 
     1074        _deprecated_function(__FUNCTION__, '1.0.1', 'wp_list_bookmarks()'); 
    10751075 
    10761076        $order = strtolower($order); 
    10771077 
    function get_links_list($order = 'name', $deprecated = '') { 
    11191119 * @param bool $count the number of links in the db 
    11201120 */ 
    11211121function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) { 
    1122         _deprecated_function(__FUNCTION__, '0.0' ); 
     1122        _deprecated_function(__FUNCTION__, '0.71' ); 
    11231123 
    11241124        if ( $count ) 
    11251125                $counts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links"); 
    function links_popup_script($text = 'Links', $width=400, $height=400, $file='lin 
    11431143 * @return unknown 
    11441144 */ 
    11451145function get_linkrating($link) { 
    1146         _deprecated_function(__FUNCTION__, '0.0', 'sanitize_bookmark_field()'); 
     1146        _deprecated_function(__FUNCTION__, '1.0.1', 'sanitize_bookmark_field()'); 
    11471147        return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); 
    11481148} 
    11491149 
    function get_linkrating($link) { 
    11581158 * @return string 
    11591159 */ 
    11601160function get_linkcatname($id = 0) { 
    1161         _deprecated_function(__FUNCTION__, '0.0', 'get_category()'); 
     1161        _deprecated_function(__FUNCTION__, '0.71', 'get_category()'); 
    11621162 
    11631163        $id = (int) $id; 
    11641164 
    function get_linkcatname($id = 0) { 
    11871187 * @param string $deprecated Not used 
    11881188 */ 
    11891189function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') { 
    1190         _deprecated_function(__FUNCTION__, '0.0', 'post_comments_feed_link()'); 
     1190        _deprecated_function(__FUNCTION__, '1.0.1', 'post_comments_feed_link()'); 
    11911191        post_comments_feed_link($link_text); 
    11921192} 
    11931193 
    function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') { 
    12041204 * @return string|null 
    12051205 */ 
    12061206function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { 
    1207         _deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()'); 
     1207        _deprecated_function(__FUNCTION__, '1.2', 'get_category_feed_link()'); 
    12081208 
    12091209        $link = get_category_feed_link($cat_ID, 'rss2'); 
    12101210 
    function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { 
    12261226 * @return string|null 
    12271227 */ 
    12281228function get_author_rss_link($echo = false, $author_id = 1, $deprecated = '') { 
    1229         _deprecated_function(__FUNCTION__, '0.0', 'get_author_feed_link()'); 
     1229        _deprecated_function(__FUNCTION__, '1.2', 'get_author_feed_link()'); 
    12301230 
    12311231        $link = get_author_feed_link($author_id); 
    12321232        if ( $echo )