wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



block_core_breadcrumbs_get_post_title › WordPress Function

Desde7.0.0
Obsoleton/a
› block_core_breadcrumbs_get_post_title ( $post_id_or_object )
Parâmetros:
  • (int|WP_Post) $post_id_or_object The post ID or post object.
    Required: Yes
Retorna:
  • (string) The post title or fallback text.
Definido em:
Codex:

Gets a post title with fallback for empty titles.



Fonte

function block_core_breadcrumbs_get_post_title( $post_id_or_object ) {
	$title = get_the_title( $post_id_or_object );
	if ( strlen( $title ) === 0 ) {
		$title = __( '(no title)' );
	}
	return $title;
}