もっと頭の良い書き方があるかもしれないが・・・。
例)Advanced custom fieldプラグインの使用判定
function blvacf_judgment(){
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(is_plugin_active( 'advanced-custom-fields/acf.php' )){
return true;
} else {
return false;
}
};
<?php
$acfjudgment = blvacf_judgment();
if($acfjudgment == true ){
echo "ACFプラグイン有効";
}elseif($acfjudgment == false ){
echo "ACFプラグイン無効";
}
?>