Plugin Directory

Changeset 400640


Ignore:
Timestamp:
06/23/2011 11:20:46 PM (15 years ago)
Author:
Gecka
Message:

tagging version 1.0-beta2

Location:
gecka-terms-thumbnails
Files:
2 edited
7 copied

Legend:

Unmodified
Added
Removed
  • gecka-terms-thumbnails/tags/1.0-beta2/gecka-terms-thumbnails.php

    r399408 r400640  
    44Plugin URI: http://gecka-apps.com
    55Description: Add thumbnails support to categories and any choosen taxonomies.
    6 Version: 1.0-beta1
     6Version: 1.0-beta2
    77Author: Gecka Apps
    88Author URI: http://gecka.nc
     
    374374     * Actions and filters hooks
    375375     **************************************************************************/
     376    public function activation_hook () {
     377       
     378        if (version_compare(PHP_VERSION, '5.0.0', '<')) {
     379            deactivate_plugins( basename(dirname(__FILE__)) . '/' . basename(__FILE__) ); // Deactivate ourself
     380            wp_die("Sorry, the Gecka Terms Ordering plugin requires PHP 5 or higher.");
     381        }
     382       
     383        global $wpdb;
     384       
     385        $collate = '';
     386        if($wpdb->supports_collation()) {
     387            if(!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset";
     388            if(!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate";
     389        }
     390       
     391        $sql = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix . "termmeta" ." (
     392                `meta_id` bigint(20) unsigned NOT NULL auto_increment,
     393                `term_id` bigint(20) unsigned NOT NULL default '0',
     394                `meta_key` varchar(255) default NULL,
     395                `meta_value` longtext,
     396                PRIMARY KEY (meta_id),
     397                KEY term_id (term_id),
     398                KEY meta_key (meta_key) ) $collate;";
     399        $wpdb->query($sql);
     400       
     401    }   
    376402   
    377403    public function plugins_loaded () {
     
    757783}
    758784
     785if ( ! function_exists('wp_list_terms') ) {
     786   
     787    function wp_list_terms ( $args ) {
     788       
     789        wp_parse_args($args);
     790        if( ! isset($args['walker']) || ! is_a( $args['walker'], 'Walker') ) $args['walker'] = new Walker_Term();
     791       
     792        return wp_list_categories( $args );
     793    }
     794}
     795
    759796/**
    760797 * Create HTML list of categories.
  • gecka-terms-thumbnails/tags/1.0-beta2/readme.txt

    r399408 r400640  
    44Requires at least: 3.0
    55Tested up to: 3.2
    6 Stable tag: 1.0-beta1
     6Stable tag: 1.0-beta2
    77Manage tumbnails for categories, tags or any other taxonomy's terms of your Wordpress website.
    88
     
    3333== Changelog ==
    3434
     35= 1.0-beta2 =
     36* Fix activation hook
     37
    3538= 1.0-beta1 =
    3639* First release.
  • gecka-terms-thumbnails/trunk/gecka-terms-thumbnails.php

    r399408 r400640  
    44Plugin URI: http://gecka-apps.com
    55Description: Add thumbnails support to categories and any choosen taxonomies.
    6 Version: 1.0-beta1
     6Version: 1.0-beta2
    77Author: Gecka Apps
    88Author URI: http://gecka.nc
     
    374374     * Actions and filters hooks
    375375     **************************************************************************/
     376    public function activation_hook () {
     377       
     378        if (version_compare(PHP_VERSION, '5.0.0', '<')) {
     379            deactivate_plugins( basename(dirname(__FILE__)) . '/' . basename(__FILE__) ); // Deactivate ourself
     380            wp_die("Sorry, the Gecka Terms Ordering plugin requires PHP 5 or higher.");
     381        }
     382       
     383        global $wpdb;
     384       
     385        $collate = '';
     386        if($wpdb->supports_collation()) {
     387            if(!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset";
     388            if(!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate";
     389        }
     390       
     391        $sql = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix . "termmeta" ." (
     392                `meta_id` bigint(20) unsigned NOT NULL auto_increment,
     393                `term_id` bigint(20) unsigned NOT NULL default '0',
     394                `meta_key` varchar(255) default NULL,
     395                `meta_value` longtext,
     396                PRIMARY KEY (meta_id),
     397                KEY term_id (term_id),
     398                KEY meta_key (meta_key) ) $collate;";
     399        $wpdb->query($sql);
     400       
     401    }   
    376402   
    377403    public function plugins_loaded () {
     
    757783}
    758784
     785if ( ! function_exists('wp_list_terms') ) {
     786   
     787    function wp_list_terms ( $args ) {
     788       
     789        wp_parse_args($args);
     790        if( ! isset($args['walker']) || ! is_a( $args['walker'], 'Walker') ) $args['walker'] = new Walker_Term();
     791       
     792        return wp_list_categories( $args );
     793    }
     794}
     795
    759796/**
    760797 * Create HTML list of categories.
  • gecka-terms-thumbnails/trunk/readme.txt

    r399408 r400640  
    44Requires at least: 3.0
    55Tested up to: 3.2
    6 Stable tag: 1.0-beta1
     6Stable tag: 1.0-beta2
    77Manage tumbnails for categories, tags or any other taxonomy's terms of your Wordpress website.
    88
     
    3333== Changelog ==
    3434
     35= 1.0-beta2 =
     36* Fix activation hook
     37
    3538= 1.0-beta1 =
    3639* First release.
Note: See TracChangeset for help on using the changeset viewer.