Plugin Directory

Changeset 2884111


Ignore:
Timestamp:
03/21/2023 08:49:16 AM (3 years ago)
Author:
whiletrue
Message:

release 1.2.23

Location:
categorized-tag-cloud
Files:
8 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • categorized-tag-cloud/trunk/categorized-tag-cloud.php

    r2881966 r2884111  
    55Description: Takes the website tags and aggregates them into a categorized cloud widget for sidebar.
    66Author: WhileTrue
    7 Version: 1.2.22
     7Version: 1.2.23
    88Author URI: https://www.whiletrue.it/
    99*/
     
    3333    $order         = (isset($instance['order']) && $instance['order'] == 'a') ? 'ASC'  : 'RAND';
    3434
    35     $exclude_items = array();
     35    $exclude_items = [];
    3636    $category_filters = (array) json_decode($instance['category_filters']);
    3737    if (!isset($category_filters['cat']) || !is_array($category_filters['cat'])) {
    38         $category_filters['cat'] = array();
     38        $category_filters['cat'] = [];
    3939    }
    4040    for ($i = 0; $i < count($category_filters['cat']); $i++) {
     
    8787        load_plugin_textdomain('categorized-tag-cloud', 'false', $this->languagePath);
    8888
    89         $this->options = array(
    90             array(
     89        $this->options = [
     90            [
    9191                'name' => 'title',             'label' => 'Title:',
    9292                'type' => 'text'
    93             ),
    94             array(
     93            ],
     94            [
    9595                'name' => 'words_number',      'label' => 'How many tags to show:',
    9696                'type' => 'text'
    97             ),
    98             array(
     97            ],
     98            [
    9999                'name' => 'words_color',       'label' => 'Word color (random if not entered):',
    100100                'type' => 'text'
    101             ),
    102             array(
     101            ],
     102            [
    103103                'name' => 'hover_color',       'label' => 'Hover color (black if not entered):',
    104104                'type' => 'text'
    105             ),
    106             array(
     105            ],
     106            [
    107107                'name' => 'smallest_font',     'label' => 'Smallest font size (default is 7):',
    108108                'type' => 'text'
    109             ),
    110             array(
     109            ],
     110            [
    111111                'name' => 'largest_font',      'label' => 'Largest font size (default is 14):',
    112112                'type' => 'text'
    113             ),
    114             array(
     113            ],
     114            [
    115115                'name' => 'order',      'label' => 'Order:',
    116                 'type' => 'radio',      'values' => array('' => 'Random', 'a' => 'Alphanumeric')
    117             ),
    118             array(
     116                'type' => 'radio',      'values' => ['' => 'Random', 'a' => 'Alphanumeric'],
     117            ],
     118            [
    119119                'label' => 'Category filters',
    120120                'type'  => 'separator'
    121             ),
    122             array(
     121            ],
     122            [
    123123                'type'  => 'category_filters'
    124             ),
    125             array(
     124            ],
     125            [
    126126                'type'  => 'donate'
    127             ),
    128         );
    129 
    130         $control_ops = array('width' => 500);
    131         parent::__construct(false, 'Categorized Tag Cloud', array(), $control_ops);
     127            ],
     128        ];
     129
     130        $control_ops = ['width' => 500];
     131        parent::__construct(false, 'Categorized Tag Cloud', [], $control_ops);
    132132    }
    133133
     
    156156
    157157            if (isset($_POST['categorized-tag-cloud-num-filters']) && is_numeric($_POST['categorized-tag-cloud-num-filters'])) {
    158                 $instance['category_filters'] = array();
     158                $instance['category_filters'] = [];
    159159                for ($i = 0; $i < $_POST['categorized-tag-cloud-num-filters']; $i++) {
    160160                    if ($_POST['categorized-tag-cloud-cat-' . $i] == '' && $_POST['categorized-tag-cloud-tag-' . $i] == '') {
     
    197197                $category_filters = (array) json_decode($instance['category_filters']);
    198198                if (!is_array($category_filters)) {
    199                     $category_filters = array();
    200                 }
    201                 if (!is_array($category_filters['cat'])) {
    202                     $category_filters['cat'] = array();
     199                    $category_filters = [];
     200                }
     201                if (!isset($category_filters['cat']) || !is_array($category_filters['cat'])) {
     202                    $category_filters['cat'] = [];
    203203                }
    204204                echo '<input name="categorized-tag-cloud-num-filters" type="hidden" value="' . (count($category_filters) + 2) . '" />';
  • categorized-tag-cloud/trunk/readme.txt

    r2881966 r2884111  
    44Tags: tags, tag sidebar, categories, sidebar, widget, tag widget, simple tag, cloud, tag cloud
    55Requires at least: 2.9+
    6 Tested up to: 6.1
    7 Stable tag: 1.2.22
     6Tested up to: 6.2
     7Stable tag: 1.2.23
    88
    99A cloud with the most used tags in a sidebar widget, filtered by post category.
     
    4747== Changelog ==
    4848
    49 = 1.2.22 =
    50 * Plugin tested up to WordPress 6.1
    51 * Fixed: PHP warning
     49= 1.2.23 =
     50* Plugin tested up to WordPress 6.2
     51* Fixed: PHP warnings
    5252
    5353= 1.2.14 =
Note: See TracChangeset for help on using the changeset viewer.