Plugin Directory

Changeset 607352


Ignore:
Timestamp:
10/03/2012 08:55:55 AM (12 years ago)
Author:
ajayver
Message:
 
Location:
cat-tag-filter-widget/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cat-tag-filter-widget/trunk/cat-tag-filter.php

    r606257 r607352  
    55Description: This plugin adds a widget to your WordPress site that allows your visitors to filter posts by category and tag.
    66Author: Ajay Verma
    7 Version: 0.8.3
     7Version: 0.8.4
    88Author URI: http://ajayver.com/
    99*/
     
    8989function tag_options($type){ //get tags
    9090  global $ctf_options, $current_tax;
    91  
     91    $there_are_tags = true;
     92    $args = '';
    9293    if($current_tax['cats'][0]){
    9394
     
    105106        endwhile;
    106107        endif;
     108        if (isset($all_tag_ids)){
     109       
    107110        $tags = array_unique($all_tag_ids);
    108111       
     
    130133        }
    131134        $include = substr($include, 0, -1);
     135       
    132136        $args['include'] = $include;
     137        }
     138       
     139        else $there_are_tags = false;
     140       
    133141   
    134142    }
     
    143151       
    144152       
    145   $tags = get_terms($ctf_options['tag_tax'],$args);
     153  if ($there_are_tags) $tags = get_terms($ctf_options['tag_tax'],$args);
    146154
    147155 
    148156if ($type == 1){
     157    if ($there_are_tags){
    149158    $options .= '<ul>';
    150159    foreach ($tags as $tag) {
     
    160169    }
    161170    $options .= '</ul>';
     171    }
     172    else $options .= '<ul><li><input type="checkbox" name="tag[]" value="-1" disabled>' .  __('No tags here', 'cat-tag-filter')  . '</li></ul>';
    162173  }
    163174  else { 
    164  
     175    if ($there_are_tags){
    165176    $options .= '<select name="' . "tag[]" . '" id="ctf-tag-select" ><option value="-1">';
    166177    if ($ctf_options['all_tags_text'] != '') $options .= $ctf_options['all_tags_text'];
     
    176187        if ($ctf_options['tags_count'] == 1) $options .= ' (' . $tag->count . ')';
    177188        $options .= '</option>';   
    178     }
    179   $options .= '</select>'; }
     189        }
     190    $options .= '</select>';
     191    }
     192    else $options .= '<select name="tag[]" id="ctf-tag-select" disabled ><option value="-1">' .  __('No tags here', 'cat-tag-filter')  . '</option></select>';
     193  }
    180194  return $options;
    181195}
  • cat-tag-filter-widget/trunk/languages/cat-tag-filter-ru_RU.po

    r605989 r607352  
    33"Project-Id-Version: Cat + Tag Filter\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-09-30 11:16+0800\n"
    6 "PO-Revision-Date: 2012-09-30 11:16+0800\n"
     5"POT-Creation-Date: 2012-10-03 16:50+0800\n"
     6"PO-Revision-Date: 2012-10-03 16:51+0800\n"
    77"Last-Translator: \n"
    88"Language-Team: \n"
     
    1414"X-Poedit-SearchPath-0: ..\n"
    1515
    16 #: ../cat-tag-filter.php:146
    17 #: ../cat-tag-filter.php:201
    18 #: ../cat-tag-filter.php:251
     16#: ../cat-tag-filter.php:172
     17#: ../cat-tag-filter.php:192
     18msgid "No tags here"
     19msgstr "Здесь нет тегов"
     20
     21#: ../cat-tag-filter.php:178
     22#: ../cat-tag-filter.php:236
     23#: ../cat-tag-filter.php:286
    1924msgid "Any tag"
    2025msgstr "Любым тегом"
    2126
    22 #: ../cat-tag-filter.php:196
     27#: ../cat-tag-filter.php:231
    2328msgid "Filter posts by category and tag"
    2429msgstr "Фильтр записей по категории и тегу"
    2530
    26 #: ../cat-tag-filter.php:201
    27 #: ../cat-tag-filter.php:251
     31#: ../cat-tag-filter.php:236
     32#: ../cat-tag-filter.php:286
    2833msgid "Filter"
    2934msgstr "Фильтр"
    3035
    31 #: ../cat-tag-filter.php:201
    32 #: ../cat-tag-filter.php:251
     36#: ../cat-tag-filter.php:236
     37#: ../cat-tag-filter.php:286
    3338msgid "Show posts"
    3439msgstr "Показать посты"
    3540
    36 #: ../cat-tag-filter.php:201
    37 #: ../cat-tag-filter.php:251
     41#: ../cat-tag-filter.php:236
     42#: ../cat-tag-filter.php:286
    3843msgid "Show posts from:"
    3944msgstr "Показать посты из:"
    4045
    41 #: ../cat-tag-filter.php:201
    42 #: ../cat-tag-filter.php:251
     46#: ../cat-tag-filter.php:236
     47#: ../cat-tag-filter.php:286
    4348msgid "With tag:"
    4449msgstr "С тегом:"
    4550
    46 #: ../cat-tag-filter.php:201
    47 #: ../cat-tag-filter.php:251
     51#: ../cat-tag-filter.php:236
     52#: ../cat-tag-filter.php:286
    4853msgid "Any category"
    4954msgstr "Любой категории"
    5055
    51 #: ../cat-tag-filter.php:261
     56#: ../cat-tag-filter.php:296
    5257msgid "Widget title"
    5358msgstr "Заголовок виджета"
    5459
    55 #: ../cat-tag-filter.php:269
     60#: ../cat-tag-filter.php:304
    5661msgid "Hide categories dropdown"
    5762msgstr "Спрятать выпадающий список категорий"
    5863
    59 #: ../cat-tag-filter.php:275
     64#: ../cat-tag-filter.php:310
    6065msgid "Categories dropdown label"
    6166msgstr "Надпись над категориями"
    6267
    63 #: ../cat-tag-filter.php:281
     68#: ../cat-tag-filter.php:316
    6469msgid "All categories option text"
    6570msgstr "Первый пункт в списке категорий"
    6671
    67 #: ../cat-tag-filter.php:288
     72#: ../cat-tag-filter.php:323
    6873msgid "Show categories post count"
    6974msgstr "Показывать счетчик постов в списке категорий"
    7075
    71 #: ../cat-tag-filter.php:293
     76#: ../cat-tag-filter.php:328
    7277msgid "Coma separated category id's to "
    7378msgstr "Id категорий через запятую, которые нужно"
    7479
    75 #: ../cat-tag-filter.php:295
    76 #: ../cat-tag-filter.php:352
     80#: ../cat-tag-filter.php:330
     81#: ../cat-tag-filter.php:387
    7782msgid "exclude"
    7883msgstr "исключить"
    7984
    80 #: ../cat-tag-filter.php:298
    81 #: ../cat-tag-filter.php:355
     85#: ../cat-tag-filter.php:333
     86#: ../cat-tag-filter.php:390
    8287msgid "include"
    8388msgstr "включить"
    8489
    85 #: ../cat-tag-filter.php:306
     90#: ../cat-tag-filter.php:341
    8691msgid "Tags dropdown label"
    8792msgstr "Надпись над тегами"
    8893
    89 #: ../cat-tag-filter.php:312
     94#: ../cat-tag-filter.php:347
    9095msgid "All tags option text"
    9196msgstr "Первый пункт в списке тегов"
    9297
    93 #: ../cat-tag-filter.php:318
     98#: ../cat-tag-filter.php:353
    9499msgid "How to show tags:"
    95100msgstr "Как показывать теги:"
    96101
    97 #: ../cat-tag-filter.php:322
     102#: ../cat-tag-filter.php:357
    98103msgid "Dropdown list"
    99104msgstr "Выпадающий список"
    100105
    101 #: ../cat-tag-filter.php:325
     106#: ../cat-tag-filter.php:360
    102107msgid "Checkboxes"
    103108msgstr "Чекбоксы"
    104109
    105 #: ../cat-tag-filter.php:331
     110#: ../cat-tag-filter.php:366
    106111msgid "Logic operator for multiple tags:"
    107112msgstr "Логический оператор при выборе нескольких тегов"
    108113
    109 #: ../cat-tag-filter.php:335
     114#: ../cat-tag-filter.php:370
    110115msgid "OR"
    111116msgstr "ИЛИ"
    112117
    113 #: ../cat-tag-filter.php:338
     118#: ../cat-tag-filter.php:373
    114119msgid "AND"
    115120msgstr "И"
    116121
    117 #: ../cat-tag-filter.php:345
     122#: ../cat-tag-filter.php:380
    118123msgid "Show tags post count"
    119124msgstr "Показывать счетчик постов в списке тегов"
    120125
    121 #: ../cat-tag-filter.php:350
     126#: ../cat-tag-filter.php:385
    122127msgid "Coma separated tag id's to "
    123128msgstr "Id тегов через запятую, которые нужно"
    124129
    125 #: ../cat-tag-filter.php:362
     130#: ../cat-tag-filter.php:397
    126131msgid "Custom taxonomy name for tags"
    127132msgstr "Имя таксономии для тегов"
    128133
    129 #: ../cat-tag-filter.php:368
     134#: ../cat-tag-filter.php:403
    130135msgid "Custom taxonomy name for categories"
    131136msgstr "Имя таксономии для категорий"
    132137
    133 #: ../cat-tag-filter.php:372
     138#: ../cat-tag-filter.php:407
    134139msgid "List of registered taxonomies"
    135140msgstr "Список зарегистрированных таксономий"
    136141
    137 #: ../cat-tag-filter.php:381
     142#: ../cat-tag-filter.php:416
    138143msgid "Button title"
    139144msgstr "Надпись на кнопке"
  • cat-tag-filter-widget/trunk/languages/cat-tag-filter.po

    r605989 r607352  
    33"Project-Id-Version: Cat + Tag Filter\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2012-09-30 11:15+0800\n"
    6 "PO-Revision-Date: 2012-09-30 11:15+0800\n"
     5"POT-Creation-Date: 2012-10-03 16:50+0800\n"
     6"PO-Revision-Date: 2012-10-03 16:50+0800\n"
    77"Last-Translator: \n"
    88"Language-Team: \n"
     
    1414"X-Poedit-SearchPath-0: ..\n"
    1515
    16 #: ../cat-tag-filter.php:146
    17 #: ../cat-tag-filter.php:201
    18 #: ../cat-tag-filter.php:251
     16#: ../cat-tag-filter.php:172
     17#: ../cat-tag-filter.php:192
     18msgid "No tags here"
     19msgstr ""
     20
     21#: ../cat-tag-filter.php:178
     22#: ../cat-tag-filter.php:236
     23#: ../cat-tag-filter.php:286
    1924msgid "Any tag"
    2025msgstr ""
    2126
    22 #: ../cat-tag-filter.php:196
     27#: ../cat-tag-filter.php:231
    2328msgid "Filter posts by category and tag"
    2429msgstr ""
    2530
    26 #: ../cat-tag-filter.php:201
    27 #: ../cat-tag-filter.php:251
     31#: ../cat-tag-filter.php:236
     32#: ../cat-tag-filter.php:286
    2833msgid "Filter"
    2934msgstr ""
    3035
    31 #: ../cat-tag-filter.php:201
    32 #: ../cat-tag-filter.php:251
     36#: ../cat-tag-filter.php:236
     37#: ../cat-tag-filter.php:286
    3338msgid "Show posts"
    3439msgstr ""
    3540
    36 #: ../cat-tag-filter.php:201
    37 #: ../cat-tag-filter.php:251
     41#: ../cat-tag-filter.php:236
     42#: ../cat-tag-filter.php:286
    3843msgid "Show posts from:"
    3944msgstr ""
    4045
    41 #: ../cat-tag-filter.php:201
    42 #: ../cat-tag-filter.php:251
     46#: ../cat-tag-filter.php:236
     47#: ../cat-tag-filter.php:286
    4348msgid "With tag:"
    4449msgstr ""
    4550
    46 #: ../cat-tag-filter.php:201
    47 #: ../cat-tag-filter.php:251
     51#: ../cat-tag-filter.php:236
     52#: ../cat-tag-filter.php:286
    4853msgid "Any category"
    4954msgstr ""
    5055
    51 #: ../cat-tag-filter.php:261
     56#: ../cat-tag-filter.php:296
    5257msgid "Widget title"
    5358msgstr ""
    5459
    55 #: ../cat-tag-filter.php:269
     60#: ../cat-tag-filter.php:304
    5661msgid "Hide categories dropdown"
    5762msgstr ""
    5863
    59 #: ../cat-tag-filter.php:275
     64#: ../cat-tag-filter.php:310
    6065msgid "Categories dropdown label"
    6166msgstr ""
    6267
    63 #: ../cat-tag-filter.php:281
     68#: ../cat-tag-filter.php:316
    6469msgid "All categories option text"
    6570msgstr ""
    6671
    67 #: ../cat-tag-filter.php:288
     72#: ../cat-tag-filter.php:323
    6873msgid "Show categories post count"
    6974msgstr ""
    7075
    71 #: ../cat-tag-filter.php:293
     76#: ../cat-tag-filter.php:328
    7277msgid "Coma separated category id's to "
    7378msgstr ""
    7479
    75 #: ../cat-tag-filter.php:295
    76 #: ../cat-tag-filter.php:352
     80#: ../cat-tag-filter.php:330
     81#: ../cat-tag-filter.php:387
    7782msgid "exclude"
    7883msgstr ""
    7984
    80 #: ../cat-tag-filter.php:298
    81 #: ../cat-tag-filter.php:355
     85#: ../cat-tag-filter.php:333
     86#: ../cat-tag-filter.php:390
    8287msgid "include"
    8388msgstr ""
    8489
    85 #: ../cat-tag-filter.php:306
     90#: ../cat-tag-filter.php:341
    8691msgid "Tags dropdown label"
    8792msgstr ""
    8893
    89 #: ../cat-tag-filter.php:312
     94#: ../cat-tag-filter.php:347
    9095msgid "All tags option text"
    9196msgstr ""
    9297
    93 #: ../cat-tag-filter.php:318
     98#: ../cat-tag-filter.php:353
    9499msgid "How to show tags:"
    95100msgstr ""
    96101
    97 #: ../cat-tag-filter.php:322
     102#: ../cat-tag-filter.php:357
    98103msgid "Dropdown list"
    99104msgstr ""
    100105
    101 #: ../cat-tag-filter.php:325
     106#: ../cat-tag-filter.php:360
    102107msgid "Checkboxes"
    103108msgstr ""
    104109
    105 #: ../cat-tag-filter.php:331
     110#: ../cat-tag-filter.php:366
    106111msgid "Logic operator for multiple tags:"
    107112msgstr ""
    108113
    109 #: ../cat-tag-filter.php:335
     114#: ../cat-tag-filter.php:370
    110115msgid "OR"
    111116msgstr ""
    112117
    113 #: ../cat-tag-filter.php:338
     118#: ../cat-tag-filter.php:373
    114119msgid "AND"
    115120msgstr ""
    116121
    117 #: ../cat-tag-filter.php:345
     122#: ../cat-tag-filter.php:380
    118123msgid "Show tags post count"
    119124msgstr ""
    120125
    121 #: ../cat-tag-filter.php:350
     126#: ../cat-tag-filter.php:385
    122127msgid "Coma separated tag id's to "
    123128msgstr ""
    124129
    125 #: ../cat-tag-filter.php:362
     130#: ../cat-tag-filter.php:397
    126131msgid "Custom taxonomy name for tags"
    127132msgstr ""
    128133
    129 #: ../cat-tag-filter.php:368
     134#: ../cat-tag-filter.php:403
    130135msgid "Custom taxonomy name for categories"
    131136msgstr ""
    132137
    133 #: ../cat-tag-filter.php:372
     138#: ../cat-tag-filter.php:407
    134139msgid "List of registered taxonomies"
    135140msgstr ""
    136141
    137 #: ../cat-tag-filter.php:381
     142#: ../cat-tag-filter.php:416
    138143msgid "Button title"
    139144msgstr ""
  • cat-tag-filter-widget/trunk/readme.txt

    r606257 r607352  
    55Requires at least: 2.8
    66Tested up to: 3.4.2
    7 Stable tag: 0.8.3
     7Stable tag: 0.8.4
    88
    99This plugin adds a widget to your WordPress site that gives your visitors an ability to filter all your posts by a category or/and tag.
     
    7474== Changelog ==
    7575
     76= 0.8.4 =
     77* fixed layout in categories with no corresponding tags.
     78
    7679= 0.8.3 =
    7780* fixed a bug with tags including\excluding.
Note: See TracChangeset for help on using the changeset viewer.