_post_format_request() – Filters the request to allow for the format prefix.

You appear to be a bot. Output may be restricted

Description

Filters the request to allow for the format prefix.

Usage

$array = _post_format_request( $qvs );

Parameters

$qvs
( array ) required

Returns

array

Source

File name: wordpress/wp-includes/post-formats.php
Lines:

1 to 14 of 14
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;
}
 

 View on GitHub View on Trac