Plugin Directory

Changeset 1179798


Ignore:
Timestamp:
06/12/2015 06:24:49 PM (11 years ago)
Author:
cip
Message:

version 1.0.2 - setup_ec_data allows now category id as parameter

Location:
enhanced-category-pages/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • enhanced-category-pages/trunk/classes/ecp/Enhanced_Category.php

    r1102490 r1179798  
    212212    }
    213213
    214     //gets global current category and setup the global post data
    215     public function setup_ec_data() {
     214    //gets global current category or category with given id and setup the global post data
     215    public function setup_ec_data($cur_cat_id = null) {
    216216        global $withcomments, $post;
    217         //get global category/term id
    218 
    219         $query_var = get_query_var("taxonomy");
    220 
    221         if ( empty($query_var) ) {
    222             $cur_cat_id = get_cat_id(single_cat_title("", false));
    223         } else {
    224             $term = get_term_by('slug', get_query_var("term"), $query_var);
    225             $cur_cat_id = $term->term_id;
     217
     218        if (empty($cur_cat_id)) {
     219            //get global category/term id
     220            $query_var = get_query_var("taxonomy");
     221
     222            if ( empty($query_var) ) {
     223                $cur_cat_id = get_cat_id(single_cat_title("", false));
     224            } else {
     225                $term = get_term_by('slug', get_query_var("term"), $query_var);
     226                $cur_cat_id = $term->term_id;
     227            }
    226228        }
    227229
  • enhanced-category-pages/trunk/enhanced-category-pages.php

    r1102490 r1179798  
    44Description: Create custom enhanced pages for categories. Manage category page as a custom post.
    55Author: Ciprian Amariei, Diana Amitroaei
    6 Version: 1.0.1
     6Version: 1.0.2
    77Text Domain: enhanced-category-pages
    88Text Path: languages
  • enhanced-category-pages/trunk/readme.txt

    r1102493 r1179798  
    55Requires at least: 3.0.1
    66Tested up to: 4.1.1
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9797* bug fixing
    9898
     99= 1.0.2 =
     100* setup_ec_data allows now category id as parameter
     101
    99102
    100103== Upgrade Notice ==
     
    108111= 1.0.1 =
    109112* Bugs fixed
     113
     114= 1.0.2 =
     115* traverse categories using setup_ec_data that allows now category id as parameter
Note: See TracChangeset for help on using the changeset viewer.