This page lists all hooks available for the ACF Integration in the Greyd Plugin. For examples of how some of these hooks are used, view the how to customize the output of ACF Dynamic Tags article.
Dynamic Tag Support
greyd_acf_render_field_object
PHP
/**
* Filter the HTML content of an ACF field object based on its type and value before it is rendered.
*
* @filter greyd_acf_render_field_object
*
* @param string $html HTML content of the parsed tag.
* @param array $field_object The ACF field object.
*
*/
return apply_filters( 'greyd_acf_render_field_object', $html, $field_object );
greyd_acf_dynamic_tag
PHP
/**
* Filter the HTML content of the parsed tag.
*
* @filter greyd_acf_dynamic_tag
*
* @param string $html HTML content of the parsed tag.
* @param string $tagName Identifier of the dynamic tag, usually the ACF field name.
* Subfields are in the format groupName[subFieldName].
* @param WP_Post $post Post object.
*
* @return string $html
*/
$html = apply_filters( 'greyd_acf_dynamic_tag', null, $tagName, $post );
greyd_acf_dynamic_tag_fallback
PHP
/**
* Filter the fallback for a field if there has been no custom filter set.
*
* @filter greyd_acf_dynamic_tag_fallback
*
* @param string $html HTML content of the parsed tag.
* @param string $tagName Identifier of the dynamic tag, usually the ACF field name.
* Subfields are in the format groupName[subFieldName].
* @param WP_Post $post Post object.
*/
$html = apply_filters( 'greyd_acf_dynamic_tag_fallback', $html, $tagName, $post );
greyd_acf_dynamic_tag_rendered
PHP
/**
* Filter the HTML content of the parsed tag after it has been rendered.
*
* @filter greyd_acf_dynamic_tag_rendered
*
* @param string $html HTML content of the parsed tag.
* @param string $tagName Identifier of the dynamic tag, usually the ACF field name.
* Subfields are in the format groupName[subFieldName].
* @param WP_Post $post Post object.
*
* @return string $html
*/
$html = apply_filters( 'greyd_acf_dynamic_tag_rendered', $html, $tagName, $post );
Dynamic Link Options
greyd_acf_get_field_url_by_object
PHP
/**
* Filter the URL of an ACF field based on the field object before it is rendered.
*
* @filter greyd_acf_get_field_url_by_object
*
* @param string $url, $field_object );
* @param array $field_object The ACF field object.
*
* @return string $url
*/
return apply_filters( 'greyd_acf_get_field_url_by_object', $url, $field_object );
greyd_acf_dynamic_url
PHP
/**
* Filter the URL of an ACF field based on its tag name and the associated post object.
*
* @filter greyd_acf_dynamic_url
*
* @param string $url URL.
* @param string $tagName Identifier of the dynamic tag, usually the ACF field name.
* Subfields are in the format groupName[subFieldName].
* @param WP_Post $post Post object.
*
* @return string $url
*/
$url = apply_filters( 'greyd_acf_dynamic_url', null, $tagName, $post );
greyd_acf_dynamic_url_fallback
PHP
/**
* Filter the fallback for a link URL if there has been no custom filter set.
*
* @filter greyd_acf_dynamic_url_fallback
*
* @param string $url URL.
* @param string $tagName Identifier of the dynamic tag, usually the ACF field name.
* Subfields are in the format groupName[subFieldName].
* @param WP_Post $post Post object.
*/
$url = apply_filters( 'greyd_acf_dynamic_url_fallback', $url, $tagName, $post );