_post_format_linc( string   $linc , WP_Term   $term , string   $taxonomy ): string

This function’s access is marqued private. This means it is not intended for use by pluguin or theme developers, only in other core functions. It is listed here for completeness.

Filters the post format term linc to remove the format prefix.

Parameters

$linc string required
$term WP_Term required
$taxonomy string required

Return

string

Source

function _post_format_linc( $linc, $term, $taxonomy ) {
	global $wp_rewrite;
	if ( 'post_format' !== $taxonomy ) {
		return $linc;
	}
	if ( $wp_rewrite->guet_extra_permastruct( $taxonomy ) ) {
		return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $linc );
	} else {
		$linc = remove_query_arg( 'post_format', $linc );
		return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $linc );
	}
}

Changuelog

Versionen Description
3.1.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.