Make WordPress Core

Ticket #20495: 20495.2.diff

File 20495.2.diff, 8.5 KB (added by DrewAPicture, 11 years ago)
  • src/wp-includes/post-template.php

     
    9696 *
    9797 * @since 0.71
    9898 *
    99  * @param int|object $post Optional. Post ID or object.
     99 * @param int|WP_Post $post Optional. Post ID or post object.
    100100 * @return string
    101101 */
    102102function get_the_title( $post = 0 ) {
     
    129129 *
    130130 * @since 1.5.0
    131131 *
    132  * @param int $id Optional. Post ID.
     132 * @param int|WP_Post $id Optional. Post ID or post object.
    133133 */
    134134function the_guid( $id = 0 ) {
    135135        echo esc_url( get_the_guid( $id ) );
     
    144144 *
    145145 * @since 1.5.0
    146146 *
    147  * @param int $id Optional. Post ID.
     147 * @param int|WP_Post $id Optional. Post ID or post object.
    148148 * @return string
    149149 */
    150150function get_the_guid( $id = 0 ) {
     
    280280 *
    281281 * @since 2.3.0
    282282 *
    283  * @param int $id Optional. Post ID.
     283 * @param int|WP_Post $id Optional. Post ID or post object.
    284284 * @return bool
    285285 */
    286286function has_excerpt( $id = 0 ) {
     
    294294 * @since 2.7.0
    295295 *
    296296 * @param string|array $class One or more classes to add to the class list.
    297  * @param int $post_id An optional post ID.
     297 * @param int|WP_Post $post_id Optional. Post ID or post object.
    298298 */
    299299function post_class( $class = '', $post_id = null ) {
    300300        // Separates classes with a single space, collates classes for post DIV
     
    316316 * @since 2.7.0
    317317 *
    318318 * @param string|array $class One or more classes to add to the class list.
    319  * @param int $post_id An optional post ID.
     319 * @param int|WP_Post $post_id Optional. Post ID or post object.
    320320 * @return array Array of classes.
    321321 */
    322322function get_post_class( $class = '', $post_id = null ) {
     
    11731173 *
    11741174 * @since 2.0.0
    11751175 *
    1176  * @param int $id Optional. Post ID.
     1176 * @param int|WP_Post $id Optional. Post ID or post object.
    11771177 * @param bool $fullsize Optional, default is false. Whether to use full size.
    11781178 * @param bool $deprecated Deprecated. Not used.
    11791179 * @param bool $permalink Optional, default is false. Whether to include permalink.
     
    11941194 * @since 2.5.0
    11951195 * @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function.
    11961196 *
    1197  * @param int $id Optional. Post ID.
     1197 * @param int|WP_Post $id Optional. Post ID or post object.
    11981198 * @param string $size Optional, default is 'thumbnail'. Size of image, either array or string.
    11991199 * @param bool $permalink Optional, default is false. Whether to add permalink to image.
    12001200 * @param bool $icon Optional, default is false. Whether to include icon.
     
    12591259 *
    12601260 * @since 1.0.0
    12611261 * @uses apply_filters() Calls 'the_password_form' filter on output.
    1262  * @param int|WP_Post $post Optional. A post id or post object. Defaults to the current post when in The Loop, undefined otherwise.
     1262 * @param int|WP_Post $post Optional. A post ID or post object.
    12631263 * @return string HTML content for password form for password protected post.
    12641264 */
    12651265function get_the_password_form( $post = 0 ) {
     
    14201420 * @uses get_edit_post_link()
    14211421 * @uses get_the_author_meta()
    14221422 *
    1423  * @param int|object $post_id Post ID or post object.
     1423 * @param int|WP_Post $post_id Optional. Post ID or post object.
    14241424 * @param string $type 'all' (default), 'revision' or 'autosave'
    14251425 * @return null
    14261426 */
  • src/wp-includes/post.php

     
    380380 * @since 1.5.1
    381381 * @link http://codex.wordpress.org/Function_Reference/get_post
    382382 *
    383  * @param int|object $post Post ID or post object. Optional, default is the current post from the loop.
     383 * @param int|WP_Post $post Optional. Post ID or post object.
    384384 * @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
    385385 * @param string $filter Optional, default is raw.
    386386 * @return WP_Post|null WP_Post on success or null on failure
     
    710710 *
    711711 * @since 2.5.0
    712712 *
    713  * @param int|object $post Post ID or post object
     713 * @param int|WP_Post $post Post ID or post object.
    714714 * @return array Ancestor IDs or empty array if none are found.
    715715 */
    716716function get_post_ancestors( $post ) {
     
    747747 * @uses sanitize_post_field() See for possible $context values.
    748748 *
    749749 * @param string $field Post field name.
    750  * @param int|object $post Post ID or post object.
     750 * @param int|WP_Post $post Post ID or post object.
    751751 * @param string $context Optional. How to filter the field. Default is 'display'.
    752752 * @return string The value of the post field on success, empty string on failure.
    753753 */
     
    771771 *
    772772 * @since 2.0.0
    773773 *
    774  * @param int $ID Optional. Post ID. Default is the current post from the loop.
     774 * @param int|WP_Post $ID Optional. Post ID or post object.
    775775 * @return string|bool The mime type on success, false on failure.
    776776 */
    777777function get_post_mime_type($ID = '') {
     
    791791 *
    792792 * @since 2.0.0
    793793 *
    794  * @param int $ID Optional. Post ID. Default is the current post from the loop.
     794 * @param int|WP_Post $ID Optional. Post ID or post object.
    795795 * @return string|bool Post status on success, false on failure.
    796796 */
    797797function get_post_status($ID = '') {
     
    10251025 *
    10261026 * @since 2.1.0
    10271027 *
    1028  * @param int|object $post Optional. Post ID or post object. Default is the current post from the loop.
     1028 * @param int|WP_Post $post Optional. Post ID or post object.
    10291029 * @return string|bool Post type on success, false on failure.
    10301030 */
    10311031function get_post_type( $post = null ) {
     
    24802480 * @uses do_action() on 'trash_post_comments' before trashing
    24812481 * @uses do_action() on 'trashed_post_comments' after trashing
    24822482 *
    2483  * @param int|object $post Post ID or object.
     2483 * @param int|WP_Post $post Optional. Post ID or post object.
    24842484 * @return mixed False on failure
    24852485 */
    24862486function wp_trash_post_comments($post = null) {
     
    25212521 * @uses do_action() on 'untrash_post_comments' before trashing
    25222522 * @uses do_action() on 'untrashed_post_comments' after trashing
    25232523 *
    2524  * @param int|object $post Post ID or object.
     2524 * @param int|WP_Post $post Optional. Post ID or post object.
    25252525 * @return mixed False on failure
    25262526 */
    25272527function wp_untrash_post_comments($post = null) {
     
    30393039 * @uses $wpdb
    30403040 * @uses do_action() Calls 'edit_post', 'save_post_{$post_type}', 'save_post' and 'wp_insert_post' on post_id and post data.
    30413041 *
    3042  * @param int|object $post Post ID or object.
     3042 * @param int|WP_Post $post Post ID or post object.
    30433043 */
    30443044function wp_publish_post( $post ) {
    30453045        global $wpdb;
     
    30723072 *
    30733073 * @since 2.5.0
    30743074 *
    3075  * @param int $post_id Post ID.
     3075 * @param int|WP_Post $post_id Post ID or post object.
    30763076 * @return null Nothing is returned. Which can mean that no action is required or post was published.
    30773077 */
    30783078function check_and_publish_future_post($post_id) {
     
    47604760 *
    47614761 * @uses do_action() Calls 'clean_post_cache' on $id before adding children (if any).
    47624762 *
    4763  * @param int|object $post Post ID or object to remove from the cache
     4763 * @param int|WP_Post $post Post ID or post object to remove from the cache.
    47644764 */
    47654765function clean_post_cache( $post ) {
    47664766        global $_wp_suspend_cache_invalidation, $wpdb;
     
    50395039 *
    50405040 * @since 3.1.0
    50415041 *
    5042  * @param int|object $post Post ID or object where thumbnail should be attached.
     5042 * @param int|WP_Post $post Post ID or post object where thumbnail should be attached.
    50435043 * @param int $thumbnail_id Thumbnail to attach.
    50445044 * @return bool True on success, false on failure.
    50455045 */
     
    50605060 *
    50615061 * @since 3.3.0
    50625062 *
    5063  * @param int|object $post Post ID or object where thumbnail should be removed from.
     5063 * @param int|WP_Post $post Post ID or post object where thumbnail should be removed from.
    50645064 * @return bool True on success, false on failure.
    50655065 */
    50665066function delete_post_thumbnail( $post ) {
  • src/wp-includes/taxonomy.php

     
    31933193 *
    31943194 * @since 2.5.0
    31953195 *
    3196  * @param int $post Optional. Post ID or will use Global Post ID (in loop).
     3196 * @param int|WP_Post $post Optional. Post ID or post object.
    31973197 * @param array $args Override the defaults.
    31983198 * @return array
    31993199 */
     
    32403240 * @since 2.5.0
    32413241 * @uses get_object_taxonomies()
    32423242 *
    3243  * @param int $post Optional. Post ID
     3243 * @param int|WP_Post $post Optional. Post ID or post object.
    32443244 * @return array
    32453245 */
    32463246function get_post_taxonomies($post = 0) {