acf_is_plugin_active()
acf_is_plugin_active
This function will return true if the ACF plugin is active
- May be included within a theme or other plugin
Хуков нет.
Возвращает
$post_id. (int)
Использование
acf_is_plugin_active();
Список изменений
| С версии 5.4.0 | Введена. |
Код acf_is_plugin_active() acf is plugin active ACF 6.4.2
function acf_is_plugin_active() {
// vars
$basename = acf_get_setting( 'basename' );
// ensure is_plugin_active() exists (not on frontend)
if ( ! function_exists( 'is_plugin_active' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
// return
return is_plugin_active( $basename );
}