Last active
December 28, 2015 09:39
-
-
Save miya0001/7480577 to your computer and use it in GitHub Desktop.
プラグインが有効かどうかを調べる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function is_active($plugin) | |
| { | |
| if (function_exists('is_plugin_active')) { | |
| return is_plugin_active($plugin); | |
| } else { | |
| return in_array( | |
| $plugin, | |
| get_option('active_plugins') | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment