Plugin Directory

Changeset 2940219


Ignore:
Timestamp:
07/19/2023 08:25:48 AM (3 years ago)
Author:
webfood
Message:

update version number 1.5 to 1.6
if no item specified main flag, use first one as main. if multiple items specified main flag, use use first one of specified items as main.
apply for Warning: Undefined array key or Notice: Undefined index.

Location:
kattene/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kattene/trunk/plugin.php

    r2622835 r2940219  
    55Plugin URI: http://webfood.info/make-kattene/
    66Description: kattene.
    7 Version: 1.5
     7Version: 1.6
    88Author URI: http://webfood.info/
    99Text Domain: kattene
     
    3232
    3333function kattene_func( $args, $content ) {
    34 
    35   $path = str_replace(home_url(),'',plugin_dir_url( __FILE__ ));
     34  $path = plugin_dir_url( __FILE__ );
    3635  wp_enqueue_style( 'kattene', $path . 'style.css');
    3736
     
    4241  $main_tmp = array_filter($sites,
    4342    function($site){
    44       return $site["main"];
     43      return isset($site["main"]) && $site["main"];
    4544    }
    4645  );
    4746
    48   $main = array_pop($main_tmp);
     47  if(empty($main_tmp)){
     48    $main = $sites[0];
     49  }else{
     50    $main = array_shift($main_tmp);
     51  }
    4952
    5053  $cnt = count($sites);
  • kattene/trunk/readme.txt

    r2622835 r2940219  
    33Tags: css, style.css, custom
    44Requires at least: 5.2.2
    5 Tested up to: 5.8.1
    6 Stable tag: 1.5
     5Tested up to: 6.2.2
     6Stable tag: 1.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.