}
/**
* Filters the request to allow for the format prefix.
*
* @access private
* @since 3.1.0
*
* @param array $qvs
* @return array
*/
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;
}
/**
* Filters the post format term link to remove the format prefix.
*
* @access private
* @since 3.1.0
*
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
*
* @param string $link
* @param WP_Term $term
* @param string $taxonomy
* @return string
*/
function _post_format_link( $link, $term, $taxonomy ) {
global $wp_rewrite;
if ( 'post_format' !== $taxonomy ) {
return $link;
}
if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
} else {
$link = remove_query_arg( 'post_format', $link );
return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
}
}
/**
* Remove the post format prefix from the name property of the term object created by get_term().
*
* @access private
* @since 3.1.0
*
* @param object $term
* @return object
*/
function _post_format_get_term( $term ) {
if ( isset( $term->slug ) ) {
$term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
}
return $term;
}
/**
* Remove the post format prefix from the name property of the term objects created by get_terms().
*
* @access private
* @since 3.1.0
*
* @param array $terms
* @param string|array $taxonomies
* @param array $args
* @return array
*/
function _post_format_get_terms( $terms, $taxonomies, $args ) {
if ( in_array( 'post_format', (array) $taxonomies, true ) ) {
if ( isset( $args['fields'] ) && 'names' === $args['fields'] ) {
foreach ( $terms as $order => $name ) {
$terms[ $order ] = get_post_format_string( str_replace( 'post-format-', '', $name ) );
}
} else {
foreach ( (array) $terms as $order => $term ) {
if ( isset( $term->taxonomy ) && 'post_format' === $term->taxonomy ) {
$terms[ $order ]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
}
}
}
}
return $terms;
}
/**
* Remove the post format prefix from the name property of the term objects created by wp_get_object_terms().
*
* @access private
* @since 3.1.0
*
* @param array $terms
* @return array
*/
function _post_format_wp_get_object_terms( $terms ) {
foreach ( (array) $terms as $order => $term ) {
if ( isset( $term->taxonomy ) && 'post_format' === $term->taxonomy ) {
$terms[ $order ]->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
}
}
return $terms;
}
Fatal error: require(): Failed opening required '/var/www/html/dportilho.com.br/web/wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php' (include_path='.:/usr/share/pear') in /var/www/html/dportilho.com.br/web/wp-settings.php on line 315
Fatal error: Uncaught Error: Call to a member function set() on null in /var/www/html/dportilho.com.br/web/wp-includes/l10n.php:856
Stack trace:
#0 /var/www/html/dportilho.com.br/web/wp-includes/l10n.php(959): load_textdomain('default', '/var/www/html/d...', 'pt_BR')
#1 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain()
#2 [internal function]: WP_Fatal_Error_Handler->handle()
#3 {main}
thrown in /var/www/html/dportilho.com.br/web/wp-includes/l10n.php on line 856