$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>uploads - ACF attachment custom field in rest response|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

uploads - ACF attachment custom field in rest response

matteradmin9PV0评论

I created an extra select option ACF field for media uploader and I would like to retrieve the associated values in Gutenberg MediaUploader onSelect.

Is there a workaround for this case?

I created an extra select option ACF field for media uploader and I would like to retrieve the associated values in Gutenberg MediaUploader onSelect.

Is there a workaround for this case?

Share Improve this question asked Jan 21, 2019 at 22:14 fefefefe 8943 gold badges14 silver badges34 bronze badges 1
  • Did you end up solving this? Currently facing the same problem – Marcel Commented May 22, 2019 at 8:08
Add a comment  | 

1 Answer 1

Reset to default 0

Check out ACF to REST API - https://github/airesvsg/acf-to-rest-api

You can optionally turn on/off which fields you want to enable.

// Enable the option show in rest
add_filter( 'acf/rest_api/field_settings/show_in_rest', '__return_true' );

// Enable the option edit in rest
add_filter( 'acf/rest_api/field_settings/edit_in_rest', '__return_true' );
Post a comment

comment list (0)

  1. No comments so far