Make WordPress Core

Ticket #33413: 33413.2.diff

File 33413.2.diff, 24.6 KB (added by dimadin, 9 years ago)
  • wp-includes/bookmark.php

     
    378378                return $value;
    379379
    380380        if ( 'edit' == $context ) {
    381                 /** This filter is documented in wp-includes/post.php */
     381                /** This filter is documented in wp-includes/post-functions.php */
    382382                $value = apply_filters( "edit_$field", $value, $bookmark_id );
    383383
    384384                if ( 'link_notes' == $field ) {
     
    387387                        $value = esc_attr($value);
    388388                }
    389389        } elseif ( 'db' == $context ) {
    390                 /** This filter is documented in wp-includes/post.php */
     390                /** This filter is documented in wp-includes/post-functions.php */
    391391                $value = apply_filters( "pre_$field", $value );
    392392        } else {
    393                 /** This filter is documented in wp-includes/post.php */
     393                /** This filter is documented in wp-includes/post-functions.php */
    394394                $value = apply_filters( $field, $value, $bookmark_id, $context );
    395395
    396396                if ( 'attribute' == $context ) {
  • wp-includes/class-snoopy.php

     
    11<?php
    22
    33/**
    4  * Deprecated. Use WP_HTTP (http.php, class-http.php) instead.
     4 * Deprecated. Use WP_HTTP (http.php) instead.
    55 */
    66_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/http.php' );
    77
  • wp-includes/class-wp-http-curl.php

     
    114114                $is_local = isset($r['local']) && $r['local'];
    115115                $ssl_verify = isset($r['sslverify']) && $r['sslverify'];
    116116                if ( $is_local ) {
    117                         /** This filter is documented in wp-includes/class-http.php */
     117                        /** This filter is documented in wp-includes/class-wp-http-streams.php */
    118118                        $ssl_verify = apply_filters( 'https_local_ssl_verify', $ssl_verify );
    119119                } elseif ( ! $is_local ) {
    120                         /** This filter is documented in wp-includes/class-http.php */
     120                        /** This filter is documented in wp-includes/class-wp-http-streams.php */
    121121                        $ssl_verify = apply_filters( 'https_ssl_verify', $ssl_verify );
    122122                }
    123123
  • wp-includes/comment-functions.php

     
    10201020
    10211021        clean_comment_cache($comment_id);
    10221022
    1023         /** This action is documented in wp-includes/comment.php */
     1023        /** This action is documented in wp-includes/comment-functions.php */
    10241024        do_action( 'wp_set_comment_status', $comment_id, 'delete' );
    10251025
    10261026        wp_transition_comment_status('delete', $comment->comment_approved, $comment);
     
    14521452                 */
    14531453                $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_ID'] );
    14541454        } elseif ( isset( $commentdata['user_id'] ) ) {
    1455                 /** This filter is documented in wp-includes/comment.php */
     1455                /** This filter is documented in wp-includes/comment-functions.php */
    14561456                $commentdata['user_id'] = apply_filters( 'pre_user_id', $commentdata['user_id'] );
    14571457        }
    14581458
     
    14641464         * @param int $comment_agent The comment author's browser user agent.
    14651465         */
    14661466        $commentdata['comment_agent'] = apply_filters( 'pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
    1467         /** This filter is documented in wp-includes/comment.php */
     1467        /** This filter is documented in wp-includes/comment-functions.php */
    14681468        $commentdata['comment_author'] = apply_filters( 'pre_comment_author_name', $commentdata['comment_author'] );
    14691469        /**
    14701470         * Filter the comment content before it is set.
     
    14821482         * @param int $comment_author_ip The comment author's IP.
    14831483         */
    14841484        $commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] );
    1485         /** This filter is documented in wp-includes/comment.php */
     1485        /** This filter is documented in wp-includes/comment-functions.php */
    14861486        $commentdata['comment_author_url'] = apply_filters( 'pre_comment_author_url', $commentdata['comment_author_url'] );
    1487         /** This filter is documented in wp-includes/comment.php */
     1487        /** This filter is documented in wp-includes/comment-functions.php */
    14881488        $commentdata['comment_author_email'] = apply_filters( 'pre_comment_author_email', $commentdata['comment_author_email'] );
    14891489        $commentdata['filtered'] = true;
    14901490        return $commentdata;
     
    18991899         * @param int $old     The old comment count.
    19001900         */
    19011901        do_action( 'wp_update_comment_count', $post_id, $new, $old );
    1902         /** This action is documented in wp-includes/post.php */
     1902        /** This action is documented in wp-includes/post-functions.php */
    19031903        do_action( 'edit_post', $post_id, $post );
    19041904
    19051905        return true;
     
    23812381
    23822382        $post = get_post($post_id);
    23832383
    2384         /** This filter is documented in wp-includes/comment.php */
     2384        /** This filter is documented in wp-includes/comment-functions.php */
    23852385        $post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
    23862386        if ( ! in_array( $post->post_type, $post_types ) )
    23872387                return $open;
  • wp-includes/cron.php

     
    296296                'args' => array(
    297297                        'timeout'   => 0.01,
    298298                        'blocking'  => false,
    299                         /** This filter is documented in wp-includes/class-http.php */
     299                        /** This filter is documented in wp-includes/class-wp-http-streams.php */
    300300                        'sslverify' => apply_filters( 'https_local_ssl_verify', false )
    301301                )
    302302        ) );
  • wp-includes/media.php

     
    706706                $src = false;
    707707
    708708                if ( $icon && $src = wp_mime_type_icon( $attachment_id ) ) {
    709                         /** This filter is documented in wp-includes/post.php */
     709                        /** This filter is documented in wp-includes/post-functions.php */
    710710                        $icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
    711711
    712712                        $src_file = $icon_dir . '/' . wp_basename( $src );
  • wp-includes/meta-functions.php

     
    533533                return false;
    534534        }
    535535
    536         /** This filter is documented in wp-includes/meta.php */
     536        /** This filter is documented in wp-includes/meta-functions.php */
    537537        $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
    538538        if ( null !== $check )
    539539                return (bool) $check;
     
    654654                $where = array();
    655655                $where[$id_column] = $meta_id;
    656656
    657                 /** This action is documented in wp-includes/meta.php */
     657                /** This action is documented in wp-includes/meta-functions.php */
    658658                do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
    659659
    660660                if ( 'post' == $meta_type ) {
    661                         /** This action is documented in wp-includes/meta.php */
     661                        /** This action is documented in wp-includes/meta-functions.php */
    662662                        do_action( 'update_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
    663663                }
    664664
     
    670670                // Clear the caches.
    671671                wp_cache_delete($object_id, $meta_type . '_meta');
    672672
    673                 /** This action is documented in wp-includes/meta.php */
     673                /** This action is documented in wp-includes/meta-functions.php */
    674674                do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );
    675675
    676676                if ( 'post' == $meta_type ) {
    677                         /** This action is documented in wp-includes/meta.php */
     677                        /** This action is documented in wp-includes/meta-functions.php */
    678678                        do_action( 'updated_postmeta', $meta_id, $object_id, $meta_key, $meta_value );
    679679                }
    680680
     
    722722        if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
    723723                $object_id = $meta->{$column};
    724724
    725                 /** This action is documented in wp-includes/meta.php */
     725                /** This action is documented in wp-includes/meta-functions.php */
    726726                do_action( "delete_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
    727727
    728728                // Old-style action.
     
    746746                // Clear the caches.
    747747                wp_cache_delete($object_id, $meta_type . '_meta');
    748748
    749                 /** This action is documented in wp-includes/meta.php */
     749                /** This action is documented in wp-includes/meta-functions.php */
    750750                do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
    751751
    752752                // Old-style action.
  • wp-includes/post-functions.php

     
    20772077
    20782078        $counts = wp_cache_get( $cache_key, 'counts' );
    20792079        if ( false !== $counts ) {
    2080                 /** This filter is documented in wp-includes/post.php */
     2080                /** This filter is documented in wp-includes/post-functions.php */
    20812081                return apply_filters( 'wp_count_posts', $counts, $type, $perm );
    20822082        }
    20832083
     
    33823382        $post->post_status = 'publish';
    33833383        wp_transition_post_status( 'publish', $old_status, $post );
    33843384
    3385         /** This action is documented in wp-includes/post.php */
     3385        /** This action is documented in wp-includes/post-functions.php */
    33863386        do_action( 'edit_post', $post->ID, $post );
    33873387
    3388         /** This action is documented in wp-includes/post.php */
     3388        /** This action is documented in wp-includes/post-functions.php */
    33893389        do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
    33903390
    3391         /** This action is documented in wp-includes/post.php */
     3391        /** This action is documented in wp-includes/post-functions.php */
    33923392        do_action( 'save_post', $post->ID, $post, true );
    33933393
    3394         /** This action is documented in wp-includes/post.php */
     3394        /** This action is documented in wp-includes/post-functions.php */
    33953395        do_action( 'wp_insert_post', $post->ID, $post, true );
    33963396}
    33973397
     
    42874287        if ( $cache = wp_cache_get( $cache_key, 'posts' ) ) {
    42884288                // Convert to WP_Post instances.
    42894289                $pages = array_map( 'get_post', $cache );
    4290                 /** This filter is documented in wp-includes/post.php */
     4290                /** This filter is documented in wp-includes/post-functions.php */
    42914291                $pages = apply_filters( 'get_pages', $pages, $r );
    42924292                return $pages;
    42934293        }
     
    44294429        $pages = $wpdb->get_results($query);
    44304430
    44314431        if ( empty($pages) ) {
    4432                 /** This filter is documented in wp-includes/post.php */
     4432                /** This filter is documented in wp-includes/post-functions.php */
    44334433                $pages = apply_filters( 'get_pages', array(), $r );
    44344434                return $pages;
    44354435        }
     
    46144614        foreach ( $post_meta_ids as $mid )
    46154615                delete_metadata_by_mid( 'post', $mid );
    46164616
    4617         /** This action is documented in wp-includes/post.php */
     4617        /** This action is documented in wp-includes/post-functions.php */
    46184618        do_action( 'delete_post', $post_id );
    46194619        $result = $wpdb->delete( $wpdb->posts, array( 'ID' => $post_id ) );
    46204620        if ( ! $result ) {
    46214621                return false;
    46224622        }
    4623         /** This action is documented in wp-includes/post.php */
     4623        /** This action is documented in wp-includes/post-functions.php */
    46244624        do_action( 'deleted_post', $post_id );
    46254625
    46264626        $uploadpath = wp_upload_dir();
  • wp-includes/taxonomy-functions.php

     
    814814
    815815        wp_cache_add( $term->term_id, $term, $taxonomy );
    816816
    817         /** This filter is documented in wp-includes/taxonomy.php */
     817        /** This filter is documented in wp-includes/taxonomy-functions.php */
    818818        $term = apply_filters( 'get_term', $term, $taxonomy );
    819819
    820         /** This filter is documented in wp-includes/taxonomy.php */
     820        /** This filter is documented in wp-includes/taxonomy-functions.php */
    821821        $term = apply_filters( "get_$taxonomy", $term, $taxonomy );
    822822
    823823        $term = sanitize_term($term, $taxonomy, $filter);
     
    13651365        if ( empty($terms) ) {
    13661366                wp_cache_add( $cache_key, array(), 'terms', DAY_IN_SECONDS );
    13671367
    1368                 /** This filter is documented in wp-includes/taxonomy.php */
     1368                /** This filter is documented in wp-includes/taxonomy-functions.php */
    13691369                return apply_filters( 'get_terms', array(), $taxonomies, $args );
    13701370        }
    13711371
     
    23352335        if ( empty($slug) ) {
    23362336                $slug = sanitize_title($slug, $term_id);
    23372337
    2338                 /** This action is documented in wp-includes/taxonomy.php */
     2338                /** This action is documented in wp-includes/taxonomy-functions.php */
    23392339                do_action( 'edit_terms', $term_id, $taxonomy );
    23402340                $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
    23412341
    2342                 /** This action is documented in wp-includes/taxonomy.php */
     2342                /** This action is documented in wp-includes/taxonomy-functions.php */
    23432343                do_action( 'edited_terms', $term_id, $taxonomy );
    23442344        }
    23452345
     
    29752975         */
    29762976        do_action( "edit_$taxonomy", $term_id, $tt_id );
    29772977
    2978         /** This filter is documented in wp-includes/taxonomy.php */
     2978        /** This filter is documented in wp-includes/taxonomy-functions.php */
    29792979        $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
    29802980
    29812981        clean_term_cache($term_id, $taxonomy);
     
    35273527                if ( $object_types )
    35283528                        $count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type IN ('" . implode("', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );
    35293529
    3530                 /** This action is documented in wp-includes/taxonomy.php */
     3530                /** This action is documented in wp-includes/taxonomy-functions.php */
    35313531                do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    35323532                $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    35333533
    3534                 /** This action is documented in wp-includes/taxonomy.php */
     3534                /** This action is documented in wp-includes/taxonomy-functions.php */
    35353535                do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    35363536        }
    35373537}
     
    35543554        foreach ( (array) $terms as $term ) {
    35553555                $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term ) );
    35563556
    3557                 /** This action is documented in wp-includes/taxonomy.php */
     3557                /** This action is documented in wp-includes/taxonomy-functions.php */
    35583558                do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    35593559                $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    35603560
    3561                 /** This action is documented in wp-includes/taxonomy.php */
     3561                /** This action is documented in wp-includes/taxonomy-functions.php */
    35623562                do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    35633563        }
    35643564}
     
    42294229
    42304230        if ( empty( $object_id ) ) {
    42314231
    4232                 /** This filter is documented in wp-includes/taxonomy.php */
     4232                /** This filter is documented in wp-includes/taxonomy-functions.php */
    42334233                return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type );
    42344234        }
    42354235
  • wp-includes/user-functions.php

     
    997997        if ( 'edit' == $context ) {
    998998                if ( $prefixed ) {
    999999
    1000                         /** This filter is documented in wp-includes/post.php */
     1000                        /** This filter is documented in wp-includes/post-functions.php */
    10011001                        $value = apply_filters( "edit_{$field}", $value, $user_id );
    10021002                } else {
    10031003
     
    10211021                        $value = esc_attr($value);
    10221022        } elseif ( 'db' == $context ) {
    10231023                if ( $prefixed ) {
    1024                         /** This filter is documented in wp-includes/post.php */
     1024                        /** This filter is documented in wp-includes/post-functions.php */
    10251025                        $value = apply_filters( "pre_{$field}", $value );
    10261026                } else {
    10271027
     
    10411041                // Use display filters by default.
    10421042                if ( $prefixed ) {
    10431043
    1044                         /** This filter is documented in wp-includes/post.php */
     1044                        /** This filter is documented in wp-includes/post-functions.php */
    10451045                        $value = apply_filters( $field, $value, $user_id, $context );
    10461046                } else {
    10471047
  • wp-includes/widget-functions.php

     
    518518
    519519        $sidebars_widgets = wp_get_sidebars_widgets();
    520520        if ( empty( $wp_registered_sidebars[ $index ] ) || empty( $sidebars_widgets[ $index ] ) || ! is_array( $sidebars_widgets[ $index ] ) ) {
    521                 /** This action is documented in wp-includes/widgets.php */
     521                /** This action is documented in wp-includes/widget-functions.php */
    522522                do_action( 'dynamic_sidebar_before', $index, false );
    523                 /** This action is documented in wp-includes/widgets.php */
     523                /** This action is documented in wp-includes/widget-functions.php */
    524524                do_action( 'dynamic_sidebar_after',  $index, false );
    525                 /** This filter is documented in wp-includes/widgets.php */
     525                /** This filter is documented in wp-includes/widget-functions.php */
    526526                return apply_filters( 'dynamic_sidebar_has_widgets', false, $index );
    527527        }
    528528
     
    909909 *
    910910 * @global WP_Widget_Factory $wp_widget_factory
    911911 *
    912  * @param string $widget   The widget's PHP class name (see default-widgets.php).
     912 * @param string $widget   The widget's PHP class name (see class-wp-widget.php).
    913913 * @param array  $instance Optional. The widget's instance settings. Default empty array.
    914914 * @param array  $args {
    915915 *     Optional. Array of arguments to configure the display of the widget.
  • wp-includes/widgets/class-wp-nav-menu-widget.php

     
    2424                if ( !$nav_menu )
    2525                        return;
    2626
    27                 /** This filter is documented in wp-includes/default-widgets.php */
     27                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2828                $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    2929
    3030                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-archives.php

     
    2121                $c = ! empty( $instance['count'] ) ? '1' : '0';
    2222                $d = ! empty( $instance['dropdown'] ) ? '1' : '0';
    2323
    24                 /** This filter is documented in wp-includes/default-widgets.php */
     24                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2525                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Archives' ) : $instance['title'], $instance, $this->id_base );
    2626
    2727                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-calendar.php

     
    1818         * @param array $instance
    1919         */
    2020        public function widget( $args, $instance ) {
    21                 /** This filter is documented in wp-includes/default-widgets.php */
     21                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2222                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    2323
    2424                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-categories.php

     
    2222        public function widget( $args, $instance ) {
    2323                static $first_dropdown = true;
    2424
    25                 /** This filter is documented in wp-includes/default-widgets.php */
     25                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2626                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );
    2727
    2828                $c = ! empty( $instance['count'] ) ? '1' : '0';
  • wp-includes/widgets/class-wp-widget-meta.php

     
    2020         * @param array $instance
    2121         */
    2222        public function widget( $args, $instance ) {
    23                 /** This filter is documented in wp-includes/default-widgets.php */
     23                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2424                $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base );
    2525
    2626                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-recent-comments.php

     
    7373
    7474                $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Comments' );
    7575
    76                 /** This filter is documented in wp-includes/default-widgets.php */
     76                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    7777                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    7878
    7979                $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
  • wp-includes/widgets/class-wp-widget-recent-posts.php

     
    4545
    4646                $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts' );
    4747
    48                 /** This filter is documented in wp-includes/default-widgets.php */
     48                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    4949                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    5050
    5151                $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5;
  • wp-includes/widgets/class-wp-widget-rss.php

     
    5050                if ( empty($title) )
    5151                        $title = empty($desc) ? __('Unknown Feed') : $desc;
    5252
    53                 /** This filter is documented in wp-includes/default-widgets.php */
     53                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    5454                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    5555
    5656                $url = strip_tags( $url );
  • wp-includes/widgets/class-wp-widget-search.php

     
    1818         * @param array $instance
    1919         */
    2020        public function widget( $args, $instance ) {
    21                 /** This filter is documented in wp-includes/default-widgets.php */
     21                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2222                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    2323
    2424                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-tag-cloud.php

     
    3030                        }
    3131                }
    3232
    33                 /** This filter is documented in wp-includes/default-widgets.php */
     33                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    3434                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    3535
    3636                echo $args['before_widget'];
  • wp-includes/widgets/class-wp-widget-text.php

     
    1919         * @param array $instance
    2020         */
    2121        public function widget( $args, $instance ) {
    22                 /** This filter is documented in wp-includes/default-widgets.php */
     22                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    2323                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    2424
    2525                /**