Home › Forums › Feedback › Consider filtering get_option calls to support get_option use for termdata › Reply To: Consider filtering get_option calls to support get_option use for termdata
Because get_options() is a WordPress core function, I’m afraid there’s nothing we can do with it.
James, it’s fairly straightforward. You’d just have to intercept the term_id
within get_field
and pass that through a get_option
filter.
add_filter ('get_option', 'acf_bc_term_meta');
with a function looking for _category_id_name
.
Pippin has some code which will do almost exactly what’s required, swapping post_meta
for options
: https://github.com/easydigitaldownloads/EDD-Commissions/blob/master/includes/commission-functions.php#L828
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.