acf_field_page_link::get_post_title()publicACF 5.0.0

get_post_title

This function returns the HTML for a result

Метод класса: acf_field_page_link{}

Возвращает

(Строку).

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

$acf_field_page_link = new acf_field_page_link();
$acf_field_page_link->get_post_title( $post, $field, $post_id, $is_search );
$post (обязательный)
-
$field (обязательный)
-
$post_id **
-
$is_search **
-

Список изменений

С версии 5.0.0 Введена.

Код acf_field_page_link::get_post_title() ACF 6.0.4

function get_post_title( $post, $field, $post_id = 0, $is_search = 0 ) {

	// get post_id
	if ( ! $post_id ) {
		$post_id = acf_get_form_data( 'post_id' );
	}

	// vars
	$title = acf_get_post_title( $post, $is_search );

	// filters
	$title = apply_filters( 'acf/fields/page_link/result', $title, $post, $field, $post_id );
	$title = apply_filters( 'acf/fields/page_link/result/name=' . $field['_name'], $title, $post, $field, $post_id );
	$title = apply_filters( 'acf/fields/page_link/result/key=' . $field['key'], $title, $post, $field, $post_id );

	// return
	return $title;

}