Plugin Directory

Changeset 3295741


Ignore:
Timestamp:
05/18/2025 02:15:55 PM (11 months ago)
Author:
grzelkowski
Message:

version 1.7.2

Location:
quick-ajax-post-loader/trunk
Files:
9 edited

Legend:

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

    r3287563 r3295741  
    302302    <button type="button" class="qapl-filter-button custom-class" data-button="quick-ajax-filter-button">
    303303       QUICK_AJAX_LABEL
    304     </button> 
     304    </button>
    305305
    306306#### Note:
     
    384384### 3.8. Templates: Best Practices for Working with Post Layouts
    385385
    386 - **Work with a child theme** - This ensures that your changes won't be lost when updating your theme or the plugin. 
    387 - **Test all changes on a staging site** before deploying them to your live site. 
    388 - **Use clear comments in your modifications** to make future maintenance easier. 
    389 - **Utilize dedicated hooks and filters** to introduce changes **without modifying core plugin template files**. 
     386- **Work with a child theme** - This ensures that your changes won't be lost when updating your theme or the plugin.
     387- **Test all changes on a staging site** before deploying them to your live site.
     388- **Use clear comments in your modifications** to make future maintenance easier.
     389- **Utilize dedicated hooks and filters** to introduce changes **without modifying core plugin template files**.
    390390
    391391---
     
    892892To ensure safe and effective modifications to the **Quick Ajax Post Loader**, follow these best practices:
    893893
    894 - **Use filters and hooks instead of modifying core plugin files.** 
    895 - **Target only specific instances** using `$quick_ajax_id`, instead of applying global changes. 
    896 - **Test all modifications on a staging site** before applying them to a live website. 
    897 - **Use debugging tools** such as `error_log(print_r($args, true));` to inspect filter output. 
    898 - **Check for conflicts with other plugins and themes** when applying modifications. 
    899 - **Follow WordPress coding standards** to ensure compatibility and maintainability. 
    900 - **Document your changes** if working in a team or managing multiple sites. 
     894- **Use filters and hooks instead of modifying core plugin files.**
     895- **Target only specific instances** using `$quick_ajax_id`, instead of applying global changes.
     896- **Test all modifications on a staging site** before applying them to a live website.
     897- **Use debugging tools** such as `error_log(print_r($args, true));` to inspect filter output.
     898- **Check for conflicts with other plugins and themes** when applying modifications.
     899- **Follow WordPress coding standards** to ensure compatibility and maintainability.
     900- **Document your changes** if working in a team or managing multiple sites.
    901901
    902902By following these practices, you can ensure that your custom modifications are **reliable, efficient, and easy to maintain**.
     
    906906## 5. Advanced Features
    907907
    908 The **Quick Ajax Post Loader** plugin provides additional features that allow for even more advanced configuration and customization of the plugin's behavior. 
     908The **Quick Ajax Post Loader** plugin provides additional features that allow for even more advanced configuration and customization of the plugin's behavior.
    909909In this section, you will find:
    910910
     
    918918### Description
    919919
    920 The **AJAX Function Generator** is a tool available in the WordPress admin panel under **Quick Ajax > Settings & Features**, in the **"Function Generator"** tab. 
     920The **AJAX Function Generator** is a tool available in the WordPress admin panel under **Quick Ajax > Settings & Features**, in the **"Function Generator"** tab.
    921921It allows you to generate PHP code that can be placed directly in theme files such as **page.php, single.php**, or other page templates.
    922922
     
    10171017### Advanced Features Tips
    10181018
    1019 - **Test all changes** in a staging environment before deploying them. 
    1020 - **Use the generated code** to avoid errors. 
    1021 - **Customize attributes in the PHP code** instead of relying solely on shortcodes. 
     1019- **Test all changes** in a staging environment before deploying them.
     1020- **Use the generated code** to avoid errors.
     1021- **Customize attributes in the PHP code** instead of relying solely on shortcodes.
    10221022
    10231023---
     
    10271027The **Quick Ajax Post Loader** plugin allows detailed configuration of how posts are retrieved and displayed using two main sets of parameters:
    10281028
    1029 - **$quick_ajax_args** controls **which posts** are retrieved. 
    1030 - **$quick_ajax_attributes** controls **how posts** are displayed. 
     1029- **$quick_ajax_args** controls **which posts** are retrieved.
     1030- **$quick_ajax_attributes** controls **how posts** are displayed.
    10311031
    10321032If you want to customize post loading behavior, use these parameters in the **qapl_render_post_container** and **qapl_render_taxonomy_filter** functions.
  • quick-ajax-post-loader/trunk/admin/admin-pages-config.php

    r3287563 r3295741  
    266266        if(is_array($this->fields[$field_name]['options'])){
    267267            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' : '';
     268                if (is_array($current_values)) {
     269                    $checked = checked(in_array($option['value'], $current_values), true, false);
     270                } else {
     271                    $checked = checked($option['value'], true, false);
    272272                }
    273273                $field .= '<div class="quick-ajax-multiselect-option">';         
  • quick-ajax-post-loader/trunk/admin/pages/help/help_en_US.json

    r3287563 r3295741  
    2222    "3_custom_taxonomy_buttons": {
    2323        "title": "<h4>Templates: Modify Taxonomy Filter Buttons</h4>",
    24         "content": "<p>Taxonomy filter buttons allow users to select categories, tags, or other taxonomies.</p>\n<h4>Template File Location</h4>\n<p>Place the filter button template file in the following directory:</p>\n<pre><code class=\"no-background\">wp-content/themes/your-theme/quick-ajax-post-loader/templates/taxonomy-filter/\n</code></pre>\n<h4>Creating or Overriding the File</h4>\n<p>Create or edit the <strong>taxonomy-filter-button.php</strong> file.</p>\n<h4>Example File Structure</h4>\n<pre><code class=\"no-background\">&lt;button type=&quot;button&quot; class=&quot;qapl-filter-button custom-class&quot; data-button=&quot;quick-ajax-filter-button&quot;&gt;\n   QUICK_AJAX_LABEL\n&lt;/button&gt;  \n</code></pre>\n<h4>Note:</h4>\n<ul>\n<li>The <strong>label (<code class=\"code-tag\">QUICK_AJAX_LABEL</code>) and <code class=\"code-tag\">data-button</code> attribute are required</strong> for filtering to work correctly.</li>\n<li>You can add <strong>custom CSS styles</strong> to make the buttons match your site&#39;s design.</li>\n</ul>"
     24        "content": "<p>Taxonomy filter buttons allow users to select categories, tags, or other taxonomies.</p>\n<h4>Template File Location</h4>\n<p>Place the filter button template file in the following directory:</p>\n<pre><code class=\"no-background\">wp-content/themes/your-theme/quick-ajax-post-loader/templates/taxonomy-filter/\n</code></pre>\n<h4>Creating or Overriding the File</h4>\n<p>Create or edit the <strong>taxonomy-filter-button.php</strong> file.</p>\n<h4>Example File Structure</h4>\n<pre><code class=\"no-background\">&lt;button type=&quot;button&quot; class=&quot;qapl-filter-button custom-class&quot; data-button=&quot;quick-ajax-filter-button&quot;&gt;\n   QUICK_AJAX_LABEL\n&lt;/button&gt;\n</code></pre>\n<h4>Note:</h4>\n<ul>\n<li>The <strong>label (<code class=\"code-tag\">QUICK_AJAX_LABEL</code>) and <code class=\"code-tag\">data-button</code> attribute are required</strong> for filtering to work correctly.</li>\n<li>You can add <strong>custom CSS styles</strong> to make the buttons match your site&#39;s design.</li>\n</ul>"
    2525    },
    2626    "3_custom_load_more_button": {
     
    3434    "3_best_practices": {
    3535        "title": "<h4>Templates: Best Practices for Working with Post Layouts</h4>",
    36         "content": "<ul>\n<li><strong>Work with a child theme</strong> - This ensures that your changes won&#39;t be lost when updating your theme or the plugin.  </li>\n<li><strong>Test all changes on a staging site</strong> before deploying them to your live site.  </li>\n<li><strong>Use clear comments in your modifications</strong> to make future maintenance easier.  </li>\n<li><strong>Utilize dedicated hooks and filters</strong> to introduce changes <strong>without modifying core plugin template files</strong>.</li>\n</ul>"
     36        "content": "<ul>\n<li><strong>Work with a child theme</strong> - This ensures that your changes won&#39;t be lost when updating your theme or the plugin.</li>\n<li><strong>Test all changes on a staging site</strong> before deploying them to your live site.</li>\n<li><strong>Use clear comments in your modifications</strong> to make future maintenance easier.</li>\n<li><strong>Utilize dedicated hooks and filters</strong> to introduce changes <strong>without modifying core plugin template files</strong>.</li>\n</ul>"
    3737    },
    3838    "4_filter_container_hooks": {
     
    8282    "4_best_practices_hooks": {
    8383        "title": "<h4>Best Practices for Hooks and Filters</h4>",
    84         "content": "<p>To ensure safe and effective modifications to the <strong>Quick Ajax Post Loader</strong>, follow these best practices:</p>\n<ul>\n<li><strong>Use filters and hooks instead of modifying core plugin files.</strong>  </li>\n<li><strong>Target only specific instances</strong> using <code class=\"code-tag\">$quick_ajax_id</code>, instead of applying global changes.  </li>\n<li><strong>Test all modifications on a staging site</strong> before applying them to a live website.  </li>\n<li><strong>Use debugging tools</strong> such as <code class=\"code-tag\">error_log(print_r($args, true));</code> to inspect filter output.  </li>\n<li><strong>Check for conflicts with other plugins and themes</strong> when applying modifications.  </li>\n<li><strong>Follow WordPress coding standards</strong> to ensure compatibility and maintainability.  </li>\n<li><strong>Document your changes</strong> if working in a team or managing multiple sites.</li>\n</ul>\n<p>By following these practices, you can ensure that your custom modifications are <strong>reliable, efficient, and easy to maintain</strong>.</p>"
     84        "content": "<p>To ensure safe and effective modifications to the <strong>Quick Ajax Post Loader</strong>, follow these best practices:</p>\n<ul>\n<li><strong>Use filters and hooks instead of modifying core plugin files.</strong></li>\n<li><strong>Target only specific instances</strong> using <code class=\"code-tag\">$quick_ajax_id</code>, instead of applying global changes.</li>\n<li><strong>Test all modifications on a staging site</strong> before applying them to a live website.</li>\n<li><strong>Use debugging tools</strong> such as <code class=\"code-tag\">error_log(print_r($args, true));</code> to inspect filter output.</li>\n<li><strong>Check for conflicts with other plugins and themes</strong> when applying modifications.</li>\n<li><strong>Follow WordPress coding standards</strong> to ensure compatibility and maintainability.</li>\n<li><strong>Document your changes</strong> if working in a team or managing multiple sites.</li>\n</ul>\n<p>By following these practices, you can ensure that your custom modifications are <strong>reliable, efficient, and easy to maintain</strong>.</p>"
    8585    },
    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    &#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>"
     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.\nIt 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</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": {
  • quick-ajax-post-loader/trunk/inc/actions.php

    r3290862 r3295741  
    180180            <div class="quick-ajax-multiselect-option">
    181181                <label>
    182                     <?php
    183                     //check if term is selected in post meta
    184                     $checked = in_array($term->term_id, $saved_terms) ? 'checked' : '';
    185                     ?>
    186                     <input type="checkbox" name="qapl_manual_selected_terms[]" value="<?php echo esc_attr($term->term_id); ?>" <?php echo $checked; ?>>
     182                    <input type="checkbox" name="qapl_manual_selected_terms[]" value="<?php echo esc_attr($term->term_id); ?>" <?php checked(in_array($term->term_id, $saved_terms)); ?>>
    187183                    <?php echo esc_html($term->name); ?>
    188184                </label>
  • quick-ajax-post-loader/trunk/inc/class-ajax.php

    r3290862 r3295741  
    333333                    $filter_buttons .= $this->update_button_template($button);
    334334                }
    335                 echo $filter_buttons;
     335                echo wp_kses_post($filter_buttons);
    336336            }
    337337            do_action(QAPL_Hooks::HOOK_FILTER_CONTAINER_END, $this->quick_ajax_id);
     
    351351            $container_class = $this->extract_classes_from_string($class_container);
    352352            $sort_buttons ='';
     353            $allowed_button_html = [
     354                'div' => [
     355                    'class' => [],
     356                    'id' => [],
     357                    'data-*' => [],
     358                ],
     359                'select' => [
     360                    'id' => [],
     361                    'name' => [],
     362                    'aria-label' => [],
     363                    'class' => [],
     364                    'data-*' => [],
     365                ],
     366                'option' => [
     367                    'value' => [],
     368                    'selected' => [],
     369                    'class' => [],
     370                    'data-*' => [],
     371                ],
     372                'span' => [
     373                    'class' => [],
     374                    'data-button' => [],
     375                    'data-attributes' => true,
     376                    'data-action' => true,
     377                    'data-*' => [],
     378                ],
     379                'p' => [
     380                    'class' => [],
     381                    'data-*' => [],
     382                ]
     383            ];
     384
    353385            ob_start(); // Start output buffering
    354386
     
    390422                ];
    391423                $sort_buttons .= $this->create_sort_button($button_option);
    392             }
    393             echo $sort_buttons;
     424               
     425            }
     426            echo wp_kses($sort_buttons, $allowed_button_html);
    394427           
    395428            echo '</div>';
  • quick-ajax-post-loader/trunk/inc/class-helper.php

    r3290862 r3295741  
    1515    public static function get_plugin_info() {
    1616        return [
    17             'version' => '1.7.1',
     17            'version' => '1.7.2',
    1818            'name' => 'Quick Ajax Post Loader',
    1919            'text_domain' => 'quick-ajax-post-loader',
  • quick-ajax-post-loader/trunk/inc/class-shortcode.php

    r3290862 r3295741  
    196196            'postmeta_key' => QAPL_Quick_Ajax_Helper::shortcode_page_show_end_message(),
    197197            'type' => 'bool',
    198         ]);       
     198        ]); 
    199199        return !empty($attributes) ? $attributes : false;
    200200    }
     
    217217        $only_if_meta_key_true = $config['only_if_meta_key_true'] ?? null;
    218218        $value = null;
     219       
    219220        // try to get value from shortcode args
    220221        if (!empty($this->shortcode_params[$shortcode_key])) {
     
    244245                return filter_var($value, FILTER_VALIDATE_BOOLEAN) ? 1 : 0;
    245246            case 'html_class':
    246                 return sanitize_html_class($value);
     247                    $classes = preg_split('/[\s,]+/', $value, -1, PREG_SPLIT_NO_EMPTY);
     248                    $sanitized_classes = array_map('sanitize_html_class', $classes);
     249                    return implode(' ', $sanitized_classes);
    247250            case 'string':
    248251            default:
  • quick-ajax-post-loader/trunk/quick-ajax-post-loader.php

    r3290862 r3295741  
    55* Text Domain: quick-ajax-post-loader
    66* Domain Path: /languages
    7 * Version: 1.7.1
     7* Version: 1.7.2
    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

    r3290862 r3295741  
    55Requires at least: 5.6
    66Tested up to: 6.8
    7 Stable tag: 1.7.1
     7Stable tag: 1.7.2
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    106106== Changelog ==
    107107
     108= 1.7.2 - 2025-05-18 =
     109- Fixed an issue where multiple custom CSS classes added to the post container were not handled correctly when separated by commas or spaces.
     110- Minor internal improvements for better code reliability.
     111
    108112= 1.7.1 - 2025-05-10 =
    109 - Enhanced taxonomy filter in shortcode settings saved terms are now automatically pre-selected when editing.
     113- Enhanced taxonomy filter in shortcode settings - saved terms are now automatically pre-selected when editing.
    110114- The "Load More" button now passes only essential parameters, ensuring cleaner functionality.
    111115- Improved compatibility with the latest PHP versions, ensuring smooth operation without deprecated warnings.
Note: See TracChangeset for help on using the changeset viewer.