public static function init() { self::$active_plugins = (array) get_option('active_plugins', array()); if (is_multisite()) { self::$active_plugins = array_merge(self::$active_plugins, get_site_option('active_sitewide_plugins', array())); } }
function is_woocommerce_active() { return AfterShip_Dependencies::woocommerce_active_check(); }
public function plugin_callback() { $options = ""; foreach ($this->plugins as $plugin) { //print_r($plugin); if (AfterShip_Dependencies::plugin_active_check($plugin['path'])) { $option = '<option value="' . $plugin['value'] . '"'; if (isset($this->options['plugin']) && esc_attr($this->options['plugin']) == $plugin['value']) { $option .= ' selected="selected"'; } $option .= '>' . $plugin['label'] . '</option>'; $options .= $option; } } printf('<select id="plugin" name="aftership_option_name[plugin]" class="aftership_dropdown">' . $options . '</select>'); }