Make WordPress Core

Ticket #35148: post.php.patch

File post.php.patch, 7.3 KB (added by ramiy, 10 years ago)
  • wp-includes/post.php

     
    170170 * Retrieve attached file path based on attachment ID.
    171171 *
    172172 * By default the path will go through the 'get_attached_file' filter, but
    173  * passing a true to the $unfiltered argument of get_attached_file() will
     173 * passing a true to the $unfiltered argument of {@see get_attached_file()} will
    174174 * return the file path unfiltered.
    175175 *
    176176 * The function works by getting the single post meta name, named
     
    948948 *     @type array       $supports             An alias for calling {@see add_post_type_support()} directly.
    949949 *                                             Defaults to array containing 'title' & 'editor'.
    950950 *     @type callable    $register_meta_box_cb Provide a callback function that sets up the meta boxes for the
    951  *                                             edit form. Do remove_meta_box() and add_meta_box() calls in the
     951 *                                             edit form. Do {@see remove_meta_box()} and {@see add_meta_box()} calls in the
    952952 *                                             callback. Default null.
    953953 *     @type array       $taxonomies           An array of taxonomy identifiers that will be registered for the
    954954 *                                             post type. Taxonomies can be registered later with
     
    12151215 *
    12161216 * These four primitive capabilities are checked in core in various locations.
    12171217 * There are also seven other primitive capabilities which are not referenced
    1218  * directly in core, except in map_meta_cap(), which takes the three aforementioned
     1218 * directly in core, except in {@see map_meta_cap()}, which takes the three aforementioned
    12191219 * meta capabilities and translates them into one or more primitive capabilities
    12201220 * that must then be checked against the user or role, depending on the context.
    12211221 *
     
    12291229 * - edit_private_posts - Controls whether private objects can be edited.
    12301230 * - edit_published_posts - Controls whether published objects can be edited.
    12311231 *
    1232  * These additional capabilities are only used in map_meta_cap(). Thus, they are
     1232 * These additional capabilities are only used in {@see map_meta_cap()}. Thus, they are
    12331233 * only assigned by default if the post type is registered with the 'map_meta_cap'
    12341234 * argument set to true (default is false).
    12351235 *
     
    12881288}
    12891289
    12901290/**
    1291  * Store or return a list of post type meta caps for map_meta_cap().
     1291 * Store or return a list of post type meta caps for {@see map_meta_cap()}.
    12921292 *
    12931293 * @since 3.1.0
    12941294 * @access private
     
    20812081}
    20822082
    20832083/**
    2084  * Return the cache key for wp_count_posts() based on the passed arguments.
     2084 * Return the cache key for {@see wp_count_posts()} based on the passed arguments.
    20852085 *
    20862086 * @since 3.9.0
    20872087 *
     
    21052105 *
    21062106 * This function provides an efficient method of finding the amount of post's
    21072107 * type a blog has. Another method is to count the amount of items in
    2108  * get_posts(), but that method has a lot of overhead with doing so. Therefore,
     2108 * {@see get_posts()}, but that method has a lot of overhead with doing so. Therefore,
    21092109 * when developing for 2.5+, use this function instead.
    21102110 *
    21112111 * The $perm parameter checks for 'readable' value and if the user can read
     
    23832383        }
    23842384
    23852385        /**
    2386          * Fires before a post is deleted, at the start of wp_delete_post().
     2386         * Fires before a post is deleted, at the start of {@see wp_delete_post()}.
    23872387         *
    23882388         * @since 3.2.0
    23892389         *
     
    24102410                }
    24112411        }
    24122412
    2413         // Do raw query. wp_get_post_revisions() is filtered.
     2413        // Do raw query. {@see wp_get_post_revisions()} is filtered.
    24142414        $revision_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'revision'", $postid ) );
    24152415        // Use wp_delete_post (via wp_delete_post_revision) again. Ensures any meta/misplaced data gets cleaned up.
    24162416        foreach ( $revision_ids as $revision_id )
     
    24642464        wp_clear_scheduled_hook('publish_future_post', array( $postid ) );
    24652465
    24662466        /**
    2467          * Fires after a post is deleted, at the conclusion of wp_delete_post().
     2467         * Fires after a post is deleted, at the conclusion of {@see wp_delete_post()}.
    24682468         *
    24692469         * @since 3.2.0
    24702470         *
     
    40574057/**
    40584058 * Retrieves page data given a page ID or page object.
    40594059 *
    4060  * Use get_post() instead of get_page().
     4060 * Use {@see get_post()} instead of get_page().
    40614061 *
    40624062 * @since 1.5.1
    40634063 * @deprecated 3.5.0 Use get_post()
     
    46064606         * @since 2.1.0
    46074607         *
    46084608         * @param array $pages List of pages to retrieve.
    4609          * @param array $r     Array of get_pages() arguments.
     4609         * @param array $r     Array of {@see get_pages()} arguments.
    46104610         */
    46114611        return apply_filters( 'get_pages', $pages, $r );
    46124612}
     
    47184718                delete_transient( 'dirsize_cache' );
    47194719
    47204720        /**
    4721          * Fires before an attachment is deleted, at the start of wp_delete_attachment().
     4721         * Fires before an attachment is deleted, at the start of {@see wp_delete_attachment()}.
    47224722         *
    47234723         * @since 2.0.0
    47244724         *
     
    50355035 * Checks if the attachment is an image.
    50365036 *
    50375037 * @since 2.1.0
    5038  * @since 4.2.0 Modified into wrapper for wp_attachment_is() and
     5038 * @since 4.2.0 Modified into wrapper for {@see wp_attachment_is()} and
    50395039 *              allowed WP_Post object to be passed.
    50405040 *
    50415041 * @param int|WP_Post $post Optional. Attachment ID. Default 0.
     
    53665366 */
    53675367function get_lastpostmodified( $timezone = 'server', $post_type = 'any' ) {
    53685368        /**
    5369          * Pre-filter the return value of get_lastpostmodified() before the query is run.
     5369         * Pre-filter the return value of {@see get_lastpostmodified()} before the query is run.
    53705370         *
    53715371         * @since 4.4.0
    53725372         *
     
    54095409 *
    54105410 * @global wpdb $wpdb WordPress database abstraction object.
    54115411 *
    5412  * @param string $timezone  The timezone for the timestamp. See get_lastpostdate().
     5412 * @param string $timezone  The timezone for the timestamp. See {@see get_lastpostdate()}.
    54135413 *                          for information on accepted values.
    54145414 * @param string $field     Post field to check. Accepts 'date' or 'modified'.
    54155415 * @param string $post_type Optional. The post type to check. Default 'any'.
     
    54835483 * object cache associated with the post ID.
    54845484 *
    54855485 * This function not run if $_wp_suspend_cache_invalidation is not empty. See
    5486  * wp_suspend_cache_invalidation().
     5486 * {@see wp_suspend_cache_invalidation()}.
    54875487 *
    54885488 * @since 2.0.0
    54895489 *
     
    56995699 * @access private
    57005700 *
    57015701 * @param int     $deprecated Not used. Can be set to null. Never implemented. Not marked
    5702  *                            as deprecated with _deprecated_argument() as it conflicts with
    5703  *                            wp_transition_post_status() and the default filter for
     5702 *                            as deprecated with {@see _deprecated_argument()} as it conflicts with
     5703 *                            {@see wp_transition_post_status()} and the default filter for
    57045704 *                            {@see _future_post_hook()}.
    57055705 * @param WP_Post $post       Post object.
    57065706 */
     
    57225722function _publish_post_hook( $post_id ) {
    57235723        if ( defined( 'XMLRPC_REQUEST' ) ) {
    57245724                /**
    5725                  * Fires when _publish_post_hook() is called during an XML-RPC request.
     5725                 * Fires when {@see _publish_post_hook()} is called during an XML-RPC request.
    57265726                 *
    57275727                 * @since 2.1.0
    57285728                 *