WordPress Infinite Scroll – Ajax Load More - Version 2.7.1

Version Description

  • FIX - Fixed issue for querying by meta_key - users are not required to enter a meta_value to query by meta_key.
Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 WordPress Infinite Scroll – Ajax Load More
Version 2.7.1
Comparing to
See all releases

Code changes from version 2.7.0 to 2.7.1

Files changed (2) hide show
  1. README.txt +9 -5
  2. ajax-load-more.php +17 -18
README.txt CHANGED
@@ -1,18 +1,18 @@
1
  === Ajax Load More ===
2
  Contributors: dcooney
3
  Donate link: http://connekthq.com/donate/
4
- Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
- Tested up to: 4.2.2
7
- Stable tag: 2.7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- A simple solution for lazy loading your WordPress posts and pages with Ajax.
12
 
13
  == Description ==
14
 
15
- Ajax Load More is a simple yet powerful solution for lazy loading WordPress posts and pages with Ajax.
16
  Build complex WordPress queries using our shortcode builder then add the shortcode to your pages via the content editor or directly into your template files.
17
 
18
 
@@ -264,6 +264,10 @@ How to install Ajax Load More.
264
  == Changelog ==
265
 
266
 
 
 
 
 
267
  = 2.7.0 =
268
  * MILESTONE - This 2.7.0 release includes major updates to ALM core functionality to allow for new features and various fixes.
269
  * NEW - Added multiple meta query functionality to the shortcode builder - users can now query by up to 4 custom fields.
1
  === Ajax Load More ===
2
  Contributors: dcooney
3
  Donate link: http://connekthq.com/donate/
4
+ Tags: ajax, query, ajax pagination, paging, filter, infinite scroll, infinite, pagination, loop, dynamic, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post_format, wmpl, archives, date
5
  Requires at least: 3.6
6
+ Tested up to: 4.2.3
7
+ Stable tag: 2.7.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ A simple solution for lazy loading/infinite scrolling posts and pages with Ajax.
12
 
13
  == Description ==
14
 
15
+ Ajax Load More is a simple yet powerful solution for lazy loading/infinite scrolling WordPress posts and pages with Ajax.
16
  Build complex WordPress queries using our shortcode builder then add the shortcode to your pages via the content editor or directly into your template files.
17
 
18
 
264
  == Changelog ==
265
 
266
 
267
+ = 2.7.1 =
268
+ * FIX - Fixed issue for querying by meta_key - users are not required to enter a meta_value to query by meta_key.
269
+
270
+
271
  = 2.7.0 =
272
  * MILESTONE - This 2.7.0 release includes major updates to ALM core functionality to allow for new features and various fixes.
273
  * NEW - Added multiple meta query functionality to the shortcode builder - users can now query by up to 4 custom fields.
ajax-load-more.php CHANGED
@@ -6,13 +6,13 @@ Description: A simple solution for lazy loading WordPress posts and pages with A
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
- Version: 2.7.0
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
- define('ALM_VERSION', '2.7.0');
15
- define('ALM_RELEASE', 'July 5, 2015');
16
  define( 'ALM_STORE_URL', 'https://connekthq.com' ); // EDD CONSTANT - Store URL
17
 
18
 
@@ -562,37 +562,37 @@ if( !class_exists('AjaxLoadMore') ):
562
 
563
  // Parse multiple meta query
564
  $total = count(explode(":", $meta_key)); // Total meta_query objects
565
- $meta_key = explode(":", $meta_key); // convert to array
566
  $meta_value = explode(":", $meta_value); // convert to array
567
  $meta_compare = explode(":", $meta_compare); // convert to array
568
 
569
  if($total == 1){
570
  $args['meta_query'] = array(
571
- alm_get_meta_query($meta_key[0], $meta_value[0], $meta_compare[0]),
572
  );
573
  }
574
  if($total == 2){
575
  $args['meta_query'] = array(
576
  'relation' => $meta_relation,
577
- alm_get_meta_query($meta_key[0], $meta_value[0], $meta_compare[0]),
578
- alm_get_meta_query($meta_key[1], $meta_value[1], $meta_compare[1]),
579
  );
580
  }
581
  if($total == 3){
582
  $args['meta_query'] = array(
583
  'relation' => $meta_relation,
584
- alm_get_meta_query($meta_key[0], $meta_value[0], $meta_compare[0]),
585
- alm_get_meta_query($meta_key[1], $meta_value[1], $meta_compare[1]),
586
- alm_get_meta_query($meta_key[2], $meta_value[2], $meta_compare[2]),
587
  );
588
  }
589
  if($total == 4){
590
  $args['meta_query'] = array(
591
  'relation' => $meta_relation,
592
- alm_get_meta_query($meta_key[0], $meta_value[0], $meta_compare[0]),
593
- alm_get_meta_query($meta_key[1], $meta_value[1], $meta_compare[1]),
594
- alm_get_meta_query($meta_key[2], $meta_value[2], $meta_compare[2]),
595
- alm_get_meta_query($meta_key[3], $meta_value[3], $meta_compare[3]),
596
  );
597
  }
598
 
@@ -600,10 +600,9 @@ if( !class_exists('AjaxLoadMore') ):
600
 
601
  // Meta_key, used for ordering by meta value
602
  if(!empty($meta_key)){
603
- if(count($meta_key) == 1){
604
- $args['meta_key'] = $meta_key[0];
605
- }
606
- }
607
 
608
  // Author
609
  if(!empty($author_id)){
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
+ Version: 2.7.1
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
+ define('ALM_VERSION', '2.7.1');
15
+ define('ALM_RELEASE', 'July 9, 2015');
16
  define( 'ALM_STORE_URL', 'https://connekthq.com' ); // EDD CONSTANT - Store URL
17
 
18
 
562
 
563
  // Parse multiple meta query
564
  $total = count(explode(":", $meta_key)); // Total meta_query objects
565
+ $meta_keys = explode(":", $meta_key); // convert to array
566
  $meta_value = explode(":", $meta_value); // convert to array
567
  $meta_compare = explode(":", $meta_compare); // convert to array
568
 
569
  if($total == 1){
570
  $args['meta_query'] = array(
571
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
572
  );
573
  }
574
  if($total == 2){
575
  $args['meta_query'] = array(
576
  'relation' => $meta_relation,
577
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
578
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
579
  );
580
  }
581
  if($total == 3){
582
  $args['meta_query'] = array(
583
  'relation' => $meta_relation,
584
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
585
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
586
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2]),
587
  );
588
  }
589
  if($total == 4){
590
  $args['meta_query'] = array(
591
  'relation' => $meta_relation,
592
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
593
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
594
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2]),
595
+ alm_get_meta_query($meta_keys[3], $meta_value[3], $meta_compare[3]),
596
  );
597
  }
598
 
600
 
601
  // Meta_key, used for ordering by meta value
602
  if(!empty($meta_key)){
603
+ $meta_key_single = explode(":", $meta_key);
604
+ $args['meta_key'] = $meta_key_single[0];
605
+ }
 
606
 
607
  // Author
608
  if(!empty($author_id)){