Adding my thanks!
@jmay Wish I knew what the problem was but ¯\_(ツ)_/¯
An official solution would be much appreciated.
FWIW, my answer that’s marked as the solution (even though it’s a workaround) has been fine deploying across multiple environments, including management with ManageWP, since ACF Pro 5 came out. There have been no issues.
Hey peeps, here’s a quick fix to add a licence key on theme activation: https://gist.github.com/mattradford/6d5b8f3cd11ce1f62480
It would be nice to have an official solution though.
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
Elliot’s comment is perfectly valid if ACF is NOT being used in accordance with the licence. But there is nothing wrong with using this as a time-saver for development – adding a licence key defined in wp-config is something that other premium plugins such as WP Migrate DB Pro and Gravity Forms have supported for a long time.
Hey peeps, here’s a quick fix to add a licence key on theme activation: https://gist.github.com/mattradford/6d5b8f3cd11ce1f62480
+1 from me. This would be very useful.
The Page Link field only returns a URL, so the title isn’t returned. Change your field type to Post Object and it’ll work.
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.