ACF_Internal_Post_Type::get_post_edit_linkpublicACF 6.1

Checks if the current user can edit ACF posts and returns the edit url.

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

Хуков нет.

Возвращает

Строку.

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

$ACF_Internal_Post_Type = new ACF_Internal_Post_Type();
$ACF_Internal_Post_Type->get_post_edit_link( $post_id );
$post_id(int) (обязательный)
The ACF post ID.

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

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

Код ACF_Internal_Post_Type::get_post_edit_link() ACF 6.4.2

public function get_post_edit_link( $post_id ) {
	if ( $post_id && acf_current_user_can_admin() ) {
		return admin_url( 'post.php?post=' . $post_id . '&action=edit' );
	}

	return '';
}