acf_set_after_rest_media_enqueue_reset_flag()
Set ACF data before a rest call if media scripts have not been enqueued yet for after REST reset.
Хуков нет.
Возвращает
Разное
.
Использование
acf_set_after_rest_media_enqueue_reset_flag( $response );
- $response(WP_REST_Response|WP_HTTP_Response|WP_Error|разное) (обязательный)
- The WordPress response object.
Список изменений
С версии 6.0 | Введена. |
Код acf_set_after_rest_media_enqueue_reset_flag() acf set after rest media enqueue reset flag ACF 6.0.4
function acf_set_after_rest_media_enqueue_reset_flag( $response ) { global $wp_actions; acf_set_data( 'acf_inside_rest_call', true ); acf_set_data( 'acf_should_reset_media_enqueue', empty( $wp_actions['wp_enqueue_media'] ) ); acf_set_data( 'acf_did_render_block_form', false ); return $response; }