On this page
_post_format_request( array $qvs ): array
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Filters the request to allow for the format prefix.
Parameters
$qvsarray Required
Return
array
Source
File: wp-includes/post-formats.php. View all references
function _post_format_request( $qvs ) {
if ( ! isset( $qvs['post_format'] ) ) {
return $qvs;
}
$slugs = get_post_format_slugs();
if ( isset( $slugs[ $qvs['post_format'] ] ) ) {
$qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
}
$tax = get_taxonomy( 'post_format' );
if ( ! is_admin() ) {
$qvs['post_type'] = $tax->object_type;
}
return $qvs;
}
Related
Uses
| Uses | Description |
|---|---|
| get_post_format_slugs() wp-includes/post-formats.php | Retrieves the array of post format slugs. |
| is_admin() wp-includes/load.php | Determines whether the current request is for an administrative interface page. |
| get_taxonomy() wp-includes/taxonomy.php | Retrieves the taxonomy object of $taxonomy. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_post_format_request