Skip to content

Commit

Permalink
Merge pull request #196 from dcooney/feature/layouts-update-security-…
Browse files Browse the repository at this point in the history
…fixes

Feature/layouts update security fixes
  • Loading branch information
dcooney authored Feb 14, 2023
2 parents 7ccb41a + 92b3992 commit dc81fc3
Show file tree
Hide file tree
Showing 58 changed files with 2,795 additions and 2,323 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ npm-shrinkwrap.json
*.map
_out
/vendor
.nvmrc.old

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.20.1
14
17 changes: 14 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: infinite scroll, load more, ajax, lazy load, endless scroll, infinite scro
Requires at least: 4.4
Requires PHP: 5.6
Tested up to: 6.1
Stable tag: 5.5.5
Stable tag: 5.6.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -128,7 +128,6 @@ The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) a
- **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)**: Generate unique paging URLs with each Ajax Load More query.
- **[Single Post](https://connekthq.com/plugins/ajax-load-more/add-ons/single-post/)**: Enable infinite scrolling of single posts on your WordPress post templates.
- **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)**: Manage Ajax Load More repeater templates from within your current theme directory.
- **[Users](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)**: Lazy loading WordPress Users with Ajax Load More.
- **[WooCommerce](https://connekthq.com/plugins/ajax-load-more/add-ons/woocommerce/)**: Infinite scroll WooCommerce products with Ajax Load More.

### Extensions
Expand All @@ -139,7 +138,8 @@ The following free [extensions](https://connekthq.com/plugins/ajax-load-more/ext
- **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)**: Display Relevanssi search results with Ajax Load More.
- **[REST API](https://connekthq.com/plugins/ajax-load-more/extensions/rest-api/)**: Enable compatibility with the WordPress REST API.
- **[SearchWP](https://connekthq.com/plugins/ajax-load-more/extensions/searchwp/)**: Display SearchWP query results with Ajax Load More.
- **[Term Query](https://wordpress.org/plugins/ajax-load-more-for-terms/)**: Infinite scroll WordPress Terms.
- **[Term Query](https://connekthq.com/plugins/ajax-load-more/extensions/terms/)**: Infinite scroll WordPress Terms.
- **[Users](https://connekthq.com/plugins/ajax-load-more/extensions/users/)**: Lazy loading WordPress Users with Ajax Load More.

### Callback Functions

Expand Down Expand Up @@ -263,6 +263,17 @@ How to install Ajax Load More.

== Changelog ==

= 5.6.0 - February 14, 2023 =
* NEW: Added new ajaxloadmore.click() public JS function to manually trigger an Ajax Load More load action from any element on the screen.
* NEW: Added support for new Filter facets in Filters add-on version 2.0.
* NEW: Added alm JavaScript object to the global `window` object so accessing config params can be done in browser. e.g. `window.ajax_load_more`
* NEW: Added support for `include_children` when running a taxonomy query.
* FIX: Fixed issue with localized data variables not working in Full Site Editing (FSE) themes.
* FIX: Fixed deprecation notice in Elementor widgetregistration
* UPDATE: Security fix for escaping data attributes in shortcode.
* UPDATE: Code cleanup.


= 5.5.5 - January 5, 2013 =
* UPDATE: Removed requirement of `transition_container` to be present when using Preloaded.
* UPDATE: Various updates required for the new 2.0 Layouts add-on release.
Expand Down
4 changes: 3 additions & 1 deletion admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ function alm_cache_page() {
* @since 3.4.0
*/
function alm_filters_page() {
include_once ALM_FILTERS_PATH . 'admin/functions.php';
if ( ! function_exists( 'alm_list_all_filters' ) ) {
include_once ALM_FILTERS_PATH . 'admin/functions.php'; // Deprecated: This is loaded in Filters add-on.
}
include_once ALM_FILTERS_PATH . 'admin/views/filters.php';
}

Expand Down
3 changes: 1 addition & 2 deletions admin/dist/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1406,9 +1406,8 @@ jQuery(document).ready(function ($) {
* @since 5.1
*/
document.addEventListener('keydown', function (e) {
if ((window.navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey) && e.keyCode == 83) {
if ((window.navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey) && e.keyCode === 83) {
if (e.target.nodeName === 'TEXTAREA' && $(e.target).closest('.repeater-wrap')) {
console.log('Saving template...');
var btn = $(e.target).closest('.repeater-wrap').find('input.save-repeater');
if (btn) {
btn.click();
Expand Down
379 changes: 192 additions & 187 deletions admin/shortcode-builder/components/filters.php

Large diffs are not rendered by default.

148 changes: 72 additions & 76 deletions admin/shortcode-builder/includes/tax-query-options.php
Original file line number Diff line number Diff line change
@@ -1,82 +1,78 @@
<?php #1 ?>
<div class="inner taxonomy">
<label class="full"><?php _e('Taxonomy:', 'ajax-load-more'); ?></label>
<?php
/**
* Taxonomy query builder.
*
* @package AjaxLoadMore
*/
?>

<?php // 1 ?>
<div class="inner taxonomy">
<label class="full"><?php esc_attr_e( 'Taxonomy:', 'ajax-load-more' ); ?></label>
<select class="alm_element" name="taxonomy-select" id="taxonomy-select">
<option value="" selected="selected">-- <?php _e('Select Taxonomy', 'ajax-load-more'); ?>--</option>
<?php foreach( $taxonomies as $taxonomy ){ ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var;?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>
<option value="" selected="selected">-- <?php esc_attr_e( 'Select Taxonomy', 'ajax-load-more' ); ?>--</option>
<?php foreach ( $taxonomies as $taxonomy ) { ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var; ?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>

<div class="taxonomy-extended">
<label class="full"><?php _e('Taxonomy Terms:', 'ajax-load-more'); ?></label>
<label class="full"><?php esc_attr_e( 'Taxonomy Terms:', 'ajax-load-more' ); ?></label>
<div id="tax-terms-container1" class="tax-terms-container checkboxes"></div>
</div>

<div class="taxonomy-extended" id="tax-operator-select">
<label class="full"><?php _e('Taxonomy Operator:', 'ajax-load-more'); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator" id="tax-in-radio" value="IN" type="radio" checked="checked">
<label class="full"><?php esc_attr_e( 'Taxonomy Operator:', 'ajax-load-more' ); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator" id="tax-in-radio" value="IN" type="radio" checked="checked">
<label for="tax-in-radio">IN (default)</label>
</li>
</li>
<li>
<input class="alm_element" name="tax-operator" id="tax-not-in-radio" value="NOT IN" type="radio">
<label for="tax-not-in-radio">NOT IN</label>
</li>
<li>
<input class="alm_element" name="tax-operator" id="tax-and-radio" value="AND" type="radio">
<label for="tax-and-radio">AND</label>
</li>
<li>
<input class="alm_element" name="tax-operator" id="tax-exists-radio" value="EXISTS" type="radio">
<label for="tax-exists-radio">EXISTS</label>
</li>
<li>
<input class="alm_element" name="tax-operator" id="tax-not-exists-radio" value="NOT EXISTS" type="radio">
<label for="tax-not-exists-radio">NOT EXISTS</label>
</li>
</ul>
</ul>
</div>

</div>
<div class="clear"></div>

<div id="tax-query-relation">
<div class="inner border-top highlighted">
<div class="wrap-50">
<label for="tax-relation" class="full"><?php _e('Relation:', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The logical relationship between each taxonomy when there is more than one.','ajax-load-more'); ?>"></a></label>
<select class="alm_element tax-relation" name="tax-relation">
<option value="AND" selected="selected">AND</option>
<option value="OR">OR</option>
</select>
</div>
</div>
<div class="inner border-top highlighted">
<div class="wrap-50">
<label for="tax-relation" class="full"><?php esc_attr_e( 'Relation:', 'ajax-load-more' ); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php esc_attr_e( 'The logical relationship between each taxonomy when there is more than one.', 'ajax-load-more' ); ?>"></a></label>
<select class="alm_element tax-relation" name="tax-relation">
<option value="AND" selected="selected">AND</option>
<option value="OR">OR</option>
</select>
</div>
</div>
</div>

<?php #2 ?>
<div class="taxonomy taxonomy-wrap">
<label class="full"><?php _e('Taxonomy:', 'ajax-load-more'); ?></label>
<?php // 2 ?>
<div class="taxonomy taxonomy-wrap">
<label class="full"><?php esc_attr_e( 'Taxonomy:', 'ajax-load-more' ); ?></label>
<a class="remove remove-tax-query" href="javascript:void(0);">&times;</a>
<select class="alm_element" name="taxonomy-select2" id="taxonomy-select2">
<option value="" selected="selected">-- <?php _e('Select Taxonomy', 'ajax-load-more'); ?>--</option>
<?php foreach( $taxonomies as $taxonomy ){ ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var;?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>
<option value="" selected="selected">-- <?php esc_attr_e( 'Select Taxonomy', 'ajax-load-more' ); ?>--</option>
<?php foreach ( $taxonomies as $taxonomy ) { ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var; ?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>

<div class="taxonomy-extended">
<label class="full"><?php _e('Taxonomy Terms:', 'ajax-load-more'); ?></label>
<label class="full"><?php esc_attr_e( 'Taxonomy Terms:', 'ajax-load-more' ); ?></label>
<div id="tax-terms-container2" class="tax-terms-container checkboxes"></div>
</div>

<div class="taxonomy-extended" id="tax-operator-select2">
<label class="full"><?php _e('Taxonomy Operator:', 'ajax-load-more'); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator2" id="tax-in-radio2" value="IN" type="radio" checked="checked">
<label class="full"><?php esc_attr_e( 'Taxonomy Operator:', 'ajax-load-more' ); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator2" id="tax-in-radio2" value="IN" type="radio" checked="checked">
<label for="tax-in-radio2">IN (default)</label>
</li>
</li>
<li>
<input class="alm_element" name="tax-operator2" id="tax-not-in-radio2" value="NOT IN" type="radio">
<label for="tax-not-in-radio2">NOT IN</label>
Expand All @@ -93,33 +89,33 @@
<input class="alm_element" name="tax-operator2" id="tax-not-exists-radio2" value="NOT EXISTS" type="radio">
<label for="tax-not-exists-radio2">NOT EXISTS</label>
</li>
</ul>
</div>
</ul>
</div>
</div>

<?php #3 ?>
<div class="taxonomy taxonomy-wrap">
<label class="full"><?php _e('Taxonomy:', 'ajax-load-more'); ?></label>
<?php // 3 ?>
<div class="taxonomy taxonomy-wrap">
<label class="full"><?php esc_attr_e( 'Taxonomy:', 'ajax-load-more' ); ?></label>
<a class="remove remove-tax-query" href="javascript:void(0);">&times;</a>
<select class="alm_element" name="taxonomy-select3" id="taxonomy-select3">
<option value="" selected="selected">-- <?php _e('Select Taxonomy', 'ajax-load-more'); ?>--</option>
<?php foreach( $taxonomies as $taxonomy ){ ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var;?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>
<option value="" selected="selected">-- <?php esc_attr_e( 'Select Taxonomy', 'ajax-load-more' ); ?>--</option>
<?php foreach ( $taxonomies as $taxonomy ) { ?>
<option name="chk-<?php echo $taxonomy->query_var; ?>" id="chk-<?php echo $taxonomy->query_var; ?>" value="<?php echo $taxonomy->query_var; ?>"><?php echo $taxonomy->label; ?></option>
<?php } ?>
</select>

<div class="taxonomy-extended">
<label class="full"><?php _e('Taxonomy Terms:', 'ajax-load-more'); ?></label>
<label class="full"><?php esc_attr_e( 'Taxonomy Terms:', 'ajax-load-more' ); ?></label>
<div id="tax-terms-container3" class="tax-terms-container checkboxes"></div>
</div>

<div class="taxonomy-extended" id="tax-operator-select3">
<label class="full"><?php _e('Taxonomy Operator:', 'ajax-load-more'); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator3" id="tax-in-radio3" value="IN" type="radio" checked="checked">
<label class="full"><?php esc_attr_e( 'Taxonomy Operator:', 'ajax-load-more' ); ?></label>
<ul class="radio">
<li>
<input class="alm_element" name="tax-operator3" id="tax-in-radio3" value="IN" type="radio" checked="checked">
<label for="tax-in-radio3">IN (default)</label>
</li>
</li>
<li>
<input class="alm_element" name="tax-operator3" id="tax-not-in-radio3" value="NOT IN" type="radio">
<label for="tax-not-in-radio3">NOT IN</label>
Expand All @@ -136,8 +132,8 @@
<input class="alm_element" name="tax-operator3" id="tax-not-exists-radio3" value="NOT EXISTS" type="radio">
<label for="tax-not-exists-radio3">NOT EXISTS</label>
</li>
</ul>
</div>
</ul>
</div>
</div>

<div class="clear"></div>
<div class="clear"></div>
Loading

0 comments on commit dc81fc3

Please sign in to comment.