WordPress Infinite Scroll – Ajax Load More - Version 3.2

Version Description

Download this release

Release Info

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

Code changes from version 3.1.2 to 3.2

Files changed (39) hide show
  1. .editorconfig +1 -3
  2. README.txt +18 -4
  3. admin/admin-functions.php +2 -1
  4. admin/admin.php +10 -13
  5. admin/css/tooltipster/themes/tooltipster-light.css +0 -12
  6. admin/css/tooltipster/themes/tooltipster-noir.css +0 -12
  7. admin/css/tooltipster/themes/tooltipster-punk.css +0 -12
  8. admin/css/tooltipster/themes/tooltipster-shadow.css +0 -12
  9. admin/dist/css/admin.css +3909 -0
  10. admin/dist/js/admin.js +1643 -0
  11. admin/editor/editor-build.php +4 -8
  12. admin/includes/cta/writeable.php +3 -3
  13. admin/shortcode-builder/includes/tax-query-options.php +1 -1
  14. admin/shortcode-builder/js/shortcode-builder.js +31 -9
  15. admin/shortcode-builder/shortcode-builder.php +91 -16
  16. admin/{js → src/js}/admin.js +108 -19
  17. admin/{js → src/js}/libs/jquery.drops.js +0 -0
  18. admin/{js → src/js}/libs/jquery.tooltipster.min.js +0 -0
  19. admin/{js → src/js}/libs/select2.min.js +0 -0
  20. admin/{css/admin.css → src/scss/admin.scss} +94 -67
  21. admin/{css/select2.css → src/scss/libs/select2.scss} +4 -4
  22. admin/{css/tooltipster/tooltipster.css → src/scss/libs/tooltipster.scss} +0 -0
  23. admin/src/scss/partials/_alm-settings-feedback.scss +58 -0
  24. admin/views/settings.php +9 -16
  25. ajax-load-more.php +5 -5
  26. core/classes/class.alm-shortcode.php +13 -3
  27. core/dist/css/ajax-load-more.min.css +1 -1
  28. core/dist/js/ajax-load-more.js +116 -47
  29. core/dist/js/ajax-load-more.min.js +1 -1
  30. core/js/modules/almMasonry.js +0 -50
  31. core/repeater/default.php +3 -3
  32. core/{js → src/js}/ajax-load-more.js +57 -20
  33. core/{js → src/js}/libs/jquery.waitforimages.js +0 -0
  34. core/src/js/modules/almMasonry.js +86 -0
  35. core/{js → src/js}/vendor/pace/pace.js +0 -0
  36. core/{js → src/js}/vendor/pace/pace.min.js +0 -0
  37. core/{scss → src/scss}/ajax-load-more.scss +0 -0
  38. gulpfile.js +59 -21
  39. lang/ajax-load-more.pot +330 -246
.editorconfig CHANGED
@@ -1,6 +1,4 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
 
5
  root = true
6
 
1
+ # EditorConfig
 
 
2
 
3
  root = true
4
 
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
- Tested up to: 4.8
7
- Stable tag: 3.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,6 +100,7 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
100
  * **posts_per_page** - Number of posts to load with each Ajax request. Default = ’5′
101
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
102
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
 
103
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
104
  * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
105
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
@@ -107,6 +108,7 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
107
  * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
108
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
109
  * **masonry_selector** - The target classname of each masonry item. Default = null
 
110
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
111
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
112
  * **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
@@ -354,6 +356,20 @@ How to install Ajax Load More.
354
 
355
  == Changelog ==
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  = 3.1.2 - July 11, 2017 =
358
 
359
  * FIX - Bug fix for JavaScript issues introduced for IE11 & Edge browsers in ALM 3.1.1 - I reverted the problematic new functions and everything is working as expected.
@@ -833,5 +849,3 @@ How to install Ajax Load More.
833
  == Upgrade Notice ==
834
 
835
  * None
836
-
837
-
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
+ Tested up to: 4.8.1
7
+ Stable tag: 3.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
100
  * **posts_per_page** - Number of posts to load with each Ajax request. Default = ’5′
101
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
102
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
103
+ * **scroll_container** - Constrain Ajax Load More infinite scrolling to a parent container. Default = null
104
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
105
  * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
106
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
108
  * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
109
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
110
  * **masonry_selector** - The target classname of each masonry item. Default = null
111
+ * **masonry_animation** - Select a loading transition type for Masonry items. (default/zoom-out/slide-up/slide-down/none). Default = default
112
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
113
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
114
  * **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
356
 
357
  == Changelog ==
358
 
359
+ = 3.2.0 - August 8, 2017 =
360
+
361
+ * NEW - Added new `masonry_animation` setting to allow for adjusting of Masonry transitions (Default, zoom-out, slide-up, slide-down, none).
362
+ * NEW - Added new `scroll_container` setting that will allow for posts to be loaded on scroll when Ajax load more has been placed inside of a container.
363
+ * NEW - Added required support for new excluded terms feature in the Previous Post add-on.
364
+ * NEW - Added support for entering html into the `button_label` and `button_loading_label` shortcode parameters. This will allow for users to enter font icons in the button.
365
+ * FIX -Fixed issue where ACF options where not displaying in Shortcode Builder.
366
+ * UPDATE - Updated image thumbnail size in default repeater template.
367
+ * UPDATE - Updated save functionality of the ALM Settings screen.
368
+ * UPDATE -Updated Font Awesome to 4.7.0
369
+ * UPDATE - Updated build process/gulpfile to include admin css/js.
370
+ * UPDATE - Various admin UI/UX updates.
371
+
372
+
373
  = 3.1.2 - July 11, 2017 =
374
 
375
  * FIX - Bug fix for JavaScript issues introduced for IE11 & Edge browsers in ALM 3.1.1 - I reverted the problematic new functions and everything is working as expected.
849
  == Upgrade Notice ==
850
 
851
  * None
 
 
admin/admin-functions.php CHANGED
@@ -22,6 +22,7 @@ function alm_is_admin_screen(){
22
  /*
23
  * alm_has_addon
24
  * Does user have add-ons installed and activated
 
25
  *
26
  * @return boolean
27
  * @since 2.13.0
@@ -46,7 +47,7 @@ function alm_has_addon(){
46
  */
47
 
48
  function alm_has_addon_shortcodes(){
49
- if(has_action('alm_cache_installed') || has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) {
50
  return true;
51
  } else {
52
  return false;
22
  /*
23
  * alm_has_addon
24
  * Does user have add-ons installed and activated
25
+ * License Page
26
  *
27
  * @return boolean
28
  * @since 2.13.0
47
  */
48
 
49
  function alm_has_addon_shortcodes(){
50
+ if(has_action('alm_acf_installed') || has_action('alm_cache_installed') || has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) {
51
  return true;
52
  } else {
53
  return false;
admin/admin.php CHANGED
@@ -179,6 +179,7 @@ function alm_admin_vars() { ?>
179
  /* <![CDATA[ */
180
  var alm_admin_localize = <?php echo json_encode( array(
181
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
 
182
  'active' => __('Active', 'ajax-load-more'),
183
  'inactive' => __('Inactive', 'ajax-load-more'),
184
  'applying_layout' => __('Applying layout', 'ajax-load-more'),
@@ -192,7 +193,9 @@ function alm_admin_vars() { ?>
192
  'install_now' => __('Are you sure you want to install this Ajax Load More extension?', 'ajax-load-more'),
193
  'install_btn' => __('Install Now', 'ajax-load-more'),
194
  'activate_btn' => __('Activate', 'ajax-load-more'),
195
- 'installed_btn' => __('Installed', 'ajax-load-more')
 
 
196
  )); ?>
197
  /* ]]> */
198
  </script>
@@ -587,11 +590,8 @@ function alm_load_cache_admin_js(){
587
  function alm_enqueue_admin_scripts(){
588
 
589
  // Admin CSS
590
- wp_enqueue_style( 'alm-admin', ALM_ADMIN_URL. 'css/admin.css');
591
- wp_enqueue_style( 'alm-select2', ALM_ADMIN_URL. 'css/select2.css');
592
- wp_enqueue_style( 'alm-tooltipster', ALM_ADMIN_URL. 'css/tooltipster/tooltipster.css');
593
- wp_enqueue_style( 'alm-core', ALM_URL. '/core/dist/css/ajax-load-more.css');
594
- wp_enqueue_style( 'alm-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css');
595
 
596
  // disable ACF select2 on ALM pages
597
  wp_dequeue_style( 'acf-input' );
@@ -613,15 +613,12 @@ function alm_enqueue_admin_scripts(){
613
  wp_enqueue_script( 'alm-codemirror-clike', ALM_ADMIN_URL. 'codemirror/mode/clike/clike.js' );
614
  wp_enqueue_script( 'alm-codemirror-php', ALM_ADMIN_URL. 'codemirror/mode/php/php.js' );
615
 
616
- }
617
 
618
  // Admin JS
619
  wp_enqueue_script( 'jquery-form' );
620
- wp_enqueue_script( 'alm-select2', ALM_ADMIN_URL. 'js/libs/select2.min.js', array( 'jquery' ));
621
- wp_enqueue_script( 'alm-drops', ALM_ADMIN_URL. 'js/libs/jquery.drops.js', array( 'jquery' ));
622
- wp_enqueue_script( 'alm-tipster', ALM_ADMIN_URL. 'js/libs/jquery.tooltipster.min.js', array( 'jquery' ));
623
- wp_enqueue_script( 'alm-admin', ALM_ADMIN_URL. 'js/admin.js', array( 'jquery' ));
624
- wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ));
625
 
626
  }
627
 
@@ -1122,7 +1119,7 @@ function alm_disable_css_callback(){
1122
 
1123
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
1124
  $html .= '<input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' />';
1125
- $html .= '<label for="alm_disable_css_input">'.__('I want to use my own CSS styles.', 'ajax-load-more').'<br/><span style="display:block;"><i class="fa fa-file-text-o"></i> &nbsp;<a href="'.ALM_URL.'/core/css/ajax-load-more.css" target="blank">'.__('View Ajax Load More CSS', 'ajax-load-more').'</a></span></label>';
1126
 
1127
  echo $html;
1128
  }
179
  /* <![CDATA[ */
180
  var alm_admin_localize = <?php echo json_encode( array(
181
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
182
+ 'ajax_load_more' => __('Ajax Load More', 'ajax-load-more'),
183
  'active' => __('Active', 'ajax-load-more'),
184
  'inactive' => __('Inactive', 'ajax-load-more'),
185
  'applying_layout' => __('Applying layout', 'ajax-load-more'),
193
  'install_now' => __('Are you sure you want to install this Ajax Load More extension?', 'ajax-load-more'),
194
  'install_btn' => __('Install Now', 'ajax-load-more'),
195
  'activate_btn' => __('Activate', 'ajax-load-more'),
196
+ 'settings_saving' => '<i class="fa fa-spinner fa-spin" aria-hidden="true"></i> ' . __('Saving Settings', 'ajax-load-more'),
197
+ 'settings_saved' => '<i class="fa fa-check" aria-hidden="true"></i> ' . __('Settings Saved Successfully', 'ajax-load-more'),
198
+ 'settings_error' => '<i class="fa fa-exclamation-circle" aria-hidden="true"></i> ' . __('Error Saving Settings', 'ajax-load-more')
199
  )); ?>
200
  /* ]]> */
201
  </script>
590
  function alm_enqueue_admin_scripts(){
591
 
592
  // Admin CSS
593
+ wp_enqueue_style( 'alm-admin', ALM_ADMIN_URL. 'dist/css/admin.css', '', ALM_VERSION);
594
+ wp_enqueue_style( 'alm-core', ALM_URL. '/core/dist/css/ajax-load-more.css', '', ALM_VERSION);
 
 
 
595
 
596
  // disable ACF select2 on ALM pages
597
  wp_dequeue_style( 'acf-input' );
613
  wp_enqueue_script( 'alm-codemirror-clike', ALM_ADMIN_URL. 'codemirror/mode/clike/clike.js' );
614
  wp_enqueue_script( 'alm-codemirror-php', ALM_ADMIN_URL. 'codemirror/mode/php/php.js' );
615
 
616
+ }
617
 
618
  // Admin JS
619
  wp_enqueue_script( 'jquery-form' );
620
+ wp_enqueue_script( 'alm-admin', ALM_ADMIN_URL. 'dist/js/admin.js', array( 'jquery' ), ALM_VERSION);
621
+ wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ), ALM_VERSION);
 
 
 
622
 
623
  }
624
 
1119
 
1120
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
1121
  $html .= '<input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' />';
1122
+ $html .= '<label for="alm_disable_css_input">'.__('I want to use my own CSS styles.', 'ajax-load-more').'<br/><span style="display:block;"><i class="fa fa-file-text-o"></i> &nbsp;<a href="'.ALM_URL.'/core/dist/css/ajax-load-more.css" target="blank">'.__('View Ajax Load More CSS', 'ajax-load-more').'</a></span></label>';
1123
 
1124
  echo $html;
1125
  }
admin/css/tooltipster/themes/tooltipster-light.css DELETED
@@ -1,12 +0,0 @@
1
- .tooltipster-light {
2
- border-radius: 5px;
3
- border: 1px solid #cccccc;
4
- background: #ededed;
5
- color: #666666;
6
- }
7
- .tooltipster-light .tooltipster-content {
8
- font-family: Arial, sans-serif;
9
- font-size: 14px;
10
- line-height: 16px;
11
- padding: 8px 10px;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/tooltipster/themes/tooltipster-noir.css DELETED
@@ -1,12 +0,0 @@
1
- .tooltipster-noir {
2
- border-radius: 0px;
3
- border: 3px solid #2c2c2c;
4
- background: #fff;
5
- color: #2c2c2c;
6
- }
7
- .tooltipster-noir .tooltipster-content {
8
- font-family: 'Georgia', serif;
9
- font-size: 14px;
10
- line-height: 16px;
11
- padding: 8px 10px;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/tooltipster/themes/tooltipster-punk.css DELETED
@@ -1,12 +0,0 @@
1
- .tooltipster-punk {
2
- border-radius: 5px;
3
- border-bottom: 3px solid #f71169;
4
- background: #2a2a2a;
5
- color: #fff;
6
- }
7
- .tooltipster-punk .tooltipster-content {
8
- font-family: 'Courier', monospace;
9
- font-size: 14px;
10
- line-height: 16px;
11
- padding: 8px 10px;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
admin/css/tooltipster/themes/tooltipster-shadow.css DELETED
@@ -1,12 +0,0 @@
1
- .tooltipster-shadow {
2
- border-radius: 5px;
3
- background: #fff;
4
- box-shadow: 0px 0px 14px rgba(0,0,0,0.3);
5
- color: #2c2c2c;
6
- }
7
- .tooltipster-shadow .tooltipster-content {
8
- font-family: 'Arial', sans-serif;
9
- font-size: 14px;
10
- line-height: 16px;
11
- padding: 8px 10px;
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
admin/dist/css/admin.css ADDED
@@ -0,0 +1,3909 @@