Changeset 23935
- Timestamp:
- 04/09/2013 09:38:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-formats.php
r23924 r23935 12 12 * @since 3.1.0 13 13 * 14 * @param int|object $post A post 14 * @param int|object $post A post. 15 15 * 16 16 * @return mixed The format if successful. False if no format is set. WP_Error if errors. … … 36 36 * 37 37 * @since 3.1.0 38 * 38 39 * @uses has_term() 39 40 * 40 * @param string $format The format to check for 41 * @param object|i d$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. 42 43 * @return bool True if the post has the format, false otherwise. 43 44 */ … … 51 52 * @since 3.1.0 52 53 * 53 * @param int|object $post The post for which to assign a format 54 * @param string $format 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. 55 56 * @return mixed WP_Error on error. Array of affected term IDs on success. 56 57 */ … … 77 78 * @since 3.6.0 78 79 * 79 * @param int $post_id 80 * @return null80 * @param int $post_id (optional) The post ID. 81 * @return array The array of post format metadata. 81 82 */ 82 83 function get_post_format_meta( $post_id = 0 ) { … … 102 103 * @since 3.1.0 103 104 * 104 * @return array The array of translat ions105 * @return array The array of translated post format names. 105 106 */ 106 107 function get_post_format_strings() { … … 125 126 * @since 3.1.0 126 127 * 128 * @uses get_post_format_strings() 129 * 127 130 * @return array The array of post format slugs. 128 131 */ … … 137 140 * @since 3.1.0 138 141 * 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. 141 146 */ 142 147 function get_post_format_string( $slug ) { … … 153 158 * @since 3.1.0 154 159 * 155 * @param string $format Post format156 * @return string Link160 * @param string $format The post format slug. 161 * @return string The post format term link. 157 162 */ 158 163 function get_post_format_link( $format ) { … … 260 265 * @since 3.6.0 261 266 * 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. 263 269 */ 264 270 function get_post_format_content_class( $format ) { … … 267 273 268 274 /** 269 * Ou put the class for a post format content wrapper270 * 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. 274 280 */ 275 281 function post_format_content_class( $format ) { … … 282 288 * @since 3.6.0 283 289 * 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. 285 295 */ 286 296 function post_formats_compat( $content, $id = 0 ) { … … 423 433 * 424 434 * @global array $_wp_chat_parsers 435 * 425 436 * @param string $name Unique identifier for chat format. Example: IRC 426 437 * @param string $newline_regex RegEx to match the start of a new line, typically when a new "username:" appears … … 451 462 * If the content does not contain username syntax, assume that it does not contain 452 463 * chat logs and return 453 *454 * @since 3.6.0455 464 * 456 465 * Example: … … 474 483 * ) 475 484 * ) 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. 477 489 * @param boolean $remove Whether to remove the found data from the passed content. 478 490 * @return array A chat log as structured data … … 572 584 * @since 3.6.0 573 585 * 574 * @param int $id Optional. Post ID575 * @return array 586 * @param int $id (optional) The post ID. 587 * @return array The chat content. 576 588 */ 577 589 function get_the_post_format_chat( $id = 0 ) { … … 630 642 * @since 3.6.0 631 643 * 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. 633 645 * @param boolean $remove Whether to remove the found URL from the passed content. 634 646 * @return string The found URL. … … 671 683 * @since 3.6.0 672 684 * 673 * @param int $id Optional. Post ID.685 * @param int $id (optional) The post ID. 674 686 * @return string A URL, if found. 675 687 */ … … 708 720 * @param string $more_link_text Optional. Content for when there is more text. 709 721 * @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. 711 723 */ 712 724 function get_the_remaining_content( $more_link_text = null, $strip_teaser = false ) {
Note: See TracChangeset
for help on using the changeset viewer.