[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> post-formats.php (summary)

Post format functions.

File Size: 267 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  get_post_format()
  has_post_format()
  set_post_format()
  get_post_format_strings()
  get_post_format_slugs()
  get_post_format_string()
  get_post_format_link()
  _post_format_request()
  _post_format_link()
  _post_format_get_term()
  _post_format_get_terms()
  _post_format_wp_get_object_terms()

Functions
Functions that are not part of a class:

get_post_format( $post = null )   X-Ref
Retrieve the format slug for a post

return: string|false The format if successful. False otherwise.
param: int|WP_Post|null $post Optional. Post ID or post object. Defaults to the current post in the loop.
since: 3.1.0

has_post_format( $format = array()   X-Ref
Check if a post has any of the given formats, or any format.

return: bool True if the post has any of the given formats (or any format, if no format specified),
param: string|string[]  $format Optional. The format or formats to check.
param: WP_Post|int|null $post   Optional. The post to check. Defaults to the current post in the loop.
since: 3.1.0

set_post_format( $post, $format )   X-Ref
Assign a format to a post

return: array|WP_Error|false Array of affected term IDs on success. WP_Error on error.
param: int|object $post   The post for which to assign a format.
param: string     $format A format to assign. Use an empty string or array to remove all formats from the post.
since: 3.1.0

get_post_format_strings()   X-Ref
Returns an array of post format slugs to their translated and pretty display versions

return: string[] Array of post format labels keyed by format slug.
since: 3.1.0

get_post_format_slugs()   X-Ref
Retrieves the array of post format slugs.

return: string[] The array of post format slugs as both keys and values.
since: 3.1.0

get_post_format_string( $slug )   X-Ref
Returns a pretty, translated version of a post format slug

return: string The translated post format name.
param: string $slug A post format slug.
since: 3.1.0

get_post_format_link( $format )   X-Ref
Returns a link to a post format index.

return: string|WP_Error|false The post format term link.
param: string $format The post format slug.
since: 3.1.0

_post_format_request( $qvs )   X-Ref
Filters the request to allow for the format prefix.

return: array
param: array $qvs
since: 3.1.0

_post_format_link( $link, $term, $taxonomy )   X-Ref
Filters the post format term link to remove the format prefix.

return: string
param: string  $link
param: WP_Term $term
param: string  $taxonomy
since: 3.1.0

_post_format_get_term( $term )   X-Ref
Remove the post format prefix from the name property of the term object created by get_term().

return: object
param: object $term
since: 3.1.0

_post_format_get_terms( $terms, $taxonomies, $args )   X-Ref
Remove the post format prefix from the name property of the term objects created by get_terms().

return: array
param: array        $terms
param: string|array $taxonomies
param: array        $args
since: 3.1.0

_post_format_wp_get_object_terms( $terms )   X-Ref
Remove the post format prefix from the name property of the term objects created by wp_get_object_terms().

return: array
param: array $terms
since: 3.1.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1