示例#1
0
/**
 * @package   Woocommerce_Wootabs
 * @author    Your Name <*****@*****.**>
 * @license   GPL-2.0+
 * @link      http://example.com
 * @copyright 2014 Your Name or Company Name
 */
$plugin_slug = 'woocommerce-wootabs';
$current_tabURL_slug = "?page=" . $plugin_slug;
$wootabs_remove_data_on_uninstall = get_option('wootabs-remove-data-on-uninstall') && get_option('wootabs-remove-data-on-uninstall') == "on" ? 'checked="checked"' : "";
$wootabs_enable_shop_manager_settings = get_option('wootabs-enable-shop-manager-settings') && get_option('wootabs-enable-shop-manager-settings') == "on" ? 'checked="checked"' : "";
$wootabs_use_global_tabs = get_option('wootabs-use-global-tabs') && get_option('wootabs-use-global-tabs') == "on" ? 'checked="checked"' : "";
$wootabs_global_tabs = get_option('wootabs-global-tabs') ? unserialize(base64_decode(get_option('wootabs-global-tabs'))) : false;
$wootabs_before_global = get_option('wootabs-before_default_tabs') ? get_option('wootabs-before_default_tabs') : 'no';
$wootabs_global_tabs_pos = get_option('wootabs-global-tabs-position') && get_option('wootabs-global-tabs-position') == "begin" ? "begin" : "end";
$ins = Woocommerce_Wootabs_Admin::get_instance();
$message = $ins->get_plugin_msg();
$errorMessage = $message['error'];
$message = $message['message'];
$updated_html = "";
if ($message) {
    $updated_classes = array('updated');
    if ($errorMessage) {
        $updated_classes[] = 'error';
    }
    $updated_html .= "<div class='" . implode(" ", $updated_classes) . "'>";
    $updated_html .= $message;
    $updated_html .= "</div>";
}
$pcats_args = array('hierarchical' => true, 'hide_empty' => false, 'pad_counts' => true);
$product_categories = get_terms('product_cat', $pcats_args);
 /**
  * Return an instance of this class.
  *
  * @since     1.0.0
  *
  * @return    object    A single instance of this class.
  */
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }