示例#1
0
            foreach ($categories as $category) {
                if ($category->name != TD_FEATURED_CAT) {
                    //ignore the featured category name
                    self::$primary_category = $category->cat_ID;
                    break;
                }
            }
        }
    }
    //used on single posts
    static function get_primary_category_id()
    {
        if (empty(self::$post->ID)) {
            return get_queried_object_id();
        }
        return self::$primary_category;
    }
    //generate unique_ids
    private static $td_unique_counter = 0;
    static function td_generate_unique_id()
    {
        self::$td_unique_counter++;
        return 'td_uid_' . self::$td_unique_counter . '_' . uniqid();
    }
}
if (is_ssl()) {
    td_global::$http_or_https = 'https';
}
td_global::$get_template_directory = get_template_directory();
td_global::$get_template_directory_uri = get_template_directory_uri();