acf_get_post_title()ACF 1.0

Хуков нет.

Возвращает

null. Ничего (null).

Использование

acf_get_post_title( $post, $is_search );
$post
.
$is_search
.
По умолчанию: false

Код acf_get_post_title() ACF 6.4.2

function acf_get_post_title( $post = 0, $is_search = false ) {

	// vars
	$post    = get_post( $post );
	$title   = '';
	$prepend = '';
	$append  = '';

	// bail early if no post
	if ( ! $post ) {
		return '';
	}

	// title
	$title = get_the_title( $post->ID );

	// empty
	if ( $title === '' ) {
		$title = __( '(no title)', 'acf' );
	}

	// status
	if ( get_post_status( $post->ID ) != 'publish' ) {
		$append .= ' (' . get_post_status( $post->ID ) . ')';
	}

	// ancestors
	if ( $post->post_type !== 'attachment' ) {

		// get ancestors
		$ancestors = get_ancestors( $post->ID, $post->post_type );
		$prepend  .= str_repeat( '- ', count( $ancestors ) );
	}

	// merge
	$title = $prepend . $title . $append;

	// return
	return $title;
}