Home › Forums › ACF PRO › Including ACF in a Plugin… caveats?? › Reply To: Including ACF in a Plugin… caveats??
Right now, yes, the main problem is having ACF4 and 5 both active and they are not compatible with each other. That should be resolved, hopefully soon. I don’t know Elliot’s timetable for getting ACF5 released to the WP repo, but I’m hoping that it’s very soon.
You’re theme can check the version of ACF that is active and display an admin notice
add_action('init', 'my_theme_check_acf_version');
function my_theme_check_acf_version() {
$acf_version = acf_get_setting('version');
if (version_compare($acf_version, '5.0.0', '<')) {
// the version above could be changed to whatever
// version your theme requires
add_action('admin_notices', 'my_admin_notices_function');
}
}
https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices
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.