Plugin Directory

Changeset 3474222


Ignore:
Timestamp:
03/04/2026 06:34:42 AM (4 weeks ago)
Author:
infility
Message:

v2.14.55 (20260304) Ben:elementor自定义列表组件优化

Location:
infility-global/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • infility-global/trunk/infility_global.php

    r3468303 r3474222  
    44Plugin URI: https://www.infility.cn/
    55Description: Infility公共插件
    6 Version: 2.14.54
     6Version: 2.14.55
    77Author: Infility
    88Author URI: https://www.infility.cn/
     
    147147    function __construct()
    148148    {
    149         define( 'INFILITY_GLOBAL_VERSION', '2.14.54' );
     149        define( 'INFILITY_GLOBAL_VERSION', '2.14.55' );
    150150        define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠
    151151        define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的
  • infility-global/trunk/widgets/elementor-tab/elementor-tab.php

    r3458821 r3474222  
    107107       
    108108        $is_curr_post = isset($_POST['is_curr_post']) ? sanitize_text_field($_POST['is_curr_post']) : 'no';
     109        $show_all_categories = isset($_POST['show_all_categories']) ? sanitize_text_field($_POST['show_all_categories']) : 'yes';
    109110        $current_post_id = isset($_POST['current_post_id']) ? intval($_POST['current_post_id']) : 0;
    110111        $current_term_id = isset($_POST['current_term_id']) ? intval($_POST['current_term_id']) : 0;
     
    139140        }
    140141
    141         if ($is_curr_post === 'yes') {
     142        if ($show_all_categories !== 'yes') {
    142143            $current_category_id = 0;
    143144            if ($current_term_id) {
  • infility-global/trunk/widgets/elementor-tab/includes/widgets/elementor_nav_posts.php

    r3458821 r3474222  
    158158        );
    159159
     160        $this->add_control(
     161            'show_all_categories',
     162            [
     163                'label' => '是否显示所有分类列表',
     164                'type' => \Elementor\Controls_Manager::SWITCHER,
     165                'default' => 'yes',
     166                'label_on' => '是',
     167                'label_off' => '否',
     168                'description' => '如果选是,则显示所有分类和它们的子分类,如果选否则只显示当前分类和当前分类的子分类',
     169            ]
     170        );
     171
     172       
    160173        $this->add_control(
    161174            'show_hierarchical',
     
    955968                    show_excerpt: '{{{ settings.show_excerpt }}}',
    956969                    show_date: '{{{ settings.show_date }}}',
    957                     show_category: '{{{ settings.show_category }}}'
     970                    show_category: '{{{ settings.show_category }}}',
     971                    show_all_categories: '{{{ settings.show_all_categories }}}'
    958972                };
    959973
     
    10831097                    show_category: '<?php echo esc_js($settings['show_category']); ?>',
    10841098                    is_curr_post: '<?php echo esc_js($settings['is_curr_post']); ?>',
     1099                    show_all_categories: '<?php echo esc_js($settings['show_all_categories']); ?>',
    10851100                    current_post_id: '<?php echo get_the_ID(); ?>',
    10861101                    current_term_id: '<?php echo (is_category() || is_tax() || is_tag()) ? get_queried_object_id() : ""; ?>'
  • infility-global/trunk/widgets/elementor-tab/js/elementor_nav_posts.js

    r3458821 r3474222  
    531531                custom_taxonomy: settings.custom_taxonomy,
    532532                is_curr_post: settings.is_curr_post,
     533                show_all_categories: settings.show_all_categories,
    533534                current_post_id: settings.current_post_id,
    534535                current_term_id: settings.current_term_id,
Note: See TracChangeset for help on using the changeset viewer.