acf_admin_field_group::ajax_render_location_rule()
ajax_render_location_rule
This function can be accessed via an AJAX action and will return the result from the render_location_value function
@type function (ajax)
{} Это метод класса: acf_admin_field_group{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$acf_admin_field_group = new acf_admin_field_group(); $acf_admin_field_group->ajax_render_location_rule();
Список изменений
С версии 5.0.0 | Введена. |
Код acf_admin_field_group::ajax_render_location_rule() acf admin field group::ajax render location rule ACF 5.10.2
function ajax_render_location_rule() { // validate if ( ! acf_verify_ajax() ) { die(); } // verify user capability if ( ! acf_current_user_can_admin() ) { die(); } // validate rule $rule = acf_validate_location_rule( $_POST['rule'] ); // view acf_get_view( 'html-location-rule', array( 'rule' => $rule, ) ); // die die(); }