Plugin Directory

Changeset 3287563


Ignore:
Timestamp:
05/05/2025 08:50:01 AM (11 months ago)
Author:
grzelkowski
Message:

version 1.7.0

Location:
quick-ajax-post-loader/trunk
Files:
3 added
24 edited

Legend:

Unmodified
Added
Removed
  • quick-ajax-post-loader/trunk/DEVELOPER_GUIDE.md

    r3275104 r3287563  
    99992. Click **Add New Shortcode** and fill in the configuration form.
    1001003. Enter the following details:
    101    - **Shortcode Name** - Provide a name for the configuration, e.g., "My Post List."
    102    - **Select Post Type** - Choose the type of content to load (e.g., posts, pages, or custom post types).
    103    - **Show Taxonomy Filter** - Enable or disable filtering by category or tag.
    104    - **Select Taxonomy** - If filtering is enabled, select which taxonomy (e.g., categories, tags) will be used.
    105    - **Posts Per Page** - Define how many posts will be loaded in a single AJAX request.
     101    - **Shortcode Name** - Provide a name for the configuration, e.g., "My Post List."
     102    - **Select Post Type** - Choose the type of content to load (e.g., posts, pages, or custom post types).
     103    - **Show Taxonomy Filter** - Enable or disable filtering by category or tag.
     104    - **Select Taxonomy** - If filtering is enabled, select which taxonomy (e.g., categories, tags) will be used.
     105    - **Select Specific Terms** - If enabled, you can manually choose specific terms to include in the filter.
     106    - **Choose Terms** - Select one or more terms from the selected taxonomy to be available in the filter. If no terms are selected, no results will be shown.
     107    - **Posts Per Page** - Define how many posts will be loaded in a single AJAX request.
    106108
    107109After saving the settings, copy the generated shortcode, e.g.:
     
    934936        'post__not_in' => [3, 66, 999],
    935937        'ignore_sticky_posts' => 1,
     938        'selected_taxonomy' => 'category',
     939        'selected_terms' => [3, 6, 9]
    936940    ];
    937941
     
    942946        'grid_num_columns' => 3,
    943947        'post_item_template' => 'post-item',
    944         'taxonomy_filter_class' => 'class-taxonomy filter-class',
    945         'container_class' => 'container-class',
     948        'taxonomy_filter_class' => 'class-taxonomy, filter-class',
     949        'container_class' => 'container-class, my-style',
    946950        'load_more_posts' => 4,
    947951        'loader_icon' => 'loader-icon',
     
    962966    endif;
    963967
    964     // Set the taxonomy for filtering posts.
    965     $quick_ajax_taxonomy = 'category';
    966 
    967     // Render the navigation for 'category' taxonomy.
     968    // Render the navigation for selected taxonomy.
    968969    if(function_exists('qapl_render_taxonomy_filter')):
    969970        qapl_render_taxonomy_filter(
    970971            $quick_ajax_args,
    971             $quick_ajax_attributes,
    972             $quick_ajax_taxonomy
     972            $quick_ajax_attributes
    973973        );
    974974    endif;
     
    10041004- **$quick_ajax_args** - WP_Query arguments array.
    10051005- **$quick_ajax_attributes** - display attributes array.
    1006 - **$quick_ajax_taxonomy** - taxonomy name (e.g., `'category'`, `'tag'`).
    10071006
    10081007### qapl_render_sort_controls
     
    10431042
    10441043- **post_type** *(string)* - the post type to retrieve, e.g., `'post'`, `'page'`, or custom post types.
    1045 - **posts_per_page** *(int)* - the number of posts displayed per page.
    1046 - **orderby** *(string)* - the sorting criteria for posts, e.g., `'date'`, `'title'`.
     1044- **posts_per_page** *(int)* - number of items to load per AJAX request.
     1045- **orderby** *(string)* - how to sort the results, e.g., `'date'`, `'title'`.
    10471046- **order** *(string)* - the order in which posts are sorted, e.g., `'ASC'`, `'DESC'`.
    1048 - **post__not_in** *(array)* - an array of post IDs to exclude.
    1049 - **ignore_sticky_posts** *(bool)* 
    1050   - `true` - ignores sticky posts.
    1051   - `false` - follows WordPress default behavior.
     1047- **post__not_in** *(array)* - array of post IDs to exclude from the results.
     1048- **ignore_sticky_posts** *(bool)* - whether to ignore sticky posts.
     1049- **selected_taxonomy** *(string)* - slug of the taxonomy to display in the filter navigation (e.g., `'category'`, `'product_color'`).
     1050  Enables rendering of a taxonomy-based filter UI with toggle buttons for terms.
     1051- **selected_terms** *(array)* - array of term IDs that should appear in the filter navigation.
     1052  If not defined or empty, **all terms** from the selected taxonomy will be included.
     1053  If defined, **only the specified terms** will be displayed and used for filtering.
    10521054
    10531055### Example Configuration of $quick_ajax_args
     
    10601062        'post__not_in'        => [3, 66, 100],
    10611063        'ignore_sticky_posts' => true,
     1064        'selected_taxonomy'   => 'category',
     1065        'selected_terms'      => [3, 6, 9]
    10621066    ];
    10631067
  • quick-ajax-post-loader/trunk/admin/admin-pages-config.php

    r3246713 r3287563  
    204204        return $scheme . '-style';
    205205    }
    206     private function add_checkbox_field($field_name, $show_hide_element_id = false, $required = false){
     206    private function add_checkbox_field($field_name, $field_options = [], $required = false) {
    207207        $checked = $this->get_the_value_if_exist($field_name);
    208         $field_container_class = $field_container_data_item = '';
    209         if(!empty($show_hide_element_id) && !is_string($show_hide_element_id) && $show_hide_element_id === true){
    210             $field_container_class =' show-hide-element';
    211         }elseif(!empty($show_hide_element_id) && is_string($show_hide_element_id)){
    212             $show_hide_element = $this->show_hide_element($show_hide_element_id);
    213             $field_container_data_item = $show_hide_element['field_container_data_item'];
    214             $field_container_class = $show_hide_element['field_container_class'];   
    215         }
    216208        $is_required = $required ? 'required' : '';
     209           
     210        $visibility = $this->show_hide_element($field_options);
     211        $field_container_class = $visibility['field_container_class'];
     212        $field_container_data_item = $visibility['field_container_data_item'];
     213       
    217214        $field = '<div class="quick-ajax-field-container quick-ajax-select-field qa-inline-block' . $field_container_class . '"' . $field_container_data_item . '>';
    218215        $field .= '<label for="' . $this->fields[$field_name]['name'] . '">' . $this->fields[$field_name]['label'] . '</label>';
     
    232229        return $field;
    233230    }
    234     private function add_select_field($field_name, $show_hide_element_id = false){
     231   
     232    private function add_select_field($field_name, $field_options = []){
    235233        $current_value = $this->get_the_value_if_exist($field_name);
    236         $show_hide_element = $this->show_hide_element($show_hide_element_id);
    237         $field_container_data_item = $show_hide_element['field_container_data_item'];
    238         $field_container_class = $show_hide_element['field_container_class'];   
    239        
     234        $visibility = $this->show_hide_element($field_options);
     235        $field_container_class = $visibility['field_container_class'];
     236        $field_container_data_item = $visibility['field_container_data_item'];
    240237        $field = '<div class="quick-ajax-field-container quick-ajax-checkbox-field' . $field_container_class . '"' . $field_container_data_item . '>';
    241238        $field .= '<label for="' . esc_attr($this->fields[$field_name]['name']) . '">' . esc_html($this->fields[$field_name]['label']) . '</label>';
    242239        $field .= '<div class="quick-ajax-field">';
    243240        $field .= '<select name="' . esc_attr($this->fields[$field_name]['name']) . '" id="' . esc_attr($this->fields[$field_name]['name']) . '">';
    244 
    245         foreach ($this->fields[$field_name]['options'] as $option) {
    246             $field .= '<option value="' . esc_attr($option['value']) . '"' . selected($current_value, $option['value'], false) . '>';
    247             $field .= esc_html($option['label']);
    248             $field .= '</option>';
     241        if(is_array($this->fields[$field_name]['options'])){
     242            foreach ($this->fields[$field_name]['options'] as $option) {
     243                $field .= '<option value="' . esc_attr($option['value']) . '"' . selected($current_value, $option['value'], false) . '>';
     244                $field .= esc_html($option['label']);
     245                $field .= '</option>';
     246            }
    249247        }
    250248
     
    256254        return $field;
    257255    }
    258     private function add_multiselect_field($field_name, $show_hide_element_id = false) {
     256    private function add_multiselect_field($field_name, $field_options = []) {
    259257        $current_values = $this->get_the_value_if_exist($field_name);
    260         $show_hide_element = $this->show_hide_element($show_hide_element_id);
     258        $show_hide_element = $this->show_hide_element($field_options);
    261259        $field_container_data_item = $show_hide_element['field_container_data_item'];
    262260        $field_container_class = $show_hide_element['field_container_class'];
     
    264262        $field .= '<label>' . esc_html($this->fields[$field_name]['label']) . '</label>';
    265263        $field .= '<div class="quick-ajax-field">';
    266    
    267         foreach ($this->fields[$field_name]['options'] as $option) {
    268             if(is_array($current_values)){
    269                 $checked = in_array($option['value'], $current_values) ? 'checked' : '';
    270             }else{
    271                 $checked = $option['value'] ? 'checked' : '';
    272             }
    273             $field .= '<div class="quick-ajax-multiselect-option">';         
    274             $field .= '<label class="quick-ajax-checkbox">';
    275             $field .= '<input type="checkbox" name="' . esc_attr($this->fields[$field_name]['name']) . '[]" value="' . esc_attr($option['value']) . '" ' . $checked . '>';
    276             $field .= esc_html($option['label']);
    277             $field .= '</label>';
    278             $field .= '</div>';
    279         }
    280    
     264
     265        $field .= '<div class="quick-ajax-field-options" id="' . esc_attr($this->fields[$field_name]['name']) . '">';
     266        if(is_array($this->fields[$field_name]['options'])){
     267            foreach ($this->fields[$field_name]['options'] as $option) {
     268                if(is_array($current_values)){
     269                    $checked = in_array($option['value'], $current_values) ? 'checked' : '';
     270                }else{
     271                    $checked = $option['value'] ? 'checked' : '';
     272                }
     273                $field .= '<div class="quick-ajax-multiselect-option">';         
     274                $field .= '<label class="quick-ajax-checkbox">';
     275                $field .= '<input type="checkbox" name="' . esc_attr($this->fields[$field_name]['name']) . '[]" value="' . esc_attr($option['value']) . '" ' . $checked . '>';
     276                $field .= esc_html($option['label']);
     277                $field .= '</label>';
     278                $field .= '</div>';
     279            }
     280        }elseif(is_string($this->fields[$field_name]['options'])){
     281            $field .= '<div class="quick-ajax-multiselect-option">'.$this->fields[$field_name]['options'].'</div>';
     282        }
     283        $field .= '</div>';
     284       
    281285        $field .= $this->add_field_description($this->fields[$field_name]['description']);
    282286        $field .= '</div>';
     
    286290    }
    287291   
    288     private function add_number_field($field_name, $show_hide_element_id = false){
     292    private function add_number_field($field_name, $field_options = []){
    289293        $current_value = $this->get_the_value_if_exist($field_name);
    290         $show_hide_element = $this->show_hide_element($show_hide_element_id);
     294        $show_hide_element = $this->show_hide_element($field_options);
    291295        $field_container_data_item = $show_hide_element['field_container_data_item'];
    292296        $field_container_class = $show_hide_element['field_container_class'];
     
    302306        return $field;
    303307    }
    304     private function add_text_input_field($field_name, $show_hide_element_id = false){
     308    private function add_text_input_field($field_name, $field_options = []){
    305309        $current_value = $this->get_the_value_if_exist($field_name);
    306         $show_hide_element = $this->show_hide_element($show_hide_element_id);
     310        $show_hide_element = $this->show_hide_element($field_options);
    307311        $field_container_data_item = $show_hide_element['field_container_data_item'];
    308312        $field_container_class = $show_hide_element['field_container_class'];
     
    319323        return $field;
    320324    }
    321     private function add_color_picker_field($field_name, $show_hide_element_id = false){
     325    private function add_color_picker_field($field_name, $field_options = []){
    322326        ob_start();
    323327        $current_value = $this->get_the_value_if_exist($field_name);
    324         $show_hide_element = $this->show_hide_element($show_hide_element_id);
     328        $show_hide_element = $this->show_hide_element($field_options);
    325329        $field_container_data_item = $show_hide_element['field_container_data_item'];
    326330        $field_container_class = $show_hide_element['field_container_class'];
     
    336340        return $field;
    337341    }
    338     private function show_hide_element($show_hide_element_id){
    339         $element_data['field_container_data_item'] = '';
    340         $element_data['field_container_class'] = '';
    341         if(!empty($show_hide_element_id)){
    342             $element_data['field_container_data_item'] = ' data-item="'.$show_hide_element_id.'"';
    343             $toggle_value = $this->get_the_value_if_exist($show_hide_element_id);
    344             if(empty($toggle_value) || $toggle_value == 0){
    345                 $element_data['field_container_class'] = ' inactive';
     342    protected function field_options(array $overrides = []): array {
     343        $defaults = [
     344            'is_trigger' => false,
     345            'visible_if' => [],
     346        ];
     347   
     348        return array_merge($defaults, $overrides);
     349    }   
     350    private function show_hide_element($field_options) {
     351        $element_data = [
     352            'field_container_data_item' => '',
     353            'field_container_class'     => ''
     354        ];
     355   
     356        // check if field is trigger
     357        if (!empty($field_options['is_trigger']) && $field_options['is_trigger'] === true) {
     358            $element_data['field_container_class'] .= ' show-hide-trigger';
     359        }
     360   
     361        // check if field has visibility conditions
     362        if (!empty($field_options['visible_if']) && is_array($field_options['visible_if'])) {
     363           
     364            $conditions = $field_options['visible_if'];
     365            $element_data['field_container_data_item'] = ' data-conditional=\'' . json_encode($conditions) . '\'';
     366           
     367            foreach ($conditions as $field => $expected_value) {
     368                $actual_value = $this->get_the_value_if_exist($field);
     369                if ((string)$actual_value !== (string)$expected_value) {
     370                    $element_data['field_container_class'] .= ' inactive';
     371                    break;
     372                }
    346373            }
    347374        }
    348375        return $element_data;
    349376    }
     377   
    350378    private function add_field_description($field_description) {
    351379        if (!empty($field_description)) {
     
    354382        return '';
    355383    }
    356    
     384    protected function get_taxonomy_options_for_post_type(?string $post_type = null): array{
     385        if (empty($post_type)) {
     386            $post_type = $this->get_the_value_if_exist(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
     387            if (empty($post_type)) {
     388                $post_type = QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type_default_value();
     389            }
     390        }
     391        $taxonomy_options = [];
     392        $post_type_object = get_post_type_object($post_type);
     393        if ($post_type_object) {
     394            $taxonomies = get_object_taxonomies($post_type);
     395            if (!empty($taxonomies)) {
     396                foreach ($taxonomies as $taxonomy) {
     397                    $taxonomy_object = get_taxonomy($taxonomy);
     398                    if ($taxonomy_object) {
     399                        $taxonomy_options[] = [
     400                            'label' => esc_html($taxonomy_object->label),
     401                            'value' => $taxonomy
     402                        ];
     403                    }
     404                }
     405            }
     406        }
     407        if (empty($taxonomy_options)) {
     408            $taxonomy_options[] = [
     409                'label' => esc_html__('No taxonomy found', 'quick-ajax-post-loader'),
     410                'value' => 0
     411            ];
     412        }
     413        return $taxonomy_options;
     414    }
     415    protected function get_term_options_for_taxonomy(?string $taxonomy = null){
     416        if (empty($taxonomy)) {
     417            // try to get taxonomy from saved shortcode value
     418            $taxonomy = $this->get_the_value_if_exist(QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy());
     419        }
     420        if (empty($taxonomy)) {
     421            // try to get first available taxonomy based on post type
     422            $post_type = $this->get_the_value_if_exist(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
     423            if (empty($post_type)) {
     424                // fallback to default post type
     425                $post_type = QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type_default_value();
     426            }
     427            if (!empty($post_type)) {
     428                $taxonomies = get_object_taxonomies($post_type);
     429                if (!empty($taxonomies)) {
     430                    $taxonomy = $taxonomies[0]; // use first found taxonomy
     431                }
     432            }
     433        }
     434   
     435        if (empty($taxonomy)) {
     436            return '<span class="no-options">'.esc_html__('No taxonomy available', 'quick-ajax-post-loader').'</span>';
     437        }
     438        $terms = get_terms([
     439            'taxonomy'   => $taxonomy,
     440            'hide_empty' => false,
     441        ]);
     442        if (empty($terms) || is_wp_error($terms)) {
     443            return '<span class="no-options">'.esc_html__('No terms found', 'quick-ajax-post-loader').'</span>';
     444        }
     445        $options = [];
     446        foreach ($terms as $term) {
     447            $options[] = [
     448                'label' => esc_html($term->name),
     449                'value' => $term->term_id
     450            ];
     451        }
     452        return $options;
     453    }
     454
    357455    protected function create_accordion_block($title, $content){
    358456        return '<div class="quick-ajax-accordion-wrapper">
     
    376474                'tabindex' => array(),
    377475                'data-item' => array(),
     476                'data-conditional' => array(),
    378477                'role' => array(),
    379478                'hidden' => array(),
     
    555654                }
    556655            }
    557         }       
     656        }
     657        //error_log(print_r($_POST, true));
     658        //error_log(print_r($form_data, true));
    558659        $serialized_data = serialize($form_data);
    559660        update_post_meta($post_id, $this->meta_key, $serialized_data);
  • quick-ajax-post-loader/trunk/admin/pages/help/help_en_US.json

    r3275104 r3287563  
    22    "2_shortcodes_configuration": {
    33        "title": "<h4>Configuration &amp; Using Shortcodes</h4>",
    4         "content": "<p>The <strong>Quick Ajax Post Loader</strong> plugin allows dynamic post loading using shortcodes. Shortcodes provide a flexible way to display posts with AJAX-based filtering, sorting, and pagination.</p>\n<p>In this section, you will learn how to:</p>\n<ul>\n<li><strong>Create and configure a shortcode</strong> using the WordPress admin panel.</li>\n<li><strong>Customize sorting, filtering, and layout settings</strong> to match your needs.</li>\n<li><strong>Use the shortcode</strong> inside pages and posts to dynamically load content.</li>\n<li><strong>Test and troubleshoot</strong> shortcode behavior.</li>\n</ul>\n<p>Each subsection provides detailed information on how to fine-tune these settings.</p>\n<h4>Creating a Shortcode</h4>\n<p>To add a new shortcode:</p>\n<ul class=\"ul-numbered\">\n<li>Go to <strong>Quick Ajax &gt; Shortcodes</strong> in the WordPress admin panel.</li>\n<li>Click <strong>Add New Shortcode</strong> and fill in the configuration form.</li>\n<li>Enter the following details:<ul>\n<li><strong>Shortcode Name</strong> - Provide a name for the configuration, e.g., &quot;My Post List.&quot;</li>\n<li><strong>Select Post Type</strong> - Choose the type of content to load (e.g., posts, pages, or custom post types).</li>\n<li><strong>Show Taxonomy Filter</strong> - Enable or disable filtering by category or tag.</li>\n<li><strong>Select Taxonomy</strong> - If filtering is enabled, select which taxonomy (e.g., categories, tags) will be used.</li>\n<li><strong>Posts Per Page</strong> - Define how many posts will be loaded in a single AJAX request.</li>\n</ul>\n</li>\n</ul>\n<p>After saving the settings, copy the generated shortcode, e.g.:</p>\n<pre><code class=\"no-background\">[qapl-quick-ajax id=&quot;125&quot; title=&quot;My Post List&quot;]\n</code></pre>\n<p>Paste it anywhere on a page or post to display dynamically loaded posts.</p>\n<h4>Sorting Settings</h4>\n<p>This section allows you to configure how posts are sorted when loaded via AJAX.</p>\n<ul>\n<li><strong>Default Sort Order</strong> - Choose whether posts should be displayed in ascending or descending order.</li>\n<li><strong>Default Sort By</strong> - Select the sorting criteria (e.g., by title, date, or comment count).</li>\n<li><strong>Show Sorting Button</strong> - Allows users to switch between ascending and descending sorting.</li>\n<li><strong>Available Sorting Options</strong> - Choose which sorting methods will be available (e.g., newest, oldest, most popular).</li>\n<li><strong>Inline Filter &amp; Sorting</strong> - Display sorting and filtering controls in a single row.</li>\n</ul>\n<h4>Additional Settings</h4>\n<p>This section allows you to configure extra AJAX query parameters:</p>\n<ul>\n<li><strong>Excluded Post IDs</strong> - Specify post IDs that should be excluded from the results.</li>\n<li><strong>Ignore Sticky Posts</strong> - Treat sticky posts as regular entries.</li>\n<li><strong>Load Initial Posts via AJAX</strong> - If disabled, the first batch of posts will be pre-rendered in HTML instead of loaded dynamically.</li>\n<li><strong>Enable Infinite Scroll</strong> - Enable this option to automatically load more posts via AJAX as the user scrolls down the page.</li>\n</ul>\n<h4>Layout Settings</h4>\n<p>Customize how posts are displayed:</p>\n<ul>\n<li><strong>Apply Quick AJAX CSS Style</strong> - Use built-in Quick AJAX styles for consistent layout and spacing.</li>\n<li><strong>Number of Columns</strong> - Define the number of columns in the post grid.</li>\n<li><strong>Select Post Item Template</strong> - Choose between the default or a custom post template.</li>\n<li><strong>Add class to taxonomy filter</strong> - Add custom CSS classes to the taxonomy filter section.</li>\n<li><strong>Add class to post container</strong> - Add custom CSS classes to the post container for styling flexibility.</li>\n<li><strong>Custom Load More Post Quantity</strong> - Set how many posts load each time the <strong>&quot;Load More&quot;</strong> button is clicked.</li>\n<li><strong>Override Global Loader Icon</strong> - Customize the loading animation icon displayed during AJAX requests.</li>\n</ul>\n<h4>Using the Shortcode on a Page</h4>\n<p>To insert the shortcode into a post or page:</p>\n<ul class=\"ul-numbered\">\n<li>Open a page or post in the WordPress editor.</li>\n<li>Paste the generated shortcode into the content (use the <strong>Shortcode</strong> block in Gutenberg or the Classic Editor).</li>\n<li>Save changes and preview the page.</li>\n</ul>\n<h4>Testing and Verification</h4>\n<p>After adding the shortcode, verify its behavior:</p>\n<ul>\n<li><strong>Dynamic Loading</strong> - Posts should appear without requiring a full-page reload.</li>\n<li><strong>Filtering</strong> - If filters are enabled, test their functionality.</li>\n<li><strong>Sorting</strong> - Confirm that sorting options modify the post order as expected.</li>\n<li><strong>&quot;Load More&quot; Button</strong> - Check that additional posts load correctly.</li>\n<li><strong>Post Grid Layout</strong> - Ensure that the layout adapts properly to different screen sizes.</li>\n</ul>\n<p>If you encounter issues, return to <strong>Quick Ajax &gt; Shortcodes</strong> settings and adjust the configuration.</p>\n<h4>Shortcode Best Practices</h4>\n<ul>\n<li><strong>Test shortcodes on a staging site</strong> before deploying them to a live website.</li>\n<li><strong>Ensure theme compatibility</strong> - Some themes may override styling, affecting the layout.</li>\n<li><strong>Refer to the documentation</strong> - Learn more about <strong>custom templates, hooks, and the AJAX Function Generator</strong> for advanced customization.</li>\n</ul>"
     4        "content": "<p>The <strong>Quick Ajax Post Loader</strong> plugin allows dynamic post loading using shortcodes. Shortcodes provide a flexible way to display posts with AJAX-based filtering, sorting, and pagination.</p>\n<p>In this section, you will learn how to:</p>\n<ul>\n<li><strong>Create and configure a shortcode</strong> using the WordPress admin panel.</li>\n<li><strong>Customize sorting, filtering, and layout settings</strong> to match your needs.</li>\n<li><strong>Use the shortcode</strong> inside pages and posts to dynamically load content.</li>\n<li><strong>Test and troubleshoot</strong> shortcode behavior.</li>\n</ul>\n<p>Each subsection provides detailed information on how to fine-tune these settings.</p>\n<h4>Creating a Shortcode</h4>\n<p>To add a new shortcode:</p>\n<ul class=\"ul-numbered\">\n<li>Go to <strong>Quick Ajax &gt; Shortcodes</strong> in the WordPress admin panel.</li>\n<li>Click <strong>Add New Shortcode</strong> and fill in the configuration form.</li>\n<li>Enter the following details:<ul>\n<li><strong>Shortcode Name</strong> - Provide a name for the configuration, e.g., &quot;My Post List.&quot;</li>\n<li><strong>Select Post Type</strong> - Choose the type of content to load (e.g., posts, pages, or custom post types).</li>\n<li><strong>Show Taxonomy Filter</strong> - Enable or disable filtering by category or tag.</li>\n<li><strong>Select Taxonomy</strong> - If filtering is enabled, select which taxonomy (e.g., categories, tags) will be used.</li>\n<li><strong>Select Specific Terms</strong> - If enabled, you can manually choose specific terms to include in the filter.</li>\n<li><strong>Choose Terms</strong> - Select one or more terms from the selected taxonomy to be available in the filter. If no terms are selected, no results will be shown.</li>\n<li><strong>Posts Per Page</strong> - Define how many posts will be loaded in a single AJAX request.</li>\n</ul>\n</li>\n</ul>\n<p>After saving the settings, copy the generated shortcode, e.g.:</p>\n<pre><code class=\"no-background\">[qapl-quick-ajax id=&quot;125&quot; title=&quot;My Post List&quot;]\n</code></pre>\n<p>Paste it anywhere on a page or post to display dynamically loaded posts.</p>\n<h4>Sorting Settings</h4>\n<p>This section allows you to configure how posts are sorted when loaded via AJAX.</p>\n<ul>\n<li><strong>Default Sort Order</strong> - Choose whether posts should be displayed in ascending or descending order.</li>\n<li><strong>Default Sort By</strong> - Select the sorting criteria (e.g., by title, date, or comment count).</li>\n<li><strong>Show Sorting Button</strong> - Allows users to switch between ascending and descending sorting.</li>\n<li><strong>Available Sorting Options</strong> - Choose which sorting methods will be available (e.g., newest, oldest, most popular).</li>\n<li><strong>Inline Filter &amp; Sorting</strong> - Display sorting and filtering controls in a single row.</li>\n</ul>\n<h4>Additional Settings</h4>\n<p>This section allows you to configure extra AJAX query parameters:</p>\n<ul>\n<li><strong>Excluded Post IDs</strong> - Specify post IDs that should be excluded from the results.</li>\n<li><strong>Ignore Sticky Posts</strong> - Treat sticky posts as regular entries.</li>\n<li><strong>Load Initial Posts via AJAX</strong> - If disabled, the first batch of posts will be pre-rendered in HTML instead of loaded dynamically.</li>\n<li><strong>Enable Infinite Scroll</strong> - Enable this option to automatically load more posts via AJAX as the user scrolls down the page.</li>\n</ul>\n<h4>Layout Settings</h4>\n<p>Customize how posts are displayed:</p>\n<ul>\n<li><strong>Apply Quick AJAX CSS Style</strong> - Use built-in Quick AJAX styles for consistent layout and spacing.</li>\n<li><strong>Number of Columns</strong> - Define the number of columns in the post grid.</li>\n<li><strong>Select Post Item Template</strong> - Choose between the default or a custom post template.</li>\n<li><strong>Add class to taxonomy filter</strong> - Add custom CSS classes to the taxonomy filter section.</li>\n<li><strong>Add class to post container</strong> - Add custom CSS classes to the post container for styling flexibility.</li>\n<li><strong>Custom Load More Post Quantity</strong> - Set how many posts load each time the <strong>&quot;Load More&quot;</strong> button is clicked.</li>\n<li><strong>Override Global Loader Icon</strong> - Customize the loading animation icon displayed during AJAX requests.</li>\n</ul>\n<h4>Using the Shortcode on a Page</h4>\n<p>To insert the shortcode into a post or page:</p>\n<ul class=\"ul-numbered\">\n<li>Open a page or post in the WordPress editor.</li>\n<li>Paste the generated shortcode into the content (use the <strong>Shortcode</strong> block in Gutenberg or the Classic Editor).</li>\n<li>Save changes and preview the page.</li>\n</ul>\n<h4>Testing and Verification</h4>\n<p>After adding the shortcode, verify its behavior:</p>\n<ul>\n<li><strong>Dynamic Loading</strong> - Posts should appear without requiring a full-page reload.</li>\n<li><strong>Filtering</strong> - If filters are enabled, test their functionality.</li>\n<li><strong>Sorting</strong> - Confirm that sorting options modify the post order as expected.</li>\n<li><strong>&quot;Load More&quot; Button</strong> - Check that additional posts load correctly.</li>\n<li><strong>Post Grid Layout</strong> - Ensure that the layout adapts properly to different screen sizes.</li>\n</ul>\n<p>If you encounter issues, return to <strong>Quick Ajax &gt; Shortcodes</strong> settings and adjust the configuration.</p>\n<h4>Shortcode Best Practices</h4>\n<ul>\n<li><strong>Test shortcodes on a staging site</strong> before deploying them to a live website.</li>\n<li><strong>Ensure theme compatibility</strong> - Some themes may override styling, affecting the layout.</li>\n<li><strong>Refer to the documentation</strong> - Learn more about <strong>custom templates, hooks, and the AJAX Function Generator</strong> for advanced customization.</li>\n</ul>"
    55    },
    66    "3_creating_custom_templates": {
     
    8686    "5_ajax_function_generator": {
    8787        "title": "<h4>AJAX Function Generator</h4>",
    88         "content": "<h4>Description</h4>\n<p>The <strong>AJAX Function Generator</strong> is a tool available in the WordPress admin panel under <strong>Quick Ajax &gt; Settings &amp; Features</strong>, in the <strong>&quot;Function Generator&quot;</strong> tab.<br>It allows you to generate PHP code that can be placed directly in theme files such as <strong>page.php, single.php</strong>, or other page templates.</p>\n<p>The generated code works similarly to shortcodes but provides greater flexibility since it can be embedded in PHP files.</p>\n<h4>Example Code Generated by Function Generator&quot;</h4>\n<p>The following code enables dynamically displaying posts via AJAX without the need to refresh the page.</p>\n<pre><code class=\"no-background\">&lt;?php\n// Define AJAX query parameters for &#39;post&#39; type posts.\n$quick_ajax_args = [\n    &#39;post_type&#39; =&gt; &#39;post&#39;,\n    &#39;posts_per_page&#39; =&gt; 6,\n    &#39;orderby&#39; =&gt; &#39;date&#39;,\n    &#39;order&#39; =&gt; &#39;DESC&#39;,\n    &#39;post__not_in&#39; =&gt; [3, 66, 999],\n    &#39;ignore_sticky_posts&#39; =&gt; 1,\n];\n\n// Define attributes for AJAX.\n$quick_ajax_attributes = [\n    &#39;quick_ajax_id&#39; =&gt; 15298,\n    &#39;quick_ajax_css_style&#39; =&gt; 1,\n    &#39;grid_num_columns&#39; =&gt; 3,\n    &#39;post_item_template&#39; =&gt; &#39;post-item&#39;,\n    &#39;taxonomy_filter_class&#39; =&gt; &#39;class-taxonomy filter-class&#39;,\n    &#39;container_class&#39; =&gt; &#39;container-class&#39;,\n    &#39;load_more_posts&#39; =&gt; 4,\n    &#39;loader_icon&#39; =&gt; &#39;loader-icon&#39;,\n    &#39;ajax_initial_load&#39; =&gt; 1,\n    &#39;infinite_scroll&#39; =&gt; 1\n];\n\n// Set the sort options for the button.\n$quick_ajax_sort_options = [&#39;date-desc&#39;, &#39;date-asc&#39;, &#39;comment_count-desc&#39;, &#39;title-asc&#39;, &#39;title-desc&#39;, &#39;rand&#39;];\n\n// Render the sorting control button.\nif(function_exists(&#39;qapl_render_sort_controls&#39;)):\n    qapl_render_sort_controls(\n        $quick_ajax_args,\n        $quick_ajax_attributes,\n        $quick_ajax_sort_options\n    );\nendif;\n\n// Set the taxonomy for filtering posts.\n$quick_ajax_taxonomy = &#39;category&#39;;\n\n// Render the navigation for &#39;category&#39; taxonomy.\nif(function_exists(&#39;qapl_render_taxonomy_filter&#39;)):\n    qapl_render_taxonomy_filter(\n        $quick_ajax_args,\n        $quick_ajax_attributes,\n        $quick_ajax_taxonomy\n    );\nendif;\n\n// Render the grid for &#39;post&#39; type posts.\nif(function_exists(&#39;qapl_render_post_container&#39;)):\nqapl_render_post_container(\n    $quick_ajax_args,\n    $quick_ajax_attributes\n);\nendif;\n?&gt;\n</code></pre>"
     88        "content": "<h4>Description</h4>\n<p>The <strong>AJAX Function Generator</strong> is a tool available in the WordPress admin panel under <strong>Quick Ajax &gt; Settings &amp; Features</strong>, in the <strong>&quot;Function Generator&quot;</strong> tab.<br>It allows you to generate PHP code that can be placed directly in theme files such as <strong>page.php, single.php</strong>, or other page templates.</p>\n<p>The generated code works similarly to shortcodes but provides greater flexibility since it can be embedded in PHP files.</p>\n<h4>Example Code Generated by Function Generator&quot;</h4>\n<p>The following code enables dynamically displaying posts via AJAX without the need to refresh the page.</p>\n<pre><code class=\"no-background\">&lt;?php\n// Define AJAX query parameters for &#39;post&#39; type posts.\n$quick_ajax_args = [\n    &#39;post_type&#39; =&gt; &#39;post&#39;,\n    &#39;posts_per_page&#39; =&gt; 6,\n    &#39;orderby&#39; =&gt; &#39;date&#39;,\n    &#39;order&#39; =&gt; &#39;DESC&#39;,\n    &#39;post__not_in&#39; =&gt; [3, 66, 999],\n    &#39;ignore_sticky_posts&#39; =&gt; 1,\n    &#39;selected_taxonomy&#39; =&gt; &#39;category&#39;,\n    &#39;selected_terms&#39; =&gt; [3, 6, 9]\n];\n\n// Define attributes for AJAX.\n$quick_ajax_attributes = [\n    &#39;quick_ajax_id&#39; =&gt; 15298,\n    &#39;quick_ajax_css_style&#39; =&gt; 1,\n    &#39;grid_num_columns&#39; =&gt; 3,\n    &#39;post_item_template&#39; =&gt; &#39;post-item&#39;,\n    &#39;taxonomy_filter_class&#39; =&gt; &#39;class-taxonomy, filter-class&#39;,\n    &#39;container_class&#39; =&gt; &#39;container-class, my-style&#39;,\n    &#39;load_more_posts&#39; =&gt; 4,\n    &#39;loader_icon&#39; =&gt; &#39;loader-icon&#39;,\n    &#39;ajax_initial_load&#39; =&gt; 1,\n    &#39;infinite_scroll&#39; =&gt; 1\n];\n\n// Set the sort options for the button.\n$quick_ajax_sort_options = [&#39;date-desc&#39;, &#39;date-asc&#39;, &#39;comment_count-desc&#39;, &#39;title-asc&#39;, &#39;title-desc&#39;, &#39;rand&#39;];\n\n// Render the sorting control button.\nif(function_exists(&#39;qapl_render_sort_controls&#39;)):\n    qapl_render_sort_controls(\n        $quick_ajax_args,\n        $quick_ajax_attributes,\n        $quick_ajax_sort_options\n    );\nendif;\n\n// Render the navigation for selected taxonomy.\nif(function_exists(&#39;qapl_render_taxonomy_filter&#39;)):\n    qapl_render_taxonomy_filter(\n        $quick_ajax_args,\n        $quick_ajax_attributes\n    );\nendif;\n\n// Render the grid for &#39;post&#39; type posts.\nif(function_exists(&#39;qapl_render_post_container&#39;)):\nqapl_render_post_container(\n    $quick_ajax_args,\n    $quick_ajax_attributes\n);\nendif;\n?&gt;\n</code></pre>"
    8989    },
    9090    "5_key_functions_parameters": {
    9191        "title": "<h4>Key Functions &amp; Parameters</h4>",
    92         "content": "<h4>qapl_render_post_container</h4>\n<p>Function responsible for rendering the <strong>grid of dynamically loaded posts</strong>.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n</ul>\n<h4>qapl_render_taxonomy_filter</h4>\n<p>Function that generates <strong>filter buttons</strong> for a selected taxonomy.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n<li><strong>$quick_ajax_taxonomy</strong> - taxonomy name (e.g., <code class=\"code-tag\">&#39;category&#39;</code>, <code class=\"code-tag\">&#39;tag&#39;</code>).</li>\n</ul>\n<h4>qapl_render_sort_controls</h4>\n<p>This function generates <strong>sorting buttons</strong>, allowing users to dynamically change the order of displayed posts without refreshing the page. Users can select different sorting criteria, such as by date, comment count, or title.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n<li><strong>$quick_ajax_sort_options</strong> - available sorting options.</li>\n</ul>\n<h4>Advanced Features Tips</h4>\n<ul>\n<li><strong>Test all changes</strong> in a staging environment before deploying them.  </li>\n<li><strong>Use the generated code</strong> to avoid errors.  </li>\n<li><strong>Customize attributes in the PHP code</strong> instead of relying solely on shortcodes.</li>\n</ul>"
     92        "content": "<h4>qapl_render_post_container</h4>\n<p>Function responsible for rendering the <strong>grid of dynamically loaded posts</strong>.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n</ul>\n<h4>qapl_render_taxonomy_filter</h4>\n<p>Function that generates <strong>filter buttons</strong> for a selected taxonomy.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n</ul>\n<h4>qapl_render_sort_controls</h4>\n<p>This function generates <strong>sorting buttons</strong>, allowing users to dynamically change the order of displayed posts without refreshing the page. Users can select different sorting criteria, such as by date, comment count, or title.</p>\n<p><strong>Parameters:</strong></p>\n<ul>\n<li><strong>$quick_ajax_args</strong> - WP_Query arguments array.</li>\n<li><strong>$quick_ajax_attributes</strong> - display attributes array.</li>\n<li><strong>$quick_ajax_sort_options</strong> - available sorting options.</li>\n</ul>\n<h4>Advanced Features Tips</h4>\n<ul>\n<li><strong>Test all changes</strong> in a staging environment before deploying them.  </li>\n<li><strong>Use the generated code</strong> to avoid errors.  </li>\n<li><strong>Customize attributes in the PHP code</strong> instead of relying solely on shortcodes.</li>\n</ul>"
    9393    },
    9494    "6_configuring_ajax_queries": {
    9595        "title": "<h4>$quick_ajax_args - Configuring AJAX Queries</h4>",
    96         "content": "<p><strong>$quick_ajax_args</strong> is an array of arguments passed to <strong>WP_Query</strong>, which determines which posts are retrieved via AJAX.</p>\n<h4>Available Options:</h4>\n<ul>\n<li><strong>post_type</strong> <em>(string)</em> - the post type to retrieve, e.g., <code class=\"code-tag\">&#39;post&#39;</code>, <code class=\"code-tag\">&#39;page&#39;</code>, or custom post types.</li>\n<li><strong>posts_per_page</strong> <em>(int)</em> - the number of posts displayed per page.</li>\n<li><strong>orderby</strong> <em>(string)</em> - the sorting criteria for posts, e.g., <code class=\"code-tag\">&#39;date&#39;</code>, <code class=\"code-tag\">&#39;title&#39;</code>.</li>\n<li><strong>order</strong> <em>(string)</em> - the order in which posts are sorted, e.g., <code class=\"code-tag\">&#39;ASC&#39;</code>, <code class=\"code-tag\">&#39;DESC&#39;</code>.</li>\n<li><strong>post__not_in</strong> <em>(array)</em> - an array of post IDs to exclude.</li>\n<li><strong>ignore_sticky_posts</strong> <em>(bool)</em>  <ul>\n<li><code class=\"code-tag\">true</code> - ignores sticky posts.</li>\n<li><code class=\"code-tag\">false</code> - follows WordPress default behavior.</li>\n</ul>\n</li>\n</ul>\n<h4>Example Configuration of $quick_ajax_args</h4>\n<pre><code class=\"no-background\">$quick_ajax_args = [\n    &#39;post_type&#39;           =&gt; &#39;post&#39;,\n    &#39;posts_per_page&#39;      =&gt; 6,\n    &#39;orderby&#39;             =&gt; &#39;date&#39;,\n    &#39;order&#39;               =&gt; &#39;DESC&#39;,\n    &#39;post__not_in&#39;        =&gt; [3, 66, 100],\n    &#39;ignore_sticky_posts&#39; =&gt; true,\n];\n</code></pre>\n<p>This setup fetches <strong>the 6 most recent posts</strong>, ignores <strong>sticky posts</strong>, and excludes posts with <strong>IDs 3, 66, and 100</strong>.</p>"
     96        "content": "<p><strong>$quick_ajax_args</strong> is an array of arguments passed to <strong>WP_Query</strong>, which determines which posts are retrieved via AJAX.</p>\n<h4>Available Options:</h4>\n<ul>\n<li><strong>post_type</strong> <em>(string)</em> - the post type to retrieve, e.g., <code class=\"code-tag\">&#39;post&#39;</code>, <code class=\"code-tag\">&#39;page&#39;</code>, or custom post types.</li>\n<li><strong>posts_per_page</strong> <em>(int)</em> - number of items to load per AJAX request.</li>\n<li><strong>orderby</strong> <em>(string)</em> - how to sort the results, e.g., <code class=\"code-tag\">&#39;date&#39;</code>, <code class=\"code-tag\">&#39;title&#39;</code>.</li>\n<li><strong>order</strong> <em>(string)</em> - the order in which posts are sorted, e.g., <code class=\"code-tag\">&#39;ASC&#39;</code>, <code class=\"code-tag\">&#39;DESC&#39;</code>.</li>\n<li><strong>post__not_in</strong> <em>(array)</em> - array of post IDs to exclude from the results.</li>\n<li><strong>ignore_sticky_posts</strong> <em>(bool)</em> - whether to ignore sticky posts.</li>\n<li><strong>selected_taxonomy</strong> <em>(string)</em> - slug of the taxonomy to display in the filter navigation (e.g., <code class=\"code-tag\">&#39;category&#39;</code>, <code class=\"code-tag\">&#39;product_color&#39;</code>).\nEnables rendering of a taxonomy-based filter UI with toggle buttons for terms.</li>\n<li><strong>selected_terms</strong> <em>(array)</em> - array of term IDs that should appear in the filter navigation.\nIf not defined or empty, <strong>all terms</strong> from the selected taxonomy will be included.\nIf defined, <strong>only the specified terms</strong> will be displayed and used for filtering.</li>\n</ul>\n<h4>Example Configuration of $quick_ajax_args</h4>\n<pre><code class=\"no-background\">$quick_ajax_args = [\n    &#39;post_type&#39;           =&gt; &#39;post&#39;,\n    &#39;posts_per_page&#39;      =&gt; 6,\n    &#39;orderby&#39;             =&gt; &#39;date&#39;,\n    &#39;order&#39;               =&gt; &#39;DESC&#39;,\n    &#39;post__not_in&#39;        =&gt; [3, 66, 100],\n    &#39;ignore_sticky_posts&#39; =&gt; true,\n    &#39;selected_taxonomy&#39;   =&gt; &#39;category&#39;,\n    &#39;selected_terms&#39;      =&gt; [3, 6, 9]\n];\n</code></pre>\n<p>This setup fetches <strong>the 6 most recent posts</strong>, ignores <strong>sticky posts</strong>, and excludes posts with <strong>IDs 3, 66, and 100</strong>.</p>"
    9797    },
    9898    "6_configuring_ajax_appearance": {
  • quick-ajax-post-loader/trunk/admin/pages/settings-page.php

    r3275104 r3287563  
    5555            //select taxonomy
    5656            $field_properties = QAPL_Form_Fields_Helper::get_field_select_taxonomy();
     57            $this->create_field($field_properties);
     58            //manual term selection checkbox
     59            $field_properties = QAPL_Form_Fields_Helper::get_field_manual_term_selection();
     60            $this->create_field($field_properties);
     61            //manual selected terms multiselect
     62            $field_properties = QAPL_Form_Fields_Helper::get_field_manual_selected_terms();
    5763            $this->create_field($field_properties);
    5864            //select post status
     
    191197            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
    192198            //show taxonomy checkbox
    193             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter(), true);
    194             //select taxonomy
    195             $taxonomies = array();
    196             $selected_option = $this->get_the_value_if_exist(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
    197             if (empty($selected_option)) {
    198             $selected_option = QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type_default_value();
    199             }
    200             $post_type_object = get_post_type_object($selected_option);
    201             if ($post_type_object) {
    202             $taxonomies = get_object_taxonomies($selected_option);
    203             }
    204             $taxonomy_options = array();
    205             if (!empty($taxonomies)) {
    206                 foreach ($taxonomies as $taxonomy) {
    207                     $taxonomy_object = get_taxonomy($taxonomy);
    208                     if ($taxonomy_object) {
    209                         $taxonomy_options[] = array(
    210                             'label' => esc_html($taxonomy_object->label),
    211                             'value' => esc_attr($taxonomy)
    212                         );
    213                     }
    214                 }
    215             }           
    216             $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]['options'] = $taxonomy_options;
    217             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy(), QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter());
     199            $field_options = $this->field_options([
     200                'is_trigger' => true,
     201            ]);
     202            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter(), $field_options);
     203            //taxonomy select option
     204            $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]['options'] = $this->get_taxonomy_options_for_post_type();
     205            $field_options = $this->field_options([
     206                'is_trigger' => false,
     207                'visible_if' => [
     208                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     209                ]
     210            ]);
     211            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy(), $field_options);
    218212            //$form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_status());
     213            // manual term selection checkbox
     214            $field_options = $this->field_options([
     215                'is_trigger' => true,
     216                'visible_if' => [
     217                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     218                ]
     219            ]);
     220            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection(), $field_options);
     221           
     222            // assign term options to field
     223            $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms()]['options'] = $this->get_term_options_for_taxonomy();
     224
     225            // render field with multiple conditions
     226            $field_options = $this->field_options([
     227                'visible_if' => [
     228                    QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection() => '1',
     229                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     230                ]
     231            ]);
     232            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms(), $field_options);
     233
     234            //end manual term selection checkbox
    219235            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_posts_per_page());
    220236            $form_tab_function_generator .= '</div>';
     
    224240            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_order());
    225241            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_orderby());
    226             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button(), true);
    227             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options(), QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button());
     242            $field_options = $this->field_options([
     243                'is_trigger' => true,
     244            ]); 
     245            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button(), $field_options);
     246            $field_options = $this->field_options([
     247                'visible_if' => [
     248                    QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button() => '1'
     249                ]
     250            ]);
     251            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options(), $field_options);
    228252            $form_tab_function_generator .= '</div>';
    229253            $form_tab_function_generator .= '<div class="quick-ajax-layout-settings" style="margin-top:20px">';
     
    238262            $form_tab_function_generator .= '<h4>'.__('Layout Settings', 'quick-ajax-post-loader').'</h4>';
    239263            //Layout Settings
    240             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style(), true);
    241             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty(), QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style());
     264            $field_options = $this->field_options([
     265                'is_trigger' => true,
     266            ]);
     267            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style(), $field_options);
     268            $field_options = $this->field_options([
     269                'visible_if' => [
     270                    QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style() => '1'
     271                ]
     272            ]);
     273            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty(), $field_options);
    242274            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template());
    243             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class(), QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter());
     275            $field_options = $this->field_options([
     276                'is_trigger' => false,
     277                'visible_if' => [
     278                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     279                ]
     280            ]);
     281            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class(), $field_options);
    244282            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class());
    245             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity(), true);
    246             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity(), QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity());
    247             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon(),true);
    248             $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon(), QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon());
     283            $field_options = $this->field_options([
     284                'is_trigger' => true,
     285            ]);
     286            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity(), $field_options);
     287            $field_options = $this->field_options([
     288                'is_trigger' => false,
     289                'visible_if' => [
     290                    QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity() => '1'
     291                ]
     292            ]);
     293            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity(), $field_options);
     294            $field_options = $this->field_options([
     295                'is_trigger' => true,
     296            ]);
     297            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon(), $field_options);
     298            $field_options = $this->field_options([
     299                'is_trigger' => false,
     300                'visible_if' => [
     301                    QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon() => '1'
     302                ]
     303            ]);
     304            $form_tab_function_generator .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon(), $field_options);
    249305            $form_tab_function_generator .= '</div>';
    250306            $form_tab_function_generator .= '</div>';
  • quick-ajax-post-loader/trunk/admin/pages/shortcode-page.php

    r3269883 r3287563  
    3232            $field_properties = QAPL_Form_Fields_Helper::get_field_select_taxonomy();
    3333            $this->create_field($field_properties);
     34            //manual term selection checkbox
     35            $field_properties = QAPL_Form_Fields_Helper::get_field_manual_term_selection();
     36            $this->create_field($field_properties);
     37            //manual selected terms multiselect
     38            $field_properties = QAPL_Form_Fields_Helper::get_field_manual_selected_terms();
     39            $this->create_field($field_properties);
    3440            //post per page number
    3541            $field_properties = QAPL_Form_Fields_Helper::get_field_select_posts_per_page();
    3642            $this->create_field($field_properties);
    3743            //select post order
    38             $field_properties = QAPL_Form_Fields_Helper::get_field_select_order();       
     44            $field_properties = QAPL_Form_Fields_Helper::get_field_select_order();
    3945            $this->create_field($field_properties);
    4046            //select post orderby
    41             $field_properties = QAPL_Form_Fields_Helper::get_field_select_orderby();   
     47            $field_properties = QAPL_Form_Fields_Helper::get_field_select_orderby();
    4248            $this->create_field($field_properties);
    4349
    4450            //show sort button
    45             $field_properties = QAPL_Form_Fields_Helper::get_field_show_sort_button();       
     51            $field_properties = QAPL_Form_Fields_Helper::get_field_show_sort_button();
    4652            $this->create_field($field_properties);
    4753            //select sort options
    48             $field_properties = QAPL_Form_Fields_Helper::get_field_select_sort_button_options();   
    49             $this->create_field($field_properties);
    50             $field_properties = QAPL_Form_Fields_Helper::get_field_show_inline_filter_sorting();   
     54            $field_properties = QAPL_Form_Fields_Helper::get_field_select_sort_button_options();
     55            $this->create_field($field_properties);
     56            $field_properties = QAPL_Form_Fields_Helper::get_field_show_inline_filter_sorting();
    5157            $this->create_field($field_properties);
    5258
     
    104110            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
    105111            //show taxonomy checkbox
    106             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter(), true);
     112            $field_options = $this->field_options([
     113                'is_trigger' => true,
     114            ]);   
     115            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter(), $field_options);
    107116            //select taxonomy
    108             $taxonomies = array();
    109             $selected_option = $this->get_the_value_if_exist(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
    110             if (empty($selected_option)) {
    111                 $selected_option = QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type_default_value();
    112             }
    113             $post_type_object = get_post_type_object($selected_option);
    114             if ($post_type_object) {
    115                 $taxonomies = get_object_taxonomies($selected_option);
    116             }
    117             $taxonomy_options = array();
    118             if (!empty($taxonomies)){
    119                 foreach ($taxonomies as $taxonomy) :
    120                         $taxonomy_object = get_taxonomy($taxonomy);
    121                         if ($taxonomy_object) :
    122                         $taxonomy_options[] = array(
    123                             'label' => esc_html($taxonomy_object->label),
    124                             'value' => $taxonomy
    125                         );
    126                         endif;
    127                 endforeach;
    128             }else{
    129                 $taxonomy_options[] = array(
    130                     'label' => esc_html__('No taxonomy found', 'quick-ajax-post-loader'),
    131                     'value' => 0
    132                 );
    133             }
    134             $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]['options'] = $taxonomy_options;
    135             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy(), QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter());
     117            $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]['options'] = $this->get_taxonomy_options_for_post_type();           
     118            $field_options = $this->field_options([
     119                'is_trigger' => false,
     120                'visible_if' => [
     121                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     122                ]
     123            ]);           
     124            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy(), $field_options);
    136125            //$shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_post_status());
     126
     127            // manual term selection checkbox
     128            $field_options = $this->field_options([
     129                'is_trigger' => true,
     130                'visible_if' => [
     131                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     132                ]
     133            ]);
     134            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection(), $field_options);
     135           
     136            // assign term options to field
     137            $this->fields[QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms()]['options'] = $this->get_term_options_for_taxonomy();
     138
     139            // render field with multiple conditions
     140            $field_options = $this->field_options([
     141                'visible_if' => [
     142                    QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection() => '1',
     143                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     144                ]
     145            ]);
     146            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms(), $field_options);
     147
     148            //end manual term selection checkbox
    137149            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_posts_per_page());
    138150            $shortcode_page .= '</div>';
     
    141153            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_order());
    142154            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_orderby());
    143             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button(), true);
    144             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options(), QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button());
    145             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting(), QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button());
     155            $field_options = $this->field_options([
     156                'is_trigger' => true,
     157            ]); 
     158            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button(), $field_options);
     159            $field_options = $this->field_options([
     160                'visible_if' => [
     161                    QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button() => '1'
     162                ]
     163            ]);
     164            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options(), $field_options);
     165            $field_options = $this->field_options([
     166                'visible_if' => [
     167                    QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button() => '1'
     168                ]
     169            ]);
     170            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting(), $field_options);
    146171            $shortcode_page .= '</div>';
    147172            $shortcode_page .= '<div class="quick-ajax-layout-settings" style="margin-top:20px">';
     
    157182            $shortcode_page .= '<div class="quick-ajax-layout-settings" style="margin-top:20px">';
    158183            $shortcode_page .= '<h4>'.esc_html__('layout Settings', 'quick-ajax-post-loader').'</h4>';
    159             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style(),true);
    160             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty(), QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style());
     184            $field_options = $this->field_options([
     185                'is_trigger' => true,
     186            ]);
     187            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style(), $field_options);
     188            $field_options = $this->field_options([
     189                'visible_if' => [
     190                    QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style() => '1'
     191                ]
     192            ]);
     193            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty(), $field_options);
    161194            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template());
    162             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class(), QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter());
     195            $field_options = $this->field_options([
     196                'is_trigger' => false,
     197                'visible_if' => [
     198                    QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter() => '1'
     199                ]
     200            ]);
     201            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class(), $field_options);
    163202            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class());
    164             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity(),true);
    165             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity(), QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity());
    166             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon(),true);
    167             $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon(), QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon());
     203            $field_options = $this->field_options([
     204                'is_trigger' => true,
     205            ]);
     206            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity(),$field_options);
     207            $field_options = $this->field_options([
     208                'is_trigger' => false,
     209                'visible_if' => [
     210                    QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity() => '1'
     211                ]
     212            ]);
     213            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity(), $field_options);
     214            $field_options = $this->field_options([
     215                'is_trigger' => true,
     216            ]);
     217            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon(), $field_options);
     218            $field_options = $this->field_options([
     219                'is_trigger' => false,
     220                'visible_if' => [
     221                    QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon() => '1'
     222                ]
     223            ]);
     224            $shortcode_page .= $this->add_field(QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon(), $field_options);
    168225            $shortcode_page .= '</div>';
    169226
  • quick-ajax-post-loader/trunk/css/admin-style.css

    r3258744 r3287563  
    230230    margin-top: 6px;
    231231}
    232 .quick-ajax-form-wrap .quick-ajax-field-container > .quick-ajax-field{
     232.quick-ajax-form-wrap .quick-ajax-field-container > .quick-ajax-field {
    233233    max-width: 580px;
    234234    width: calc(100% - 210px);
     
    240240    width: 100%;
    241241}
    242 .quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field{
     242.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options{
    243243    display: -webkit-box;
    244244    display: -ms-flexbox;
     
    247247        flex-wrap: wrap;
    248248}
    249 .quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field > .quick-ajax-multiselect-option{
     249.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options > .quick-ajax-multiselect-option{
    250250    -webkit-box-flex: 0;
    251251        -ms-flex: 0 1 calc(100% / 3);
    252252            flex: 0 1 calc(100% / 3);
    253     min-width: 200px;   
     253    min-width: 180px;   
    254254    padding:6px 0;
     255    min-height: 32px;
    255256    -webkit-box-sizing: border-box;
    256257            box-sizing: border-box;
    257258}
    258 .quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field > .quick-ajax-multiselect-option label{
     259.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options > .quick-ajax-multiselect-option label{
    259260    cursor:pointer;
    260261}
     
    369370    max-width: 580px;
    370371}
    371 .function-generator-options .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field > .quick-ajax-multiselect-option{
     372.function-generator-options .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options > .quick-ajax-multiselect-option{
    372373    min-width: 50%;
    373374}
     
    526527    margin-top: -1px;
    527528}
     529
     530/* content loader animation */
     531.qapl-admin-page-loader {
     532    position: relative;
     533    height: 20px;
     534    width: 40px;
     535    padding:6px 0;
     536    margin-left: 0;
     537    vertical-align: middle;
     538}
     539
     540.qapl-admin-page-loader span {
     541    position: absolute;
     542    top: 50%;
     543    left: 0;
     544    width: 6px;
     545    height: 6px;
     546    background-color: #50575e;
     547    border-radius: 50%;
     548    -webkit-transform: translate(0, -50%);
     549        -ms-transform: translate(0, -50%);
     550            transform: translate(0, -50%);
     551    opacity: 0;
     552    -webkit-animation: qapl-admin-loader-animation 1.8s linear infinite;
     553            animation: qapl-admin-loader-animation 1.8s linear infinite;
     554}
     555.qapl-admin-page-loader span:nth-child(1) {
     556    -webkit-animation-delay: 0s;
     557            animation-delay: 0s;
     558}
     559.qapl-admin-page-loader span:nth-child(2) {
     560    -webkit-animation-delay: 0.6s;
     561            animation-delay: 0.6s;
     562}
     563.qapl-admin-page-loader span:nth-child(3) {
     564    -webkit-animation-delay: 1.2s;
     565            animation-delay: 1.2s;
     566}
     567@-webkit-keyframes qapl-admin-loader-animation {
     568    0% {
     569        -webkit-transform: translate(0, -50%);
     570                transform: translate(0, -50%);
     571        opacity: 0;
     572    }
     573    10% {
     574        opacity: 1;
     575    }
     576    50% {
     577        -webkit-transform: translate(20px, -50%);
     578                transform: translate(20px, -50%);
     579        opacity: 1;
     580    }
     581    90% {
     582        opacity: 0;
     583    }
     584    100% {
     585        -webkit-transform: translate(40px, -50%);
     586                transform: translate(40px, -50%);
     587        opacity: 0;
     588    }
     589}
     590@keyframes qapl-admin-loader-animation {
     591    0% {
     592        -webkit-transform: translate(0, -50%);
     593                transform: translate(0, -50%);
     594        opacity: 0;
     595    }
     596    10% {
     597        opacity: 1;
     598    }
     599    50% {
     600        -webkit-transform: translate(20px, -50%);
     601                transform: translate(20px, -50%);
     602        opacity: 1;
     603    }
     604    90% {
     605        opacity: 0;
     606    }
     607    100% {
     608        -webkit-transform: translate(40px, -50%);
     609                transform: translate(40px, -50%);
     610        opacity: 0;
     611    }
     612}
     613
     614
     615
     616
  • quick-ajax-post-loader/trunk/css/admin-style.min.css

    r3258744 r3287563  
    1 input:checked+.switch{background-color:#2271b1}.light-style input:checked+.switch{background-color:#04a4cc}.light-style select:focus{border-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #04a4cc;box-shadow:0 0 0 1px #04a4cc}.modern-style input:checked+.switch{background-color:#3858e9}.modern-style select:focus{border-color:#3858e9;-webkit-box-shadow:0 0 0 1px #3858e9;box-shadow:0 0 0 1px #3858e9}.blue-style input:checked+.switch{background-color:#e1a948}.blue-style select:focus{border-color:#e1a948;-webkit-box-shadow:0 0 0 1px #e1a948;box-shadow:0 0 0 1px #e1a948}.coffee-style input:checked+.switch{background-color:#c7a589}.coffee-style select:focus{border-color:#c7a589;-webkit-box-shadow:0 0 0 1px #c7a589;box-shadow:0 0 0 1px #c7a589}.ectoplasm-style input:checked+.switch{background-color:#a3b745}.ectoplasm-style select:focus{border-color:#a3b745;-webkit-box-shadow:0 0 0 1px #a3b745;box-shadow:0 0 0 1px #a3b745}.midnight-style input:checked+.switch{background-color:#e14d43}.midnight-style select:focus{border-color:#e14d43;-webkit-box-shadow:0 0 0 1px #e14d43;box-shadow:0 0 0 1px #e14d43}.ocean-style input:checked+.switch{background-color:#9ebaa0}.ocean-style select:focus{border-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #9ebaa0;box-shadow:0 0 0 1px #9ebaa0}.sunrise-style input:checked+.switch{background-color:#dd823b}.sunrise-style select:focus{border-color:#dd823b;-webkit-box-shadow:0 0 0 1px #dd823b;box-shadow:0 0 0 1px #dd823b}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#2271b1}.light-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.light-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#04a4cc}.modern-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.modern-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#3858e9}.blue-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.blue-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#e1a948}.coffee-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.coffee-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#c7a589}.ectoplasm-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.ectoplasm-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#a3b745}.midnight-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.midnight-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#e14d43}.ocean-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.ocean-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#9ebaa0}.sunrise-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.sunrise-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#dd823b}#shortcode-box-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:10px}#shortcode-box-wrap .shortcode-description{padding:0 14px}#shortcode-box-wrap code{line-height:2;padding:10px 10px 11px;border:1px solid #8c8f94;border-radius:3px;background:rgba(255,255,255,.5);cursor:pointer;-webkit-transition:.3s;transition:.3s}.switch-checkbox{display:inline-block;min-height:30px}.switch-wrap{position:relative;width:40px;height:20px;margin-top:6px}.switch-wrap input{opacity:0;width:0;height:0}.switch{border-radius:12px}.switch:before{border-radius:50%}input+.switch{position:absolute;cursor:pointer;top:-1px;left:0;right:0;bottom:1px;background-color:#ccc;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5);-webkit-transition:.3s;transition:.3s}.switch:before{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.switch{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5)}input:focus+.switch{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5)}input:checked+.switch:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}.quick-ajax-form-wrap{margin-top:2rem;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.quick-ajax-form-wrap .quick-ajax-field-container{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;margin-bottom:1rem;visibility:visible;opacity:1;-webkit-transition:.15s;transition:.15s}.quick-ajax-form-wrap .quick-ajax-field-container.inactive{visibility:hidden;opacity:0;height:0;margin-bottom:0;-webkit-transition:.15s;transition:.15s}.quick-ajax-form-wrap .quick-ajax-field-container>label{width:210px;margin-top:6px}.quick-ajax-form-wrap .quick-ajax-field-container>.quick-ajax-field{max-width:580px;width:calc(100% - 210px)}.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>div,.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>input,.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>select{max-width:100%;width:100%}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field>.quick-ajax-multiselect-option{-webkit-box-flex:0;-ms-flex:0 1 calc(100% / 3);flex:0 1 calc(100% / 3);min-width:200px;padding:6px 0;-webkit-box-sizing:border-box;box-sizing:border-box}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field>.quick-ajax-multiselect-option label{cursor:pointer}.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field-desc{margin-top:5px;margin-bottom:0;color:#50575e;font-style:italic}.quick-ajax-form-wrap .quick-ajax-field-container>input,.quick-ajax-form-wrap .quick-ajax-field-container>select{padding:0 6px;margin:0}@media (max-width:782px){.quick-ajax-form-wrap .quick-ajax-field-container>label{-ms-flex-preferred-size:100%;flex-basis:100%;margin-top:0;margin-right:0}.quick-ajax-form-wrap .quick-ajax-field-container>.quick-ajax-field{-ms-flex-preferred-size:100%;flex-basis:100%}}.quick-ajax-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;overflow:hidden}.quick-ajax-tabs:before{content:'';position:absolute;width:100%;bottom:0;height:1px;background-color:#c3c4c7}.quick-ajax-tab-button{position:relative;padding:5px 10px;cursor:pointer;z-index:0;background:#dcdcdc;border:1px solid #c3c4c7;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0 5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-tab-button:first-of-type{margin-left:0}.quick-ajax-tab-button:hover{-webkit-transition:all .3s ease;transition:all .3s ease;background:#f6f7f7}.quick-ajax-tab-button.active{background:#fff;z-index:1;border-bottom:1px solid #fff;-webkit-transition:all .1s ease;transition:all .1s ease}.quick-ajax-tab-content,.quick-ajax-tab-content[hidden]{position:relative;background:#fff;padding:1rem;border:1px solid #c3c4c7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);display:none}.quick-ajax-tab-content.active{display:block}.quick-ajax-tab-content+.quick-ajax-tab-content,.quick-ajax-tabs+.quick-ajax-tab-content{border-top:none}.function-generator-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-column-gap:100px;-moz-column-gap:100px;column-gap:100px}.function-generator-options{max-width:580px}.function-generator-options .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field>.quick-ajax-multiselect-option{min-width:50%}.function-generator-result{width:auto;-webkit-box-flex:1;-ms-flex:1;flex:1;max-width:480px}.function-generator-result>pre{overflow:auto}@media (max-width:1200px){.function-generator-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.function-generator-options,function-generator-result{width:100%;max-width:unset}}.quick-ajax-form-wrap code.no-background{background:0 0;padding:3px 0 2px;font-size:14px}.quick-ajax-form-wrap code.code-tag{padding:2px 4px 3px;margin:0 1px;background:rgba(0,0,0,.07)}.quick-ajax-form-wrap pre{white-space:pre-wrap;word-wrap:break-word}.quick-ajax-form-wrap ul.ul-numbered{list-style-type:decimal;padding-left:13px}.quick-ajax-form-wrap li ul{margin-top:6px}.quick-ajax-accordion-wrapper{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden;margin-bottom:1rem}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1em 1.5em;background:#fff;border:1px solid #c3c4c7;cursor:pointer;outline:unset}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:hover{background:#f6f7f7}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-width:2px;outline-style:solid;outline-offset:-2px;background-color:#f6f7f7;z-index:1}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active{background:#fff}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active:hover{background:#f6f7f7}.quick-ajax-accordion-wrapper .accordion-title{font-size:13px;font-weight:600;margin:0}.quick-ajax-accordion-wrapper .accordion-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transform:rotateX(0);transform:rotateX(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active .accordion-icon{-webkit-transform:rotateX(180deg);transform:rotateX(180deg);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.quick-ajax-accordion-wrapper .accordion-icon span{pointer-events:none;position:absolute;border:solid #50575e;border-width:0 2px 2px 0;height:.5rem;width:.5rem;top:50%;right:0;-webkit-transform:translateY(-70%) rotate(45deg);-ms-transform:translateY(-70%) rotate(45deg);transform:translateY(-70%) rotate(45deg)}.quick-ajax-accordion-wrapper .quick-ajax-accordion-content{display:none;border:1px solid #c3c4c7;border-top:none;padding:0 1.5em 1em 1.5em}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active+.quick-ajax-accordion-content:before{content:"";position:absolute;display:block;background:#fff;height:1px;left:1px;right:1px;margin-top:-1px}
     1input:checked+.switch{background-color:#2271b1}.light-style input:checked+.switch{background-color:#04a4cc}.light-style select:focus{border-color:#04a4cc;-webkit-box-shadow:0 0 0 1px #04a4cc;box-shadow:0 0 0 1px #04a4cc}.modern-style input:checked+.switch{background-color:#3858e9}.modern-style select:focus{border-color:#3858e9;-webkit-box-shadow:0 0 0 1px #3858e9;box-shadow:0 0 0 1px #3858e9}.blue-style input:checked+.switch{background-color:#e1a948}.blue-style select:focus{border-color:#e1a948;-webkit-box-shadow:0 0 0 1px #e1a948;box-shadow:0 0 0 1px #e1a948}.coffee-style input:checked+.switch{background-color:#c7a589}.coffee-style select:focus{border-color:#c7a589;-webkit-box-shadow:0 0 0 1px #c7a589;box-shadow:0 0 0 1px #c7a589}.ectoplasm-style input:checked+.switch{background-color:#a3b745}.ectoplasm-style select:focus{border-color:#a3b745;-webkit-box-shadow:0 0 0 1px #a3b745;box-shadow:0 0 0 1px #a3b745}.midnight-style input:checked+.switch{background-color:#e14d43}.midnight-style select:focus{border-color:#e14d43;-webkit-box-shadow:0 0 0 1px #e14d43;box-shadow:0 0 0 1px #e14d43}.ocean-style input:checked+.switch{background-color:#9ebaa0}.ocean-style select:focus{border-color:#9ebaa0;-webkit-box-shadow:0 0 0 1px #9ebaa0;box-shadow:0 0 0 1px #9ebaa0}.sunrise-style input:checked+.switch{background-color:#dd823b}.sunrise-style select:focus{border-color:#dd823b;-webkit-box-shadow:0 0 0 1px #dd823b;box-shadow:0 0 0 1px #dd823b}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#2271b1}.light-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.light-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#04a4cc}.modern-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.modern-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#3858e9}.blue-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.blue-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#e1a948}.coffee-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.coffee-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#c7a589}.ectoplasm-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.ectoplasm-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#a3b745}.midnight-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.midnight-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#e14d43}.ocean-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.ocean-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#9ebaa0}.sunrise-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.sunrise-style .quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-color:#dd823b}#shortcode-box-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:10px}#shortcode-box-wrap .shortcode-description{padding:0 14px}#shortcode-box-wrap code{line-height:2;padding:10px 10px 11px;border:1px solid #8c8f94;border-radius:3px;background:rgba(255,255,255,.5);cursor:pointer;-webkit-transition:.3s;transition:.3s}.switch-checkbox{display:inline-block;min-height:30px}.switch-wrap{position:relative;width:40px;height:20px;margin-top:6px}.switch-wrap input{opacity:0;width:0;height:0}.switch{border-radius:12px}.switch:before{border-radius:50%}input+.switch{position:absolute;cursor:pointer;top:-1px;left:0;right:0;bottom:1px;background-color:#ccc;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5);-webkit-transition:.3s;transition:.3s}.switch:before{position:absolute;content:"";height:14px;width:14px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.switch{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5)}input:focus+.switch{-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,.5);box-shadow:inset 0 0 3px rgba(0,0,0,.5)}input:checked+.switch:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}.quick-ajax-form-wrap{margin-top:2rem;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.quick-ajax-form-wrap .quick-ajax-field-container{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;margin-bottom:1rem;visibility:visible;opacity:1;-webkit-transition:.15s;transition:.15s}.quick-ajax-form-wrap .quick-ajax-field-container.inactive{visibility:hidden;opacity:0;height:0;margin-bottom:0;-webkit-transition:.15s;transition:.15s}.quick-ajax-form-wrap .quick-ajax-field-container>label{width:210px;margin-top:6px}.quick-ajax-form-wrap .quick-ajax-field-container>.quick-ajax-field{max-width:580px;width:calc(100% - 210px)}.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>div,.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>input,.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field>select{max-width:100%;width:100%}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options>.quick-ajax-multiselect-option{-webkit-box-flex:0;-ms-flex:0 1 calc(100% / 3);flex:0 1 calc(100% / 3);min-width:180px;padding:6px 0;min-height:32px;-webkit-box-sizing:border-box;box-sizing:border-box}.quick-ajax-form-wrap .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options>.quick-ajax-multiselect-option label{cursor:pointer}.quick-ajax-form-wrap .quick-ajax-field-container .quick-ajax-field-desc{margin-top:5px;margin-bottom:0;color:#50575e;font-style:italic}.quick-ajax-form-wrap .quick-ajax-field-container>input,.quick-ajax-form-wrap .quick-ajax-field-container>select{padding:0 6px;margin:0}@media (max-width:782px){.quick-ajax-form-wrap .quick-ajax-field-container>label{-ms-flex-preferred-size:100%;flex-basis:100%;margin-top:0;margin-right:0}.quick-ajax-form-wrap .quick-ajax-field-container>.quick-ajax-field{-ms-flex-preferred-size:100%;flex-basis:100%}}.quick-ajax-tabs{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;overflow:hidden}.quick-ajax-tabs:before{content:'';position:absolute;width:100%;bottom:0;height:1px;background-color:#c3c4c7}.quick-ajax-tab-button{position:relative;padding:5px 10px;cursor:pointer;z-index:0;background:#dcdcdc;border:1px solid #c3c4c7;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0 5px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-tab-button:first-of-type{margin-left:0}.quick-ajax-tab-button:hover{-webkit-transition:all .3s ease;transition:all .3s ease;background:#f6f7f7}.quick-ajax-tab-button.active{background:#fff;z-index:1;border-bottom:1px solid #fff;-webkit-transition:all .1s ease;transition:all .1s ease}.quick-ajax-tab-content,.quick-ajax-tab-content[hidden]{position:relative;background:#fff;padding:1rem;border:1px solid #c3c4c7;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);display:none}.quick-ajax-tab-content.active{display:block}.quick-ajax-tab-content+.quick-ajax-tab-content,.quick-ajax-tabs+.quick-ajax-tab-content{border-top:none}.function-generator-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-column-gap:100px;-moz-column-gap:100px;column-gap:100px}.function-generator-options{max-width:580px}.function-generator-options .quick-ajax-field-container.quick-ajax-multiselect-field .quick-ajax-field .quick-ajax-field-options>.quick-ajax-multiselect-option{min-width:50%}.function-generator-result{width:auto;-webkit-box-flex:1;-ms-flex:1;flex:1;max-width:480px}.function-generator-result>pre{overflow:auto}@media (max-width:1200px){.function-generator-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.function-generator-options,function-generator-result{width:100%;max-width:unset}}.quick-ajax-form-wrap code.no-background{background:0 0;padding:3px 0 2px;font-size:14px}.quick-ajax-form-wrap code.code-tag{padding:2px 4px 3px;margin:0 1px;background:rgba(0,0,0,.07)}.quick-ajax-form-wrap pre{white-space:pre-wrap;word-wrap:break-word}.quick-ajax-form-wrap ul.ul-numbered{list-style-type:decimal;padding-left:13px}.quick-ajax-form-wrap li ul{margin-top:6px}.quick-ajax-accordion-wrapper{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden;margin-bottom:1rem}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1em 1.5em;background:#fff;border:1px solid #c3c4c7;cursor:pointer;outline:unset}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:hover{background:#f6f7f7}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:active,.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle:focus{outline-width:2px;outline-style:solid;outline-offset:-2px;background-color:#f6f7f7;z-index:1}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active{background:#fff}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active:hover{background:#f6f7f7}.quick-ajax-accordion-wrapper .accordion-title{font-size:13px;font-weight:600;margin:0}.quick-ajax-accordion-wrapper .accordion-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transform:rotateX(0);transform:rotateX(0);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active .accordion-icon{-webkit-transform:rotateX(180deg);transform:rotateX(180deg);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.quick-ajax-accordion-wrapper .accordion-icon span{pointer-events:none;position:absolute;border:solid #50575e;border-width:0 2px 2px 0;height:.5rem;width:.5rem;top:50%;right:0;-webkit-transform:translateY(-70%) rotate(45deg);-ms-transform:translateY(-70%) rotate(45deg);transform:translateY(-70%) rotate(45deg)}.quick-ajax-accordion-wrapper .quick-ajax-accordion-content{display:none;border:1px solid #c3c4c7;border-top:none;padding:0 1.5em 1em 1.5em}.quick-ajax-accordion-wrapper .quick-ajax-accordion-toggle.active+.quick-ajax-accordion-content:before{content:"";position:absolute;display:block;background:#fff;height:1px;left:1px;right:1px;margin-top:-1px}.qapl-admin-page-loader{position:relative;height:20px;width:40px;padding:6px 0;margin-left:0;vertical-align:middle}.qapl-admin-page-loader span{position:absolute;top:50%;left:0;width:6px;height:6px;background-color:#50575e;border-radius:50%;-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);opacity:0;-webkit-animation:qapl-admin-loader-animation 1.8s linear infinite;animation:qapl-admin-loader-animation 1.8s linear infinite}.qapl-admin-page-loader span:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.qapl-admin-page-loader span:nth-child(2){-webkit-animation-delay:.6s;animation-delay:.6s}.qapl-admin-page-loader span:nth-child(3){-webkit-animation-delay:1.2s;animation-delay:1.2s}@-webkit-keyframes qapl-admin-loader-animation{0%{-webkit-transform:translate(0,-50%);transform:translate(0,-50%);opacity:0}10%{opacity:1}50%{-webkit-transform:translate(20px,-50%);transform:translate(20px,-50%);opacity:1}90%{opacity:0}100%{-webkit-transform:translate(40px,-50%);transform:translate(40px,-50%);opacity:0}}@keyframes qapl-admin-loader-animation{0%{-webkit-transform:translate(0,-50%);transform:translate(0,-50%);opacity:0}10%{opacity:1}50%{-webkit-transform:translate(20px,-50%);transform:translate(20px,-50%);opacity:1}90%{opacity:0}100%{-webkit-transform:translate(40px,-50%);transform:translate(40px,-50%);opacity:0}}
  • quick-ajax-post-loader/trunk/css/style.css

    r3275104 r3287563  
    420420            animation: loader-one-spin 2s linear infinite;
    421421  }
     422  .qapl-loader-default.dark-loader{
     423    border: 8px solid rgba(0,0,0,0.3);
     424    border-top: 8px solid rgba(0,0,0,0.6);
     425}
    422426 
    423427  @-webkit-keyframes loader-one-spin {
     
    454458            animation: dotPulse 1.2s infinite ease-in-out both;
    455459}
     460.qapl-loader-dot.dark-loader .dot{
     461    background: rgba(0,0,0,0.6);
     462}
    456463
    457464.qapl-loader-dot .dot:nth-child(1) { -webkit-animation-delay: -0.24s; animation-delay: -0.24s; }
     
    502509    height: 30px;
    503510    background: rgba(255,255,255,0.1);
    504     margin: 0 2px;
    505    
    506     -webkit-animation: wave 1.2s infinite ease-in-out;
    507    
     511    margin: 0 2px;   
     512    -webkit-animation: wave 1.2s infinite ease-in-out;   
    508513            animation: wave 1.2s infinite ease-in-out;
     514}
     515.qapl-loader-wave.dark-loader .wave {
     516    background: rgba(0,0,0,0.1);
     517    -webkit-animation: wave-dark 1.2s infinite ease-in-out;
     518            animation: wave-dark 1.2s infinite ease-in-out;
    509519}
    510520.qapl-loader-wave .wave:nth-child(1) { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; }
     
    535545                transform: scaleY(1.0);
    536546        background: rgba(255,255,255,1);
     547    }
     548}
     549@-webkit-keyframes wave-dark {
     550    0%, 40%, 100% {
     551        -webkit-transform: scaleY(0.4);
     552                transform: scaleY(0.4);
     553    }
     554    20% {
     555        -webkit-transform: scaleY(1.0);
     556                transform: scaleY(1.0);
     557        background: rgba(0,0,0,0.6);
     558    }
     559}
     560@keyframes wave-dark {
     561    0%, 40%, 100% {
     562        -webkit-transform: scaleY(0.4);
     563                transform: scaleY(0.4);
     564    }
     565    20% {
     566        -webkit-transform: scaleY(1.0);
     567                transform: scaleY(1.0);
     568        background: rgba(0,0,0,0.6);
    537569    }
    538570}
  • quick-ajax-post-loader/trunk/css/style.min.css

    r3275104 r3287563  
    1 .quick-ajax-filter-container.quick-ajax-theme{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px;margin-bottom:2rem;text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button,.quick-ajax-sort-options-container.quick-ajax-theme select{padding:10px 20px;font-size:16px;line-height:1;border:2px solid #1e1e1e;background-color:#1e1e1e;color:#fff;-webkit-box-shadow:0 0 22px rgba(0,0,0,.2);box-shadow:0 0 22px rgba(0,0,0,.2);border-radius:21px;outline:unset;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button:focus{outline:0;text-decoration:none;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button.active,.quick-ajax-filter-container.quick-ajax-theme button.qapl-button:hover{border:2px solid #1e1e1e;background-color:transparent;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-controls-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px}.quick-ajax-controls-container .quick-ajax-filter-container{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.quick-ajax-controls-container .quick-ajax-sort-options-container{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.quick-ajax-controls-container .quick-ajax-filter-container.quick-ajax-theme{text-align:left;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start}.quick-ajax-sort-options-container.quick-ajax-theme{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative}.quick-ajax-sort-options-container.quick-ajax-theme select{background-color:#1e1e1e;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 5L0 3h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 8px;background-size:10px;padding:5px 40px 5px 20px;min-height:40px;font-weight:500;text-align:center;outline:0;cursor:pointer;position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select:hover,.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper:hover select{background-color:transparent;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%231e1e1e" d="M2 5L0 3h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 8px;background-size:10px;border:2px solid #1e1e1e;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select:focus{background-color:transparent;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%231e1e1e" d="M2 0L0 2h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 16px;background-size:10px;color:#1e1e1e;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select option{background-color:#fff;color:#1e1e1e;font-weight:500;padding:10px;text-align:center}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-posts-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + 2rem);margin-left:-1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-no-posts-found{display:block;width:100%;text-align:center}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-end-message-container{display:block;width:100%;text-align:center;opacity:0;-webkit-animation:qapl-fade-in .3s ease forwards;animation:qapl-fade-in .3s ease forwards;-webkit-animation-delay:.5s;animation-delay:.5s}.quick-ajax-posts-container.quick-ajax-theme .qapl-load-more-button{display:block;width:auto;margin:0 auto}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%;padding:1rem}.quick-ajax-posts-container.quick-ajax-theme .col-qty-2 .qapl-post-item{width:calc(100% / 2)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-3 .qapl-post-item{width:calc(100% / 3)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-4 .qapl-post-item{width:calc(100% / 4)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-5 .qapl-post-item{width:calc(100% / 5)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-6 .qapl-post-item{width:calc(100% / 6)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-7 .qapl-post-item{width:calc(100% / 7)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-8 .qapl-post-item{width:calc(100% / 8)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-9 .qapl-post-item{width:calc(100% / 9)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-10 .qapl-post-item{width:calc(100% / 10)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-11 .qapl-post-item{width:calc(100% / 11)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-12 .qapl-post-item{width:calc(100% / 12)}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a:focus{outline:0;text-decoration:none;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a>div{position:relative;display:block;width:100%}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a{background-color:#fff;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);text-decoration:none;border-radius:6px;text-decoration:none;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:focus img{outline:0}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:hover{-webkit-box-shadow:0 0 10px rgba(0,0,0,.5);box-shadow:0 0 10px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a>div{opacity:1;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:hover>div{opacity:.8;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-image img{width:100%;max-width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;border-top-right-radius:6px;border-top-left-radius:6px}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-date{position:absolute;top:1rem;left:1rem;z-index:1;background-color:rgba(255,255,255,.6);display:-webkit-box;display:-ms-flexbox;display:flex;width:auto;border-radius:6px}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-date span{line-height:1;padding:.5rem;font-size:14px;font-weight:700;color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:.5rem 1rem 1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title,.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title>*{color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-no-image+.qapl-post-title{margin-top:3rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3;padding:0 1rem 1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description,.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description *{color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-read-more{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4;text-align:right;padding:0 1rem 1rem;color:#1e1e1e;margin-top:auto}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-read-more p{margin-bottom:0}.quick-ajax-posts-container.quick-ajax-theme.loading{margin-bottom:0}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container{display:block;width:100%;opacity:1}.quick-ajax-posts-container.quick-ajax-theme.loading .quick-ajax-load-more-container{display:none;opacity:0}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-wrapper{margin-top:1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-load-more-button{display:block;width:auto;margin:0 auto}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-button{display:block;padding:10px 20px;font-size:18px;line-height:1;border:2px solid #1e1e1e;background-color:#1e1e1e;color:#fff;-webkit-box-shadow:0 0 22px rgba(0,0,0,.2);box-shadow:0 0 22px rgba(0,0,0,.2);border-radius:21px;outline:unset;-webkit-transition:all .3s;transition:all .3s}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-button:hover{border:2px solid #1e1e1e;background-color:transparent;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container .quick-ajax-load-more-container.infinite-scroll{visibility:hidden}.quick-ajax-posts-container .quick-ajax-loader-container{visibility:hidden;opacity:0;height:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.quick-ajax-posts-container.loading .quick-ajax-loader-container{visibility:visible;opacity:1;height:auto;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 auto 0}.quick-ajax-posts-container.quick-ajax-theme.loading .quick-ajax-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:42px;height:auto}.qapl-loader-default{border:8px solid #ebeaea;border-top:8px solid #fff;border-radius:50%;width:60px;height:60px;margin:1rem auto 1rem;-webkit-animation:loader-one-spin 2s linear infinite;animation:loader-one-spin 2s linear infinite}@-webkit-keyframes loader-one-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader-one-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.qapl-loader-dot{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:1rem auto 1rem}.qapl-loader-dot .dot{width:15px;height:15px;background:#fff;border-radius:50%;margin:5px;-webkit-animation:dotPulse 1.2s infinite ease-in-out both;animation:dotPulse 1.2s infinite ease-in-out both}.qapl-loader-dot .dot:nth-child(1){-webkit-animation-delay:-.24s;animation-delay:-.24s}.qapl-loader-dot .dot:nth-child(2){-webkit-animation-delay:-.12s;animation-delay:-.12s}.qapl-loader-dot .dot:nth-child(3){-webkit-animation-delay:0;animation-delay:0}@-webkit-keyframes dotPulse{0%,100%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.7}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes dotPulse{0%,100%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.7}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.qapl-loader-wave{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:1rem auto 1rem}.qapl-loader-wave .wave{width:5px;height:30px;background:rgba(255,255,255,.1);margin:0 2px;-webkit-animation:wave 1.2s infinite ease-in-out;animation:wave 1.2s infinite ease-in-out}.qapl-loader-wave .wave:nth-child(1){-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.qapl-loader-wave .wave:nth-child(2){-webkit-animation-delay:-1s;animation-delay:-1s}.qapl-loader-wave .wave:nth-child(3){-webkit-animation-delay:-.9s;animation-delay:-.9s}.qapl-loader-wave .wave:nth-child(4){-webkit-animation-delay:-.8s;animation-delay:-.8s}.qapl-loader-wave .wave:nth-child(5){-webkit-animation-delay:-.7s;animation-delay:-.7s}@-webkit-keyframes wave{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:#fff}}@keyframes wave{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:#fff}}@-webkit-keyframes qapl-fade-in{from{opacity:0}to{opacity:1}}@keyframes qapl-fade-in{from{opacity:0}to{opacity:1}}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img{position:relative;overflow:hidden;color:#fff}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a{text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-image{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:4px;-o-object-position:center;object-position:center;object-fit:cover;z-index:1}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-no-image{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);border-radius:4px;z-index:0}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .post-content{position:relative;z-index:2;background-color:rgba(0,0,0,.6);padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;overflow:hidden}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .post-content::before{content:'';position:absolute;top:0;left:-200%;width:200%;height:100%;background:linear-gradient(45deg,rgba(0,0,0,.9) 0,rgba(0,0,0,.1) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 100%);opacity:0;z-index:-1;border-top-left-radius:4px;border-top-right-radius:4px;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a:hover>.post-content::before{left:0;opacity:1;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-date{position:relative;background:0 0;line-height:1;margin-bottom:20px;font-size:14px;font-weight:600}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-date span{padding:0;margin-bottom:.5rem;color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title{padding-top:3rem;margin-top:auto}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title,.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title *{color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-description,.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-description *{color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-read-more{text-align:right;font-weight:600;color:#fff;text-decoration:none;background:rgba(0,0,0,.4);display:inline-block;margin-top:1rem;margin-left:auto;margin-bottom:0;padding:6px 20px 8px;text-transform:uppercase;border-radius:7px;line-height:1;opacity:0;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-read-more p{margin-bottom:0}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a:hover .qapl-read-more{opacity:1;background:rgba(0,0,0,.6);-webkit-transition:all .6s ease;transition:all .6s ease}
     1.quick-ajax-filter-container.quick-ajax-theme{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px;margin-bottom:2rem;text-align:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button,.quick-ajax-sort-options-container.quick-ajax-theme select{padding:10px 20px;font-size:16px;line-height:1;border:2px solid #1e1e1e;background-color:#1e1e1e;color:#fff;-webkit-box-shadow:0 0 22px rgba(0,0,0,.2);box-shadow:0 0 22px rgba(0,0,0,.2);border-radius:21px;outline:unset;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button:focus{outline:0;text-decoration:none;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.quick-ajax-filter-container.quick-ajax-theme button.qapl-button.active,.quick-ajax-filter-container.quick-ajax-theme button.qapl-button:hover{border:2px solid #1e1e1e;background-color:transparent;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-controls-container{display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px}.quick-ajax-controls-container .quick-ajax-filter-container{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.quick-ajax-controls-container .quick-ajax-sort-options-container{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.quick-ajax-controls-container .quick-ajax-filter-container.quick-ajax-theme{text-align:left;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start}.quick-ajax-sort-options-container.quick-ajax-theme{margin-left:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;position:relative}.quick-ajax-sort-options-container.quick-ajax-theme select{background-color:#1e1e1e;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 5L0 3h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 8px;background-size:10px;padding:5px 40px 5px 20px;min-height:40px;font-weight:500;text-align:center;outline:0;cursor:pointer;position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select:hover,.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper:hover select{background-color:transparent;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%231e1e1e" d="M2 5L0 3h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 8px;background-size:10px;border:2px solid #1e1e1e;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select:focus{background-color:transparent;background-image:url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%231e1e1e" d="M2 0L0 2h4z"/></svg>');background-repeat:no-repeat;background-position:calc(100% - 20px) 16px;background-size:10px;color:#1e1e1e;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-sort-options-container.quick-ajax-theme .quick-ajax-sort-option-wrapper select option{background-color:#fff;color:#1e1e1e;font-weight:500;padding:10px;text-align:center}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-posts-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:calc(100% + 2rem);margin-left:-1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-no-posts-found{display:block;width:100%;text-align:center}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-end-message-container{display:block;width:100%;text-align:center;opacity:0;-webkit-animation:qapl-fade-in .3s ease forwards;animation:qapl-fade-in .3s ease forwards;-webkit-animation-delay:.5s;animation-delay:.5s}.quick-ajax-posts-container.quick-ajax-theme .qapl-load-more-button{display:block;width:auto;margin:0 auto}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%;padding:1rem}.quick-ajax-posts-container.quick-ajax-theme .col-qty-2 .qapl-post-item{width:calc(100% / 2)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-3 .qapl-post-item{width:calc(100% / 3)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-4 .qapl-post-item{width:calc(100% / 4)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-5 .qapl-post-item{width:calc(100% / 5)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-6 .qapl-post-item{width:calc(100% / 6)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-7 .qapl-post-item{width:calc(100% / 7)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-8 .qapl-post-item{width:calc(100% / 8)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-9 .qapl-post-item{width:calc(100% / 9)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-10 .qapl-post-item{width:calc(100% / 10)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-11 .qapl-post-item{width:calc(100% / 11)}.quick-ajax-posts-container.quick-ajax-theme .col-qty-12 .qapl-post-item{width:calc(100% / 12)}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a:focus{outline:0;text-decoration:none;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a>div{position:relative;display:block;width:100%}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item a{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a{background-color:#fff;-webkit-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);text-decoration:none;border-radius:6px;text-decoration:none;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:focus img{outline:0}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:hover{-webkit-box-shadow:0 0 10px rgba(0,0,0,.5);box-shadow:0 0 10px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a>div{opacity:1;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default a:hover>div{opacity:.8;-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-image img{width:100%;max-width:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;border-top-right-radius:6px;border-top-left-radius:6px}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-date{position:absolute;top:1rem;left:1rem;z-index:1;background-color:rgba(255,255,255,.6);display:-webkit-box;display:-ms-flexbox;display:flex;width:auto;border-radius:6px}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-date span{line-height:1;padding:.5rem;font-size:14px;font-weight:700;color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding:.5rem 1rem 1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title,.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-title>*{color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-no-image+.qapl-post-title{margin-top:3rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3;padding:0 1rem 1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description,.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-post-description *{color:#1e1e1e}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-read-more{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4;text-align:right;padding:0 1rem 1rem;color:#1e1e1e;margin-top:auto}.quick-ajax-posts-container.quick-ajax-theme .qapl-post-item.qapl-post-item-default .qapl-read-more p{margin-bottom:0}.quick-ajax-posts-container.quick-ajax-theme.loading{margin-bottom:0}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container{display:block;width:100%;opacity:1}.quick-ajax-posts-container.quick-ajax-theme.loading .quick-ajax-load-more-container{display:none;opacity:0}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-wrapper{margin-top:1rem}.quick-ajax-posts-container.quick-ajax-theme .qapl-load-more-button{display:block;width:auto;margin:0 auto}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-button{display:block;padding:10px 20px;font-size:18px;line-height:1;border:2px solid #1e1e1e;background-color:#1e1e1e;color:#fff;-webkit-box-shadow:0 0 22px rgba(0,0,0,.2);box-shadow:0 0 22px rgba(0,0,0,.2);border-radius:21px;outline:unset;-webkit-transition:all .3s;transition:all .3s}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-load-more-container .qapl-load-more-button:hover{border:2px solid #1e1e1e;background-color:transparent;color:#1e1e1e;-webkit-box-shadow:0 0 14px rgba(0,0,0,.5);box-shadow:0 0 14px rgba(0,0,0,.5);-webkit-transition:all .3s ease;transition:all .3s ease}.quick-ajax-posts-container .quick-ajax-load-more-container.infinite-scroll{visibility:hidden}.quick-ajax-posts-container .quick-ajax-loader-container{visibility:hidden;opacity:0;height:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.quick-ajax-posts-container.loading .quick-ajax-loader-container{visibility:visible;opacity:1;height:auto;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.quick-ajax-posts-container.quick-ajax-theme .quick-ajax-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;margin:0 auto 0}.quick-ajax-posts-container.quick-ajax-theme.loading .quick-ajax-loader-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:42px;height:auto}.qapl-loader-default{border:8px solid #ebeaea;border-top:8px solid #fff;border-radius:50%;width:60px;height:60px;margin:1rem auto 1rem;-webkit-animation:loader-one-spin 2s linear infinite;animation:loader-one-spin 2s linear infinite}.qapl-loader-default.dark-loader{border:8px solid rgba(0,0,0,.3);border-top:8px solid rgba(0,0,0,.6)}@-webkit-keyframes loader-one-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader-one-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.qapl-loader-dot{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:1rem auto 1rem}.qapl-loader-dot .dot{width:15px;height:15px;background:#fff;border-radius:50%;margin:5px;-webkit-animation:dotPulse 1.2s infinite ease-in-out both;animation:dotPulse 1.2s infinite ease-in-out both}.qapl-loader-dot.dark-loader .dot{background:rgba(0,0,0,.6)}.qapl-loader-dot .dot:nth-child(1){-webkit-animation-delay:-.24s;animation-delay:-.24s}.qapl-loader-dot .dot:nth-child(2){-webkit-animation-delay:-.12s;animation-delay:-.12s}.qapl-loader-dot .dot:nth-child(3){-webkit-animation-delay:0;animation-delay:0}@-webkit-keyframes dotPulse{0%,100%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.7}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes dotPulse{0%,100%{-webkit-transform:scale(.8);transform:scale(.8);opacity:.7}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.qapl-loader-wave{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:1rem auto 1rem}.qapl-loader-wave .wave{width:5px;height:30px;background:rgba(255,255,255,.1);margin:0 2px;-webkit-animation:wave 1.2s infinite ease-in-out;animation:wave 1.2s infinite ease-in-out}.qapl-loader-wave.dark-loader .wave{background:rgba(0,0,0,.1);-webkit-animation:wave-dark 1.2s infinite ease-in-out;animation:wave-dark 1.2s infinite ease-in-out}.qapl-loader-wave .wave:nth-child(1){-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.qapl-loader-wave .wave:nth-child(2){-webkit-animation-delay:-1s;animation-delay:-1s}.qapl-loader-wave .wave:nth-child(3){-webkit-animation-delay:-.9s;animation-delay:-.9s}.qapl-loader-wave .wave:nth-child(4){-webkit-animation-delay:-.8s;animation-delay:-.8s}.qapl-loader-wave .wave:nth-child(5){-webkit-animation-delay:-.7s;animation-delay:-.7s}@-webkit-keyframes wave{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:#fff}}@keyframes wave{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:#fff}}@-webkit-keyframes wave-dark{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:rgba(0,0,0,.6)}}@keyframes wave-dark{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1);background:rgba(0,0,0,.6)}}@-webkit-keyframes qapl-fade-in{from{opacity:0}to{opacity:1}}@keyframes qapl-fade-in{from{opacity:0}to{opacity:1}}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img{position:relative;overflow:hidden;color:#fff}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a{text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-image{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:4px;-o-object-position:center;object-position:center;object-fit:cover;z-index:1}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-no-image{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);border-radius:4px;z-index:0}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .post-content{position:relative;z-index:2;background-color:rgba(0,0,0,.6);padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;overflow:hidden}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .post-content::before{content:'';position:absolute;top:0;left:-200%;width:200%;height:100%;background:linear-gradient(45deg,rgba(0,0,0,.9) 0,rgba(0,0,0,.1) 65%,rgba(0,0,0,0) 70%,rgba(0,0,0,0) 100%);opacity:0;z-index:-1;border-top-left-radius:4px;border-top-right-radius:4px;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a:hover>.post-content::before{left:0;opacity:1;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-date{position:relative;background:0 0;line-height:1;margin-bottom:20px;font-size:14px;font-weight:600}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-date span{padding:0;margin-bottom:.5rem;color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title{padding-top:3rem;margin-top:auto}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title,.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-title *{color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-description,.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-post-description *{color:#fff;text-decoration:none}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-read-more{text-align:right;font-weight:600;color:#fff;text-decoration:none;background:rgba(0,0,0,.4);display:inline-block;margin-top:1rem;margin-left:auto;margin-bottom:0;padding:6px 20px 8px;text-transform:uppercase;border-radius:7px;line-height:1;opacity:0;-webkit-transition:all .6s ease;transition:all .6s ease}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img .qapl-read-more p{margin-bottom:0}.quick-ajax-posts-container .qapl-post-item.qapl-post-item-bg-img a:hover .qapl-read-more{opacity:1;background:rgba(0,0,0,.6);-webkit-transition:all .6s ease;transition:all .6s ease}
  • quick-ajax-post-loader/trunk/inc/actions.php

    r3275104 r3287563  
    136136    wp_die();
    137137}
     138add_action('wp_ajax_qapl_quick_ajax_get_terms_by_taxonomy', 'qapl_quick_ajax_get_terms_by_taxonomy');
     139add_action('wp_ajax_nopriv_qapl_quick_ajax_get_terms_by_taxonomy', 'qapl_quick_ajax_get_terms_by_taxonomy');
     140function qapl_quick_ajax_get_terms_by_taxonomy() {
     141    if (!defined('DOING_AJAX') || !DOING_AJAX) {
     142        wp_send_json_error(['message' => 'Quick Ajax Post Loader: Not an AJAX request']);
     143    }
     144    if (!isset($_POST['nonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['nonce'])), QAPL_Quick_Ajax_Helper::wp_nonce_form_quick_ajax_action())) {
     145        wp_send_json_error(['message' => 'Quick Ajax Post Loader: Unauthorized request']);
     146    }
     147    //return info if No taxonomy
     148    if (empty($_POST['taxonomy']) || $_POST['taxonomy'] === '0') {
     149        ob_start();
     150        ?>
     151        <div class="quick-ajax-multiselect-option">
     152            <span class="no-options"><?php echo esc_html__('No taxonomy available', 'quick-ajax-post-loader'); ?></span>
     153        </div>
     154        <?php
     155        $output = ob_get_clean();
     156        wp_send_json_success($output);
     157        wp_die();
     158    }
     159    $taxonomy = sanitize_text_field(wp_unslash($_POST['taxonomy']));
     160    $terms = get_terms([
     161        'taxonomy' => $taxonomy,
     162        'hide_empty' => false,
     163    ]);
     164    /*
     165    $post_id = isset($_POST['post_id']) ? intval($_POST['post_id']) : 0;
     166    $saved_terms = [];   
     167    if ($post_id > 0) {
     168        $post_meta = get_post_meta($post_id, QAPL_Quick_Ajax_Helper::quick_ajax_shortcode_settings(), true);
     169        $post_meta_values = maybe_unserialize($post_meta);
     170        if (is_array($post_meta_values) && isset($post_meta_values['qapl_manual_selected_terms'])) {
     171            $saved_terms = array_map('intval', (array) $post_meta_values['qapl_manual_selected_terms']);
     172        }
     173    }
     174    //$checked = in_array($term->term_id, $saved_terms) ? 'checked' : '';
     175   
     176    */
     177    ob_start();
     178    if (!empty($terms) && !is_wp_error($terms)) {
     179        foreach ($terms as $term) {
     180            ?>
     181            <div class="quick-ajax-multiselect-option">
     182                <label>
     183                    <input type="checkbox" name="qapl_manual_selected_terms[]" value="<?php echo esc_attr($term->term_id); ?>">
     184                    <?php echo esc_html($term->name); ?>
     185                </label>
     186            </div>
     187            <?php
     188        }
     189    } else {
     190        ?>
     191        <div class="quick-ajax-multiselect-option">
     192            <span class="no-options"><?php echo esc_html__('No terms found', 'quick-ajax-post-loader'); ?></span>
     193        </div>
     194        <?php
     195    }
     196    $output = ob_get_clean();
     197    wp_send_json_success($output);
     198    wp_die();
     199}
  • quick-ajax-post-loader/trunk/inc/class-ajax.php

    r3275104 r3287563  
    88        private static $instance = null;
    99        private $helper;
    10         public $args = array();
    11         public $attributes = array();
    12         public $layout = array();
     10        private $input_args = [];
     11        private $selected_terms = [];
     12        public $args = [];
     13        public $load_more_args = [];
     14        public $attributes = [];
     15        public $layout = [];
    1316        private $ajax_initial_load;
    1417        private $quick_ajax_id;
    15         private $quick_ajax_block_id;
    1618        private $global_options;
    1719        //private $placeholder_replacer;
     
    2022            $this->helper = QAPL_Quick_Ajax_Helper::get_instance();
    2123            $this->quick_ajax_id = 0;
    22             $this->quick_ajax_block_id = '';
    2324            $this->global_options = get_option($this->helper->admin_page_global_options_name(), []);
    2425            //$this->placeholder_replacer = new QAPL_Placeholder_Replacer(); // not in use after removing placeholders
     
    9798                $prefix = (isset($attributes['shortcode']) && $attributes['shortcode'] === true) ? 'p' : 'c';             
    9899                $this->quick_ajax_id = esc_attr($prefix . $attributes[$this->helper->layout_quick_ajax_id()]);
    99                 $this->quick_ajax_block_id = 'quick-ajax-' . esc_attr($prefix . $attributes[$this->helper->layout_quick_ajax_id()]);
    100100            } else {
    101101                // Increment qapl_id if 'quick_ajax_id' is not set
     
    118118            $this->args = [];
    119119            $this->generate_block_id($attributes);
     120            $this->input_args = $args;
    120121            $quick_ajax_args = $this->initialize_query_args($args);
    121122            $this->args['post_status'] = $this->helper->shortcode_page_select_post_status_default_value();
     
    130131                $this->args['tax_query'] = $args['tax_query'];
    131132            }
     133           
    132134            $this->args = apply_filters(QAPL_Hooks::HOOK_MODIFY_POSTS_QUERY_ARGS, $this->args, $this->quick_ajax_id);
    133135
     
    140142        private function initialize_query_args($args) {
    141143            // Set default query arguments
    142             $query_args = [
     144            $query_args = $this->query_args_base_query_args($args);
     145            $query_args = $this->query_args_add_tax_query($query_args, $args);           
     146            $query_args = $this->query_args_apply_offset_or_paged($query_args, $args);
     147            $this->get_selected_terms($args);
     148            return $query_args;   
     149        }
     150        private function query_args_base_query_args($args) {
     151            return [
    143152                'post_type' => isset($args['post_type']) ? sanitize_text_field($args['post_type']) : null,
    144153                'posts_per_page' => isset($args['posts_per_page']) ? intval($args['posts_per_page']) : $this->helper->shortcode_page_select_posts_per_page_default_value(),
     
    147156                'post__not_in' => isset($args['post__not_in']) ? array_map('absint', $this->create_post_not_in($args['post__not_in'])) : '',
    148157                'ignore_sticky_posts' => isset($args['ignore_sticky_posts']) ? intval($args['ignore_sticky_posts']) : $this->helper->shortcode_page_ignore_sticky_posts_default_value(),
    149                 'paged' => isset($args['paged']) ? intval($args['paged']) : 1
     158                'paged' => isset($args['paged']) ? intval($args['paged']) : 1,
    150159            ];
     160        }       
     161        private function query_args_apply_offset_or_paged($query_args, $args) {
    151162            // Check if 'offset' is provided and use it instead of 'paged'
    152163            if (isset($args['offset']) && !is_null($args['offset'])) {
     
    155166                unset($query_args['paged']);
    156167            }
    157 
    158             return $query_args;   
    159         }
     168            return $query_args;
     169        }
     170        private function query_args_add_tax_query($query_args, $args) {
     171            $taxonomy = isset($args['selected_taxonomy']) ? sanitize_text_field($args['selected_taxonomy']) : '';
     172            $terms = isset($args['selected_terms']) && is_array($args['selected_terms']) ? array_map('absint', $args['selected_terms']) : [];
     173       
     174            if ($taxonomy && !empty($terms)) {
     175                $query_args['tax_query'][] = [
     176                    'taxonomy' => $taxonomy,
     177                    'field'    => 'term_id',
     178                    'terms'    => $terms,
     179                    'operator' => 'IN',
     180                ];
     181            } elseif ($taxonomy) {
     182                $query_args['tax_query'][] = [
     183                    'taxonomy' => $taxonomy,
     184                    'operator' => 'EXISTS',
     185                ];
     186            }       
     187            return $query_args;
     188        }
     189        private function get_selected_terms($args) {
     190            $taxonomy = isset($args['selected_taxonomy']) ? sanitize_text_field($args['selected_taxonomy']) : '';
     191            $terms = isset($args['selected_terms']) && is_array($args['selected_terms']) ? array_map('absint', $args['selected_terms']) : [];       
     192            if ($taxonomy && !empty($terms)) {
     193                $this->selected_terms = $terms;
     194            }       
     195        }
     196
    160197        public function sanitize_json_to_array($data) {
    161198            // Check if input is a JSON string
     
    194231                        'field'    => 'term_id',
    195232                        'terms'    => $term->term_id,
     233                        'operator' => 'IN',
    196234                    ),
    197235                ),
     
    209247                return false;
    210248            }
    211             $terms = get_terms( array(
    212                 'taxonomy' => $taxonomy,
    213                 'object_type' => array($this->args['post_type']),
    214                 'hide_empty' => true,               
    215             ) );
     249
     250            $terms_args = array(
     251                'taxonomy'     => $taxonomy,
     252                'object_type'  => array($this->args['post_type']),
     253                'hide_empty'   => true,
     254            );           
     255            // only include specific terms if selected_terms is not empty
     256            if (!empty($this->selected_terms) && is_array($this->selected_terms)) {
     257                $terms_args['include'] = $this->selected_terms;
     258            }           
     259            $terms = get_terms($terms_args);           
     260
    216261            $block_id = 'quick-ajax-filter-'.$this->quick_ajax_id;
    217262            $class_container = 'quick-ajax-filter-container';
     
    245290                    'button_label' => $show_all_label,
    246291                    'data-button' => $button_base['data-button'],
    247                     'data-action' => $this->args,
     292                    'data-action' => $this->input_args,
    248293                    'data-attributes' => $button_base['data-attributes'],
    249294                ];
     
    253298                    $not_empty = $this->get_post_assigned_to_the_term($term, $this->args['post_type'], $exclude_ids);
    254299                    if($not_empty == true){
     300                        $data_action = $this->input_args;
     301                        $data_action['selected_terms'] = [$term->term_id];
    255302                        $term_button_data = [                       
    256303                            'term_id' => $term->term_id,
     
    259306                            'button_label' => $term->name,
    260307                            'data-button' => $button_base['data-button'],
    261                             'data-action' => $this->generate_tax_query($taxonomy, $term->slug),
     308                            'data-action' => $data_action,
    262309                            'data-attributes' => $button_base['data-attributes'],
    263310                        ];
     
    348395            }
    349396            $sort_option .= '</select>';
    350             $sort_option .= '<span class="quick-ajax-settings" data-button="'.$this->helper->sort_option_button_data_button().'" data-attributes="' . esc_attr(wp_json_encode($this->attributes)) . '" data-action="' . esc_attr(wp_json_encode($this->args)) . '"></span>';
     397            $sort_option .= '<span class="quick-ajax-settings" data-button="'.$this->helper->sort_option_button_data_button().'" data-attributes="' . esc_attr(wp_json_encode($this->attributes)) . '" data-action="' . esc_attr(wp_json_encode($this->input_args)) . '"></span>';
    351398            $sort_option .= '</div>';                     
    352399            return $sort_option;
     
    423470        }
    424471
    425         private function generate_tax_query($taxonomy, $term_slug){
     472        private function generate_tax_query($taxonomy, $term_id){
    426473            $term_args = $this->args;
    427474            unset($term_args['paged']);
     
    430477                array(
    431478                    'taxonomy' => $taxonomy,
    432                     'field' => 'slug',
    433                     'terms' => $term_slug,
     479                    'field' => 'term_id',
     480                    'terms' => $term_id,
     481                    'operator' => 'IN',
    434482                ),
    435483            );
     
    518566            }
    519567            $args = $this->args;
    520            
     568
     569            $args['selected_taxonomy'] = isset($this->input_args['selected_taxonomy']) ? sanitize_text_field($this->input_args['selected_taxonomy']) : '';
     570            $args['selected_terms'] = isset($this->input_args['selected_terms']) && is_array($this->input_args['selected_terms']) ? array_map('absint', $this->input_args['selected_terms']) : [];
    521571            $query = new WP_Query($args);
    522572            $this->attributes[$this->helper->layout_quick_ajax_id()] = $this->quick_ajax_id;
     
    550600                QAPL_Post_Template_Context::set_template($qapl_post_template);
    551601                if ($this->ajax_initial_load) {
    552                     echo '<div class="qapl-initial-loader" data-button="quick-ajax-filter-button" style="display:none;" data-action="' . esc_attr(wp_json_encode($this->args)) . '" data-attributes="' . esc_attr(wp_json_encode($this->attributes)) . '"></div>';
     602                    echo '<div class="qapl-initial-loader" data-button="quick-ajax-filter-button" style="display:none;" data-action="' . esc_attr(wp_json_encode($this->input_args)) . '" data-attributes="' . esc_attr(wp_json_encode($this->attributes)) . '"></div>';
    553603                } else {
    554604                    while ($query->have_posts()) {
     
    561611                // No posts found
    562612                $container_settings = [
    563                     'quick_ajax_id' => $ajax_class->attributes['quick_ajax_id'],
     613                    'quick_ajax_id' => $this->quick_ajax_id,
    564614                    'template_name' => 'no-post-message',
    565615                ];
  • quick-ajax-post-loader/trunk/inc/class-helper.php

    r3275104 r3287563  
    1515    public static function get_plugin_info() {
    1616        return [
    17             'version' => '1.6.4',
     17            'version' => '1.7.0',
    1818            'name' => 'Quick Ajax Post Loader',
    1919            'text_domain' => 'quick-ajax-post-loader',
     
    134134            'quick_ajax_post_type' => self::shortcode_page_select_post_type(),
    135135            'quick_ajax_taxonomy' => self::shortcode_page_select_taxonomy(),
     136            'quick_ajax_manual_selected_terms' => self::shortcode_page_manual_selected_terms(),
    136137            'quick_ajax_css_style' => self::layout_quick_ajax_css_style(),
    137138            'grid_num_columns' => self::layout_container_num_columns(),
     
    353354    public static function shortcode_page_select_taxonomy(){
    354355        return 'qapl_select_taxonomy';
     356    }
     357    public static function shortcode_page_manual_term_selection(){
     358        return 'qapl_manual_term_selection';
     359    }
     360    public static function shortcode_page_manual_term_selection_default_value(){
     361        return 0;
     362    }
     363    public static function shortcode_page_manual_selected_terms(){
     364        return 'qapl_manual_selected_terms';
    355365    }
    356366    public static function shortcode_page_select_posts_per_page(){
     
    868878        );
    869879    }
     880    //manual term selection checkbox
     881    public static function get_field_manual_term_selection(){
     882        return array(
     883            'name'        => QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection(),
     884            'label'       => __('Select Specific Terms', 'quick-ajax-post-loader'),
     885            'type'        => 'checkbox',
     886            'default'     => QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection_default_value(),
     887            'description' => __('Enable manual selection of taxonomy terms to be used for filtering.', 'quick-ajax-post-loader')
     888        );
     889    }
     890    //manual selected terms multiselect
     891    public static function get_field_manual_selected_terms(){
     892        return array(
     893            'name'        => QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms(),
     894            'label'       => __('Choose Terms', 'quick-ajax-post-loader'),
     895            'type'        => 'multiselect',
     896            'options'     => '',
     897            'default'     => array(),
     898            'description' => __('Select the specific terms to be used for filtering posts. If left empty, no results will be shown.', 'quick-ajax-post-loader')
     899        );
     900    }
    870901    //post per page number
    871902    public static function get_field_select_posts_per_page(){
  • quick-ajax-post-loader/trunk/inc/class-shortcode.php

    r3269883 r3287563  
    33    exit;
    44}
     5class QAPL_Shortcode_Params_Handler {
     6    public static function get_params($params) {
     7        $defaults = array(
     8            'id' => '',
     9            'excluded_post_ids' => '',
     10            'post_type' => '',
     11            'posts_per_page' => '',
     12            'order' => '',
     13            'orderby' => '',
     14            'sort_options' => '',
     15            'quick_ajax_css_style' => '',
     16            'grid_num_columns' => '',
     17            'post_item_template' => '',
     18            'taxonomy_filter_class' => '',
     19            'container_class' => '',
     20            'load_more_posts' => '',
     21            'loader_icon' => '',
     22            'quick_ajax_id' => '',
     23            'quick_ajax_taxonomy' => '',
     24            //'manual_selected_terms' => '',
     25            'ignore_sticky_posts' => '',
     26            'ajax_initial_load' => '',
     27            'infinite_scroll' => '',
     28            'show_end_message' => '',
     29        );
     30        //retain only the keys that match the defaults
     31        $params = array_intersect_key($params, $defaults);
     32        //merge provided parameters with defaults
     33        $params = shortcode_atts($defaults, $params, 'quick-ajax');       
     34
     35        //sanitize and cast numeric and boolean parameters
     36        $params['id'] = intval($params['id']);
     37        $params['ignore_sticky_posts'] = filter_var($params['ignore_sticky_posts'], FILTER_VALIDATE_BOOLEAN);
     38        $params['ajax_initial_load'] = filter_var($params['ajax_initial_load'], FILTER_VALIDATE_BOOLEAN);
     39        $params['infinite_scroll'] = filter_var($params['infinite_scroll'], FILTER_VALIDATE_BOOLEAN);
     40        $params['show_end_message'] = filter_var($params['show_end_message'], FILTER_VALIDATE_BOOLEAN);
     41        $params['excluded_post_ids'] = array_filter(array_map('intval', explode(',', $params['excluded_post_ids'])));
     42        $params['posts_per_page'] = intval($params['posts_per_page']);
     43        $params['quick_ajax_css_style'] = intval($params['quick_ajax_css_style']);
     44        $params['grid_num_columns'] = intval($params['grid_num_columns']);
     45        $params['load_more_posts'] = intval($params['load_more_posts']);
     46        $params['quick_ajax_id'] = intval($params['quick_ajax_id']);
     47
     48        //sanitize text parameters
     49        $params['post_type'] = sanitize_text_field($params['post_type']);
     50        $params['order'] = sanitize_text_field($params['order']);
     51        $params['orderby'] = sanitize_text_field($params['orderby']);
     52        //$params['sort_options'] = sanitize_text_field($params['sort_options']);
     53        $params['post_item_template'] = sanitize_text_field($params['post_item_template']);
     54        $params['taxonomy_filter_class'] = sanitize_html_class($params['taxonomy_filter_class']);
     55        $params['container_class'] = sanitize_html_class($params['container_class']);
     56        $params['loader_icon'] = sanitize_text_field($params['loader_icon']);
     57        $params['quick_ajax_taxonomy'] = sanitize_text_field($params['quick_ajax_taxonomy']);
     58        //$params['manual_selected_terms'] = (!empty($params['quick_ajax_taxonomy'])) ? array_filter(array_map('intval', explode(',', $params['manual_selected_terms']))) : '';
     59
     60        //return sanitized data
     61        return $params;
     62    }
     63}
     64class QAPL_Shortcode_Post_Meta_Handler {
     65    public static function load_and_sanitize($id) {
     66        $serialized_data = get_post_meta($id, QAPL_Quick_Ajax_Helper::quick_ajax_shortcode_settings(), true);
     67        if (!$serialized_data) {
     68            return array();
     69        }
     70        $form_data = maybe_unserialize($serialized_data);
     71       
     72        if (empty($form_data) || !is_array($form_data)) {
     73            return array();
     74        }
     75        return self::sanitize($form_data);
     76    }
     77    private static function sanitize($meta_data) {
     78        $sanitized = array();
     79        foreach ($meta_data as $key => $value) {
     80            if (is_array($value)) {
     81                $sanitized_array = [];   
     82                foreach ($value as $item) {
     83                    if (is_numeric($item)) {
     84                        $sanitized_array[] = absint($item); // sanitize as int
     85                    } else {
     86                        $sanitized_array[] = sanitize_text_field($item); // sanitize as string
     87                    }
     88                }   
     89                $sanitized[$key] = $sanitized_array;
     90            } elseif (is_numeric($value)) {
     91                $sanitized[$key] = intval($value);
     92            } elseif (is_string($value)) {
     93                $sanitized[$key] = sanitize_text_field($value);
     94            }
     95        }
     96        return $sanitized;
     97    }
     98}
     99class QAPL_Shortcode_Query_Args_Provider {
     100    private $shortcode_params;
     101    private $shortcode_postmeta;
     102
     103    public function __construct(array $shortcode_params, array $postmeta) {
     104        $this->shortcode_params = $shortcode_params;
     105        $this->shortcode_postmeta = $postmeta;
     106    }
     107    // return shortcode param if set else get value from postmeta
     108    public function get_arg_value($shortcode_key, $meta_key = null) {
     109        // check if param exists in shortcode
     110        if (!empty($this->shortcode_params[$shortcode_key])) {
     111            return $this->shortcode_params[$shortcode_key];
     112        }
     113        // fallback to meta key if not provided
     114        if (!$meta_key) {
     115            $meta_key = $shortcode_key;
     116        }
     117        // check if param exists in postmeta
     118        if (isset($this->shortcode_postmeta[$meta_key])) {
     119            return $this->shortcode_postmeta[$meta_key];
     120        }       
     121        return '';
     122    }
     123}
     124class QAPL_Shortcode_Ajax_Attributes_Provider {
     125    private $shortcode_params = [];
     126    private $shortcode_postmeta = [];
     127
     128    public function __construct(array $shortcode_params, array $shortcode_postmeta) {
     129        $this->shortcode_params = $shortcode_params;
     130        $this->shortcode_postmeta = $shortcode_postmeta;
     131    }
     132    public function get_attributes() {
     133        return $this->create_shortcode_attributes();
     134    }
     135
     136    private function create_shortcode_attributes() {
     137        $attributes = array();       
     138        if (!empty($this->shortcode_params['id'])) {
     139            $attributes['shortcode'] = true;
     140            $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_id()] = absint($this->shortcode_params['id']);
     141        } else {
     142            $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_id()] = $this->get_sanitized_attribute([
     143                'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_quick_ajax_id(),
     144                'type' => 'number',
     145            ]);
     146        }
     147        $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_css_style()] = $this->get_sanitized_attribute([
     148            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_quick_ajax_css_style(),
     149            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style(),
     150            'type' => 'string',
     151        ]);
     152        $attributes[QAPL_Quick_Ajax_Helper::layout_container_num_columns()] = $this->get_sanitized_attribute([
     153            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_container_num_columns(),
     154            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty(),
     155            'type' => 'number',
     156        ]);
     157        $attributes[QAPL_Quick_Ajax_Helper::layout_post_item_template()] = $this->get_sanitized_attribute([
     158            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_post_item_template(),
     159            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template(),
     160            'type' => 'string',
     161        ]);
     162        $attributes[QAPL_Quick_Ajax_Helper::layout_taxonomy_filter_class()] = $this->get_sanitized_attribute([
     163            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_taxonomy_filter_class(),
     164            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class(),
     165            'type' => 'html_class',
     166        ]);
     167        $attributes[QAPL_Quick_Ajax_Helper::layout_container_class()] = $this->get_sanitized_attribute([
     168            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_container_class(),
     169            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class(),
     170            'type' => 'html_class',
     171        ]);
     172        $attributes[QAPL_Quick_Ajax_Helper::layout_load_more_posts()] = $this->get_sanitized_attribute([
     173            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_load_more_posts(),
     174            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity(),
     175            'only_if_meta_key_true' => QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity(),
     176            'type' => 'number',
     177        ]);
     178        $attributes[QAPL_Quick_Ajax_Helper::layout_select_loader_icon()] = $this->get_sanitized_attribute([
     179            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_select_loader_icon(),
     180            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon(),
     181            'only_if_meta_key_true' => QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon(),
     182            'type' => 'string',
     183        ]);
     184        $attributes[QAPL_Quick_Ajax_Helper::query_settings_ajax_on_initial_load()] = $this->get_sanitized_attribute([
     185            'shortcode_key' => QAPL_Quick_Ajax_Helper::query_settings_ajax_on_initial_load(),
     186            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_ajax_on_initial_load(),
     187            'type' => 'bool',
     188        ]);
     189        $attributes[QAPL_Quick_Ajax_Helper::layout_ajax_infinite_scroll()] = $this->get_sanitized_attribute([
     190            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_ajax_infinite_scroll(),
     191            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_ajax_infinite_scroll(),
     192            'type' => 'bool',
     193        ]);
     194        $attributes[QAPL_Quick_Ajax_Helper::layout_show_end_message()] = $this->get_sanitized_attribute([
     195            'shortcode_key' => QAPL_Quick_Ajax_Helper::layout_show_end_message(),
     196            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_show_end_message(),
     197            'type' => 'bool',
     198        ]);       
     199        return !empty($attributes) ? $attributes : false;
     200    }
     201
     202    private function get_sanitized_attribute(array $config) {
     203        /**
     204         * - try to get value from shortcode args first
     205         * - if not found, try to get value from shortcode postmeta settings
     206         * - if 'only_if_meta_key_true' is set, check its value before using postmeta value
     207         * - if value is still not found, return empty value (0 or empty string)
     208         * - sanitize the value based on given type:
     209         *   - 'number' = return as integer
     210         *   - 'bool' = return as 1 or 0
     211         *   - 'html_class' = sanitize as safe css class
     212         *   - 'string' = sanitize as safe text
     213         */
     214        $shortcode_key = $config['shortcode_key'] ?? null;
     215        $meta_key = $config['postmeta_key'] ?? null;
     216        $type = $config['type'] ?? 'string';
     217        $only_if_meta_key_true = $config['only_if_meta_key_true'] ?? null;
     218        $value = null;
     219        // try to get value from shortcode args
     220        if (!empty($this->shortcode_params[$shortcode_key])) {
     221            $value = $this->shortcode_params[$shortcode_key];
     222        // if not found try to get value from shortcode settings
     223        } elseif (!empty($meta_key) && isset($this->shortcode_postmeta[$meta_key])) {
     224            // check if additional meta key condition is required
     225            if (!empty($only_if_meta_key_true)) {
     226                if (!empty($this->shortcode_postmeta[$only_if_meta_key_true])) {
     227                    $value = $this->shortcode_postmeta[$meta_key];
     228                } else {
     229                    $value = null;
     230                }
     231            } else {
     232                $value = $this->shortcode_postmeta[$meta_key];
     233            }
     234        }
     235        // return default empty value if value is still null
     236        if ($value === null) {
     237            return ($type === 'number' || $type === 'bool') ? 0 : '';
     238        }
     239        // sanitize value based on type
     240        switch ($type) {
     241            case 'number':
     242                return intval($value);
     243            case 'bool':
     244                return filter_var($value, FILTER_VALIDATE_BOOLEAN) ? 1 : 0;
     245            case 'html_class':
     246                return sanitize_html_class($value);
     247            case 'string':
     248            default:
     249                return sanitize_text_field($value);
     250        }
     251    }
     252}
    5253
    6254if (!class_exists('QAPL_Quick_Ajax_Shortcode')) {
    7255    class QAPL_Quick_Ajax_Shortcode {
    8         private $shortcode_args = array();
    9         private $shortcode_settings = array();
     256        private $shortcode_params = array();
     257        private $shortcode_postmeta = array();
    10258       
    11         private function get_shortcode_args($args) {
    12             $this->shortcode_args = $this->sanitize_and_set_default_args($args);
    13         }       
    14         private function sanitize_and_set_default_args($args) {
    15             $defaults = array(
    16                 'id' => '',
    17                 'excluded_post_ids' => '',
    18                 'post_type' => '',
    19                 'posts_per_page' => '',
    20                 'order' => '',
    21                 'orderby' => '',
    22                 //'sort_options' => '',
    23                 'quick_ajax_css_style' => '',
    24                 'grid_num_columns' => '',
    25                 'post_item_template' => '',
    26                 'taxonomy_filter_class' => '',
    27                 'container_class' => '',
    28                 'load_more_posts' => '',
    29                 'loader_icon' => '',
    30                 'quick_ajax_id' => '',
    31                 'quick_ajax_taxonomy' => '',
    32                 'ignore_sticky_posts' => '',
    33                 'ajax_initial_load' => '',
    34                 'infinite_scroll' => '',
    35                 'show_end_message' => '',
    36             );
    37             //retain only the keys that match the defaults
    38             $args = array_intersect_key($args, $defaults);
    39             //merge provided args with defaults
    40             $args = shortcode_atts($defaults, $args, 'quick-ajax');       
    41 
    42             //sanitize and cast numeric and boolean attributes
    43             $args['id'] = is_numeric($args['id']) ? intval($args['id']) : '';
    44             $args['ignore_sticky_posts'] = isset($args['ignore_sticky_posts']) ? filter_var($args['ignore_sticky_posts'], FILTER_VALIDATE_BOOLEAN) : false;
    45             $args['ajax_initial_load'] = isset($args['ajax_initial_load']) ? filter_var($args['ajax_initial_load'], FILTER_VALIDATE_BOOLEAN) : false;
    46             $args['infinite_scroll'] = isset($args['infinite_scroll']) ? filter_var($args['infinite_scroll'], FILTER_VALIDATE_BOOLEAN) : false;
    47             $args['show_end_message'] = isset($args['show_end_message']) ? filter_var($args['show_end_message'], FILTER_VALIDATE_BOOLEAN) : false;
    48             $args['excluded_post_ids'] = is_string($args['excluded_post_ids'])  ? array_filter(array_map('intval', explode(',', $args['excluded_post_ids'])))  : '';
    49             $args['posts_per_page'] = is_numeric($args['posts_per_page']) ? intval($args['posts_per_page']) : '';
    50             $args['quick_ajax_css_style'] = is_numeric($args['quick_ajax_css_style']) ? intval($args['quick_ajax_css_style']) : '';
    51             $args['grid_num_columns'] = is_numeric($args['grid_num_columns']) ? intval($args['grid_num_columns']) : '';
    52             $args['load_more_posts'] = is_numeric($args['load_more_posts']) ? intval($args['load_more_posts']) : '';
    53             $args['quick_ajax_id'] = is_numeric($args['quick_ajax_id']) ? intval($args['quick_ajax_id']) : '';
    54 
    55             //sanitize text attributes
    56             $args['post_type'] = !empty($args['post_type']) ? sanitize_text_field($args['post_type']) : '';
    57             $args['order'] = !empty($args['order']) ? sanitize_text_field($args['order']) : '';
    58             $args['orderby'] = !empty($args['orderby']) ? sanitize_text_field($args['orderby']) : '';
    59             $args['sort_options'] = !empty($args['sort_options']) ? sanitize_text_field($args['sort_options']) : '';
    60             //$args['post_status'] = !empty($args['post_status']) ? sanitize_text_field($args['post_status']) : '';
    61             $args['post_item_template'] = !empty($args['post_item_template']) ? sanitize_text_field($args['post_item_template']) : '';
    62             $args['taxonomy_filter_class'] = !empty($args['taxonomy_filter_class']) ? sanitize_html_class($args['taxonomy_filter_class']) : '';
    63             $args['container_class'] = !empty($args['container_class']) ? sanitize_html_class($args['container_class']) : '';
    64             $args['loader_icon'] = !empty($args['loader_icon']) ? sanitize_text_field($args['loader_icon']) : '';
    65             $args['quick_ajax_taxonomy'] = !empty($args['quick_ajax_taxonomy']) ? sanitize_text_field($args['quick_ajax_taxonomy']) : '';
    66        
    67             //return sanitized data
    68             return $args;
    69         }
    70 
    71         private function unserialize_shortcode_data($id){
    72             $serialized_data = get_post_meta($id, QAPL_Quick_Ajax_Helper::quick_ajax_shortcode_settings(), true);
    73             if ($serialized_data) {
    74                 $form_data = maybe_unserialize($serialized_data);
    75                 if (is_array($form_data)) { // ensure data is valid
    76                     foreach ($form_data as $field_name => $field_value) {
    77                         $this->shortcode_settings[$field_name] = $field_value;
    78                     }
    79                 }
    80             }
    81         }
    82         // return shortcode param if set else get value from postmeta
    83         private function get_param_value($shortcode_key, $meta_key = null) {
    84             // check if param exists in shortcode
    85             if (!empty($this->shortcode_args[$shortcode_key])) {
    86                 return $this->shortcode_args[$shortcode_key];
    87             }
    88             // fallback to meta key if not provided
    89             if (!$meta_key) {
    90                 $meta_key = $shortcode_key;
    91             }
    92             // check if param exists in postmeta
    93             if (isset($this->shortcode_settings[$meta_key])) {
    94                 return $this->shortcode_settings[$meta_key];
    95             }
    96        
    97             return '';
    98         }
    99        
     259        private function get_shortcode_params($params) {
     260            $this->shortcode_params = QAPL_Shortcode_Params_Handler::get_params($params);
     261        }   
     262        private function unserialize_shortcode_data($id) {
     263            $this->shortcode_postmeta = QAPL_Shortcode_Post_Meta_Handler::load_and_sanitize($id);
     264        }
    100265        private function create_shortcode_args(){
     266            $data_args = new QAPL_Shortcode_Query_Args_Provider($this->shortcode_params, $this->shortcode_postmeta);
    101267            $args = array();
    102268            // get main query params from shortcode or postmeta
    103             $selected_post_type = $this->get_param_value('post_type', QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
    104             $post_per_page = $this->get_param_value('posts_per_page', QAPL_Quick_Ajax_Helper::shortcode_page_select_posts_per_page());
    105             $post_order = $this->get_param_value('order', QAPL_Quick_Ajax_Helper::shortcode_page_select_order());
    106             $post_orderby = $this->get_param_value('orderby', QAPL_Quick_Ajax_Helper::shortcode_page_select_orderby());
    107             $post_not_in = $this->get_param_value('excluded_post_ids', QAPL_Quick_Ajax_Helper::shortcode_page_set_post_not_in());       
    108             $ignore_sticky_posts = $this->get_param_value('ignore_sticky_posts', QAPL_Quick_Ajax_Helper::shortcode_page_ignore_sticky_posts());
    109            
     269            $selected_post_type = $data_args->get_arg_value('post_type', QAPL_Quick_Ajax_Helper::shortcode_page_select_post_type());
     270            $post_per_page = $data_args->get_arg_value('posts_per_page', QAPL_Quick_Ajax_Helper::shortcode_page_select_posts_per_page());
     271            $post_order = $data_args->get_arg_value('order', QAPL_Quick_Ajax_Helper::shortcode_page_select_order());
     272            $post_orderby = $data_args->get_arg_value('orderby', QAPL_Quick_Ajax_Helper::shortcode_page_select_orderby());
     273            $post_not_in = $data_args->get_arg_value('excluded_post_ids', QAPL_Quick_Ajax_Helper::shortcode_page_set_post_not_in());
     274            $ignore_sticky_posts = $data_args->get_arg_value('ignore_sticky_posts', QAPL_Quick_Ajax_Helper::shortcode_page_ignore_sticky_posts());
     275            $show_taxonomy = $data_args->get_arg_value('show_taxonomy', QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter());
     276            $select_taxonomy = $data_args->get_arg_value('select_taxonomy', QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy());
     277            $manual_term_selection = $data_args->get_arg_value('manual_term_selection', QAPL_Quick_Ajax_Helper::shortcode_page_manual_term_selection());
     278            $manual_selected_terms = $data_args->get_arg_value('manual_selected_terms', QAPL_Quick_Ajax_Helper::shortcode_page_manual_selected_terms());
    110279            // return query args if post type is defined
    111280            if(!empty($selected_post_type)){
    112281                $args = array(
    113282                    'post_type' => $selected_post_type,
    114                     //'post_status' => $post_post_status,
    115283                    'orderby' => $post_orderby,
    116                     'order' => $post_order,                     
     284                    'order' => $post_order,
    117285                    'posts_per_page' => $post_per_page,
    118                     'post__not_in' => $post_not_in,
    119                     'ignore_sticky_posts' => $ignore_sticky_posts,
     286                    //'post__not_in' => $post_not_in,
     287                    //'ignore_sticky_posts' => $ignore_sticky_posts,
    120288                );
     289                if (!empty($post_not_in)) {
     290                    $args['post__not_in'] = $post_not_in;
     291                }               
     292                if (!empty($ignore_sticky_posts)) {
     293                    $args['ignore_sticky_posts'] = $ignore_sticky_posts;
     294                }
     295                if($show_taxonomy && $select_taxonomy){
     296                    $args['selected_taxonomy'] = $select_taxonomy;
     297                }
     298                if($select_taxonomy && $manual_term_selection && $manual_selected_terms){
     299                    $args['selected_terms'] = $manual_selected_terms;
     300                }
     301                /*
     302                if ($show_taxonomy && $manual_term_selection && !empty($manual_selected_terms)) {
     303                    $args['tax_query'] = array(
     304                        array(
     305                            'taxonomy' => $select_taxonomy,
     306                            'field' => 'term_id',
     307                            'terms' => $manual_selected_terms,
     308                            'operator' => 'IN',
     309                        )
     310                    );
     311                }
     312                elseif ($show_taxonomy && !$manual_term_selection) {
     313                    $args['tax_query'] = array(
     314                        array(
     315                            'taxonomy' => $select_taxonomy,
     316                            'operator' => 'EXISTS',
     317                        )
     318                    );
     319                }           
     320                */
    121321            }
    122322            if(!empty($args)){
     
    125325            return false;
    126326        }
    127         /*
    128         private function create_shortcode_attributes_old(){
    129             if(!empty($this->shortcode_args['id'])){
    130                 $attributes['shortcode'] = true;
    131                 $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_id()] = $this->shortcode_args['id'];
    132                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()]) && ($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()] != 0)){
    133                     $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_css_style()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()];         
    134                 }
    135                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()]) && ($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()] != 0) && isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty()])){
    136                     $attributes[QAPL_Quick_Ajax_Helper::layout_container_num_columns()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty()];         
    137                 }
    138                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template()])){
    139                     $attributes[QAPL_Quick_Ajax_Helper::layout_post_item_template()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template()];
    140                 }
    141                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class()])){
    142                     $attributes[QAPL_Quick_Ajax_Helper::layout_taxonomy_filter_class()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class()];
    143                 }
    144                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class()])){
    145                     $attributes[QAPL_Quick_Ajax_Helper::layout_container_class()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class()];
    146                 }
    147                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity()]) && ($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity()] != 0)){
    148                     $attributes[QAPL_Quick_Ajax_Helper::layout_load_more_posts()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity()];         
    149                 }
    150                 if(isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon()]) && ($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon()] != 0) && isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon()])){
    151                     $attributes[QAPL_Quick_Ajax_Helper::layout_select_loader_icon()] = $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon()];
    152                 }
    153             }
    154             if(!empty($attributes)){
    155                 return $attributes;
    156             }
    157             return false;
    158         }*/
    159         // updated version if attributes are added to the shortcode
    160         private function create_shortcode_attributes() {
    161             $attributes = array();
    162             if (!empty($this->shortcode_args['id'])) {
    163                 $attributes['shortcode'] = true;
    164                 $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_id()] = absint($this->shortcode_args['id']);
    165        
    166                 $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_css_style()] =
    167                     !empty($this->shortcode_args['quick_ajax_css_style']) ?
    168                     sanitize_text_field($this->shortcode_args['quick_ajax_css_style']) :
    169                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()]) ?
    170                     sanitize_text_field($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_quick_ajax_css_style()]) : '');
    171        
    172                 $attributes[QAPL_Quick_Ajax_Helper::layout_container_num_columns()] =
    173                     !empty($this->shortcode_args['grid_num_columns']) ?
    174                     intval($this->shortcode_args['grid_num_columns']) :
    175                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty()]) ?
    176                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_select_columns_qty()]) : '');
    177        
    178                 $attributes[QAPL_Quick_Ajax_Helper::layout_post_item_template()] =
    179                     !empty($this->shortcode_args['post_item_template']) ?
    180                     sanitize_text_field($this->shortcode_args['post_item_template']) :
    181                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template()]) ?
    182                     sanitize_text_field($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_post_item_template()]) : '');
    183        
    184                 $attributes[QAPL_Quick_Ajax_Helper::layout_taxonomy_filter_class()] =
    185                     !empty($this->shortcode_args['taxonomy_filter_class']) ?
    186                     sanitize_html_class($this->shortcode_args['taxonomy_filter_class']) :
    187                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class()]) ?
    188                     sanitize_html_class($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_taxonomy_filter_class()]) : '');
    189        
    190                 $attributes[QAPL_Quick_Ajax_Helper::layout_container_class()] =
    191                     !empty($this->shortcode_args['container_class']) ?
    192                     sanitize_html_class($this->shortcode_args['container_class']) :
    193                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class()]) ?
    194                     sanitize_html_class($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_layout_container_class()]) : '');
    195        
    196                 $attributes[QAPL_Quick_Ajax_Helper::layout_load_more_posts()] =
    197                     !empty($this->shortcode_args['load_more_posts']) ?
    198                     intval($this->shortcode_args['load_more_posts']) :
    199                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity()]) &&
    200                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_custom_load_more_post_quantity()]) !== 0 ?
    201                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_custom_load_more_post_quantity()]) : 0);
    202        
    203                 $attributes[QAPL_Quick_Ajax_Helper::layout_select_loader_icon()] =
    204                     !empty($this->shortcode_args['loader_icon']) ?
    205                     sanitize_text_field($this->shortcode_args['loader_icon']) :
    206                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon()]) &&
    207                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_override_global_loader_icon()]) !== 0 &&
    208                     isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon()]) ?
    209                     sanitize_text_field($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_loader_icon()]) : '');
    210                
    211                 $attributes[QAPL_Quick_Ajax_Helper::query_settings_ajax_on_initial_load()] =
    212                     !empty($this->shortcode_args['ajax_initial_load']) ?
    213                     intval($this->shortcode_args['ajax_initial_load']) :
    214                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_ajax_on_initial_load()]) ?
    215                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_ajax_on_initial_load()]) : '');
    216 
    217                 $attributes[QAPL_Quick_Ajax_Helper::layout_ajax_infinite_scroll()] =
    218                     !empty($this->shortcode_args['infinite_scroll']) ?
    219                     intval($this->shortcode_args['infinite_scroll']) :
    220                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_ajax_infinite_scroll()]) ?
    221                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_ajax_infinite_scroll()]) : '');
    222                 $attributes[QAPL_Quick_Ajax_Helper::layout_show_end_message()] =
    223                     !empty($this->shortcode_args['show_end_message']) ?
    224                     intval($this->shortcode_args['show_end_message']) :
    225                     (isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_end_message()]) ?
    226                     intval($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_end_message()]) : '');
    227             } else {
    228                 $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_id()] =
    229                     !empty($this->shortcode_args['quick_ajax_id']) ?
    230                     absint($this->shortcode_args['quick_ajax_id']) : 0;
    231        
    232                 $attributes[QAPL_Quick_Ajax_Helper::layout_quick_ajax_css_style()] =
    233                     !empty($this->shortcode_args['quick_ajax_css_style']) ?
    234                     sanitize_text_field($this->shortcode_args['quick_ajax_css_style']) : '';
    235        
    236                 $attributes[QAPL_Quick_Ajax_Helper::layout_container_num_columns()] =
    237                     !empty($this->shortcode_args['grid_num_columns']) ?
    238                     intval($this->shortcode_args['grid_num_columns']) : 0;
    239        
    240                 $attributes[QAPL_Quick_Ajax_Helper::layout_post_item_template()] =
    241                     !empty($this->shortcode_args['post_item_template']) ?
    242                     sanitize_text_field($this->shortcode_args['post_item_template']) : '';
    243        
    244                 $attributes[QAPL_Quick_Ajax_Helper::layout_taxonomy_filter_class()] =
    245                     !empty($this->shortcode_args['taxonomy_filter_class']) ?
    246                     sanitize_html_class($this->shortcode_args['taxonomy_filter_class']) : '';
    247        
    248                 $attributes[QAPL_Quick_Ajax_Helper::layout_container_class()] =
    249                     !empty($this->shortcode_args['container_class']) ?
    250                     sanitize_html_class($this->shortcode_args['container_class']) : '';
    251        
    252                 $attributes[QAPL_Quick_Ajax_Helper::layout_load_more_posts()] =
    253                     !empty($this->shortcode_args['load_more_posts']) ?
    254                     intval($this->shortcode_args['load_more_posts']) : 0;
    255        
    256                 $attributes[QAPL_Quick_Ajax_Helper::layout_select_loader_icon()] =
    257                     !empty($this->shortcode_args['loader_icon']) ?
    258                     sanitize_text_field($this->shortcode_args['loader_icon']) : '';
    259 
    260                 $attributes[QAPL_Quick_Ajax_Helper::query_settings_ajax_on_initial_load()] =
    261                     !empty($this->shortcode_args['ajax_initial_load']) ?
    262                     intval($this->shortcode_args['ajax_initial_load']) : 0;
    263                    
    264                 $attributes[QAPL_Quick_Ajax_Helper::layout_ajax_infinite_scroll()] =
    265                     !empty($this->shortcode_args['infinite_scroll']) ?
    266                     intval($this->shortcode_args['infinite_scroll']) : 0;
    267                 $attributes[QAPL_Quick_Ajax_Helper::layout_show_end_message()] =
    268                     !empty($this->shortcode_args['show_end_message']) ?
    269                     intval($this->shortcode_args['show_end_message']) : 0;
    270             }
    271             if (!empty($attributes)) {
    272                 return $attributes;
    273             }
    274        
    275             return false;
    276         }
    277                
    278 
    279327        private function create_shortcode_taxonomy(){
    280             if(!empty($this->shortcode_args['id'])){
    281                 //$postID = $this->shortcode_args['id'];
    282                 //$selectedTaxonomy = get_post_meta($postID, 'quick_ajax_meta_box_select_taxonomy', true);
    283                 $show_taxonomies_filter = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter()] : null;
    284                 if($show_taxonomies_filter==1){
    285                     $selectedTaxonomy = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()] : null;
    286                     $selectedTaxonomy = esc_attr($selectedTaxonomy);
    287                 }
    288             }
     328            if (empty($this->shortcode_params['id'])) {
     329                return null;
     330            }
     331            //$postID = $this->shortcode_params['id'];
     332            //$selectedTaxonomy = get_post_meta($postID, 'quick_ajax_meta_box_select_taxonomy', true);
     333            $show_taxonomies_filter = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_taxonomy_filter()] : null;
     334            if($show_taxonomies_filter==1){
     335                $selectedTaxonomy = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_select_taxonomy()] : null;
     336                $selectedTaxonomy = esc_attr($selectedTaxonomy);
     337            }           
    289338            if(!empty($selectedTaxonomy)){
    290339                return $selectedTaxonomy;
     
    293342        }
    294343        private function create_shortcode_controls_container(){
    295             if(!empty($this->shortcode_args['id'])){
    296                 $show_sort_orderby_button = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()] : null;
     344            if(!empty($this->shortcode_params['id'])){
     345                $show_sort_orderby_button = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()] : null;
    297346                if($show_sort_orderby_button==1){
    298                     $add_wrapper = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting()] : null;
     347                    $add_wrapper = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_inline_filter_sorting()] : null;
    299348                    return $add_wrapper;
    300349                }
     
    303352        }
    304353        private function create_shortcode_sort_button(){
    305             if(!empty($this->shortcode_args['id'])){
    306                 $show_sort_orderby_button = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()] : null;
     354            if(!empty($this->shortcode_params['id'])){
     355                $show_sort_orderby_button = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_show_sort_button()] : null;
    307356                if($show_sort_orderby_button==1){
    308                     $sort_orderby = isset($this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options()]) ? $this->shortcode_settings[QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options()] : null;
     357                    $sort_orderby = isset($this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options()]) ? $this->shortcode_postmeta[QAPL_Quick_Ajax_Helper::shortcode_page_select_sort_button_options()] : null;
    309358                    if (is_array($sort_orderby)) {
    310359                        $sort_orderby = array_map('esc_attr', $sort_orderby);
     
    318367        }
    319368
    320         public function render_quick_ajax_shortcode($atts) {
    321             $this->get_shortcode_args($atts);
    322             if (!empty($this->shortcode_args['id'])) {
    323                 $this->unserialize_shortcode_data($this->shortcode_args['id']);
    324             }
    325             $args = $this->create_shortcode_args();
    326             $attributes = $this->create_shortcode_attributes();
    327             $params['taxonomy'] = $this->create_shortcode_taxonomy();
    328             $params['sort_options'] = $this->create_shortcode_sort_button();
    329             $params['controls_container'] = $this->create_shortcode_controls_container();
     369        public function render_quick_ajax_shortcode($params) {
     370            $this->get_shortcode_params($params);
     371            if (!empty($this->shortcode_params['id'])) {
     372                $this->unserialize_shortcode_data($this->shortcode_params['id']);
     373            }
     374            $query_args = $this->create_shortcode_args();
     375            $attribute_provider = new QAPL_Shortcode_Ajax_Attributes_Provider($this->shortcode_params, $this->shortcode_postmeta);
     376            $attributes = $attribute_provider->get_attributes();
     377            $render_context['taxonomy'] = $this->create_shortcode_taxonomy();
     378            $render_context['sort_options'] = $this->create_shortcode_sort_button();
     379            $render_context['controls_container'] = $this->create_shortcode_controls_container();
    330380            ob_start();
    331             if (!empty($args) && function_exists('qapl_render_post_container')) {
    332                 qapl_render_post_container($args, $attributes, $params);
     381            if (!empty($query_args) && function_exists('qapl_render_post_container')) {
     382                qapl_render_post_container($query_args, $attributes, $render_context);
    333383            }
    334384            $output = ob_get_clean();
  • quick-ajax-post-loader/trunk/inc/functions.php

    r3246713 r3287563  
    55//add get qapl_render_post_container - echo qapl_render_post_container()
    66//add get qapl_render_taxonomy_filter
    7 function qapl_render_post_container($args, $attributes = null, $params = null, $meta_query = null) {
     7function qapl_render_post_container($args, $attributes = null, $render_context = null, $meta_query = null) {
    88    if (!class_exists('QAPL_Quick_Ajax_Handler') || !method_exists('QAPL_Quick_Ajax_Handler', 'get_instance')) {
    99        if (defined('WP_DEBUG') && WP_DEBUG) {
     
    1818    $output = '';
    1919    $filter_wrapper_start = $filter_wrapper_end = '';
    20     if(isset($params['controls_container']) && $params['controls_container'] == 1){
     20    if(isset($render_context['controls_container']) && $render_context['controls_container'] == 1){
    2121        $filter_wrapper_start = '<div class="quick-ajax-controls-container">';
    2222         $filter_wrapper_end = '</div>';
    2323    }
    2424    $output .= $filter_wrapper_start;
    25     if (isset($params['sort_options']) && !empty($params['sort_options']) && is_array($params['sort_options'])) {
    26         $output .= $ajax_class->render_sort_options($params['sort_options']);
     25    if (isset($render_context['sort_options']) && !empty($render_context['sort_options']) && is_array($render_context['sort_options'])) {
     26        $output .= $ajax_class->render_sort_options($render_context['sort_options']);
    2727    }
    28     if (isset($params['taxonomy']) && !empty($params['taxonomy']) && is_string($params['taxonomy'])) {
    29         $output .= $ajax_class->render_taxonomy_terms_filter($params['taxonomy']);
     28    if (isset($render_context['taxonomy']) && !empty($render_context['taxonomy']) && is_string($render_context['taxonomy'])) {
     29        $output .= $ajax_class->render_taxonomy_terms_filter($render_context['taxonomy']);
    3030    }
    3131    $output .= $filter_wrapper_end;
     
    5050    $ajax_class->wp_query_args($args, $attributes);
    5151    $ajax_class->layout_customization($attributes);
    52     if(!empty($taxonomy) && is_string($taxonomy)) {
    53         echo $ajax_class->render_taxonomy_terms_filter($taxonomy);
     52    $selected_taxonomy = null;
     53
     54    if (!empty($taxonomy) && is_string($taxonomy)) {
     55        $selected_taxonomy = $taxonomy;
     56    } elseif (!empty($args['selected_taxonomy']) && is_string($args['selected_taxonomy'])) {
     57        $selected_taxonomy = $args['selected_taxonomy'];
     58    }
     59    if(!empty($selected_taxonomy) && is_string($selected_taxonomy)) {
     60        echo $ajax_class->render_taxonomy_terms_filter($selected_taxonomy);
    5461    }
    5562}
  • quick-ajax-post-loader/trunk/js/admin-script.js

    r3269883 r3287563  
    66            this.click_and_select_all();
    77            this.handle_post_type_change();
     8            this.handle_taxonomy_change();
    89            this.show_hide_element_on_change();
    910            this.quick_ajax_tabs();
     
    1415        },
    1516        handle_post_type_change: function () {
     17            var self = this;
    1618            if (typeof qapl_quick_ajax_helper !== "undefined" && qapl_quick_ajax_helper) {
    1719                if ($("#" + qapl_quick_ajax_helper.quick_ajax_settings_wrapper + " #" + qapl_quick_ajax_helper.quick_ajax_post_type).length) {
     
    3133                                    taxonomySelect.empty();
    3234                                    taxonomySelect.append(response.data);
     35                                    self.trigger_taxonomy_change();
    3336                                } else {
    3437                                    console.error("Quick Ajax Post Loader: Invalid response structure");
     
    4346            }
    4447        },
     48        handle_taxonomy_change: function () {
     49            var self = this;
     50            if (typeof qapl_quick_ajax_helper !== "undefined" && qapl_quick_ajax_helper) {
     51                var taxonomySelect = $("#" + qapl_quick_ajax_helper.quick_ajax_settings_wrapper + " #" + qapl_quick_ajax_helper.quick_ajax_taxonomy);
     52                var termsContainer = $("#" + qapl_quick_ajax_helper.quick_ajax_settings_wrapper + " #" + qapl_quick_ajax_helper.quick_ajax_manual_selected_terms);
     53                if (taxonomySelect.length) {
     54                    taxonomySelect.on("change", function () {
     55                        termsContainer.empty();
     56                        self.admin_page_loader(termsContainer);
     57                        var taxonomy = $(this).val();
     58                        var post_id = "";
     59                        if ($("#post_ID").length) {
     60                            post_id = $("#post_ID").val();
     61                        }
     62                        $.ajax({
     63                            url: qapl_quick_ajax_helper.ajax_url,
     64                            type: "POST",
     65                            data: {
     66                                action: "qapl_quick_ajax_get_terms_by_taxonomy",
     67                                taxonomy: taxonomy,
     68                                post_id: post_id,
     69                                nonce: qapl_quick_ajax_helper.nonce
     70                            },
     71                            success: function (response) {
     72                                if (response && response.data) {
     73                                    termsContainer.fadeOut(100, function () {
     74                                        termsContainer.empty();
     75                                        termsContainer.append(response.data);
     76                                        termsContainer.fadeIn(100);
     77                                    });
     78                                } else {
     79                                    console.error("Quick Ajax Post Loader: Invalid response structure for terms");
     80                                }
     81                            },
     82                            error: function (xhr, status, error) {
     83                                console.error(error);
     84                            }
     85                        });
     86                    });
     87                }
     88            }
     89        },
     90        trigger_taxonomy_change: function () {
     91            var self = this;
     92            if (typeof qapl_quick_ajax_helper !== "undefined" && qapl_quick_ajax_helper) {
     93                var taxonomySelect = $("#" + qapl_quick_ajax_helper.quick_ajax_settings_wrapper + " #" + qapl_quick_ajax_helper.quick_ajax_taxonomy);
     94                var termsContainer = $("#" + qapl_quick_ajax_helper.quick_ajax_settings_wrapper + " #" + qapl_quick_ajax_helper.quick_ajax_manual_selected_terms);
     95                if (termsContainer.length) {
     96                    self.admin_page_loader(termsContainer);
     97                    taxonomySelect.trigger("change");
     98                }
     99            }
     100        },
     101        admin_page_loader: function (container) {
     102            container.append('<div class="qapl-admin-page-loader"><span></span><span></span><span></span></div>');
     103        },
    45104        show_hide_element_on_change: function () {
    46             $(".show-hide-element").each(function () {
    47                 var checkbox = $(this).find("input");
    48                 var targetID = checkbox.attr("id");
    49                 checkbox.change(function () {
    50                     if (checkbox.is(":checked")) {
    51                         $('div[data-item="' + targetID + '"]').removeClass("inactive");
     105            $(".show-hide-trigger input, .show-hide-trigger select").on("change", function () {
     106                $(".quick-ajax-field-container[data-conditional]").each(function () {
     107                    var $container = $(this);
     108                    var conditions = $container.data("conditional");
     109                    var shouldBeVisible = true;
     110
     111                    $.each(conditions, function (fieldId, expectedValue) {
     112                        var $triggerField = $("#" + fieldId);
     113                        var actualValue = $triggerField.is(":checkbox") ? ($triggerField.is(":checked") ? "1" : "0") : $triggerField.val();
     114
     115                        if (actualValue !== expectedValue) {
     116                            shouldBeVisible = false;
     117                            return false; // break out of loop
     118                        }
     119                    });
     120
     121                    if (shouldBeVisible) {
     122                        $container.removeClass("inactive");
    52123                    } else {
    53                         $('div[data-item="' + targetID + '"]').addClass("inactive");
     124                        $container.addClass("inactive");
    54125                    }
    55126                });
     
    155226
    156227            // Join the cleaned class names with a single space
    157             return classNames.join(" ");
     228            return classNames.join(", ");
    158229        },
    159230        quick_ajax_function_generator: function () {
     
    208279                    quickAjaxArgsText += "    'ignore_sticky_posts' => " + inputData.qapl_ignore_sticky_posts + ",\n";
    209280                }
     281                if (inputData.qapl_show_select_taxonomy === 1) {
     282                    quickAjaxArgsText += "    'selected_taxonomy' => '" + inputData.qapl_select_taxonomy + "',\n";
     283                }
     284                /* */
     285                if (inputData.qapl_show_select_taxonomy === 1 && inputData.qapl_manual_term_selection === 1) {
     286                    var quickAjaxSelectedTerms = inputData.qapl_manual_selected_terms;
     287                    if (quickAjaxSelectedTerms && quickAjaxSelectedTerms.length > 0) {
     288                        var quickAjaxSelectedTermsArray = "[";
     289                        quickAjaxSelectedTermsArray += quickAjaxSelectedTerms.map((option) => `${option}`).join(", ");
     290                        quickAjaxSelectedTermsArray += "]";
     291                    }
     292                    if (quickAjaxSelectedTermsArray) {
     293                        quickAjaxArgsText += "    'selected_terms' => " + quickAjaxSelectedTermsArray + ",\n";
     294                    }
     295                }
     296                let cleanArray = quickAjaxArgsText.trimEnd(); // maybe change to push and join
     297                if (cleanArray.endsWith(",")) {
     298                    // remove last coma
     299                    quickAjaxArgsText = cleanArray.slice(0, -1) + "\n";
     300                }
    210301                quickAjaxArgsText += "];";
    211302                if (typeof qapl_quick_ajax_helper !== "undefined" && qapl_quick_ajax_helper) {
     
    285376                    quickAjaxSortControlValue = "";
    286377                    quickAjaxSortControlValue += quickAjaxSortControlValueOptions;
    287                     //qapl_render_taxonomy_filter
     378                    //qapl_render_sort_controls
    288379                    quickAjaxSortControlText = "";
    289380                    quickAjaxSortControlText += "if(function_exists('qapl_render_sort_controls')):\n";
     
    307398                if (quickAjaxTaxonomy !== null) {
    308399                    quickAjaxTaxonomyFilterValue = "";
    309                     quickAjaxTaxonomyFilterValue += `$quick_ajax_taxonomy = '${quickAjaxTaxonomy}';`;
     400                    //quickAjaxTaxonomyFilterValue += `$quick_ajax_taxonomy = '${quickAjaxTaxonomy}';`;
    310401                    //qapl_render_taxonomy_filter
    311402                    quickAjaxTaxonomyFilterText = "";
     
    314405                    quickAjaxTaxonomyFilterText += "        $quick_ajax_args,\n";
    315406                    quickAjaxTaxonomyFilterText += "        $quick_ajax_attributes,\n";
    316                     quickAjaxTaxonomyFilterText += "        $quick_ajax_taxonomy,\n";
     407                    //quickAjaxTaxonomyFilterText += "        $quick_ajax_taxonomy,\n";
    317408                    //remove last comma
    318409                    quickAjaxTaxonomyFilterText = quickAjaxTaxonomyFilterText.slice(0, -2) + "\n";
  • quick-ajax-post-loader/trunk/js/admin-script.min.js

    r3269883 r3287563  
    1 !function(e){var t={init:function(){this.click_and_select_shortcode(),this.click_and_select_all(),this.handle_post_type_change(),this.show_hide_element_on_change(),this.quick_ajax_tabs(),this.copy_code(),this.quick_ajax_function_generator(),this.accordion_block_toggle()},handle_post_type_change:function(){"undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper&&e("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_post_type).length&&e("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_post_type).on("change",(function(){var t=e(this).val();e.ajax({url:qapl_quick_ajax_helper.ajax_url,type:"POST",data:{action:"qapl_quick_ajax_get_taxonomies_by_post_type",post_type:t,nonce:qapl_quick_ajax_helper.nonce},success:function(t){if(t&&t.data){var a=e("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_taxonomy);a.empty(),a.append(t.data)}},error:function(e,t,a){}})}))},show_hide_element_on_change:function(){e(".show-hide-element").each((function(){var t=e(this).find("input"),a=t.attr("id");t.change((function(){t.is(":checked")?e('div[data-item="'+a+'"]').removeClass("inactive"):e('div[data-item="'+a+'"]').addClass("inactive")}))}))},quick_ajax_tabs:function(){if(e(".quick-ajax-tabs").length){const t=e(".quick-ajax-tab-button"),a=e(".quick-ajax-tab-content");t.on("click",(function(_){_.preventDefault();const n=e(this).data("tab");t.removeClass("active").attr("aria-selected","false").attr("tabindex","-1"),a.removeClass("active").attr("hidden",!0),e(this).addClass("active").attr("aria-selected","true").attr("tabindex","0"),e("#"+n).addClass("active").attr("hidden",!1)})),t.on("keydown",(function(e){const a=t.index(this);let _;if("ArrowRight"===e.key)_=(a+1)%t.length;else{if("ArrowLeft"!==e.key)return;_=(a-1+t.length)%t.length}t.eq(_).focus().click()}))}},copy_code:function(){e(".copy-button").on("click",(function(){var t=e("#"+e(this).data("copy")),a=e("<textarea>").val(t.text()).appendTo("body").select();try{navigator.clipboard.writeText(t.text()).then((()=>{})).catch((e=>{}))}finally{a.remove(),e(this).text("Code Copied"),setTimeout((()=>{e(this).text("Copy Code")}),2e3)}}))},generateId:function(e){let t=0;for(let a=0;a<e.length;a++)t+=e.charCodeAt(a),a%2==0?t+=e.charCodeAt(a):t-=e.charCodeAt(a);return t},getExcludedPostIds:function(e){var t=e.split(/[,\s]+/),a=[];return t.forEach((function(e){/^\d+$/.test(e)&&-1===a.indexOf(e)&&a.push(e)})),a.join(", ")},cleanClassNames:function(e){let t=e.replace(/,/g," ").split(/\s+/);return t=t.filter(((e,t,a)=>!/^\d/.test(e)&&""!==e&&a.indexOf(e)===t)),t.join(" ")},quick_ajax_function_generator:function(){var t=this;e(".generate-function-button").on("click",(function(){var a=e(this),_=a.attr("data-output");a.prop("disabled",!0);var n=e('.copy-button[data-copy="'+_+'"]');n.prop("disabled",!0);var i={};e(".function-generator-wrap input, .function-generator-wrap select").each((function(t,a){var _=e(a),n=_.attr("name"),o=_.attr("id");if("checkbox"===a.type)if(n&&n.endsWith("[]")){let e=n.replace(/\[\]$/,"");i[e]||(i[e]=[]),_.prop("checked")&&i[e].push(_.val())}else i[o]=_.prop("checked")?1:0;else i[o]=_.val()}));let o=Object.values(i).join("");var c="";(c+="$quick_ajax_args = [\n",c+="    'post_type' => '"+i.qapl_select_post_type+"',\n",c+="    'posts_per_page' => "+i.qapl_select_posts_per_page+",\n","none"!==i.qapl_select_orderby&&(c+="    'orderby' => '"+i.qapl_select_orderby+"',\n"),c+="    'order' => '"+i.qapl_select_order+"',\n",""!==i.qapl_select_post_not_in)&&(c+="    'post__not_in' => ["+t.getExcludedPostIds(i.qapl_select_post_not_in)+"],\n");if(1===i.qapl_ignore_sticky_posts&&(c+="    'ignore_sticky_posts' => "+i.qapl_ignore_sticky_posts+",\n"),c+="];","undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper){var l={};if(l[qapl_quick_ajax_helper.quick_ajax_id]=t.generateId(o),1===i.qapl_layout_quick_ajax_css_style&&(l[qapl_quick_ajax_helper.quick_ajax_css_style]=i.qapl_layout_quick_ajax_css_style,l[qapl_quick_ajax_helper.grid_num_columns]=i.qapl_layout_select_columns_qty),i.qapl_layout_quick_ajax_post_item_template){var r=i.qapl_layout_quick_ajax_post_item_template;l[qapl_quick_ajax_helper.post_item_template]=r}if(i.qapl_layout_add_taxonomy_filter_class&&""!==i.qapl_layout_add_taxonomy_filter_class){r=t.cleanClassNames(i.qapl_layout_add_taxonomy_filter_class);l[qapl_quick_ajax_helper.taxonomy_filter_class]=r}if(i.qapl_layout_add_container_class&&""!==i.qapl_layout_add_container_class){r=t.cleanClassNames(i.qapl_layout_add_container_class);l[qapl_quick_ajax_helper.container_class]=r}1===i.qapl_show_custom_load_more_post_quantity&&(l[qapl_quick_ajax_helper.load_more_posts]=i.qapl_select_custom_load_more_post_quantity),1===i.qapl_override_global_loader_icon&&(l[qapl_quick_ajax_helper.loader_icon]=i.qapl_loader_icon),1===i.qapl_ajax_on_initial_load&&(l[qapl_quick_ajax_helper.ajax_initial_load]=i.qapl_ajax_on_initial_load),1===i.qapl_ajax_infinite_scroll&&(l[qapl_quick_ajax_helper.infinite_scroll]=i.qapl_ajax_infinite_scroll),1===i.qapl_show_end_post_message&&(l[qapl_quick_ajax_helper.show_end_message]=i.qapl_show_end_post_message)}var s="";Object.keys(l).length>0&&(s="",s+="$quick_ajax_attributes = [\n",Object.entries(l).forEach((([e,a])=>{let _;_=t.quick_ajax_is_numeric(a)?parseInt(a):"string"==typeof a?`'${a}'`:a,s+=`    '${e}' => ${_},\n`})),s=s.slice(0,-2)+"\n",s+="];");var p=null,u=null;if(1===i.qapl_show_order_button&&((p=i.qapl_select_orderby_button_options)&&p.length>0)){u="$quick_ajax_sort_options = [";u+=p.map((e=>`'${e}'`)).join(", "),u+="];"}var d="",q="";null!==p&&(d="",d+=u,q="",q+="if(function_exists('qapl_render_sort_controls')):\n",q+="    qapl_render_sort_controls(\n",q+="        $quick_ajax_args,\n",q+="        $quick_ajax_attributes,\n",q=(q+="        $quick_ajax_sort_options,\n").slice(0,-2)+"\n",q+="    );\n",q+="endif;");var x=null;if(1===i.qapl_show_select_taxonomy)x=i.qapl_select_taxonomy;var h="",f="";null!==x&&(h="",h+=`$quick_ajax_taxonomy = '${x}';`,f="",f+="if(function_exists('qapl_render_taxonomy_filter')):\n",f+="    qapl_render_taxonomy_filter(\n",f+="        $quick_ajax_args,\n",f+="        $quick_ajax_attributes,\n",f=(f+="        $quick_ajax_taxonomy,\n").slice(0,-2)+"\n",f+="    );\n",f+="endif;");var k="";k+="if(function_exists('qapl_render_post_container')):\n",k+="   qapl_render_post_container(\n",k+="       $quick_ajax_args,\n",""!==s&&(k+="       $quick_ajax_attributes,\n"),k=k.slice(0,-2)+"\n",k+="   );\n",k+="endif;";var j="";""!==c.trim()&&(j+="\n// Define AJAX query parameters for '"+i.qapl_select_post_type+"' type posts.\n",j+=c.trim()+"\n"),""!==s.trim()&&(j+="\n// Define attributes for AJAX.\n",j+=s.trim()+"\n"),""!==d.trim()&&(j+="\n// Set the sort options for the button.\n",j+=d.trim()+"\n"),""!==q.trim()&&(j+="\n// Render the sorting control button.\n",j+=q.trim()+"\n"),""!==h.trim()&&(j+="\n// Set the taxonomy for filtering posts.\n",j+=h.trim()+"\n"),""!==f.trim()&&(j+="\n// Render the navigation for '"+i.qapl_select_taxonomy+"' taxonomy.\n",j+=f.trim()+"\n"),""!==k.trim()&&(j+="\n// Render the grid for '"+i.qapl_select_post_type+"' type posts.\n",j+=k.trim()+"\n");var y=e("#"+_);y.empty();for(var m=j.split("\n"),g=0;g<m.length;g++)!function(e){setTimeout((function(){y.append(m[e]+"\n"),e===m.length-1&&(a.prop("disabled",!1),n.prop("disabled",!1))}),50*g)}(g)}))},quick_ajax_is_numeric:function(e){return/^-?\d+(\.\d+)?$/.test(e)},quick_ajax_color_picker:function(){e(".color-picker-field").wpColorPicker()},quick_ajax_select_text:function(e){var t,a;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):window.getSelection&&(a=window.getSelection(),(t=document.createRange()).selectNodeContents(e),a.removeAllRanges(),a.addRange(t))},click_and_select_shortcode:function(){var t=this;e(".quick-ajax-shortcode").on("click",(function(){t.quick_ajax_select_text(this)}))},click_and_select_all:function(){var t=this;e(".click-and-select-all").on("click",(function(){var a=e(this).find("code").get(0);t.quick_ajax_select_text(a)}))},accordion_block_toggle:function(){var t=e("#wpbody-content");if(t.find(".quick-ajax-tabs").length>0){var a=e("#adminmenuwrap").outerHeight();t.css("min-height",a)}e(".quick-ajax-accordion-toggle").click((function(){e(this).toggleClass("active").next(".quick-ajax-accordion-content").slideToggle(200)}))}};e(document).ready((function(){t.init()}))}(jQuery);
     1!function(a){var e={init:function(){this.click_and_select_shortcode(),this.click_and_select_all(),this.handle_post_type_change(),this.handle_taxonomy_change(),this.show_hide_element_on_change(),this.quick_ajax_tabs(),this.copy_code(),this.quick_ajax_function_generator(),this.accordion_block_toggle()},handle_post_type_change:function(){var e=this;"undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper&&a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_post_type).length&&a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_post_type).on("change",(function(){var t=a(this).val();a.ajax({url:qapl_quick_ajax_helper.ajax_url,type:"POST",data:{action:"qapl_quick_ajax_get_taxonomies_by_post_type",post_type:t,nonce:qapl_quick_ajax_helper.nonce},success:function(t){if(t&&t.data){var _=a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_taxonomy);_.empty(),_.append(t.data),e.trigger_taxonomy_change()}},error:function(a,e,t){}})}))},handle_taxonomy_change:function(){var e=this;if("undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper){var t=a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_taxonomy),_=a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_manual_selected_terms);t.length&&t.on("change",(function(){_.empty(),e.admin_page_loader(_);var t=a(this).val(),n="";a("#post_ID").length&&(n=a("#post_ID").val()),a.ajax({url:qapl_quick_ajax_helper.ajax_url,type:"POST",data:{action:"qapl_quick_ajax_get_terms_by_taxonomy",taxonomy:t,post_id:n,nonce:qapl_quick_ajax_helper.nonce},success:function(a){a&&a.data&&_.fadeOut(100,(function(){_.empty(),_.append(a.data),_.fadeIn(100)}))},error:function(a,e,t){}})}))}},trigger_taxonomy_change:function(){if("undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper){var e=a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_taxonomy),t=a("#"+qapl_quick_ajax_helper.quick_ajax_settings_wrapper+" #"+qapl_quick_ajax_helper.quick_ajax_manual_selected_terms);t.length&&(this.admin_page_loader(t),e.trigger("change"))}},admin_page_loader:function(a){a.append('<div class="qapl-admin-page-loader"><span></span><span></span><span></span></div>')},show_hide_element_on_change:function(){a(".show-hide-trigger input, .show-hide-trigger select").on("change",(function(){a(".quick-ajax-field-container[data-conditional]").each((function(){var e=a(this),t=e.data("conditional"),_=!0;a.each(t,(function(e,t){var n=a("#"+e);if((n.is(":checkbox")?n.is(":checked")?"1":"0":n.val())!==t)return _=!1,!1})),_?e.removeClass("inactive"):e.addClass("inactive")}))}))},quick_ajax_tabs:function(){if(a(".quick-ajax-tabs").length){const e=a(".quick-ajax-tab-button"),t=a(".quick-ajax-tab-content");e.on("click",(function(_){_.preventDefault();const n=a(this).data("tab");e.removeClass("active").attr("aria-selected","false").attr("tabindex","-1"),t.removeClass("active").attr("hidden",!0),a(this).addClass("active").attr("aria-selected","true").attr("tabindex","0"),a("#"+n).addClass("active").attr("hidden",!1)})),e.on("keydown",(function(a){const t=e.index(this);let _;if("ArrowRight"===a.key)_=(t+1)%e.length;else{if("ArrowLeft"!==a.key)return;_=(t-1+e.length)%e.length}e.eq(_).focus().click()}))}},copy_code:function(){a(".copy-button").on("click",(function(){var e=a("#"+a(this).data("copy")),t=a("<textarea>").val(e.text()).appendTo("body").select();try{navigator.clipboard.writeText(e.text()).then((()=>{})).catch((a=>{}))}finally{t.remove(),a(this).text("Code Copied"),setTimeout((()=>{a(this).text("Copy Code")}),2e3)}}))},generateId:function(a){let e=0;for(let t=0;t<a.length;t++)e+=a.charCodeAt(t),t%2==0?e+=a.charCodeAt(t):e-=a.charCodeAt(t);return e},getExcludedPostIds:function(a){var e=a.split(/[,\s]+/),t=[];return e.forEach((function(a){/^\d+$/.test(a)&&-1===t.indexOf(a)&&t.push(a)})),t.join(", ")},cleanClassNames:function(a){let e=a.replace(/,/g," ").split(/\s+/);return e=e.filter(((a,e,t)=>!/^\d/.test(a)&&""!==a&&t.indexOf(a)===e)),e.join(", ")},quick_ajax_function_generator:function(){var e=this;a(".generate-function-button").on("click",(function(){var t=a(this),_=t.attr("data-output");t.prop("disabled",!0);var n=a('.copy-button[data-copy="'+_+'"]');n.prop("disabled",!0);var i={};a(".function-generator-wrap input, .function-generator-wrap select").each((function(e,t){var _=a(t),n=_.attr("name"),o=_.attr("id");if("checkbox"===t.type)if(n&&n.endsWith("[]")){let a=n.replace(/\[\]$/,"");i[a]||(i[a]=[]),_.prop("checked")&&i[a].push(_.val())}else i[o]=_.prop("checked")?1:0;else i[o]=_.val()}));let o=Object.values(i).join("");var l="";(l+="$quick_ajax_args = [\n",l+="    'post_type' => '"+i.qapl_select_post_type+"',\n",l+="    'posts_per_page' => "+i.qapl_select_posts_per_page+",\n","none"!==i.qapl_select_orderby&&(l+="    'orderby' => '"+i.qapl_select_orderby+"',\n"),l+="    'order' => '"+i.qapl_select_order+"',\n",""!==i.qapl_select_post_not_in)&&(l+="    'post__not_in' => ["+e.getExcludedPostIds(i.qapl_select_post_not_in)+"],\n");if(1===i.qapl_ignore_sticky_posts&&(l+="    'ignore_sticky_posts' => "+i.qapl_ignore_sticky_posts+",\n"),1===i.qapl_show_select_taxonomy&&(l+="    'selected_taxonomy' => '"+i.qapl_select_taxonomy+"',\n"),1===i.qapl_show_select_taxonomy&&1===i.qapl_manual_term_selection){var c=i.qapl_manual_selected_terms;if(c&&c.length>0){var r="[";r+=c.map((a=>`${a}`)).join(", "),r+="]"}r&&(l+="    'selected_terms' => "+r+",\n")}let s=l.trimEnd();if(s.endsWith(",")&&(l=s.slice(0,-1)+"\n"),l+="];","undefined"!=typeof qapl_quick_ajax_helper&&qapl_quick_ajax_helper){var p={};if(p[qapl_quick_ajax_helper.quick_ajax_id]=e.generateId(o),1===i.qapl_layout_quick_ajax_css_style&&(p[qapl_quick_ajax_helper.quick_ajax_css_style]=i.qapl_layout_quick_ajax_css_style,p[qapl_quick_ajax_helper.grid_num_columns]=i.qapl_layout_select_columns_qty),i.qapl_layout_quick_ajax_post_item_template){var u=i.qapl_layout_quick_ajax_post_item_template;p[qapl_quick_ajax_helper.post_item_template]=u}if(i.qapl_layout_add_taxonomy_filter_class&&""!==i.qapl_layout_add_taxonomy_filter_class){u=e.cleanClassNames(i.qapl_layout_add_taxonomy_filter_class);p[qapl_quick_ajax_helper.taxonomy_filter_class]=u}if(i.qapl_layout_add_container_class&&""!==i.qapl_layout_add_container_class){u=e.cleanClassNames(i.qapl_layout_add_container_class);p[qapl_quick_ajax_helper.container_class]=u}1===i.qapl_show_custom_load_more_post_quantity&&(p[qapl_quick_ajax_helper.load_more_posts]=i.qapl_select_custom_load_more_post_quantity),1===i.qapl_override_global_loader_icon&&(p[qapl_quick_ajax_helper.loader_icon]=i.qapl_loader_icon),1===i.qapl_ajax_on_initial_load&&(p[qapl_quick_ajax_helper.ajax_initial_load]=i.qapl_ajax_on_initial_load),1===i.qapl_ajax_infinite_scroll&&(p[qapl_quick_ajax_helper.infinite_scroll]=i.qapl_ajax_infinite_scroll),1===i.qapl_show_end_post_message&&(p[qapl_quick_ajax_helper.show_end_message]=i.qapl_show_end_post_message)}var d="";Object.keys(p).length>0&&(d="",d+="$quick_ajax_attributes = [\n",Object.entries(p).forEach((([a,t])=>{let _;_=e.quick_ajax_is_numeric(t)?parseInt(t):"string"==typeof t?`'${t}'`:t,d+=`    '${a}' => ${_},\n`})),d=d.slice(0,-2)+"\n",d+="];");var q=null,h=null;if(1===i.qapl_show_order_button&&((q=i.qapl_select_orderby_button_options)&&q.length>0)){h="$quick_ajax_sort_options = [";h+=q.map((a=>`'${a}'`)).join(", "),h+="];"}var x="",f="";null!==q&&(x="",x+=h,f="",f+="if(function_exists('qapl_render_sort_controls')):\n",f+="    qapl_render_sort_controls(\n",f+="        $quick_ajax_args,\n",f+="        $quick_ajax_attributes,\n",f=(f+="        $quick_ajax_sort_options,\n").slice(0,-2)+"\n",f+="    );\n",f+="endif;");var k=null;if(1===i.qapl_show_select_taxonomy)k=i.qapl_select_taxonomy;var j="",m="";null!==k&&(j="",m="",m+="if(function_exists('qapl_render_taxonomy_filter')):\n",m+="    qapl_render_taxonomy_filter(\n",m+="        $quick_ajax_args,\n",m=(m+="        $quick_ajax_attributes,\n").slice(0,-2)+"\n",m+="    );\n",m+="endif;");var g="";g+="if(function_exists('qapl_render_post_container')):\n",g+="   qapl_render_post_container(\n",g+="       $quick_ajax_args,\n",""!==d&&(g+="       $quick_ajax_attributes,\n"),g=g.slice(0,-2)+"\n",g+="   );\n",g+="endif;";var y="";""!==l.trim()&&(y+="\n// Define AJAX query parameters for '"+i.qapl_select_post_type+"' type posts.\n",y+=l.trim()+"\n"),""!==d.trim()&&(y+="\n// Define attributes for AJAX.\n",y+=d.trim()+"\n"),""!==x.trim()&&(y+="\n// Set the sort options for the button.\n",y+=x.trim()+"\n"),""!==f.trim()&&(y+="\n// Render the sorting control button.\n",y+=f.trim()+"\n"),""!==j.trim()&&(y+="\n// Set the taxonomy for filtering posts.\n",y+=j.trim()+"\n"),""!==m.trim()&&(y+="\n// Render the navigation for '"+i.qapl_select_taxonomy+"' taxonomy.\n",y+=m.trim()+"\n"),""!==g.trim()&&(y+="\n// Render the grid for '"+i.qapl_select_post_type+"' type posts.\n",y+=g.trim()+"\n");var v=a("#"+_);v.empty();for(var b=y.split("\n"),w=0;w<b.length;w++)!function(a){setTimeout((function(){v.append(b[a]+"\n"),a===b.length-1&&(t.prop("disabled",!1),n.prop("disabled",!1))}),50*w)}(w)}))},quick_ajax_is_numeric:function(a){return/^-?\d+(\.\d+)?$/.test(a)},quick_ajax_color_picker:function(){a(".color-picker-field").wpColorPicker()},quick_ajax_select_text:function(a){var e,t;document.body.createTextRange?((e=document.body.createTextRange()).moveToElementText(a),e.select()):window.getSelection&&(t=window.getSelection(),(e=document.createRange()).selectNodeContents(a),t.removeAllRanges(),t.addRange(e))},click_and_select_shortcode:function(){var e=this;a(".quick-ajax-shortcode").on("click",(function(){e.quick_ajax_select_text(this)}))},click_and_select_all:function(){var e=this;a(".click-and-select-all").on("click",(function(){var t=a(this).find("code").get(0);e.quick_ajax_select_text(t)}))},accordion_block_toggle:function(){var e=a("#wpbody-content");if(e.find(".quick-ajax-tabs").length>0){var t=a("#adminmenuwrap").outerHeight();e.css("min-height",t)}a(".quick-ajax-accordion-toggle").click((function(){a(this).toggleClass("active").next(".quick-ajax-accordion-content").slideToggle(200)}))}};a(document).ready((function(){e.init()}))}(jQuery);
  • quick-ajax-post-loader/trunk/languages/quick-ajax-post-loader.pot

    r3269883 r3287563  
    44"Project-Id-Version: Quick Ajax Post Loader\n"
    55"Report-Msgid-Bugs-To: \n"
    6 "POT-Creation-Date: 2025-04-09 15:53+0000\n"
     6"POT-Creation-Date: 2025-05-04 15:48+0000\n"
    77"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    88"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1717"X-Domain: quick-ajax-post-loader"
    1818
    19 #: inc/class-helper.php:411 inc/class-helper.php:1311 inc/class-helper.php:1312
     19#: inc/class-helper.php:421 inc/class-helper.php:1342 inc/class-helper.php:1343
     20#: build/github/inc/class-helper.php:421 build/github/inc/class-helper.php:1342
     21#: build/github/inc/class-helper.php:1343
     22#: build/wordpress-org/trunk/inc/class-helper.php:421
     23#: build/wordpress-org/trunk/inc/class-helper.php:1342
     24#: build/wordpress-org/trunk/inc/class-helper.php:1343
    2025msgid "A → Z"
    2126msgstr ""
    2227
    23 #: inc/class-helper.php:1125
     28#: inc/class-helper.php:1156 build/github/inc/class-helper.php:1156
     29#: build/wordpress-org/trunk/inc/class-helper.php:1156
    2430msgid "Add class to post container"
    2531msgstr ""
    2632
    27 #: inc/class-helper.php:1112
     33#: inc/class-helper.php:1143 build/github/inc/class-helper.php:1143
     34#: build/wordpress-org/trunk/inc/class-helper.php:1143
    2835msgid "Add class to taxonomy filter"
    2936msgstr ""
    3037
    31 #: inc/class-helper.php:1117
     38#: inc/class-helper.php:1148 build/github/inc/class-helper.php:1148
     39#: build/wordpress-org/trunk/inc/class-helper.php:1148
    3240msgid "Add classes to the filter: class-one, class-two, class-three"
    3341msgstr ""
    3442
    35 #: inc/class-helper.php:1130
     43#: inc/class-helper.php:1161 build/github/inc/class-helper.php:1161
     44#: build/wordpress-org/trunk/inc/class-helper.php:1161
    3645msgid "Add classes to the post container: class-one, class-two, class-three"
    3746msgstr ""
    3847
    3948#: admin/admin-pages-config.php:26 admin/admin-pages-config.php:27
    40 #: admin/admin-pages-config.php:94
     49#: admin/admin-pages-config.php:94 build/github/admin/admin-pages-config.php:26
     50#: build/github/admin/admin-pages-config.php:27
     51#: build/github/admin/admin-pages-config.php:94
     52#: build/wordpress-org/trunk/admin/admin-pages-config.php:26
     53#: build/wordpress-org/trunk/admin/admin-pages-config.php:27
     54#: build/wordpress-org/trunk/admin/admin-pages-config.php:94
    4155msgid "Add New"
    4256msgstr ""
    4357
    44 #: admin/admin-pages-config.php:95
     58#: admin/admin-pages-config.php:95 build/github/admin/admin-pages-config.php:95
     59#: build/wordpress-org/trunk/admin/admin-pages-config.php:95
    4560msgid "Add New Quick Ajax"
    4661msgstr ""
    4762
    48 #: admin/pages/settings-page.php:227 admin/pages/shortcode-page.php:148
     63#: admin/pages/settings-page.php:254 admin/pages/shortcode-page.php:173
     64#: build/github/admin/pages/settings-page.php:254
     65#: build/github/admin/pages/shortcode-page.php:173
     66#: build/wordpress-org/trunk/admin/pages/settings-page.php:254
     67#: build/wordpress-org/trunk/admin/pages/shortcode-page.php:173
    4968msgid "Additional Settings"
    5069msgstr ""
    5170
    52 #: inc/class-helper.php:1060
     71#: inc/class-helper.php:1091 build/github/inc/class-helper.php:1091
     72#: build/wordpress-org/trunk/inc/class-helper.php:1091
    5373msgid "Apply Quick AJAX CSS Style"
    5474msgstr ""
    5575
    56 #: inc/class-helper.php:1064
     76#: inc/class-helper.php:1095 build/github/inc/class-helper.php:1095
     77#: build/wordpress-org/trunk/inc/class-helper.php:1095
    5778msgid "Apply Quick AJAX CSS styles and column layout."
    5879msgstr ""
    5980
    60 #: inc/class-helper.php:889
     81#: inc/class-helper.php:920 build/github/inc/class-helper.php:920
     82#: build/wordpress-org/trunk/inc/class-helper.php:920
    6183msgid "Ascending - order from lowest to highest"
    6284msgstr ""
    6385
    6486#: admin/admin-pages-config.php:144
     87#: build/github/admin/admin-pages-config.php:144
     88#: build/wordpress-org/trunk/admin/admin-pages-config.php:144
    6589msgid "Author"
    6690msgstr ""
     
    7094msgstr ""
    7195
    72 #: inc/class-helper.php:939
     96#: inc/class-helper.php:970 build/github/inc/class-helper.php:970
     97#: build/wordpress-org/trunk/inc/class-helper.php:970
    7398msgid "Available Sorting Options"
    7499msgstr ""
    75100
    76 #: inc/class-helper.php:1104
     101#: inc/class-helper.php:1135 build/github/inc/class-helper.php:1135
     102#: build/wordpress-org/trunk/inc/class-helper.php:1135
    77103msgid "Choose a template for displaying post items."
    78104msgstr ""
    79105
    80 #: inc/class-helper.php:1193
     106#: inc/class-helper.php:1224 build/github/inc/class-helper.php:1224
     107#: build/wordpress-org/trunk/inc/class-helper.php:1224
    81108msgid ""
    82109"Choose an icon to display as the loading indicator when the \"Load More\" "
     
    84111msgstr ""
    85112
    86 #: inc/class-helper.php:845
     113#: inc/class-helper.php:894 build/github/inc/class-helper.php:894
     114#: build/wordpress-org/trunk/inc/class-helper.php:894
     115msgid "Choose Terms"
     116msgstr ""
     117
     118#: inc/class-helper.php:855 build/github/inc/class-helper.php:855
     119#: build/wordpress-org/trunk/inc/class-helper.php:855
    87120msgid "Choose the post type you want to display using AJAX."
    88121msgstr ""
    89122
    90 #: inc/class-helper.php:919
     123#: inc/class-helper.php:950 build/github/inc/class-helper.php:950
     124#: build/wordpress-org/trunk/inc/class-helper.php:950
    91125msgid "Choose the sorting criteria for posts."
    92126msgstr ""
    93127
    94 #: inc/class-helper.php:1348
     128#: inc/class-helper.php:1379 build/github/inc/class-helper.php:1379
     129#: build/wordpress-org/trunk/inc/class-helper.php:1379
    95130msgid ""
    96131"Choose this option to remove old, unused data from the database. This will "
     
    99134msgstr ""
    100135
    101 #: inc/class-helper.php:1116 inc/class-helper.php:1129
     136#: inc/class-helper.php:1147 inc/class-helper.php:1160
     137#: build/github/inc/class-helper.php:1147
     138#: build/github/inc/class-helper.php:1160
     139#: build/wordpress-org/trunk/inc/class-helper.php:1147
     140#: build/wordpress-org/trunk/inc/class-helper.php:1160
    102141msgid "class-name, another-class-name"
    103142msgstr ""
    104143
    105 #: inc/class-helper.php:909
     144#: inc/class-helper.php:940 build/github/inc/class-helper.php:940
     145#: build/wordpress-org/trunk/inc/class-helper.php:940
    106146msgid "Comments: Sort by comment count"
    107147msgstr ""
    108148
    109 #: inc/class-helper.php:1344
     149#: inc/class-helper.php:1375 build/github/inc/class-helper.php:1375
     150#: build/wordpress-org/trunk/inc/class-helper.php:1375
    110151msgid "Confirm Purge of Old Data"
    111152msgstr ""
    112153
    113154#: admin/pages/shortcode-page.php:13
     155#: build/github/admin/pages/shortcode-page.php:13
     156#: build/wordpress-org/trunk/admin/pages/shortcode-page.php:13
    114157msgid "Copy and paste this shortcode on the page to display the posts list"
    115158msgstr ""
    116159
    117 #: admin/pages/settings-page.php:252
     160#: admin/pages/settings-page.php:311
     161#: build/github/admin/pages/settings-page.php:311
     162#: build/wordpress-org/trunk/admin/pages/settings-page.php:311
    118163msgid "Copy Code"
    119164msgstr ""
    120165
    121 #: inc/class-helper.php:1138 inc/class-helper.php:1149
     166#: inc/class-helper.php:1169 inc/class-helper.php:1180
     167#: build/github/inc/class-helper.php:1169
     168#: build/github/inc/class-helper.php:1180
     169#: build/wordpress-org/trunk/inc/class-helper.php:1169
     170#: build/wordpress-org/trunk/inc/class-helper.php:1180
    122171msgid "Custom Load More Post Quantity"
    123172msgstr ""
    124173
    125 #: inc/class-helper.php:1229
     174#: inc/class-helper.php:1260 build/github/inc/class-helper.php:1260
     175#: build/wordpress-org/trunk/inc/class-helper.php:1260
    126176msgid ""
    127177"Customize the \"Load More\" button text. This label will appear on the "
     
    130180msgstr ""
    131181
    132 #: inc/class-helper.php:1205
     182#: inc/class-helper.php:1236 build/github/inc/class-helper.php:1236
     183#: build/wordpress-org/trunk/inc/class-helper.php:1236
    133184msgid ""
    134185"Customize the \"Read More\" text for your templates. This label will appear "
     
    137188msgstr ""
    138189
    139 #: inc/class-helper.php:1217
     190#: inc/class-helper.php:1248 build/github/inc/class-helper.php:1248
     191#: build/wordpress-org/trunk/inc/class-helper.php:1248
    140192msgid ""
    141193"Customize the \"Show All\" text label for the filter. This label will appear "
     
    144196msgstr ""
    145197
    146 #: inc/class-helper.php:1265
     198#: inc/class-helper.php:1296 build/github/inc/class-helper.php:1296
     199#: build/wordpress-org/trunk/inc/class-helper.php:1296
    147200msgid ""
    148201"Customize the format for displaying post dates. This text will replace the "
     
    151204msgstr ""
    152205
    153 #: inc/class-helper.php:1253
     206#: inc/class-helper.php:1272 build/github/inc/class-helper.php:1272
     207#: build/wordpress-org/trunk/inc/class-helper.php:1272
    154208msgid ""
    155209"Customize the message shown when no posts match the selected filters. "
     
    158212msgstr ""
    159213
    160 #: inc/class-helper.php:1241
     214#: inc/class-helper.php:1284 build/github/inc/class-helper.php:1284
     215#: build/wordpress-org/trunk/inc/class-helper.php:1284
    161216msgid ""
    162217"Customize the message that appears when there are no more posts to load. "
     
    165220msgstr ""
    166221
    167 #: inc/class-helper.php:907
     222#: inc/class-helper.php:938 build/github/inc/class-helper.php:938
     223#: build/wordpress-org/trunk/inc/class-helper.php:938
    168224msgid "Date: Sort by publication date"
    169225msgstr ""
    170226
    171 #: inc/class-helper.php:915
     227#: inc/class-helper.php:946 build/github/inc/class-helper.php:946
     228#: build/wordpress-org/trunk/inc/class-helper.php:946
    172229msgid "Default Sort By"
    173230msgstr ""
    174231
    175 #: inc/class-helper.php:895
     232#: inc/class-helper.php:926 build/github/inc/class-helper.php:926
     233#: build/wordpress-org/trunk/inc/class-helper.php:926
    176234msgid "Default Sort Order"
    177235msgstr ""
    178236
    179 #: inc/class-helper.php:885
     237#: inc/class-helper.php:916 build/github/inc/class-helper.php:916
     238#: build/wordpress-org/trunk/inc/class-helper.php:916
    180239msgid "Descending - order from highest to lowest"
    181240msgstr ""
    182241
    183 #: inc/class-helper.php:878
     242#: inc/class-helper.php:909 build/github/inc/class-helper.php:909
     243#: build/wordpress-org/trunk/inc/class-helper.php:909
    184244msgid "Determine the number of posts to be loaded per AJAX request."
    185245msgstr ""
    186246
    187 #: inc/class-helper.php:1052
     247#: inc/class-helper.php:1083 build/github/inc/class-helper.php:1083
     248#: build/wordpress-org/trunk/inc/class-helper.php:1083
    188249msgid "Display a message when there are no more posts to load via AJAX."
    189250msgstr ""
    190251
    191 #: inc/class-helper.php:952
     252#: inc/class-helper.php:983 build/github/inc/class-helper.php:983
     253#: build/wordpress-org/trunk/inc/class-helper.php:983
    192254msgid ""
    193255"Display taxonomy filter and sorting options in a single row to save space "
     
    199261msgstr ""
    200262
    201 #: admin/admin-pages-config.php:96
     263#: admin/admin-pages-config.php:96 build/github/admin/admin-pages-config.php:96
     264#: build/wordpress-org/trunk/admin/admin-pages-config.php:96
    202265msgid "Edit Quick Ajax"
    203266msgstr ""
    204267
    205 #: inc/class-helper.php:931
     268#: inc/class-helper.php:962 build/github/inc/class-helper.php:962
     269#: build/wordpress-org/trunk/inc/class-helper.php:962
    206270msgid ""
    207271"Enable a button that allows users to switch between ascending and descending "
     
    209273msgstr ""
    210274
    211 #: inc/class-helper.php:856
     275#: inc/class-helper.php:866 build/github/inc/class-helper.php:866
     276#: build/wordpress-org/trunk/inc/class-helper.php:866
    212277msgid "Enable filtering by taxonomy/category."
    213278msgstr ""
    214279
    215 #: inc/class-helper.php:1037
     280#: inc/class-helper.php:1068 build/github/inc/class-helper.php:1068
     281#: build/wordpress-org/trunk/inc/class-helper.php:1068
    216282msgid "Enable Infinite Scroll"
    217283msgstr ""
    218284
    219 #: inc/class-helper.php:1041
     285#: inc/class-helper.php:887 build/github/inc/class-helper.php:887
     286#: build/wordpress-org/trunk/inc/class-helper.php:887
     287msgid "Enable manual selection of taxonomy terms to be used for filtering."
     288msgstr ""
     289
     290#: inc/class-helper.php:1072 build/github/inc/class-helper.php:1072
     291#: build/wordpress-org/trunk/inc/class-helper.php:1072
    220292msgid ""
    221293"Enable this option to automatically load more posts via AJAX as the user "
     
    223295msgstr ""
    224296
    225 #: inc/class-helper.php:1030
     297#: inc/class-helper.php:1061 build/github/inc/class-helper.php:1061
     298#: build/wordpress-org/trunk/inc/class-helper.php:1061
    226299msgid ""
    227300"Enable this option to load the initial set of posts via AJAX on page load. "
     
    230303msgstr ""
    231304
    232 #: inc/class-helper.php:1007 inc/class-helper_new.php:485
     305#: inc/class-helper.php:1038 inc/class-helper_new.php:485
     306#: build/github/inc/class-helper.php:1038
     307#: build/wordpress-org/trunk/inc/class-helper.php:1038
    233308msgid "Enter a list of post IDs to exclude from the query."
    234309msgstr ""
    235310
    236 #: inc/class-helper.php:1228
     311#: inc/class-helper.php:1259 build/github/inc/class-helper.php:1259
     312#: build/wordpress-org/trunk/inc/class-helper.php:1259
    237313msgid "Enter custom label for Load More"
    238314msgstr ""
    239315
    240 #: inc/class-helper.php:1204
     316#: inc/class-helper.php:1235 build/github/inc/class-helper.php:1235
     317#: build/wordpress-org/trunk/inc/class-helper.php:1235
    241318msgid "Enter custom label for Read More"
    242319msgstr ""
    243320
    244 #: inc/class-helper.php:1216
     321#: inc/class-helper.php:1247 build/github/inc/class-helper.php:1247
     322#: build/wordpress-org/trunk/inc/class-helper.php:1247
    245323msgid "Enter custom label for Show All"
    246324msgstr ""
    247325
    248 #: inc/class-helper.php:1264
     326#: inc/class-helper.php:1295 build/github/inc/class-helper.php:1295
     327#: build/wordpress-org/trunk/inc/class-helper.php:1295
    249328msgid "Enter date format (e.g., F j, Y)"
    250329msgstr ""
    251330
    252 #: inc/class-helper.php:1240
     331#: inc/class-helper.php:1283 build/github/inc/class-helper.php:1283
     332#: build/wordpress-org/trunk/inc/class-helper.php:1283
    253333msgid "Enter message for end of posts"
    254334msgstr ""
    255335
    256 #: inc/class-helper.php:1252
     336#: inc/class-helper.php:1271 build/github/inc/class-helper.php:1271
     337#: build/wordpress-org/trunk/inc/class-helper.php:1271
    257338msgid "Enter message for no posts found"
    258339msgstr ""
    259340
    260 #: inc/class-helper.php:1002 inc/class-helper_new.php:482
     341#: inc/class-helper.php:1033 inc/class-helper_new.php:482
     342#: build/github/inc/class-helper.php:1033
     343#: build/wordpress-org/trunk/inc/class-helper.php:1033
    261344msgid "Excluded Post IDs"
    262345msgstr ""
    263346
    264 #: admin/pages/settings-page.php:132 admin/pages/settings-page.php:183
     347#: admin/pages/settings-page.php:140 admin/pages/settings-page.php:192
     348#: build/github/admin/pages/settings-page.php:140
     349#: build/github/admin/pages/settings-page.php:192
     350#: build/wordpress-org/trunk/admin/pages/settings-page.php:140
     351#: build/wordpress-org/trunk/admin/pages/settings-page.php:192
    265352msgid "Function Generator"
    266353msgstr ""
    267354
    268 #: admin/pages/settings-page.php:187 admin/pages/shortcode-page.php:102
     355#: admin/pages/settings-page.php:196 admin/pages/shortcode-page.php:108
     356#: build/github/admin/pages/settings-page.php:196
     357#: build/github/admin/pages/shortcode-page.php:108
     358#: build/wordpress-org/trunk/admin/pages/settings-page.php:196
     359#: build/wordpress-org/trunk/admin/pages/shortcode-page.php:108
    269360msgid "General Settings"
    270361msgstr ""
    271362
    272 #: admin/pages/settings-page.php:251
     363#: admin/pages/settings-page.php:310
     364#: build/github/admin/pages/settings-page.php:310
     365#: build/wordpress-org/trunk/admin/pages/settings-page.php:310
    273366msgid "Generate Function"
    274367msgstr ""
    275368
    276 #: admin/pages/settings-page.php:130 admin/pages/settings-page.php:162
     369#: admin/pages/settings-page.php:138 admin/pages/settings-page.php:170
     370#: build/github/admin/pages/settings-page.php:138
     371#: build/github/admin/pages/settings-page.php:170
     372#: build/wordpress-org/trunk/admin/pages/settings-page.php:138
     373#: build/wordpress-org/trunk/admin/pages/settings-page.php:170
    277374msgid "Global Options"
    278375msgstr ""
    279376
    280 #: admin/pages/settings-page.php:134
     377#: admin/pages/settings-page.php:142
     378#: build/github/admin/pages/settings-page.php:142
     379#: build/wordpress-org/trunk/admin/pages/settings-page.php:142
    281380msgid "Help"
    282381msgstr ""
    283382
    284 #: admin/pages/settings-page.php:261
     383#: admin/pages/settings-page.php:320
     384#: build/github/admin/pages/settings-page.php:320
     385#: build/wordpress-org/trunk/admin/pages/settings-page.php:320
    285386msgid "Help Content"
    286387msgstr ""
    287388
    288 #: admin/pages/settings-page.php:274
     389#: admin/pages/settings-page.php:333
     390#: build/github/admin/pages/settings-page.php:333
     391#: build/wordpress-org/trunk/admin/pages/settings-page.php:333
    289392msgid "Help file not found."
    290393msgstr ""
     
    298401msgstr ""
    299402
    300 #: inc/class-helper.php:1015 inc/class-helper_new.php:493
     403#: inc/class-helper.php:1046 inc/class-helper_new.php:493
     404#: build/github/inc/class-helper.php:1046
     405#: build/wordpress-org/trunk/inc/class-helper.php:1046
    301406msgid "Ignore Sticky Posts"
    302407msgstr ""
     
    306411msgstr ""
    307412
    308 #: inc/class-helper.php:949
     413#: inc/class-helper.php:980 build/github/inc/class-helper.php:980
     414#: build/wordpress-org/trunk/inc/class-helper.php:980
    309415msgid "Inline Filter & Sorting"
    310416msgstr ""
    311417
    312 #: admin/pages/settings-page.php:279
     418#: admin/pages/settings-page.php:338
     419#: build/github/admin/pages/settings-page.php:338
     420#: build/wordpress-org/trunk/admin/pages/settings-page.php:338
    313421msgid "Invalid help file format."
    314422msgstr ""
    315423
    316 #: admin/pages/settings-page.php:235
     424#: admin/pages/settings-page.php:262
     425#: build/github/admin/pages/settings-page.php:262
     426#: build/wordpress-org/trunk/admin/pages/settings-page.php:262
    317427msgid "Layout Settings"
    318428msgstr ""
    319429
    320 #: admin/pages/shortcode-page.php:158
     430#: admin/pages/shortcode-page.php:183
     431#: build/github/admin/pages/shortcode-page.php:183
     432#: build/wordpress-org/trunk/admin/pages/shortcode-page.php:183
    321433msgid "layout Settings"
    322434msgstr ""
    323435
    324 #: inc/class-helper.php:1141
     436#: inc/class-helper.php:1172 build/github/inc/class-helper.php:1172
     437#: build/wordpress-org/trunk/inc/class-helper.php:1172
    325438msgid "Load a different number of posts than the default page display."
    326439msgstr ""
    327440
    328 #: inc/class-helper.php:1026
     441#: inc/class-helper.php:1057 build/github/inc/class-helper.php:1057
     442#: build/wordpress-org/trunk/inc/class-helper.php:1057
    329443msgid "Load Initial Posts via AJAX"
    330444msgstr ""
    331445
    332 #: inc/class-ajax.php:616 inc/class-helper.php:1227
    333 #: inc/class-template-hooks.php:124
     446#: inc/class-ajax.php:673 inc/class-helper.php:1258
     447#: inc/class-template-hooks.php:135 build/github/inc/class-ajax.php:673
     448#: build/github/inc/class-helper.php:1258
     449#: build/github/inc/class-template-hooks.php:135
     450#: build/wordpress-org/trunk/inc/class-ajax.php:673
     451#: build/wordpress-org/trunk/inc/class-helper.php:1258
     452#: build/wordpress-org/trunk/inc/class-template-hooks.php:135
    334453msgid "Load More"
    335454msgstr ""
    336455
    337 #: admin/admin-pages-config.php:97
     456#: admin/admin-pages-config.php:97 build/github/admin/admin-pages-config.php:97
     457#: build/wordpress-org/trunk/admin/admin-pages-config.php:97
    338458msgid "New Quick Ajax"
    339459msgstr ""
    340460
    341 #: inc/class-helper.php:393 inc/class-helper.php:1275 inc/class-helper.php:1276
     461#: inc/class-helper.php:403 inc/class-helper.php:1306 inc/class-helper.php:1307
     462#: build/github/inc/class-helper.php:403 build/github/inc/class-helper.php:1306
     463#: build/github/inc/class-helper.php:1307
     464#: build/wordpress-org/trunk/inc/class-helper.php:403
     465#: build/wordpress-org/trunk/inc/class-helper.php:1306
     466#: build/wordpress-org/trunk/inc/class-helper.php:1307
    342467msgid "Newest"
    343468msgstr ""
    344469
    345470#: admin/admin-pages-config.php:100
     471#: build/github/admin/admin-pages-config.php:100
     472#: build/wordpress-org/trunk/admin/admin-pages-config.php:100
    346473msgid "No Items found"
    347474msgstr ""
    348475
    349476#: admin/admin-pages-config.php:101
     477#: build/github/admin/admin-pages-config.php:101
     478#: build/wordpress-org/trunk/admin/admin-pages-config.php:101
    350479msgid "No Items found in trash"
    351480msgstr ""
    352481
    353 #: inc/class-helper.php:1239 inc/class-template-hooks.php:127
    354 msgid "No more posts to load."
    355 msgstr ""
    356 
    357 #: templates/post-items/no-posts.php:7
     482#: inc/class-helper.php:1282 inc/class-template-hooks.php:141
     483#: build/github/inc/class-helper.php:1282
     484#: build/github/inc/class-template-hooks.php:141
     485#: build/wordpress-org/trunk/inc/class-helper.php:1282
     486#: build/wordpress-org/trunk/inc/class-template-hooks.php:141
     487msgid "No more posts to load"
     488msgstr ""
     489
     490#: inc/class-helper.php:1270 inc/class-template-hooks.php:138
     491#: build/github/inc/class-helper.php:1270
     492#: build/github/inc/class-template-hooks.php:138
     493#: build/wordpress-org/trunk/inc/class-helper.php:1270
     494#: build/wordpress-org/trunk/inc/class-template-hooks.php:138
    358495msgid "No posts found"
    359496msgstr ""
    360497
    361 #: inc/class-helper.php:1251
    362 msgid "No posts found."
    363 msgstr ""
    364 
    365 #: inc/actions.php:125 admin/pages/shortcode-page.php:130
     498#: admin/admin-pages-config.php:436 inc/actions.php:152
     499#: build/github/admin/admin-pages-config.php:436
     500#: build/github/inc/actions.php:152
     501#: build/wordpress-org/trunk/admin/admin-pages-config.php:436
     502#: build/wordpress-org/trunk/inc/actions.php:152
     503msgid "No taxonomy available"
     504msgstr ""
     505
     506#: admin/admin-pages-config.php:409 inc/actions.php:131
     507#: build/github/admin/admin-pages-config.php:409
     508#: build/github/inc/actions.php:131
     509#: build/wordpress-org/trunk/admin/admin-pages-config.php:409
     510#: build/wordpress-org/trunk/inc/actions.php:131
    366511msgid "No taxonomy found"
    367512msgstr ""
    368513
    369 #: inc/class-helper.php:1079
     514#: admin/admin-pages-config.php:443 inc/actions.php:192
     515#: build/github/admin/admin-pages-config.php:443
     516#: build/github/inc/actions.php:192
     517#: build/wordpress-org/trunk/admin/admin-pages-config.php:443
     518#: build/wordpress-org/trunk/inc/actions.php:192
     519msgid "No terms found"
     520msgstr ""
     521
     522#: inc/class-helper.php:1110 build/github/inc/class-helper.php:1110
     523#: build/wordpress-org/trunk/inc/class-helper.php:1110
    370524msgid "Number of Columns"
    371525msgstr ""
    372526
    373 #: inc/class-helper.php:399 inc/class-helper.php:1287 inc/class-helper.php:1288
     527#: inc/class-helper.php:409 inc/class-helper.php:1318 inc/class-helper.php:1319
     528#: build/github/inc/class-helper.php:409 build/github/inc/class-helper.php:1318
     529#: build/github/inc/class-helper.php:1319
     530#: build/wordpress-org/trunk/inc/class-helper.php:409
     531#: build/wordpress-org/trunk/inc/class-helper.php:1318
     532#: build/wordpress-org/trunk/inc/class-helper.php:1319
    374533msgid "Oldest"
    375534msgstr ""
    376535
    377 #: inc/class-helper.php:1160
     536#: inc/class-helper.php:1191 build/github/inc/class-helper.php:1191
     537#: build/wordpress-org/trunk/inc/class-helper.php:1191
    378538msgid "Override Global Loader Icon"
    379539msgstr ""
     
    387547msgstr ""
    388548
    389 #: inc/class-helper.php:405 inc/class-helper.php:1299 inc/class-helper.php:1300
     549#: inc/class-helper.php:415 inc/class-helper.php:1330 inc/class-helper.php:1331
     550#: build/github/inc/class-helper.php:415 build/github/inc/class-helper.php:1330
     551#: build/github/inc/class-helper.php:1331
     552#: build/wordpress-org/trunk/inc/class-helper.php:415
     553#: build/wordpress-org/trunk/inc/class-helper.php:1330
     554#: build/wordpress-org/trunk/inc/class-helper.php:1331
    390555msgid "Popular"
    391556msgstr ""
     
    395560msgstr ""
    396561
    397 #: inc/class-helper.php:874
     562#: inc/class-helper.php:905 build/github/inc/class-helper.php:905
     563#: build/wordpress-org/trunk/inc/class-helper.php:905
    398564msgid "Posts Per Page"
    399565msgstr ""
     
    407573msgstr ""
    408574
    409 #: admin/pages/settings-page.php:138 admin/pages/settings-page.php:305
     575#: admin/pages/settings-page.php:146 admin/pages/settings-page.php:364
     576#: build/github/admin/pages/settings-page.php:146
     577#: build/github/admin/pages/settings-page.php:364
     578#: build/wordpress-org/trunk/admin/pages/settings-page.php:146
     579#: build/wordpress-org/trunk/admin/pages/settings-page.php:364
    410580msgid "Purge Old Data"
    411581msgstr ""
    412582
    413 #: admin/pages/settings-page.php:311
     583#: admin/pages/settings-page.php:370
     584#: build/github/admin/pages/settings-page.php:370
     585#: build/wordpress-org/trunk/admin/pages/settings-page.php:370
    414586msgid "Purge Unused Data"
    415587msgstr ""
     
    419591msgstr ""
    420592
    421 #: admin/pages/settings-page.php:9
     593#: admin/pages/settings-page.php:9 build/github/admin/pages/settings-page.php:9
     594#: build/wordpress-org/trunk/admin/pages/settings-page.php:9
    422595msgid "Quick AJAX settings"
    423596msgstr ""
    424597
    425 #: admin/admin-pages-config.php:93
     598#: admin/admin-pages-config.php:93 build/github/admin/admin-pages-config.php:93
     599#: build/wordpress-org/trunk/admin/admin-pages-config.php:93
    426600msgid "Quick Ajax Shortcode"
    427601msgstr ""
    428602
    429 #: admin/admin-pages-config.php:92
     603#: admin/admin-pages-config.php:92 build/github/admin/admin-pages-config.php:92
     604#: build/wordpress-org/trunk/admin/admin-pages-config.php:92
    430605msgid "Quick Ajax Shortcodes"
    431606msgstr ""
    432607
    433 #: inc/class-helper.php:423 inc/class-helper.php:1335 inc/class-helper.php:1336
     608#: inc/class-helper.php:433 inc/class-helper.php:1366 inc/class-helper.php:1367
     609#: build/github/inc/class-helper.php:433 build/github/inc/class-helper.php:1366
     610#: build/github/inc/class-helper.php:1367
     611#: build/wordpress-org/trunk/inc/class-helper.php:433
     612#: build/wordpress-org/trunk/inc/class-helper.php:1366
     613#: build/wordpress-org/trunk/inc/class-helper.php:1367
    434614msgid "Random"
    435615msgstr ""
    436616
    437 #: inc/class-helper.php:910
     617#: inc/class-helper.php:941 build/github/inc/class-helper.php:941
     618#: build/wordpress-org/trunk/inc/class-helper.php:941
    438619msgid "Random: Random order"
    439620msgstr ""
    440621
    441 #: inc/class-helper.php:1203 inc/class-template-hooks.php:121
     622#: inc/class-helper.php:1234 inc/class-template-hooks.php:132
     623#: build/github/inc/class-helper.php:1234
     624#: build/github/inc/class-template-hooks.php:132
     625#: build/wordpress-org/trunk/inc/class-helper.php:1234
     626#: build/wordpress-org/trunk/inc/class-template-hooks.php:132
    442627msgid "Read More"
    443628msgstr ""
    444629
    445 #: admin/pages/settings-page.php:176
     630#: admin/pages/settings-page.php:185
     631#: build/github/admin/pages/settings-page.php:185
     632#: build/wordpress-org/trunk/admin/pages/settings-page.php:185
    446633msgid "Save Settings"
    447634msgstr ""
    448635
    449 #: admin/admin-pages-config.php:99
     636#: admin/admin-pages-config.php:99 build/github/admin/admin-pages-config.php:99
     637#: build/wordpress-org/trunk/admin/admin-pages-config.php:99
    450638msgid "Search Quick Ajax"
    451639msgstr ""
    452640
    453 #: inc/class-helper.php:1189
     641#: inc/class-helper.php:1220 build/github/inc/class-helper.php:1220
     642#: build/wordpress-org/trunk/inc/class-helper.php:1220
    454643msgid "Select Loader Icon"
    455644msgstr ""
    456645
    457 #: inc/class-helper.php:1100
     646#: inc/class-helper.php:1131 build/github/inc/class-helper.php:1131
     647#: build/wordpress-org/trunk/inc/class-helper.php:1131
    458648msgid "Select Post Item Template"
    459649msgstr ""
    460650
    461 #: inc/class-helper.php:842
     651#: inc/class-helper.php:852 build/github/inc/class-helper.php:852
     652#: build/wordpress-org/trunk/inc/class-helper.php:852
    462653msgid "Select Post Type"
    463654msgstr ""
    464655
    465 #: inc/class-helper.php:863
     656#: inc/class-helper.php:884 build/github/inc/class-helper.php:884
     657#: build/wordpress-org/trunk/inc/class-helper.php:884
     658msgid "Select Specific Terms"
     659msgstr ""
     660
     661#: inc/class-helper.php:873 build/github/inc/class-helper.php:873
     662#: build/wordpress-org/trunk/inc/class-helper.php:873
    466663msgid "Select Taxonomy"
    467664msgstr ""
    468665
    469 #: inc/class-helper.php:1152
     666#: inc/class-helper.php:1183 build/github/inc/class-helper.php:1183
     667#: build/wordpress-org/trunk/inc/class-helper.php:1183
    470668msgid ""
    471669"Select the custom number of posts to load when using the \"Load More\" "
     
    477675msgstr ""
    478676
    479 #: inc/class-helper.php:867
     677#: inc/class-helper.php:898 build/github/inc/class-helper.php:898
     678#: build/wordpress-org/trunk/inc/class-helper.php:898
     679msgid ""
     680"Select the specific terms to be used for filtering posts. If left empty, no "
     681"results will be shown."
     682msgstr ""
     683
     684#: inc/class-helper.php:877 build/github/inc/class-helper.php:877
     685#: build/wordpress-org/trunk/inc/class-helper.php:877
    480686msgid "Select the taxonomy to be used for filtering posts."
    481687msgstr ""
    482688
    483 #: inc/class-helper.php:943
     689#: inc/class-helper.php:974 build/github/inc/class-helper.php:974
     690#: build/wordpress-org/trunk/inc/class-helper.php:974
    484691msgid "Select which sorting options will be available to users."
    485692msgstr ""
    486693
    487 #: inc/class-helper.php:1308
     694#: inc/class-helper.php:1339 build/github/inc/class-helper.php:1339
     695#: build/wordpress-org/trunk/inc/class-helper.php:1339
    488696msgid "Set \"A → Z\" Label"
    489697msgstr ""
    490698
    491 #: inc/class-helper.php:1236
     699#: inc/class-helper.php:1279 build/github/inc/class-helper.php:1279
     700#: build/wordpress-org/trunk/inc/class-helper.php:1279
    492701msgid "Set \"End of Posts\" Message"
    493702msgstr ""
    494703
    495 #: inc/class-helper.php:1224
     704#: inc/class-helper.php:1255 build/github/inc/class-helper.php:1255
     705#: build/wordpress-org/trunk/inc/class-helper.php:1255
    496706msgid "Set \"Load More\" Label"
    497707msgstr ""
    498708
    499 #: inc/class-helper.php:1272
     709#: inc/class-helper.php:1303 build/github/inc/class-helper.php:1303
     710#: build/wordpress-org/trunk/inc/class-helper.php:1303
    500711msgid "Set \"Newest\" Label"
    501712msgstr ""
    502713
    503 #: inc/class-helper.php:1248
     714#: inc/class-helper.php:1267 build/github/inc/class-helper.php:1267
     715#: build/wordpress-org/trunk/inc/class-helper.php:1267
    504716msgid "Set \"No Posts Found\" Message"
    505717msgstr ""
    506718
    507 #: inc/class-helper.php:1284
     719#: inc/class-helper.php:1315 build/github/inc/class-helper.php:1315
     720#: build/wordpress-org/trunk/inc/class-helper.php:1315
    508721msgid "Set \"Oldest\" Label"
    509722msgstr ""
    510723
    511 #: inc/class-helper.php:1296
     724#: inc/class-helper.php:1327 build/github/inc/class-helper.php:1327
     725#: build/wordpress-org/trunk/inc/class-helper.php:1327
    512726msgid "Set \"Popular\" Label"
    513727msgstr ""
    514728
    515 #: inc/class-helper.php:1332
     729#: inc/class-helper.php:1363 build/github/inc/class-helper.php:1363
     730#: build/wordpress-org/trunk/inc/class-helper.php:1363
    516731msgid "Set \"Random\" Label"
    517732msgstr ""
    518733
    519 #: inc/class-helper.php:1200
     734#: inc/class-helper.php:1231 build/github/inc/class-helper.php:1231
     735#: build/wordpress-org/trunk/inc/class-helper.php:1231
    520736msgid "Set \"Read More\" Label"
    521737msgstr ""
    522738
    523 #: inc/class-helper.php:1212
     739#: inc/class-helper.php:1243 build/github/inc/class-helper.php:1243
     740#: build/wordpress-org/trunk/inc/class-helper.php:1243
    524741msgid "Set \"Show All\" Label"
    525742msgstr ""
    526743
    527 #: inc/class-helper.php:1320
     744#: inc/class-helper.php:1351 build/github/inc/class-helper.php:1351
     745#: build/wordpress-org/trunk/inc/class-helper.php:1351
    528746msgid "Set \"Z → A\" Label"
    529747msgstr ""
    530748
    531 #: inc/class-helper.php:1163
     749#: inc/class-helper.php:1194 build/github/inc/class-helper.php:1194
     750#: build/wordpress-org/trunk/inc/class-helper.php:1194
    532751msgid "Set a different loader icon than the one specified in global options."
    533752msgstr ""
    534753
    535 #: inc/class-helper.php:1260
     754#: inc/class-helper.php:1291 build/github/inc/class-helper.php:1291
     755#: build/wordpress-org/trunk/inc/class-helper.php:1291
    536756msgid "Set Date Format"
    537757msgstr ""
    538758
    539 #: inc/class-helper.php:1313
     759#: inc/class-helper.php:1344 build/github/inc/class-helper.php:1344
     760#: build/wordpress-org/trunk/inc/class-helper.php:1344
    540761msgid ""
    541762"Set the label for sorting posts alphabetically (A to Z) based on the post "
     
    543764msgstr ""
    544765
    545 #: inc/class-helper.php:1325
     766#: inc/class-helper.php:1356 build/github/inc/class-helper.php:1356
     767#: build/wordpress-org/trunk/inc/class-helper.php:1356
    546768msgid ""
    547769"Set the label for sorting posts alphabetically (Z to A) based on the post "
     
    550772msgstr ""
    551773
    552 #: inc/class-helper.php:1301
     774#: inc/class-helper.php:1332 build/github/inc/class-helper.php:1332
     775#: build/wordpress-org/trunk/inc/class-helper.php:1332
    553776msgid ""
    554777"Set the label for sorting posts by the highest number of comments. Examples: "
     
    556779msgstr ""
    557780
    558 #: inc/class-helper.php:1277
     781#: inc/class-helper.php:1308 build/github/inc/class-helper.php:1308
     782#: build/wordpress-org/trunk/inc/class-helper.php:1308
    559783msgid ""
    560784"Set the label for sorting posts from newest to oldest (based on publication "
     
    562786msgstr ""
    563787
    564 #: inc/class-helper.php:1289
     788#: inc/class-helper.php:1320 build/github/inc/class-helper.php:1320
     789#: build/wordpress-org/trunk/inc/class-helper.php:1320
    565790msgid ""
    566791"Set the label for sorting posts from oldest to newest (based on publication "
     
    568793msgstr ""
    569794
    570 #: inc/class-helper.php:1337
     795#: inc/class-helper.php:1368 build/github/inc/class-helper.php:1368
     796#: build/wordpress-org/trunk/inc/class-helper.php:1368
    571797msgid ""
    572798"Set the label for sorting posts in a random order. Examples: \"Shuffle\", "
     
    575801
    576802#: admin/admin-pages-config.php:36 admin/admin-pages-config.php:37
     803#: build/github/admin/admin-pages-config.php:36
     804#: build/github/admin/admin-pages-config.php:37
     805#: build/wordpress-org/trunk/admin/admin-pages-config.php:36
     806#: build/wordpress-org/trunk/admin/admin-pages-config.php:37
    577807msgid "Settings & Features"
    578808msgstr ""
    579809
    580810#: admin/admin-pages-config.php:143
     811#: build/github/admin/admin-pages-config.php:143
     812#: build/wordpress-org/trunk/admin/admin-pages-config.php:143
    581813msgid "Shortcode"
    582814msgstr ""
    583815
    584816#: admin/admin-pages-config.php:103
     817#: build/github/admin/admin-pages-config.php:103
     818#: build/wordpress-org/trunk/admin/admin-pages-config.php:103
    585819msgid "Shortcodes"
    586820msgstr ""
    587821
    588 #: inc/class-ajax.php:240 inc/class-helper.php:1215
     822#: inc/class-ajax.php:284 inc/class-helper.php:1246
     823#: build/github/inc/class-ajax.php:284 build/github/inc/class-helper.php:1246
     824#: build/wordpress-org/trunk/inc/class-ajax.php:284
     825#: build/wordpress-org/trunk/inc/class-helper.php:1246
    589826msgid "Show All"
    590827msgstr ""
    591828
    592 #: inc/class-helper.php:1048
     829#: inc/class-helper.php:1079 build/github/inc/class-helper.php:1079
     830#: build/wordpress-org/trunk/inc/class-helper.php:1079
    593831msgid "Show End Message"
    594832msgstr ""
    595833
    596 #: inc/class-helper.php:928
     834#: inc/class-helper.php:959 build/github/inc/class-helper.php:959
     835#: build/wordpress-org/trunk/inc/class-helper.php:959
    597836msgid "Show Sorting Button"
    598837msgstr ""
    599838
    600 #: inc/class-helper.php:853
     839#: inc/class-helper.php:863 build/github/inc/class-helper.php:863
     840#: build/wordpress-org/trunk/inc/class-helper.php:863
    601841msgid "Show Taxonomy Filter"
    602842msgstr ""
    603843
    604 #: inc/class-ajax.php:324
     844#: inc/class-ajax.php:370 build/github/inc/class-ajax.php:370
     845#: build/wordpress-org/trunk/inc/class-ajax.php:370
    605846msgid "Sort by"
    606847msgstr ""
    607848
    608 #: admin/pages/settings-page.php:168
     849#: admin/pages/settings-page.php:177
     850#: build/github/admin/pages/settings-page.php:177
     851#: build/wordpress-org/trunk/admin/pages/settings-page.php:177
    609852msgid "Sorting Option Labels"
    610853msgstr ""
    611854
    612 #: admin/pages/settings-page.php:220 admin/pages/shortcode-page.php:140
     855#: admin/pages/settings-page.php:239 admin/pages/shortcode-page.php:152
     856#: build/github/admin/pages/settings-page.php:239
     857#: build/github/admin/pages/shortcode-page.php:152
     858#: build/wordpress-org/trunk/admin/pages/settings-page.php:239
     859#: build/wordpress-org/trunk/admin/pages/shortcode-page.php:152
    613860msgid "Sorting Settings"
    614861msgstr ""
    615862
    616 #: inc/class-helper.php:899
     863#: inc/class-helper.php:930 build/github/inc/class-helper.php:930
     864#: build/wordpress-org/trunk/inc/class-helper.php:930
    617865msgid "Specify the order of posts."
    618866msgstr ""
    619867
    620 #: inc/class-helper.php:1083
     868#: inc/class-helper.php:1114 build/github/inc/class-helper.php:1114
     869#: build/wordpress-org/trunk/inc/class-helper.php:1114
    621870msgid "Specify the quantity of columns."
    622871msgstr ""
    623872
    624 #: inc/class-helper.php:1019 inc/class-helper_new.php:496
     873#: inc/class-helper.php:1050 inc/class-helper_new.php:496
     874#: build/github/inc/class-helper.php:1050
     875#: build/wordpress-org/trunk/inc/class-helper.php:1050
    625876msgid ""
    626877"Specify to ignore sticky posts, treating them as regular posts in the query."
     
    633884msgstr ""
    634885
    635 #: inc/class-helper.php:908
     886#: inc/class-helper.php:939 build/github/inc/class-helper.php:939
     887#: build/wordpress-org/trunk/inc/class-helper.php:939
    636888msgid "Title: Sort by post title"
    637889msgstr ""
     
    641893msgstr ""
    642894
    643 #: admin/admin-pages-config.php:98
     895#: admin/admin-pages-config.php:98 build/github/admin/admin-pages-config.php:98
     896#: build/wordpress-org/trunk/admin/admin-pages-config.php:98
    644897msgid "View Quick Ajax"
    645898msgstr ""
    646899
    647900#: admin/admin-pages-config.php:46 inc/class-updater.php:308
    648 #: inc/class-updater.php:337
     901#: inc/class-updater.php:337 build/github/admin/admin-pages-config.php:46
     902#: build/github/inc/class-updater.php:308
     903#: build/github/inc/class-updater.php:337
     904#: build/wordpress-org/trunk/admin/admin-pages-config.php:46
     905#: build/wordpress-org/trunk/inc/class-updater.php:308
     906#: build/wordpress-org/trunk/inc/class-updater.php:337
    649907msgid "You do not have sufficient permissions to access this page."
    650908msgstr ""
    651909
    652 #: inc/class-helper.php:417 inc/class-helper.php:1323 inc/class-helper.php:1324
     910#: inc/class-helper.php:427 inc/class-helper.php:1354 inc/class-helper.php:1355
     911#: build/github/inc/class-helper.php:427 build/github/inc/class-helper.php:1354
     912#: build/github/inc/class-helper.php:1355
     913#: build/wordpress-org/trunk/inc/class-helper.php:427
     914#: build/wordpress-org/trunk/inc/class-helper.php:1354
     915#: build/wordpress-org/trunk/inc/class-helper.php:1355
    653916msgid "Z → A"
    654917msgstr ""
  • quick-ajax-post-loader/trunk/quick-ajax-post-loader.php

    r3275104 r3287563  
    55* Text Domain: quick-ajax-post-loader
    66* Domain Path: /languages
    7 * Version: 1.6.4
     7* Version: 1.7.0
    88* Description: Supercharge post loading with Quick Ajax Post Loader. Enhance user experience and optimize site performance using AJAX technology.
    99* Author: Pawel Grzelkowski
  • quick-ajax-post-loader/trunk/readme.txt

    r3275104 r3287563  
    55Requires at least: 5.6
    66Tested up to: 6.8
    7 Stable tag: 1.6.4
     7Stable tag: 1.7.0
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    106106== Changelog ==
    107107
     108= 1.7.0 - 2025-05-05 =
     109- Added support for manually selecting specific taxonomy terms in the shortcode or PHP function settings.
     110- Improved loader icon system with support for dark variants and better visual integration.
     111- Updated labels and structure of filter and loader buttons for clarity and consistency.
     112- Updated the `qapl_render_taxonomy_filter()` PHP function - the `$taxonomy` parameter is now optional (still supported for backward compatibility).
     113- Optimized internal plugin code for better performance, readability, and long-term maintainability.
     114- Enhanced shortcode parameter handling and security validation to prevent conflicts and unexpected behavior.
     115- Fixed several minor styling issues to improve compatibility with custom themes.
     116
    108117= 1.6.4 - 2025-04-16 =
    109118- Added a new global option to define a custom "No Posts Found" message.
     
    253262== Upgrade Notice ==
    254263
     264= 1.7.0 =
     265This update introduces improvements to filter buttons, loader styling, and shortcode parameter handling.
     266
     267**Important:**
     268- New support for selecting specific taxonomy terms directly via shortcode settings offers more control and flexibility.
     269- The `qapl_render_taxonomy_filter()` PHP function has been updated – the `$taxonomy` parameter is now optional and auto-detected from the shortcode or function arguments.
     270- If you previously passed the taxonomy manually, your code will still work — no changes required.
     271
     272Recommended update for improved developer experience and enhanced plugin stability.
     273
    255274= 1.6.4 =
    256275This update adds a new global option and filter hook to customize the "No Posts Found" message.
  • quick-ajax-post-loader/trunk/templates/loader-icon/loader-icon-quick-ajax-dot.php

    r3238174 r3287563  
    33    exit;
    44}
    5 /* Loader Icon Name: Dot Icon */
     5/* Loader Icon Name: Dot Loader */
    66?>
    77<div class="qapl-loader-dot">
  • quick-ajax-post-loader/trunk/templates/loader-icon/loader-icon-quick-ajax-wave.php

    r3238174 r3287563  
    33  exit;
    44}
    5 /* Loader Icon Name: Wave Icon */
     5/* Loader Icon Name: Wave Loader */
    66?>
    77<div class="qapl-loader-wave">
  • quick-ajax-post-loader/trunk/templates/loader-icon/loader-icon.php

    r3238174 r3287563  
    33    exit;
    44}
    5 /* Loader Icon Name: Default Icon */
     5/* Loader Icon Name: Default Loader */
    66?>
    77<div class="qapl-loader-default"></div>
Note: See TracChangeset for help on using the changeset viewer.