Home › Forums › ACF PRO › Including ACF Pro in a Plugin › Reply To: Including ACF Pro in a Plugin
Just throwing in my 2 cents here, I was able to use just the conditional for acf pro and it works on wp installs with acf regular and pro.
So, in my plugin file I have:
/* Checks to see if “is_plugin_active” function exists and if not load the php file that includes that function */
if ( ! function_exists( ‘is_plugin_active’ ) ) {
include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
}
/* Checks to see if the acf pro plugin is activated */
if ( !is_plugin_active(‘advanced-custom-fields-pro/acf.php’) ) {
/* load the plugin and anything else you want to do */
}
and if my install already has acf regular, my needed pro features work, and if it has acf pro, it doesn’t load and everything works as well.
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.