WordPress.org

Make WordPress Core

Ticket #11386: 11386-deprecated-args.diff

File 11386-deprecated-args.diff, 10.1 KB (added by nacin, 8 years ago)
  • wp-admin/includes/image.php

     
    1919 * @param int $max_side Maximum length of a single side for the thumbnail.
    2020 * @return string Thumbnail path on success, Error string on failure.
    2121 */
    22 function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
     22function wp_create_thumbnail( $file, $max_side ) {
    2323        $thumbpath = image_resize( $file, $max_side, $max_side );
    2424        return apply_filters( 'wp_create_thumbnail', $thumbpath );
    2525}
  • wp-admin/includes/meta-boxes.php

     
    634634 *
    635635 * @param string $class
    636636 * @param string $value
    637  * @param mixed $deprecated Not used.
    638637 */
    639 function xfn_check($class, $value = '', $deprecated = '') {
     638function xfn_check($class, $value = '') {
    640639        global $link;
    641640
    642641        $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
  • wp-admin/includes/upgrade.php

     
    3030 * @param string $user_name User's username.
    3131 * @param string $user_email User's email.
    3232 * @param bool $public Whether blog is public.
    33  * @param null $deprecated Optional. Not used.
    3433 * @return array Array keys 'url', 'user_id', 'password', 'password_message'.
    3534 */
    36 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
     35function wp_install($blog_title, $user_name, $user_email, $public) {
    3736        global $wp_rewrite;
    3837
    3938        wp_check_mysql_version();
  • wp-app.php

     
    884884         *
    885885         * @since 2.2.0
    886886         *
    887          * @param mixed $deprecated Optional, not used.
    888887         * @return string
    889888         */
    890         function get_categories_url($deprecated = '') {
     889        function get_categories_url() {
    891890                return $this->app_base . $this->CATEGORIES_PATH;
    892891        }
    893892
  • wp-includes/author-template.php

     
    1717 * @uses $authordata The current author's DB object.
    1818 * @uses apply_filters() Calls 'the_author' hook on the author display name.
    1919 *
    20  * @param string $deprecated Deprecated.
    2120 * @return string The author's display name.
    2221 */
    23 function get_the_author($deprecated = '') {
     22function get_the_author() {
    2423        global $authordata;
    2524        return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null);
    2625}
     
    4746function the_author($deprecated = '', $deprecated_echo = true) {
    4847        if ( $deprecated_echo )
    4948                echo get_the_author();
    50         return get_the_author();
     49        else
     50                return get_the_author();
    5151}
    5252
    5353/**
     
    174174 * @uses $authordata The current author's DB object.
    175175 * @uses get_author_posts_url()
    176176 * @uses get_the_author()
    177  * @param string $deprecated Deprecated.
    178177 */
    179 function the_author_posts_link($deprecated = '') {
     178function the_author_posts_link() {
    180179        global $authordata;
    181180        $link = sprintf(
    182181                '<a href="%1$s" title="%2$s">%3$s</a>',
  • wp-includes/comment-template.php

     
    503503 *
    504504 * @since 0.71
    505505 *
    506  * @param string $deprecated Not Used
    507  * @param bool $deprecated Not Used
    508506 */
    509 function comments_link( $deprecated = '', $deprecated = '' ) {
     507function comments_link() {
    510508        echo get_comments_link();
    511509}
    512510
     
    545543 * @param string $zero Text for no comments
    546544 * @param string $one Text for one comment
    547545 * @param string $more Text for more than one comment
    548  * @param string $deprecated Not used.
    549546 */
    550 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
     547function comments_number( $zero = false, $one = false, $more = false ) {
    551548        global $id;
    552549        $number = get_comments_number($id);
    553550
     
    691688 * @since 0.71
    692689 * @uses get_trackback_url() Gets the trackback url for the current post
    693690 *
    694  * @param bool $deprecated Remove backwards compat in 2.5
     691 * @param bool $deprecated_echo Remove backwards compat in 2.5
    695692 * @return void|string Should only be used to echo the trackback URL, use get_trackback_url() for the result instead.
    696693 */
    697 function trackback_url($deprecated = true) {
    698         if ($deprecated) echo get_trackback_url();
    699         else return get_trackback_url();
     694function trackback_url($deprecated_echo = true) {
     695        if ( $deprecated_echo )
     696                echo get_trackback_url();
     697        else
     698                return get_trackback_url();
    700699}
    701700
    702701/**
     
    704703 *
    705704 * @since 0.71
    706705 *
    707  * @param int $deprecated Not used (Was $timezone = 0)
    708706 */
    709 function trackback_rdf($deprecated = '') {
     707function trackback_rdf() {
    710708        if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) {
    711709                echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    712710                                xmlns:dc="http://purl.org/dc/elements/1.1/"
  • wp-includes/comment.php

     
    14501450 * @since 1.5.0
    14511451 *
    14521452 * @param string $url URL to ping.
    1453  * @param int $deprecated Not Used.
    14541453 * @return bool|string False on failure, string containing URI on success.
    14551454 */
    1456 function discover_pingback_server_uri($url, $deprecated = 2048) {
     1455function discover_pingback_server_uri($url) {
    14571456
    14581457        $pingback_str_dquote = 'rel="pingback"';
    14591458        $pingback_str_squote = 'rel=\'pingback\'';
  • wp-includes/formatting.php

     
    862862 * @since 0.71
    863863 *
    864864 * @param string $content String of characters to be converted.
    865  * @param string $deprecated Not used.
    866865 * @return string Converted string.
    867866 */
    868 function convert_chars($content, $deprecated = '') {
     867function convert_chars($content) {
    869868        // Translation of invalid Unicode references range to valid range
    870869        $wp_htmltranswinuni = array(
    871870        '&#128;' => '&#8364;', // the Euro sign
  • wp-includes/functions.php

     
    11841184 *
    11851185 * @param string $url URL to fetch.
    11861186 * @param string|bool $file_path Optional. File path to write request to.
    1187  * @param bool $deprecated Deprecated. Not used.
    11881187 * @return bool|string False on failure and string of headers if HEAD request.
    11891188 */
    1190 function wp_get_http( $url, $file_path = false, $deprecated = false ) {
     1189function wp_get_http( $url, $file_path = false ) {
    11911190        @set_time_limit( 60 );
    11921191
    11931192        $options = array();
     
    12261225 * @since 1.5.1
    12271226 *
    12281227 * @param string $url
    1229  * @param bool $deprecated Not Used.
    12301228 * @return bool|string False on failure, headers on success.
    12311229 */
    1232 function wp_get_http_headers( $url, $deprecated = false ) {
     1230function wp_get_http_headers( $url ) {
    12331231        $response = wp_remote_head( $url );
    12341232
    12351233        if ( is_wp_error( $response ) )
  • wp-includes/kses.php

     
    11961196add_action('init', 'kses_init');
    11971197add_action('set_current_user', 'kses_init');
    11981198
    1199 function safecss_filter_attr( $css, $deprecated = '' ) {
     1199function safecss_filter_attr( $css ) {
    12001200        $css = wp_kses_no_null($css);
    12011201        $css = str_replace(array("\n","\r","\t"), '', $css);
    12021202
  • wp-includes/link-template.php

     
    165165 * @since 1.0.0
    166166 *
    167167 * @param int $post_id Optional. Post ID.
    168  * @param mixed $deprecated Not used.
    169168 * @return string
    170169 */
    171 function post_permalink($post_id = 0, $deprecated = '') {
     170function post_permalink($post_id = 0) {
    172171        return get_permalink($post_id);
    173172}
    174173
  • wp-includes/pluggable.php

     
    16841685 *
    16851686 * @param string $username User's username
    16861687 * @param string $password User's password
    1687  * @param bool $deprecated Not used
    16881688 * @return bool False on login failure, true on successful check
    16891689 */
    1690 function wp_login($username, $password, $deprecated = '') {
     1690function wp_login($username, $password) {
    16911691        global $error;
    16921692
    16931693        $user = wp_authenticate($username, $password);
  • wp-includes/post-template.php

     
    242242 *
    243243 * @since 0.71
    244244 *
    245  * @param mixed $deprecated Not used.
    246245 * @return string
    247246 */
    248 function get_the_excerpt($deprecated = '') {
     247function get_the_excerpt() {
    249248        global $post;
    250249        $output = $post->post_excerpt;
    251250        if ( post_password_required($post) ) {
  • wp-includes/widgets.php

     
    980980 * @since 2.2.0
    981981 * @access private
    982982 *
    983  * @param bool $update Optional, deprecated.
    984983 * @return array Upgraded list of widgets to version 3 array format when called from the admin.
    985984 */
    986 function wp_get_sidebars_widgets($deprecated = true) {
     985function wp_get_sidebars_widgets() {
    987986        global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
    988987
    989988        // If loading from front page, consult $_wp_sidebars_widgets rather than options