Make WordPress Core

Changeset 23935


Ignore:
Timestamp:
04/09/2013 09:38:25 AM (11 years ago)
Author:
SergeyBiryukov
Message:

PHPDoc fixes and additions for post formats. props c3mdigital, DrewAPicture. fixes #23974.

File:
1 edited

Legend:

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

    r23924 r23935  
    1212 * @since 3.1.0
    1313 *
    14  * @param int|object $post A post
     14 * @param int|object $post A post.
    1515 *
    1616 * @return mixed The format if successful. False if no format is set. WP_Error if errors.
     
    3636 *
    3737 * @since 3.1.0
     38 *
    3839 * @uses has_term()
    3940 *
    40  * @param string $format The format to check for
    41  * @param object|id $post The post to check. If not supplied, defaults to the current post if used in the loop.
     41 * @param string $format The format to check for.
     42 * @param object|int $post The post to check. If not supplied, defaults to the current post if used in the loop.
    4243 * @return bool True if the post has the format, false otherwise.
    4344 */
     
    5152 * @since 3.1.0
    5253 *
    53  * @param int|object $post The post for which to assign a format
    54  * @param string $format  A format to assign. Use an empty string or array to remove all formats from the post.
     54 * @param int|object $post The post for which to assign a format.
     55 * @param string $format A format to assign. Use an empty string or array to remove all formats from the post.
    5556 * @return mixed WP_Error on error. Array of affected term IDs on success.
    5657 */
     
    7778 * @since 3.6.0
    7879 *
    79  * @param int $post_id
    80  * @return null
     80 * @param int $post_id (optional) The post ID.
     81 * @return array The array of post format metadata.
    8182 */
    8283function get_post_format_meta( $post_id = 0 ) {
     
    102103 * @since 3.1.0
    103104 *
    104  * @return array The array of translations
     105 * @return array The array of translated post format names.
    105106 */
    106107function get_post_format_strings() {
     
    125126 * @since 3.1.0
    126127 *
     128 * @uses get_post_format_strings()
     129 *
    127130 * @return array The array of post format slugs.
    128131 */
     
    137140 * @since 3.1.0
    138141 *
    139  * @param string $slug A post format slug
    140  * @return string The translated post format name
     142 * @uses get_post_format_strings()
     143 *
     144 * @param string $slug A post format slug.
     145 * @return string The translated post format name.
    141146 */
    142147function get_post_format_string( $slug ) {
     
    153158 * @since 3.1.0
    154159 *
    155  * @param string $format Post format
    156  * @return string Link
     160 * @param string $format The post format slug.
     161 * @return string The post format term link.
    157162 */
    158163function get_post_format_link( $format ) {
     
    260265 * @since 3.6.0
    261266 *
    262  * @param string $format
     267 * @param string $format The post format slug, such as status, quote, image, gallery, etc.
     268 * @return string Filtered post format content class.
    263269 */
    264270function get_post_format_content_class( $format ) {
     
    267273
    268274/**
    269  * Ouput the class for a post format content wrapper
    270  *
    271  * @since 3.6.0
    272  *
    273  * @param string $format
     275 * Output the class for a post format content wrapper
     276 *
     277 * @since 3.6.0
     278 *
     279 * @param string $format The post format slug, such as status, quote, image, gallery, etc.
    274280 */
    275281function post_format_content_class( $format ) {
     
    282288 * @since 3.6.0
    283289 *
    284  * @param string $content
     290 * @uses get_post_format_meta()
     291 *
     292 * @param string $content The post content.
     293 * @param int $id (optional) The post ID.
     294 * @return string Formatted output based on associated post format.
    285295 */
    286296function post_formats_compat( $content, $id = 0 ) {
     
    423433 *
    424434 * @global array $_wp_chat_parsers
     435 *
    425436 * @param string $name Unique identifier for chat format. Example: IRC
    426437 * @param string $newline_regex RegEx to match the start of a new line, typically when a new "username:" appears
     
    451462 * If the content does not contain username syntax, assume that it does not contain
    452463 * chat logs and return
    453  *
    454  * @since 3.6.0
    455464 *
    456465 * Example:
     
    474483 *     )
    475484 * )
    476  * @param string $content A string which might contain chat data.
     485 *
     486 * @since 3.6.0
     487 *
     488 * @param string $content A string which might contain chat data, passed by reference.
    477489 * @param boolean $remove Whether to remove the found data from the passed content.
    478490 * @return array A chat log as structured data
     
    572584 * @since 3.6.0
    573585 *
    574  * @param int $id Optional. Post ID
    575  * @return array
     586 * @param int $id (optional) The post ID.
     587 * @return array The chat content.
    576588 */
    577589function get_the_post_format_chat( $id = 0 ) {
     
    630642 * @since 3.6.0
    631643 *
    632  * @param string $content A string which might contain a URL.
     644 * @param string $content A string which might contain a URL, passed by reference.
    633645 * @param boolean $remove Whether to remove the found URL from the passed content.
    634646 * @return string The found URL.
     
    671683 * @since 3.6.0
    672684 *
    673  * @param int $id Optional. Post ID.
     685 * @param int $id (optional) The post ID.
    674686 * @return string A URL, if found.
    675687 */
     
    708720 * @param string $more_link_text Optional. Content for when there is more text.
    709721 * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
    710  * @return string
     722 * @return string The content minus the extracted post format content.
    711723 */
    712724function get_the_remaining_content( $more_link_text = null, $strip_teaser = false ) {
Note: See TracChangeset for help on using the changeset viewer.