wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



block_core_breadcrumbs_get_post_title › WordPress Function

Da7.0.0
Deprecaton/a
› block_core_breadcrumbs_get_post_title ( $post_id_or_object )
Parametri:
  • (int|WP_Post) $post_id_or_object The post ID or post object.
    Richiesto: Sì
Ritorna:
  • (string) The post title or fallback text.
Definito a:
Codex:

Gets a post title with fallback for empty titles.



Sorgenti

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;
}