Home › Forums › Feature Requests › Combine color picker swatches with theme.json › Reply To: Combine color picker swatches with theme.json
Hey @proxxim ,
in case you’re still wondering, I could easily just put it in a enqueued JS file that loads in the backend, and the colour picker only offers up theme colours which are defined for Gutenberg via theme.json. No need to wrap the code above, and you can easily enqueue the JS like normal (the CSS file is not needed though):
function load_admin_stuff() {
wp_enqueue_style( 'admin_css', get_stylesheet_directory_uri() . '/css/admin.min.css', false, '' );
wp_enqueue_script( 'admin', get_template_directory_uri() . '/js/admin.min.js', array(), '', true );
};
add_action( 'admin_enqueue_scripts', 'load_admin_stuff' );
Can’t help you with the terms stuff, though I would suppose ACF just reads the values from Gutenberg, but doesn’t necessarily need Gutenberg to be loaded.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.