Plugin Directory

Changeset 3054294


Ignore:
Timestamp:
03/19/2024 10:26:43 AM (2 years ago)
Author:
bdevs
Message:

Updated default options setting of plugin

Location:
generic-elements-for-elementor/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • generic-elements-for-elementor/trunk/admin/assets/js/generic-admin.js

    r3053173 r3054294  
    462462    });
    463463  };
    464   // @since 1.2.2
     464  // @since 1.2.3
    465465  $.notificationx.trigger = function (selector) {
    466466    var source = $(selector + ":checked").val();
  • generic-elements-for-elementor/trunk/changelog.txt

    r3053173 r3054294  
    11== Changelog ==
     2= 1.2.3 - 19-03-2024 =
     3- Updated: Theme Settings option updated.
     4- Updated: Generic Faq widget updated.
     5
    26= 1.2.2 - 18-03-2024 =
    37- Updated: Theme Settings option updated.
  • generic-elements-for-elementor/trunk/generic-elements.php

    r3053173 r3054294  
    55 * Plugin URI:                  https://generic-elements.bdevs.net/
    66 * Description:                 The ultimate Elementor Addons
    7  * Version:                     1.2.2
     7 * Version:                     1.2.3
    88 * Author:                      bdevs
    99 * Requires at least:           5.8
     
    4949     * @var string
    5050     */
    51     public $version = '1.2.2';
     51    public $version = '1.2.3';
    5252
    5353    /**
     
    150150
    151151        // plugin default active setting
    152         update_option('generic_bootstrap_option', 'inactive');
    153         update_option('generic_fontawesome_option', 'inactive');
    154         update_option('generic_magnific_popup_option', 'inactive');
    155         update_option('generic_odometer_option', 'inactive');
    156         update_option('generic_appear_option', 'inactive');
    157         update_option('generic_waypoints_option', 'inactive');
    158         update_option('generic_animate_option', 'inactive');
    159         update_option('generic_wow_option', 'inactive');
    160         update_option('generic_swiper_option', 'inactive');
    161         update_option('generic_meanmenu_option', 'active');
     152        $bootstrap_option = get_option('generic_bootstrap_option');
     153        if (!$bootstrap_option) {
     154            update_option('generic_bootstrap_option', 'inactive');
     155        }
     156        $fontawesome_option = get_option('generic_fontawesome_option');
     157        if (!$fontawesome_option) {
     158            update_option('generic_fontawesome_option', 'inactive');
     159        }
     160        $magnific_option = get_option('generic_magnific_popup_option');
     161        if (!$magnific_option) {
     162            update_option('generic_magnific_popup_option', 'inactive');
     163        }
     164        $odometer_option = get_option('generic_odometer_option');
     165        if (!$odometer_option) {
     166            update_option('generic_odometer_option', 'inactive');
     167        }
     168        $appear_option = get_option('generic_appear_option');
     169        if (!$appear_option) {
     170            update_option('generic_appear_option', 'inactive');
     171        }
     172        $waypoints_option = get_option('generic_waypoints_option');
     173        if (!$waypoints_option) {
     174            update_option('generic_waypoints_option', 'inactive');
     175        }
     176        $animate_option = get_option('generic_animate_option');
     177        if (!$animate_option) {
     178            update_option('generic_animate_option', 'inactive');
     179        }
     180        $wow_option = get_option('generic_wow_option');
     181        if (!$wow_option) {
     182            update_option('generic_wow_option', 'inactive');
     183        }
     184        $swiper_option = get_option('generic_swiper_option');
     185        if (!$swiper_option) {
     186            update_option('generic_swiper_option', 'inactive');
     187        }
     188        $meanmenu_option = get_option('generic_meanmenu_option');
     189        if (!$meanmenu_option) {
     190            update_option('generic_meanmenu_option', 'active');
     191        }
    162192    }
    163193
  • generic-elements-for-elementor/trunk/readme.txt

    r3053173 r3054294  
    55Tested up to: 6.3
    66Requires PHP: 7.1
    7 Stable tag: 1.2.2
     7Stable tag: 1.2.3
    88License: GPLv3 or later
    99License URI: https://opensource.org/licenses/GPL-3.0
  • generic-elements-for-elementor/trunk/widgets/GenericFaq.php

    r3026730 r3054294  
    8888        //faq_list
    8989        $this->start_controls_section(
    90             'faq_list',
    91             [
    92                 'label' => __('FAQ List', 'generic-elements'),
    93                 'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
     90            'content_faq_section',
     91            [
     92                'label' => __('Accordions', 'generic-elements'),
     93                'type' => \Elementor\Controls_Manager::TAB_CONTENT,
    9494            ]
    9595        );
     
    9898            'gen_extra_class',
    9999            [
    100                 'label' => esc_html__('Additonal Class', 'generic-elements'),
     100                'label' => __('Wrapper Class', 'generic-elements'),
    101101                'type' => \Elementor\Controls_Manager::TEXT,
     102                'default' => __('', 'generic-elements'),
     103                'placeholder' => __('Type your accordion class', 'generic-elements'),
    102104                'label_block' => true,
    103                 'placeholder' => esc_html__('Type your css class name', 'generic-elements'),
    104                 'dynamic' => [
    105                     'active' => true,
    106                 ]
    107105            ]
    108106        );
     
    111109            'gen_faq_id',
    112110            [
     111                'label' => __('Accordion ID', 'generic-elements'),
    113112                'type' => \Elementor\Controls_Manager::TEXT,
     113                'default' => __('accordion_id', 'generic-elements'),
     114                'placeholder' => __('accordion id with no space', 'generic-elements'),
     115                'description' => __('Give a id with no space for accordion.', 'generic-elements'),
    114116                'label_block' => true,
    115                 'label' => __('FAQ Id', 'bdevs-element'),
    116                 'default' => __('faq_01', 'bdevs-element'),
    117                 'placeholder' => __('faq_01', 'bdevs-element'),
    118                 'dynamic' => [
    119                     'active' => true,
    120                 ]
    121117            ]
    122118        );
    123119
    124120        $repeater = new \Elementor\Repeater();
     121
     122        $repeater->add_control(
     123            'acc_active_switch',
     124            [
     125                'label' => esc_html__('Show', 'generic-elements'),
     126                'type' => \Elementor\Controls_Manager::SWITCHER,
     127                'label_on' => esc_html__('Show', 'generic-elements'),
     128                'label_off' => esc_html__('Hide', 'generic-elements'),
     129                'return_value' => 'yes',
     130                'default' => '0',
     131            ]
     132        );
    125133
    126134        $repeater->add_control(
     
    128136            [
    129137                'label' => __('Title', 'generic-elements'),
    130                 'type' => \Elementor\Controls_Manager::TEXTAREA,
     138                'type' => \Elementor\Controls_Manager::TEXT,
     139                'default' => __('Accordion Title', 'generic-elements'),
     140                'placeholder' => __('Accordion Title', 'generic-elements'),
    131141                'label_block' => true,
    132                 'default' => __('Title', 'generic-elements'),
    133                 'placeholder' => __('Title', 'generic-elements'),
    134                 'dynamic' => [
    135                     'active' => true,
    136                 ]
    137142            ]
    138143        );
     
    141146            'faq_des',
    142147            [
    143                 'label' => __('Description', 'generic-elements'),
    144                 'type' => \Elementor\Controls_Manager::TEXTAREA,
    145                 'label_block' => true,
    146                 'default' => __('description', 'generic-elements'),
    147                 'placeholder' => __('description', 'generic-elements'),
    148                 'dynamic' => [
    149                     'active' => true,
    150                 ],
    151             ]
    152         );
    153 
    154         $this->add_control(
    155             'slides',
    156             [
     148                'label' => __('Content', 'generic-elements'),
     149                'default' => __('Accordion Content', 'generic-elements'),
     150                'placeholder' => __('Accordion Content', 'generic-elements'),
     151                'type' => \Elementor\Controls_Manager::WYSIWYG,
    157152                'show_label' => false,
     153            ]
     154        );
     155
     156        $this->add_control(
     157            'accordion_list',
     158            [
     159                'label' => __('Accordion Items', 'generic-elements'),
    158160                'type' => \Elementor\Controls_Manager::REPEATER,
    159161                'fields' => $repeater->get_controls(),
    160                 'title_field' => '<# print(faq_title || "Carousel Item"); #>',
    161162                'default' => [
    162163                    [
    163                         'image' => [
    164                             'url' => \Elementor\Utils::get_placeholder_image_src(),
    165                         ],
     164                        'faq_title' => __('Accordion #1', 'generic-elements'),
     165                        'faq_des' => __('We reimburse all expenses of the Client for the payment of fines and penalties that were caused by mistakes made by us in accounting and tax accounting and reporting.', 'generic-elements'),
    166166                    ],
    167167                    [
    168                         'image' => [
    169                             'url' => \Elementor\Utils::get_placeholder_image_src(),
    170                         ],
    171                     ]
    172                 ]
     168                        'faq_title' => __('Accordion #2', 'generic-elements'),
     169                        'faq_des' => __('We reimburse all expenses of the Client for the payment of fines and penalties that were caused by mistakes made by us in accounting and tax accounting and reporting.', 'generic-elements'),
     170                    ],
     171                    [
     172                        'faq_title' => __('Accordion #3', 'generic-elements'),
     173                        'faq_des' => __('We reimburse all expenses of the Client for the payment of fines and penalties that were caused by mistakes made by us in accounting and tax accounting and reporting.', 'generic-elements'),
     174                    ],
     175                    [
     176                        'faq_title' => __('Accordion #4', 'generic-elements'),
     177                        'faq_des' => __('We reimburse all expenses of the Client for the payment of fines and penalties that were caused by mistakes made by us in accounting and tax accounting and reporting.', 'generic-elements'),
     178                    ],
     179                ],
     180                'title_field' => '{{{ faq_title }}}',
     181            ]
     182        );
     183
     184        $this->add_control(
     185            'title_tag',
     186            [
     187                'label' => __('Title Tag', 'generic-elements'),
     188                'type' => \Elementor\Controls_Manager::SELECT,
     189                'options' => [
     190                    'h1' => 'H1',
     191                    'h2' => 'H2',
     192                    'h3' => 'H3',
     193                    'h4' => 'H4',
     194                    'h5' => 'H5',
     195                    'h6' => 'H6',
     196                    'div' => 'div',
     197                ],
     198                'default' => 'h2',
    173199            ]
    174200        );
     
    733759    {
    734760        $settings = $this->get_settings_for_display();
    735         $gen_extra_class = $settings['gen_extra_class'];
    736         $gen_faq_id = $settings['gen_faq_id'];
     761        extract($settings);
    737762
    738763?>
    739 
    740 
    741764        <div class="generice-el-faq-wrapper <?php echo esc_attr($gen_extra_class); ?>">
    742             <div class="accordion" id="<?php echo $gen_faq_id; ?>">
    743                 <?php foreach ($settings['slides'] as $id => $slide) :
    744                     // active class
    745                     $collapsed_tab = ($id == 0 && $gen_faq_id == 'faq_01') ? '' : 'collapsed';
    746                     $area_expanded = ($id == 0 && $gen_faq_id == 'faq_01') ? 'true' : 'false';
    747                     $active_show_tab = ($id == 0 && $gen_faq_id == 'faq_01') ? 'show' : '';
     765            <div class="accordion" id="<?php echo esc_attr($gen_faq_id); ?>">
     766                <?php foreach ($settings['accordion_list'] as $key => $item) :
     767                    $key_id = $key + 1;
     768                    $collapsed = $item['acc_active_switch'] ? '' : 'collapsed';
     769                    $show = $item['acc_active_switch'] ? 'show' : '';
    748770                ?>
    749771                    <div class="accordion-item">
    750                         <h2 class="accordion-header" id="<?php echo $gen_faq_id; ?>_headingOne<?php echo esc_attr($id); ?>">
    751                             <button class="accordion-button generic-el-title <?php echo esc_attr($collapsed_tab); ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?php echo $gen_faq_id; ?>_collapseOne<?php echo esc_attr($id); ?>" aria-expanded="<?php echo esc_attr($area_expanded); ?>" aria-controls="<?php echo $gen_faq_id; ?>_collapseOne<?php echo esc_attr($id); ?>">
    752                                 <?php echo wp_kses_post($slide['faq_title']); ?>
     772                        <<?php echo esc_attr($title_tag); ?> class="accordion-header" id="<?php echo esc_attr($gen_faq_id); ?>-heading-<?php echo esc_attr($key_id); ?>">
     773                            <button class="accordion-button generic-el-title <?php echo esc_attr($collapsed); ?>" type="button" data-bs-toggle="collapse" data-bs-target="#<?php echo esc_attr($gen_faq_id); ?>-collapse-<?php echo esc_attr($key_id); ?>" aria-expanded="true" aria-controls="<?php echo esc_attr($gen_faq_id); ?>-collapse-<?php echo esc_attr($key_id); ?>">
     774                                <?php echo wp_kses_post($item['faq_title']); ?>
    753775                            </button>
    754                         </h2>
    755                         <div id="<?php echo $gen_faq_id; ?>_collapseOne<?php echo esc_attr($id); ?>" class="accordion-collapse collapse <?php echo esc_attr($active_show_tab); ?>" aria-labelledby="<?php echo $gen_faq_id; ?>_headingOne<?php echo esc_attr($id); ?>" data-bs-parent="#<?php echo $gen_faq_id; ?>">
     776                        </<?php echo esc_attr($title_tag); ?>>
     777                        <div id="<?php echo esc_attr($gen_faq_id); ?>-collapse-<?php echo esc_attr($key_id); ?>" class="accordion-collapse collapse <?php echo esc_attr($show); ?>" aria-labelledby="<?php echo esc_attr($gen_faq_id); ?>-heading-<?php echo esc_attr($key_id); ?>" data-bs-parent="#<?php echo esc_attr($gen_faq_id); ?>">
    756778                            <div class="accordion-body generic-el-desc">
    757                                 <?php echo wp_kses_post($slide['faq_des']); ?>
     779                                <?php echo wp_kses_post($item['faq_des']); ?>
    758780                            </div>
    759781                        </div>
     
    762784            </div>
    763785        </div>
    764 
    765786<?php
    766787    }
Note: See TracChangeset for help on using the changeset viewer.