Make WordPress Core

Changeset 32616


Ignore:
Timestamp:
05/27/2015 04:05:33 PM (10 years ago)
Author:
wonderboymusic
Message:

Add missing doc blocks to post-formats.php.
Correct some types for @param and @return.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-formats.php

    r32477 r32616  
    1212 * @since 3.1.0
    1313 *
    14  * @param int|object $post Post ID or post object. Optional, default is the current post from the loop.
    15  * @return mixed The format if successful. False otherwise.
     14 * @param int|object|null $post Post ID or post object. Optional, default is the current post from the loop.
     15 * @return string|false The format if successful. False otherwise.
    1616 */
    1717function get_post_format( $post = null ) {
     
    3737 * @since 3.1.0
    3838 *
    39  * @param string|array $format Optional. The format or formats to check.
    40  * @param object|int $post Optional. The post to check. If not supplied, defaults to the current post if used in the loop.
     39 * @param string|array    $format Optional. The format or formats to check.
     40 * @param object|int|null $post  Optional. The post to check. If not supplied, defaults to the current post if used in the loop.
    4141 * @return bool True if the post has any of the given formats (or any format, if no format specified), false otherwise.
    4242 */
     
    5858 * @since 3.1.0
    5959 *
    60  * @param int|object $post The post for which to assign a format.
    61  * @param string $format A format to assign. Use an empty string or array to remove all formats from the post.
    62  * @return mixed WP_Error on error. Array of affected term IDs on success.
     60 * @param int|object $post   The post for which to assign a format.
     61 * @param string     $format A format to assign. Use an empty string or array to remove all formats from the post.
     62 * @return array|WP_Error|false WP_Error on error. Array of affected term IDs on success.
    6363 */
    6464function set_post_format( $post, $format ) {
     
    136136 *
    137137 * @param string $format The post format slug.
    138  * @return string The post format term link.
     138 * @return string|WP_Error|false The post format term link.
    139139 */
    140140function get_post_format_link( $format ) {
     
    150150 * @access private
    151151 * @since 3.1.0
     152 *
     153 * @param array $qvs
     154 * @return array
    152155 */
    153156function _post_format_request( $qvs ) {
     
    168171 * @access private
    169172 * @since 3.1.0
     173 *
     174 * @global WP_Rewrite $wp_rewrite
     175 *
     176 * @param string $link
     177 * @param object $term
     178 * @param string $taxonomy
     179 * @return string
    170180 */
    171181function _post_format_link( $link, $term, $taxonomy ) {
    172182    global $wp_rewrite;
    173     if ( 'post_format' != $taxonomy )
     183    if ( 'post_format' != $taxonomy ) {
    174184        return $link;
     185    }
    175186    if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
    176187        return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
     
    186197 * @access private
    187198 * @since 3.1.0
     199 *
     200 * @param object $term
     201 * @return object
    188202 */
    189203function _post_format_get_term( $term ) {
     
    199213 * @access private
    200214 * @since 3.1.0
     215 *
     216 * @param array        $terms
     217 * @param string|array $taxonomies
     218 * @param array        $args
     219 * @return array
    201220 */
    202221function _post_format_get_terms( $terms, $taxonomies, $args ) {
     
    222241 * @access private
    223242 * @since 3.1.0
     243 *
     244 * @param array $terms
     245 * @return array
    224246 */
    225247function _post_format_wp_get_object_terms( $terms ) {
Note: See TracChangeset for help on using the changeset viewer.