WordPress Infinite Scroll – Ajax Load More - Version 2.14.1

Version Description

  • March 24, 2017 =

  • NEW - Adding built in support for sticky posts (sticky_posts="true").

  • NEW - Added new alm_js_dependencies filter for removing jQuery dependency.

  • NEW - New alm_enqueue_external_scripts action for loading external JS files.

  • NEW - Adding support for paging + comments add-on.

  • FIX - Fixed issue with some addons not appearing in Shortcode Builder.

  • UPDATE - Various UI Updates and enhancements.

Download this release

Release Info

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

Code changes from version 2.14.0 to 2.14.1

Files changed (40) hide show
  1. .editorconfig +16 -0
  2. README.txt +68 -58
  3. admin/admin-functions.php +5 -6
  4. admin/admin.php +460 -459
  5. admin/css/admin.css +65 -35
  6. admin/editor/editor-build.php +21 -21
  7. admin/editor/editor.php +5 -5
  8. admin/includes/components/custom-layouts.php +4 -4
  9. admin/includes/components/layout-list.php +12 -12
  10. admin/includes/components/repeater-options.php +1 -1
  11. admin/includes/cta/about.php +32 -30
  12. admin/includes/cta/add-ons.php +4 -2
  13. admin/includes/cta/dyk.php +30 -22
  14. admin/includes/cta/mailinglist.php +0 -17
  15. admin/includes/cta/resources.php +11 -9
  16. admin/includes/cta/reviews.php +1 -1
  17. admin/includes/cta/sharing.php +1 -1
  18. admin/includes/cta/writeable.php +47 -45
  19. admin/includes/layout/default.php +3 -3
  20. admin/includes/mailchimp/MailChimp.php +0 -87
  21. admin/includes/mailchimp/mailchimp-info.php +0 -33
  22. admin/js/admin.js +1 -48
  23. admin/shortcode-builder/js/shortcode-builder.js +74 -34
  24. admin/shortcode-builder/shortcode-builder.php +415 -382
  25. admin/views/add-ons.php +100 -128
  26. admin/views/examples.php +19 -18
  27. admin/views/help.php +10 -10
  28. admin/views/licenses.php +317 -384
  29. admin/views/repeater-templates.php +128 -122
  30. admin/views/settings.php +37 -48
  31. admin/views/shortcode-builder.php +13 -9
  32. ajax-load-more.php +368 -332
  33. core/classes/class.alm-enqueue.php +17 -17
  34. core/classes/class.alm-shortcode.php +313 -296
  35. core/functions.php +106 -106
  36. core/js/ajax-load-more.js +6 -2
  37. core/js/ajax-load-more.min.js +2 -2
  38. core/repeater/default.php +11 -8
  39. index.php +0 -1
  40. lang/ajax-load-more.pot +253 -269
.editorconfig ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ # PHP PSR-2 Coding Standards
6
+ # http://www.php-fig.org/psr/psr-2/
7
+
8
+ root = true
9
+
10
+ [*.php]
11
+ charset = utf-8
12
+ end_of_line = lf
13
+ insert_final_newline = true
14
+ trim_trailing_whitespace = true
15
+ indent_style = tab
16
+ indent_size = 3
README.txt CHANGED
@@ -1,22 +1,22 @@
1
- === Ajax Load More - Infinite Scroll ===
2
- Contributors: dcooney
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce, ajax load more
5
  Requires at least: 3.6
6
  Tested up to: 4.7.3
7
- Stable tag: 2.14.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- The ultimate solution to add infinite scroll functionality to your website
12
 
13
  == Description ==
14
 
15
- Ajax Load More is a powerful solution for infinite scrolling and lazy loading posts, custom post types, single posts, pages and comments with Ajax powered queries.
16
 
17
- Build complex custom WordPress queries using the Ajax Load More shortcode builder then add the generated shortcode to your page via the content editor or directly into your template files.
18
 
19
- Ajax Load More is fully compatible with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
  **[Get More Information](https://connekthq.com/plugins/ajax-load-more/)**
22
 
@@ -50,9 +50,10 @@ Check out the examples below:
50
  = Shortcode Parameters =
51
 
52
  Ajax Load More accepts a number of parameters that are passed to the WordPress query. These parameters are transferred via shortcode - don't worry, creating your custom shortcode is simple with the intuitive [Shortcode Builder](https://connekthq.com/plugins/ajax-load-more/screenshots/#shortcode-builder)
53
-
54
  * **repeater** - Choose a repeater template (<a href="https://connekthq.com/plugins/ajax-load-more/custom-repeaters/">Add-on available</a>). Default = ‘default’
55
  * **post_type** - Comma separated list of post types. Default = ‘post’
 
56
  * **post_format** - Query by post format. Default = null
57
  * **category** - A comma separated list of categories to include by slug. Default = null
58
  * **category__not_in** - A comma separated list of categories to exclude by ID. Default = null
@@ -72,24 +73,24 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
72
  * **meta_type** - Custom field type. Default = ‘CHAR’
73
  * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
74
  * **author** - Comma separated list of authors by id. Default = null
75
- * **post__in** - Comma separated list of post ID’s to include in query. Default = null
76
- * **post__not_in** - Comma separated list of post ID’s to exclude from query. Default = null
77
  * **search** - Query search term (‘s’). Default = null
78
  * **custom_args** - A semicolon separated list of value:pair arguments. e.g. tag_slug__and:design,development; event_display:upcoming. Default = null
79
- * **post_status** - Select status of the post. Default = 'publish'
80
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
81
  * **orderby** - Order posts by date, title, name, menu order, author, post ID or comment count. Default = ‘date’
82
  * **offset** - Offset the initial query (number). Default = ’0′
83
  * **posts_per_page** - Number of posts to load with each Ajax request. Default = ’5′
84
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
85
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
86
- * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
87
- * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
88
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
89
- * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
90
- * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
91
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
92
- * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
93
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
94
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
95
  * **button_loading_label** - Update the text of the Load More button while content is loading. Default = null
@@ -128,7 +129,7 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
128
 
129
  [youtube https://www.youtube.com/watch?v=EQ57i6dkOew]
130
 
131
- ***
132
 
133
  = Add-ons =
134
  The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) are available to increase the functionality of Ajax Load More.
@@ -136,19 +137,19 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
136
  > #### Cache
137
  > The **[Cache](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)** add-oncreates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
138
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)
139
- >
140
  > #### Call to Actions
141
  > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.<br />
142
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)
143
- >
144
  > #### Comments
145
  > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.<br />
146
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
147
- >
148
  > #### Custom Repeaters
149
  > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.<br />
150
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)
151
- >
152
  > #### Layouts
153
  > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.<br />
154
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)
@@ -168,30 +169,30 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
168
  > #### Previous Post
169
  > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
170
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)
171
- >
172
  > #### Search Engine Optimization
173
  > The **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.<br />
174
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)
175
- >
176
  > #### Theme Repeaters
177
  > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.<br />
178
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
179
 
180
 
181
- ***
182
 
183
  = Extensions =
184
  The following [extensions](https://connekthq.com/plugins/ajax-load-more/extensions/) are available to provide compatibility with popular WordPress plugins and core features.
185
 
186
  > #### Relvanssi
187
  > The **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)** extension provides the functionality for returning Relevanssi query results to Ajax Load More.
188
- >
189
  > #### REST API
190
  > The **[REST API](https://connekthq.com/plugins/ajax-load-more/extensions/rest-api/)** extension will enable compatibility between Ajax Load More and the WordPress REST API.
191
- >
192
  > #### SearchWP
193
  > The **[SearchWP](https://connekthq.com/plugins/ajax-load-more/extensions/searchwp/)** extension provides the functionality for returning SearchWP query results to Ajax Load More.
194
- >
195
 
196
 
197
  ***
@@ -205,49 +206,49 @@ The following [functions](https://connekthq.com/plugins/ajax-load-more/docs/call
205
  $.fn.almComplete = function(alm){
206
  // Your on complete code goes here
207
  };
208
-
209
 
210
  **ALM Done** - The almDone() function is triggered after all posts have been loaded..
211
 
212
  $.fn.almDone = function(alm){
213
  console.log('All posts have been loaded!');
214
  };
215
-
216
  **ALM Empty** - The almEmpty() function is triggered if there are zero results returned in the initial query.
217
 
218
  $.fn.almEmpty = function(alm){
219
  console.log('Sorry, but we could not locate any posts that matched your criteria.');
220
  };
221
-
222
  **ALM Filter Complete** - The almFilterComplete() function is triggered after a successful call to the public function almFilter().
223
 
224
  $.fn.almFilterComplete = function(){
225
- console.log('Ajax Load More filter has completed!');
226
  };
227
 
228
-
229
  **ALM URL Update** - The almUrlUpdate() function is triggered after a successful URL update (pushState) from the Previous Post or the Search Engine Optimization add-on
230
 
231
  $.fn.almUrlUpdate = function(permalink, type){
232
- console.log("URL updated to " + permalink + '- dispatched from the '+ type + ' add-on.');
233
  };
234
 
235
  ***
236
-
237
  = Filter Hooks =
238
 
239
  Ajax Load More has a variety of [filters](https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/) in place that enable users to hook into Ajax Load More to insert or modify data.
240
 
241
-
242
  = Variables =
243
 
244
  Ajax Load More passes the following PHP [variables](https://connekthq.com/plugins/ajax-load-more/docs/variables/) to each repeater template - these template variables can help you style and transform your repeater templates.
245
-
246
  * **$alm_current** - Returns the current item number in the current Ajax Load More loop and will reset to zero with every 'Load More' action.. 'echo $alm_current;'
247
  * **$alm_page** - Returns the current page number. 'echo $alm_page;'
248
  * **$alm_item** - Returns the current item number within your loop. 'echo $alm_item;'
249
  * **$alm_found_posts** - Returns the total number of posts found within the entire WordPress query. 'echo $alm_found_posts;'
250
-
251
  ***
252
 
253
  = Tested Browsers =
@@ -279,11 +280,11 @@ Your ratings make a big difference! If you like and use Ajax Load More, please c
279
 
280
  1. Create your shortcode
281
  2. Add the shortcode to your page, by adding it through the content editor or placing it directly within one of your template files.
282
- 3. Load a page with your shortcode in place and watch Ajax Load More fetch your posts.
283
 
284
  = What are my server requirements? =
285
 
286
- Your server must be able to read/write/create files. Ajax Load More creates the default repeater on plugin activation and in order to modify the output we are required to write to the file as well.
287
 
288
  = Is the ajax functionality secure? =
289
 
@@ -347,7 +348,16 @@ How to install Ajax Load More.
347
 
348
  == Changelog ==
349
 
350
- = 2.14.0 - February 14, 2016 =
 
 
 
 
 
 
 
 
 
351
 
352
  * NEW - Adding functionality for Next Page add-on (https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/).
353
  * NEW - Added support for SEO add-on to be integrated with default WP search page.
@@ -364,7 +374,7 @@ How to install Ajax Load More.
364
  * NEW - Added new filter for creating and listing custom layouts within repeater template admin (docs coming soon).
365
  * Update - Adding Post Type 'any' to shortcode builder.
366
  * Update - Updating max_pages parameter to be '0' as the plugin default.
367
- * Update - Various UI updates and enhancements.
368
  * FIX - Updated post_status parameter to support inherit for attachments.
369
  * FIX - Undefined variables in Shortcode Builder pop up.
370
  * FIX - Shortcode Builder UI and copy updates.
@@ -460,12 +470,12 @@ How to install Ajax Load More.
460
  * NEW - Adding support for table container type.
461
  * NEW - Adding new 'transition_container' shortcode parameter to allow for removal of the .alm-reveal div in the ajax output.
462
  * FIX - Fixed issue with the display of Previous Post taxonomy selection in Shortcode Builder.
463
- * FIX - Fixed issue with noscript navigation for preloaded and seo add-ons.
464
- * FIX - Fixed issue with hiding of Button Classes setting if 'Disable CSS' is checked.
465
- * FIX - Fixed bug with custom repeater fallback function.
466
- * FIX - Fixed issue with almDone function firing before a the button text reset function.
467
- * UPDATE - Various UI/UX enhancments.
468
- * UPDATE - Adding cache support for Theme Repeaters add-on.
469
  * UPDATE - Updating add-on activation script from wp_remote_get to wp_remote_post.
470
 
471
 
@@ -650,7 +660,7 @@ How to install Ajax Load More.
650
  * Adding fix for ordering by meta value.
651
  * Admin stying updates.
652
  * Updated FAQs
653
- * Fix meta_query query and orderby meta value
654
 
655
 
656
  = 2.2.7 =
@@ -673,18 +683,18 @@ How to install Ajax Load More.
673
  * Added plugin action links to plugin listing.
674
 
675
  = 2.2.3 =
676
- * Adding query by Custom Field value(Meta Query).
677
  * Improved error handling for easier debugging.
678
- * Fixed issue with pause = "true" and scroll = "true". Pause should always take precendence over scroll.
679
  * Code clean up, improving overall quality for easier merges and updates.
680
 
681
  = 2.2.2 =
682
- * Adding callback function that is dispatched once a successful ajax call is made. $.fn.almComplete(alm).
683
  * Adding WPML support for ICL_LANGUAGE_CODE - A 'lang' atributed is added dynamically if WPML is installed.
684
  * Making JS variables and functions publically accessible.
685
 
686
  = 2.2.1 =
687
- * Fixed php notice/warning that would trigger if WP_DEBUG was enabled.
688
  * Adding minified core JS.
689
  * Adding global option to disable shortcode button in the content editor.
690
  * Adding touchmove js event for faster scroll detection on mobile devices.
@@ -700,9 +710,9 @@ How to install Ajax Load More.
700
 
701
  = 2.1.3 =
702
  * Fixed issue causing the Ajax Load More menu to not show on some admin screen do to location conflict with another plugin.
703
- * Adding column 'alias' to wp_alm table to allow for repeater alias (Only for the custom repeater add-on).
704
- * Remove legacy column 'test' from wp_alm table.
705
- * Updating styles in admin.css.
706
 
707
  = 2.1.2 =
708
  * Adding ability to have multiple instances of script on a single page
@@ -726,10 +736,10 @@ How to install Ajax Load More.
726
  * Fixed issue with author query
727
 
728
  = 2.0.13 =
729
- * Fixed issue where loading button was not turning off when posts remaining were zero
730
 
731
  = 2.0.12 =
732
- * Adding add_filter('widget_text', 'do_shortcode');
733
 
734
  = 2.0.11 =
735
  * Removed 2 filters for widget_text which were casuing issues in sidebars
@@ -768,6 +778,6 @@ How to install Ajax Load More.
768
 
769
  == Upgrade Notice ==
770
 
771
- * None
772
 
773
 
1
+ === WordPress Infinite Scroll - Ajax Load More ===
2
+ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce, ajax load more
5
  Requires at least: 3.6
6
  Tested up to: 4.7.3
7
+ Stable tag: 2.14.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ The ultimate infinite scroll and lazy load solution for your WordPress powered website.
12
 
13
  == Description ==
14
 
15
+ Ajax Load More is a powerful solution for infinite scrolling and lazy loading WordPress posts, custom post types, single posts, pages and comments with Ajax powered queries.
16
 
17
+ Build complex custom WordPress queries using the Ajax Load More shortcode builder then add the generated shortcode to your page via the content editor or directly into your template files.
18
 
19
+ Ajax Load More is fully compatible for infinite scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
  **[Get More Information](https://connekthq.com/plugins/ajax-load-more/)**
22
 
50
  = Shortcode Parameters =
51
 
52
  Ajax Load More accepts a number of parameters that are passed to the WordPress query. These parameters are transferred via shortcode - don't worry, creating your custom shortcode is simple with the intuitive [Shortcode Builder](https://connekthq.com/plugins/ajax-load-more/screenshots/#shortcode-builder)
53
+
54
  * **repeater** - Choose a repeater template (<a href="https://connekthq.com/plugins/ajax-load-more/custom-repeaters/">Add-on available</a>). Default = ‘default’
55
  * **post_type** - Comma separated list of post types. Default = ‘post’
56
+ * **sticky_posts** - Preserve sticky post ordering in Ajax listing. Default = false
57
  * **post_format** - Query by post format. Default = null
58
  * **category** - A comma separated list of categories to include by slug. Default = null
59
  * **category__not_in** - A comma separated list of categories to exclude by ID. Default = null
73
  * **meta_type** - Custom field type. Default = ‘CHAR’
74
  * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
75
  * **author** - Comma separated list of authors by id. Default = null
76
+ * **post__in** - Comma separated list of post ID’s to include in query. Default = null
77
+ * **post__not_in** - Comma separated list of post ID’s to exclude from query. Default = null
78
  * **search** - Query search term (‘s’). Default = null
79
  * **custom_args** - A semicolon separated list of value:pair arguments. e.g. tag_slug__and:design,development; event_display:upcoming. Default = null
80
+ * **post_status** - Select status of the post. Default = 'publish'
81
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
82
  * **orderby** - Order posts by date, title, name, menu order, author, post ID or comment count. Default = ‘date’
83
  * **offset** - Offset the initial query (number). Default = ’0′
84
  * **posts_per_page** - Number of posts to load with each Ajax request. Default = ’5′
85
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
86
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
87
+ * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '0'
88
+ * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
89
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
90
+ * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
91
+ * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
92
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
93
+ * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
94
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
95
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
96
  * **button_loading_label** - Update the text of the Load More button while content is loading. Default = null
129
 
130
  [youtube https://www.youtube.com/watch?v=EQ57i6dkOew]
131
 
132
+ ***
133
 
134
  = Add-ons =
135
  The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) are available to increase the functionality of Ajax Load More.
137
  > #### Cache
138
  > The **[Cache](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)** add-oncreates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
139
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)
140
+ >
141
  > #### Call to Actions
142
  > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.<br />
143
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)
144
+ >
145
  > #### Comments
146
  > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.<br />
147
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
148
+ >
149
  > #### Custom Repeaters
150
  > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.<br />
151
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)
152
+ >
153
  > #### Layouts
154
  > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.<br />
155
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)
169
  > #### Previous Post
170
  > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
171
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)
172
+ >
173
  > #### Search Engine Optimization
174
  > The **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.<br />
175
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)
176
+ >
177
  > #### Theme Repeaters
178
  > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.<br />
179
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
180
 
181
 
182
+ ***
183
 
184
  = Extensions =
185
  The following [extensions](https://connekthq.com/plugins/ajax-load-more/extensions/) are available to provide compatibility with popular WordPress plugins and core features.
186
 
187
  > #### Relvanssi
188
  > The **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)** extension provides the functionality for returning Relevanssi query results to Ajax Load More.
189
+ >
190
  > #### REST API
191
  > The **[REST API](https://connekthq.com/plugins/ajax-load-more/extensions/rest-api/)** extension will enable compatibility between Ajax Load More and the WordPress REST API.
192
+ >
193
  > #### SearchWP
194
  > The **[SearchWP](https://connekthq.com/plugins/ajax-load-more/extensions/searchwp/)** extension provides the functionality for returning SearchWP query results to Ajax Load More.
195
+ >
196
 
197
 
198
  ***
206
  $.fn.almComplete = function(alm){
207
  // Your on complete code goes here
208
  };
209
+
210
 
211
  **ALM Done** - The almDone() function is triggered after all posts have been loaded..
212
 
213
  $.fn.almDone = function(alm){
214
  console.log('All posts have been loaded!');
215
  };
216
+
217
  **ALM Empty** - The almEmpty() function is triggered if there are zero results returned in the initial query.
218
 
219
  $.fn.almEmpty = function(alm){
220
  console.log('Sorry, but we could not locate any posts that matched your criteria.');
221
  };
222
+
223
  **ALM Filter Complete** - The almFilterComplete() function is triggered after a successful call to the public function almFilter().
224
 
225
  $.fn.almFilterComplete = function(){
226
+ console.log('Ajax Load More filter has completed!');
227
  };
228
 
229
+
230
  **ALM URL Update** - The almUrlUpdate() function is triggered after a successful URL update (pushState) from the Previous Post or the Search Engine Optimization add-on
231
 
232
  $.fn.almUrlUpdate = function(permalink, type){
233
+ console.log("URL updated to " + permalink + '- dispatched from the '+ type + ' add-on.');
234
  };
235
 
236
  ***
237
+
238
  = Filter Hooks =
239
 
240
  Ajax Load More has a variety of [filters](https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/) in place that enable users to hook into Ajax Load More to insert or modify data.
241
 
242
+
243
  = Variables =
244
 
245
  Ajax Load More passes the following PHP [variables](https://connekthq.com/plugins/ajax-load-more/docs/variables/) to each repeater template - these template variables can help you style and transform your repeater templates.
246
+
247
  * **$alm_current** - Returns the current item number in the current Ajax Load More loop and will reset to zero with every 'Load More' action.. 'echo $alm_current;'
248
  * **$alm_page** - Returns the current page number. 'echo $alm_page;'
249
  * **$alm_item** - Returns the current item number within your loop. 'echo $alm_item;'
250
  * **$alm_found_posts** - Returns the total number of posts found within the entire WordPress query. 'echo $alm_found_posts;'
251
+
252
  ***
253
 
254
  = Tested Browsers =
280
 
281
  1. Create your shortcode
282
  2. Add the shortcode to your page, by adding it through the content editor or placing it directly within one of your template files.
283
+ 3. Load a page with your shortcode in place and watch Ajax Load More fetch your posts.
284
 
285
  = What are my server requirements? =
286
 
287
+ Your server must be able to read/write/create files. Ajax Load More creates the default repeater on plugin activation and in order to modify the output we are required to write to the file as well.
288
 
289
  = Is the ajax functionality secure? =
290
 
348
 
349
  == Changelog ==
350
 
351
+ = 2.14.1 - March 24, 2017 =
352
+
353
+ * NEW - Adding built in support for sticky posts (sticky_posts="true").
354
+ * NEW - Added new alm_js_dependencies filter for removing jQuery dependency.
355
+ * NEW - New alm_enqueue_external_scripts action for loading external JS files.
356
+ * NEW - Adding support for paging + comments add-on.
357
+ * FIX - Fixed issue with some addons not appearing in Shortcode Builder.
358
+ * UPDATE - Various UI Updates and enhancements.
359
+
360
+ = 2.14.0 - February 14, 2017 =
361
 
362
  * NEW - Adding functionality for Next Page add-on (https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/).
363
  * NEW - Added support for SEO add-on to be integrated with default WP search page.
374
  * NEW - Added new filter for creating and listing custom layouts within repeater template admin (docs coming soon).
375
  * Update - Adding Post Type 'any' to shortcode builder.
376
  * Update - Updating max_pages parameter to be '0' as the plugin default.
377
+ * Update - Various UI updates and enhancements.
378
  * FIX - Updated post_status parameter to support inherit for attachments.
379
  * FIX - Undefined variables in Shortcode Builder pop up.
380
  * FIX - Shortcode Builder UI and copy updates.
470
  * NEW - Adding support for table container type.
471
  * NEW - Adding new 'transition_container' shortcode parameter to allow for removal of the .alm-reveal div in the ajax output.
472
  * FIX - Fixed issue with the display of Previous Post taxonomy selection in Shortcode Builder.
473
+ * FIX - Fixed issue with noscript navigation for preloaded and seo add-ons.
474
+ * FIX - Fixed issue with hiding of Button Classes setting if 'Disable CSS' is checked.
475
+ * FIX - Fixed bug with custom repeater fallback function.
476
+ * FIX - Fixed issue with almDone function firing before a the button text reset function.
477
+ * UPDATE - Various UI/UX enhancments.
478
+ * UPDATE - Adding cache support for Theme Repeaters add-on.
479
  * UPDATE - Updating add-on activation script from wp_remote_get to wp_remote_post.
480
 
481
 
660
  * Adding fix for ordering by meta value.
661
  * Admin stying updates.
662
  * Updated FAQs
663
+ * Fix meta_query query and orderby meta value
664
 
665
 
666
  = 2.2.7 =
683
  * Added plugin action links to plugin listing.
684
 
685
  = 2.2.3 =
686
+ * Adding query by Custom Field value(Meta Query).
687
  * Improved error handling for easier debugging.
688
+ * Fixed issue with pause = "true" and scroll = "true". Pause should always take precendence over scroll.
689
  * Code clean up, improving overall quality for easier merges and updates.
690
 
691
  = 2.2.2 =
692
+ * Adding callback function that is dispatched once a successful ajax call is made. $.fn.almComplete(alm).
693
  * Adding WPML support for ICL_LANGUAGE_CODE - A 'lang' atributed is added dynamically if WPML is installed.
694
  * Making JS variables and functions publically accessible.
695
 
696
  = 2.2.1 =
697
+ * Fixed php notice/warning that would trigger if WP_DEBUG was enabled.
698
  * Adding minified core JS.
699
  * Adding global option to disable shortcode button in the content editor.
700
  * Adding touchmove js event for faster scroll detection on mobile devices.
710
 
711
  = 2.1.3 =
712
  * Fixed issue causing the Ajax Load More menu to not show on some admin screen do to location conflict with another plugin.
713
+ * Adding column 'alias' to wp_alm table to allow for repeater alias (Only for the custom repeater add-on).
714
+ * Remove legacy column 'test' from wp_alm table.
715
+ * Updating styles in admin.css.
716
 
717
  = 2.1.2 =
718
  * Adding ability to have multiple instances of script on a single page
736
  * Fixed issue with author query
737
 
738
  = 2.0.13 =
739
+ * Fixed issue where loading button was not turning off when posts remaining were zero
740
 
741
  = 2.0.12 =
742
+ * Adding add_filter('widget_text', 'do_shortcode');
743
 
744
  = 2.0.11 =
745
  * Removed 2 filters for widget_text which were casuing issues in sidebars
778
 
779
  == Upgrade Notice ==
780
 
781
+ * None
782
 
783
 
admin/admin-functions.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
-
3
  /*
4
  * alm_is_admin_screen
5
  * Determine whether user is on an ALM admin screen
@@ -7,7 +7,7 @@
7
  * @return boolean
8
  * @since 2.12.0
9
  */
10
-
11
  function alm_is_admin_screen(){
12
  $return = false;
13
  $screen = get_current_screen();
@@ -26,7 +26,7 @@ function alm_is_admin_screen(){
26
  * @return boolean
27
  * @since 2.13.0
28
  */
29
-
30
  function alm_has_addon(){
31
  if(has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_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')) {
32
  return true;
@@ -44,12 +44,11 @@ function alm_has_addon(){
44
  * @return boolean
45
  * @since 2.13.0.1
46
  */
47
-
48
  function alm_has_addon_shortcodes(){
49
- if(has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_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;
53
  }
54
  }
55
-
1
  <?php
2
+
3
  /*
4
  * alm_is_admin_screen
5
  * Determine whether user is on an ALM admin screen
7
  * @return boolean
8
  * @since 2.12.0
9
  */
10
+
11
  function alm_is_admin_screen(){
12
  $return = false;
13
  $screen = get_current_screen();
26
  * @return boolean
27
  * @since 2.13.0
28
  */
29
+
30
  function alm_has_addon(){
31
  if(has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_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')) {
32
  return true;
44
  * @return boolean
45
  * @since 2.13.0.1
46
  */
47
+
48
  function alm_has_addon_shortcodes(){
49
+ if(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;
53
  }
54
  }
 
admin/admin.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
-
3
  add_action( 'plugins_loaded', 'alm_core_update' ); // Core Update
4
  add_action( 'wp_ajax_alm_save_repeater', 'alm_save_repeater' ); // Ajax Save Repeater
5
  add_action( 'wp_ajax_alm_update_repeater', 'alm_update_repeater' ); // Ajax Update Repeater
@@ -7,7 +7,7 @@ add_action( 'wp_ajax_alm_get_tax_terms', 'alm_get_tax_terms' ); // Ajax Get Taxo
7
  add_action( 'wp_ajax_alm_delete_cache', 'alm_delete_cache' ); // Delete Cache
8
  add_action( 'wp_ajax_alm_layouts_dismiss', 'alm_layouts_dismiss' ); // Dismiss Layouts CTA
9
  add_action( 'wp_ajax_alm_license_activation', 'alm_license_activation' ); // Activate Add-on
10
- add_action( 'alm_get_layouts', 'alm_get_layouts' ); // Add layout selection
11
  add_action( 'wp_ajax_alm_get_layout', 'alm_get_layout' ); // Get layout
12
  add_action( 'wp_ajax_alm_dismiss_sharing', 'alm_dismiss_sharing' ); // Dismiss sharing
13
  add_filter( 'admin_footer_text', 'alm_filter_admin_footer_text'); // Admin menu text
@@ -22,77 +22,77 @@ add_filter( 'admin_footer_text', 'alm_filter_admin_footer_text'); // Admin menu
22
  */
23
 
24
  function alm_license_activation(){
25
-
26
  if (current_user_can( 'edit_theme_options' )){
27
-
28
  $nonce = $_GET["nonce"];
29
  $type = $_GET["type"]; // activate / deactivate
30
- $item = $_GET["item"];
31
- $license = $_GET["license"];
32
- $url = $_GET["url"];
33
- $upgrade = $_GET["upgrade"];
34
- $option_status = $_GET["status"];
35
- $option_key = $_GET["key"];
36
-
37
  // Check our nonce, if they don't match then bounce!
38
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
39
- die('Error - unable to verify nonce, please try again.');
40
-
41
  // data to send in our API request
42
  if($type === 'activate'){
43
  $action = 'activate_license';
44
  }else{
45
  $action = 'deactivate_license';
46
  }
47
-
48
- $api_params = array(
49
- 'edd_action'=> $action,
50
- 'license' => $license,
51
  'item_id' => $item, // the ID of our product in EDD
52
  'url' => home_url()
53
  );
54
-
55
  // Call the custom API.
56
  //$response = wp_remote_get( add_query_arg( $api_params, $url ), array( 'timeout' => 15, 'sslverify' => false ) );
57
-
58
  // Updated 2.8.7
59
  $response = wp_remote_post( ALM_STORE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
60
-
61
  // make sure the response came back okay
62
  if ( is_wp_error( $response ) )
63
  return false;
64
-
65
-
66
  $license_data = $response['body'];
67
  $license_data = json_decode($license_data); // decode the license data
68
-
69
-
70
  $return["success"] = $license_data->success;
71
-
72
  $msg = '';
73
- if($type === 'activate'){
74
  $return["license_limit"] = $license_data->license_limit;
75
  $return["expires"] = $license_data->expires;
76
  $return["site_count"] = $license_data->site_count;
77
  $return["activations_left"] = $license_data->activations_left;
78
  $return["license"] = $license_data->license;
79
- $return["item_name"] = $license_data->item_name;
80
  if($license_data->activations_left === 0 && $license_data->success === false){
81
  $msg = '<strong>Sorry, but you are out of available licenses <em>('. $license_data->license_limit .' / '. $license_data->site_count .')</em>.</strong> Please visit the <a href="'.$upgrade.'" target="_blank">'.$license_data->item_name.'</a> page to add additional licenses.';
82
- }
83
  }
84
  $return["msg"] = $msg;
85
-
86
  update_option( $option_status, $license_data->license);
87
- update_option( $option_key, $license );
88
-
89
  echo json_encode($return);
90
-
91
  die();
92
-
93
  } else {
94
  echo __('You don\'t belong here.', ALM_NAME);
95
- }
96
  }
97
 
98
 
@@ -105,28 +105,28 @@ function alm_license_activation(){
105
  * @updated 2.14.0
106
  */
107
 
108
- function alm_get_layout(){
109
- if (current_user_can( 'edit_theme_options' )){
110
-
111
  $nonce = sanitize_text_field($_GET["nonce"]);
112
- $type = sanitize_text_field($_GET["type"]);
113
- $custom = sanitize_text_field($_GET["custom"]);
114
-
115
  // Check our nonce, if they don't match then bounce!
116
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
117
- die('Error - unable to verify nonce, please try again.');
118
-
119
  if($type === 'default'){
120
-
121
  // Default Layout
122
  $content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
123
-
124
  }else{
125
-
126
  // Custom Layout
127
  if($custom == 'true'){
128
  $dir = 'alm_layouts';
129
-
130
  if(is_child_theme()){
131
  $path = get_stylesheet_directory().'/'. $dir .'/' .$type;
132
  // if child theme does not have the layout, check the parent theme
@@ -137,22 +137,22 @@ function alm_get_layout(){
137
  else{
138
  $path = get_template_directory().'/'. $dir .'/' .$type;
139
  }
140
- $content = file_get_contents($path);
141
-
142
- }
143
-
144
  // Layouts Add-on
145
- else {
146
- $content = file_get_contents(ALM_LAYOUTS_PATH.'layouts/'.$type.'.php');
147
- }
148
- }
149
-
150
  $return["value"] = $content;
151
- echo json_encode($return);
152
  }else {
153
  echo __('You don\'t belong here.', ALM_NAME);
154
- }
155
- die();
156
  }
157
 
158
 
@@ -165,10 +165,9 @@ function alm_get_layout(){
165
  * @since 2.8.7
166
  */
167
  function alm_get_layouts(){ // do_action
168
- include( ALM_PATH . 'admin/includes/components/layout-list.php');
169
  }
170
 
171
-
172
  /*
173
  * alm_admin_vars
174
  * Create admin variables and ajax nonce
@@ -178,7 +177,7 @@ function alm_get_layouts(){ // do_action
178
  function alm_admin_vars() { ?>
179
  <script type='text/javascript'>
180
  /* <![CDATA[ */
181
- var alm_admin_localize = <?php echo json_encode( array(
182
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
183
  'active' => __('Active', 'ajax-load-more'),
184
  'inactive' => __('Inactive', 'ajax-load-more'),
@@ -217,22 +216,22 @@ function alm_set_admin_nonce(){
217
  * @since 2.0.5
218
  */
219
 
220
- function alm_core_update() {
221
-
222
  if(!get_option( 'alm_version')){ // Add 'alm_version' to WP options table if it does not exist
223
- add_option( 'alm_version', ALM_VERSION );
224
- }
225
-
226
  $alm_installed_ver = get_option( "alm_version" ); // Get value from WP Option tbl
227
  if ( $alm_installed_ver != ALM_VERSION ) {
228
-
229
  // Delete ALM transients
230
  delete_transient('alm_dismiss_sharing');
231
-
232
  // Update repeaters
233
- alm_run_update();
234
-
235
- }
236
  }
237
 
238
 
@@ -245,22 +244,22 @@ function alm_core_update() {
245
  */
246
 
247
  function alm_run_update(){
248
- global $wpdb;
249
-
250
- if ( is_multisite()) {
251
- $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
252
-
253
- // Loop all blogs and run update routine
254
  foreach ( $blog_ids as $blog_id ) {
255
  switch_to_blog( $blog_id );
256
  alm_update_template_files();
257
  restore_current_blog();
258
  }
259
-
260
  } else {
261
  alm_update_template_files();
262
  }
263
-
264
  update_option( "alm_version", ALM_VERSION ); // Update the WP Option tbl with the new version num
265
  }
266
 
@@ -274,49 +273,49 @@ function alm_run_update(){
274
  */
275
 
276
  function alm_update_template_files(){
277
- global $wpdb;
278
  $table_name = $wpdb->prefix . "alm";
279
- $blog_id = $wpdb->blogid;
280
-
281
- // Get all templates ($rows) where name is 'default'
282
- $rows = $wpdb->get_results("SELECT * FROM $table_name WHERE name = 'default'");
283
 
284
  if($rows){
285
  foreach( $rows as $row ) { // Loop $rows
286
-
287
  $data = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE name = 'default'");
288
-
289
  if($blog_id > 1){
290
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
291
  if( !is_dir($dir) ){
292
  mkdir($dir);
293
- }
294
  $f = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
295
  }else{
296
  $f = ALM_PATH. 'core/repeater/default.php';
297
  }
298
-
299
  try {
300
  $o = fopen($f, 'w+'); //Open file
301
  if ( !$o ) {
302
  throw new Exception(__('[Ajax Load More] Error opening default repeater template - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/core/repeater directory', 'ajax-load-more'));
303
- }
304
  $w = fwrite($o, $data); //Save the file
305
  if ( !$w ) {
306
  throw new Exception(__('[Ajax Load More] Error updating default repeater template - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/core/repeater directory.', 'ajax-load-more'));
307
- }
308
  fclose($o); //now close it
309
-
310
  } catch ( Exception $e ) {
311
  // Display error message in console.
312
- if(!isset($options['_alm_error_notices']) || $options['_alm_error_notices'] == '1'){
313
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
314
  }
315
  }
316
-
317
  }
318
  }
319
-
320
  }
321
 
322
 
@@ -330,101 +329,101 @@ function alm_update_template_files(){
330
  */
331
 
332
  add_action( 'admin_menu', 'alm_admin_menu' );
333
- function alm_admin_menu() {
334
  $icon = 'dashicons-plus-alt';
335
  $icon = ALM_ADMIN_URL . "/img/alm-logo-16x16.svg";
336
-
337
- $alm_page = add_menu_page(
338
- 'Ajax Load More',
339
- 'Ajax Load More',
340
- 'edit_theme_options',
341
- 'ajax-load-more',
342
  'alm_settings_page',
343
  $icon
344
  );
345
-
346
- $alm_settings_page = add_submenu_page(
347
- 'ajax-load-more',
348
- 'Settings',
349
- 'Settings',
350
- 'edit_theme_options',
351
- 'ajax-load-more',
352
  'alm_settings_page'
353
- );
354
-
355
- $alm_template_page = add_submenu_page(
356
- 'ajax-load-more',
357
- 'Repeater Templates',
358
- 'Repeater Templates',
359
- 'edit_theme_options',
360
- 'ajax-load-more-repeaters',
361
  'alm_repeater_page'
362
  );
363
-
364
- $alm_shortcode_page = add_submenu_page(
365
- 'ajax-load-more',
366
- 'Shortcode Builder',
367
- 'Shortcode Builder',
368
- 'edit_theme_options',
369
- 'ajax-load-more-shortcode-builder',
370
  'alm_shortcode_builder_page'
371
  );
372
-
373
- $alm_addons_page = add_submenu_page(
374
- 'ajax-load-more',
375
- 'Add-ons',
376
- 'Add-ons',
377
- 'edit_theme_options',
378
- 'ajax-load-more-add-ons',
379
  'alm_add_ons_page'
380
- );
381
-
382
- $alm_examples_page = add_submenu_page(
383
- 'ajax-load-more',
384
- 'Examples',
385
- 'Examples',
386
- 'edit_theme_options',
387
- 'ajax-load-more-examples',
388
  'alm_examples_page'
389
- );
390
-
391
- $alm_help_page = add_submenu_page(
392
- 'ajax-load-more',
393
- 'Help',
394
- 'Help',
395
- 'edit_theme_options',
396
- 'ajax-load-more-help',
397
  'alm_help_page'
398
- );
399
-
400
  $alm_licenses_page = add_submenu_page(
401
- 'ajax-load-more',
402
- 'Licenses',
403
- 'Licenses',
404
- 'edit_theme_options',
405
- 'ajax-load-more-licenses',
406
  'alm_licenses_page'
407
- );
408
-
409
  if(has_action('alm_cache_installed')){
410
- $alm_cache_page = add_submenu_page(
411
- 'ajax-load-more',
412
- 'Cache',
413
- '<span style="color: #f2f5bf; display:block; border-top: 1px solid #555; padding-top: 8px; border-radius: 3px;">Cache<span>',
414
- 'edit_theme_options',
415
- 'ajax-load-more-cache',
416
  'alm_cache_page'
417
  );
418
  add_action( 'load-' . $alm_cache_page, 'alm_load_admin_js' );
419
  add_action( 'load-' . $alm_cache_page, 'alm_load_cache_admin_js' );
420
- add_action( 'load-' . $alm_cache_page, 'alm_set_admin_nonce' );
421
  }
422
-
423
  //Add our admin scripts
424
  add_action( 'load-' . $alm_settings_page, 'alm_load_admin_js' );
425
- add_action( 'load-' . $alm_settings_page, 'alm_set_admin_nonce' );
426
  add_action( 'load-' . $alm_template_page, 'alm_load_admin_js' );
427
- add_action( 'load-' . $alm_template_page, 'alm_set_admin_nonce' );
428
  add_action( 'load-' . $alm_shortcode_page, 'alm_load_admin_js' );
429
  add_action( 'load-' . $alm_shortcode_page, 'alm_set_admin_nonce' );
430
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
@@ -435,8 +434,8 @@ function alm_admin_menu() {
435
  add_action( 'load-' . $alm_addons_page, 'alm_set_admin_nonce' );
436
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
437
  add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
438
- }
439
-
440
 
441
 
442
  /**
@@ -472,16 +471,18 @@ function alm_enqueue_admin_scripts(){
472
  wp_enqueue_style( 'alm-tooltipster', ALM_ADMIN_URL. 'css/tooltipster/tooltipster.css');
473
  wp_enqueue_style( 'alm-core', ALM_URL. '/core/css/ajax-load-more.css');
474
  wp_enqueue_style( 'alm-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css');
475
-
476
- //Load CodeMirror Syntax Highlighting if on Repater Template page
 
 
477
  $screen = get_current_screen();
478
- if ( in_array( $screen->id, array( 'ajax-load-more_page_ajax-load-more-repeaters') ) ){
479
-
480
  //CodeMirror CSS
481
  wp_enqueue_style( 'alm-codemirror-css', ALM_ADMIN_URL. 'codemirror/lib/codemirror.css' );
482
-
483
  //CodeMirror JS
484
- wp_enqueue_script( 'alm-codemirror', ALM_ADMIN_URL. 'codemirror/lib/codemirror.js');
485
  wp_enqueue_script( 'alm-codemirror-matchbrackets', ALM_ADMIN_URL. 'codemirror/addon/edit/matchbrackets.js' );
486
  wp_enqueue_script( 'alm-codemirror-htmlmixed', ALM_ADMIN_URL. 'codemirror/mode/htmlmixed/htmlmixed.js' );
487
  wp_enqueue_script( 'alm-codemirror-xml', ALM_ADMIN_URL. 'codemirror/mode/xml/xml.js' );
@@ -489,10 +490,10 @@ function alm_enqueue_admin_scripts(){
489
  wp_enqueue_script( 'alm-codemirror-mode-css', ALM_ADMIN_URL. 'codemirror/mode/css/css.js' );
490
  wp_enqueue_script( 'alm-codemirror-clike', ALM_ADMIN_URL. 'codemirror/mode/clike/clike.js' );
491
  wp_enqueue_script( 'alm-codemirror-php', ALM_ADMIN_URL. 'codemirror/mode/php/php.js' );
492
-
493
  }
494
-
495
- //Load JS
496
  wp_enqueue_script( 'jquery-form' );
497
  wp_enqueue_script( 'alm-select2', ALM_ADMIN_URL. 'js/libs/select2.min.js', array( 'jquery' ));
498
  wp_enqueue_script( 'alm-drops', ALM_ADMIN_URL. 'js/libs/jquery.drops.js', array( 'jquery' ));
@@ -511,7 +512,7 @@ function alm_enqueue_admin_scripts(){
511
  * @since 2.0.0
512
  */
513
 
514
- function alm_settings_page(){
515
  include_once( ALM_PATH . 'admin/views/settings.php');
516
  }
517
 
@@ -524,7 +525,7 @@ function alm_settings_page(){
524
  * @since 2.0.0
525
  */
526
 
527
- function alm_repeater_page(){
528
  include_once( ALM_PATH . 'admin/views/repeater-templates.php');
529
  }
530
 
@@ -537,8 +538,8 @@ function alm_repeater_page(){
537
  * @since 2.0.0
538
  */
539
 
540
- function alm_shortcode_builder_page(){
541
- include_once( ALM_PATH . 'admin/views/shortcode-builder.php');
542
  }
543
 
544
 
@@ -550,21 +551,21 @@ function alm_shortcode_builder_page(){
550
  * @since 2.0.0
551
  */
552
 
553
- function alm_examples_page(){
554
- include_once( ALM_PATH . 'admin/views/examples.php');
555
  }
556
 
557
 
558
 
559
  /*
560
  * alm_help_page
561
- * Help Page (Implementation Inforgraphic)
562
  *
563
  * @since 2.8.7
564
  */
565
 
566
- function alm_help_page(){
567
- include_once( ALM_PATH . 'admin/views/help.php');
568
  }
569
 
570
 
@@ -576,7 +577,7 @@ function alm_help_page(){
576
  * @since 2.0.0
577
  */
578
 
579
- function alm_add_ons_page(){
580
  include_once( ALM_PATH . 'admin/views/add-ons.php');
581
  }
582
 
@@ -589,7 +590,7 @@ function alm_add_ons_page(){
589
  * @since 2.7.0
590
  */
591
 
592
- function alm_licenses_page(){
593
  include_once( ALM_PATH . 'admin/views/licenses.php');
594
  }
595
 
@@ -601,7 +602,7 @@ function alm_licenses_page(){
601
  * @since 2.6.0
602
  */
603
 
604
- function alm_cache_page(){
605
  include_once( ALM_CACHE_PATH . 'admin/views/cache.php');
606
  }
607
 
@@ -616,44 +617,44 @@ function alm_cache_page(){
616
  */
617
 
618
  function alm_save_repeater(){
619
-
620
  if (current_user_can( 'edit_theme_options' )){
621
-
622
  global $wpdb;
623
  $table_name = $wpdb->prefix . "alm";
624
- $blog_id = $wpdb->blogid;
625
  $options = get_option( 'alm_settings' ); //Get plugin options
626
-
627
  $nonce = $_POST["nonce"];
628
  // Check our nonce, if they don't match then bounce!
629
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
630
  die('Error - unable to verify nonce, please try again.');
631
-
632
- // Get _POST Vars
633
  $c = Trim(stripslashes($_POST["value"])); // Repeater Value
634
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
635
  $t = Trim(stripslashes($_POST["type"])); // Repeater name
636
  $a = Trim(stripslashes($_POST["alias"])); // Repeater alias
637
-
638
- // Write to repeater templates
639
-
640
  // (Default)
641
  if($t === 'default'){
642
-
643
- if($blog_id > 1){
644
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
645
  if( !is_dir($dir) ){
646
  mkdir($dir);
647
- }
648
  $f = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
649
  }else{
650
- $f = ALM_PATH. 'core/repeater/default.php';
651
  }
652
-
653
  }
654
  // (Unlimited)
655
  elseif($t === 'unlimited'){
656
-
657
  if($blog_id > 1){
658
  $dir = ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id;
659
  if( !is_dir($dir) ){
@@ -663,41 +664,41 @@ function alm_save_repeater(){
663
  }else{
664
  $f = ALM_UNLIMITED_PATH. 'repeaters/'.$n .'.php';
665
  }
666
-
667
  }
668
  // (Unlimited v1)
669
  else{
670
-
671
  $f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php';
672
-
673
  }
674
-
675
  try {
676
  $o = fopen($f, 'w+'); //Open file
677
  if ( !$o ) {
678
  throw new Exception(__('[Ajax Load More] Unable to open repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more'));
679
- }
680
  $w = fwrite($o, $c); //Save the file
681
  if ( !$w ) {
682
  throw new Exception(__('[Ajax Load More] Error saving repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more'));
683
- }
684
  fclose($o); //now close it
685
-
686
  } catch ( Exception $e ) {
687
  // Display error message in console.
688
- if(!isset($options['_alm_error_notices']) || $options['_alm_error_notices'] == '1'){
689
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
690
  }
691
  }
692
-
693
- //Save to database
694
-
695
- if($t === 'default') {
696
  $data_update = array('repeaterDefault' => "$c", 'pluginVersion' => ALM_VERSION);
697
  $data_where = array('name' => "default");
698
  }
699
- elseif($t === 'unlimited'){ // Unlimited Repeaters
700
- $table_name = $wpdb->prefix . "alm_unlimited";
701
  $data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_UNLIMITED_VERSION);
702
  $data_where = array('name' => $n);
703
  }
@@ -705,9 +706,9 @@ function alm_save_repeater(){
705
  $data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_REPEATER_VERSION);
706
  $data_where = array('name' => $n);
707
  }
708
-
709
  $wpdb->update($table_name , $data_update, $data_where);
710
-
711
  //Our results
712
  if($w){
713
  echo '<span class="saved">Template Saved Successfully</span>';
@@ -715,7 +716,7 @@ function alm_save_repeater(){
715
  echo '<span class="saved-error"><b>'. __('Error Writing File', 'ajax-load-more') .'</b></span><br/>Something went wrong and the data could not be saved.';
716
  }
717
  die();
718
-
719
  }else {
720
  echo __('You don\'t belong here.', 'ajax-load-more');
721
  }
@@ -734,36 +735,36 @@ function alm_save_repeater(){
734
  */
735
 
736
  function alm_update_repeater(){
737
-
738
  if (current_user_can( 'edit_theme_options' )){
739
-
740
  $nonce = $_POST["nonce"];
741
  // Check our nonce, if they don't match then bounce!
742
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
743
  die('Error - unable to verify nonce, please try again.');
744
-
745
- // Get _POST Vars
746
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
747
  $t = Trim(stripslashes($_POST["type"])); // Repeater type (default | unlimited)
748
-
749
-
750
  // Get value from database
751
  global $wpdb;
752
- $table_name = $wpdb->prefix . "alm";
753
-
754
- if($t === 'default') $n = 'default';
755
- if($t === 'unlimited') $table_name = $wpdb->prefix . "alm_unlimited";
756
-
757
  $the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '$n'");
758
-
759
  echo $the_repeater; // Return repeater value
760
-
761
  die();
762
-
763
  } else {
764
  echo __('You don\'t belong here.', 'ajax-load-more');
765
  }
766
-
767
  }
768
 
769
 
@@ -776,42 +777,42 @@ function alm_update_repeater(){
776
  * @since 2.1.0
777
  */
778
 
779
- function alm_get_tax_terms(){
780
  if (current_user_can( 'edit_theme_options' )){
781
-
782
  $nonce = $_GET["nonce"];
783
  // Check our nonce, if they don't match then bounce!
784
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
785
  die('Get Bounced!');
786
-
787
- $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
788
- $index = (isset($_GET['index'])) ? $_GET['index'] : '1';
789
-
790
  $tax_args = array(
791
- 'orderby' => 'name',
792
  'order' => 'ASC',
793
  'hide_empty' => false
794
- );
795
  $terms = get_terms($taxonomy, $tax_args);
796
  $returnVal = '';
797
- if ( !empty( $terms ) && !is_wp_error( $terms ) ){
798
  $returnVal .= '<ul>';
799
  foreach ( $terms as $term ) {
800
 
801
- $returnVal .='<li><input type="checkbox" class="alm_element" name="tax-term-'.$term->slug.'" id="tax-term-'.$term->slug.'-'.$index.'" data-type="'.$term->slug.'"><label for="tax-term-'.$term->slug.'-'.$index.'">'.$term->name.'</label></li>';
802
-
803
  }
804
- $returnVal .= '</ul>';
805
  echo $returnVal;
806
-
807
  die();
808
  }else{
809
  echo "<p class='warning'>No terms exist within this taxonomy</p>";
810
  die();
811
  }
812
-
813
- } else {
814
- echo __('You don\'t belong here.', 'ajax-load-more');
815
  }
816
  }
817
 
@@ -825,16 +826,16 @@ function alm_get_tax_terms(){
825
  */
826
  function alm_layouts_dismiss(){
827
  if (current_user_can( 'edit_theme_options' )){
828
-
829
  $nonce = $_POST["nonce"];
830
-
831
  // Check our nonce, if they don't match then bounce!
832
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
833
- die('Error - unable to verify nonce, please try again.');
834
-
835
  update_option('alm_layouts_dismiss', 'true');
836
  echo 'Success';
837
-
838
  die();
839
  }
840
  }
@@ -849,16 +850,16 @@ function alm_layouts_dismiss(){
849
  */
850
  function alm_dismiss_sharing(){
851
  if (current_user_can( 'edit_theme_options' )){
852
-
853
  $nonce = $_POST["nonce"];
854
-
855
  // Check our nonce, if they don't match then bounce!
856
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
857
- die('Error - unable to verify nonce, please try again.');
858
-
859
  set_transient( 'alm_dismiss_sharing', 'true', YEAR_IN_SECONDS );
860
  echo 'ALM sharing dismissed successfully.';
861
-
862
  die();
863
  }
864
  }
@@ -872,12 +873,12 @@ function alm_dismiss_sharing(){
872
  * @since 2.12.0
873
  */
874
 
875
- function alm_filter_admin_footer_text( $text ) {
876
- $screen = alm_is_admin_screen();
877
  if(!$screen){
878
  return;
879
  }
880
-
881
  echo '<strong>Ajax Load More</strong> is made with <span style="color: #e25555;">♥</span> by <a href="https://connekthq.com" target="_blank" style="font-weight: 500;">Connekt</a> | <a href="https://wordpress.org/support/plugin/ajax-load-more/reviews/" target="_blank" style="font-weight: 500;">Leave a Review</a> | <a href="https://connekthq.com/plugins/ajax-load-more/support/" target="_blank" style="font-weight: 500;">Get Support</a>';
882
  }
883
 
@@ -893,26 +894,26 @@ function alm_filter_admin_footer_text( $text ) {
893
  add_action( 'admin_init', 'alm_admin_init');
894
  function alm_admin_init(){
895
 
896
- register_setting(
897
- 'alm-setting-group',
898
- 'alm_settings',
899
- 'alm_sanitize_settings'
 
 
 
 
 
 
 
900
  );
901
-
902
- add_settings_section(
903
- 'alm_general_settings',
904
- 'Global Settings',
905
- 'alm_general_settings_callback',
906
- 'ajax-load-more'
907
  );
908
-
909
- add_settings_section(
910
- 'alm_admin_settings',
911
- 'Admin Settings',
912
- 'alm_admin_settings_callback',
913
- 'ajax-load-more'
914
- );
915
-
916
  add_settings_field( // Container type
917
  '_alm_container_type',
918
  __('Container Type', 'ajax-load-more' ),
@@ -920,132 +921,132 @@ function alm_admin_init(){
920
  'ajax-load-more',
921
  'alm_general_settings'
922
  );
923
-
924
  add_settings_field( // Classnames
925
- '_alm_classname',
926
- __('Container Classes', 'ajax-load-more' ),
927
- 'alm_class_callback',
928
- 'ajax-load-more',
929
- 'alm_general_settings'
930
  );
931
-
932
  add_settings_field( // Disbale CSS
933
- '_alm_disable_css',
934
- __('Disable CSS', 'ajax-load-more' ),
935
- 'alm_disable_css_callback',
936
- 'ajax-load-more',
937
- 'alm_general_settings'
938
  );
939
-
940
  add_settings_field( // Btn color
941
- '_alm_btn_color',
942
- __('Button/Loading Style', 'ajax-load-more' ),
943
- 'alm_btn_color_callback',
944
- 'ajax-load-more',
945
- 'alm_general_settings'
946
- );
947
-
948
  add_settings_field( // Button classes
949
- '_alm_btn_classname',
950
- __('Button Classes', 'ajax-load-more' ),
951
- 'alm_btn_class_callback',
952
- 'ajax-load-more',
953
- 'alm_general_settings'
954
  );
955
-
956
  add_settings_field( // Nonce security
957
- '_alm_nonce_security',
958
- __('Ajax Security', 'ajax-load-more' ),
959
- '_alm_nonce_security_callback',
960
- 'ajax-load-more',
961
- 'alm_general_settings'
962
- );
963
-
964
  add_settings_field( // Scroll to top on load
965
- '_alm_scroll_top',
966
- __('Top of Page', 'ajax-load-more' ),
967
- '_alm_scroll_top_callback',
968
- 'ajax-load-more',
969
- 'alm_general_settings'
970
- );
971
-
972
  add_settings_field( // Load dynamic queries
973
- '_alm_disable_dynamic',
974
- __('Dynamic Content', 'ajax-load-more' ),
975
- 'alm_disable_dynamic_callback',
976
- 'ajax-load-more',
977
- 'alm_admin_settings'
978
- );
979
-
980
  add_settings_field( // Hide btn
981
- '_alm_hide_btn',
982
- __('Editor Button', 'ajax-load-more' ),
983
- 'alm_hide_btn_callback',
984
- 'ajax-load-more',
985
- 'alm_admin_settings'
986
  );
987
-
988
  add_settings_field( // Display error notices
989
- '_alm_error_notices',
990
- __('Error Notices', 'ajax-load-more' ),
991
- '_alm_error_notices_callback',
992
- 'ajax-load-more',
993
- 'alm_admin_settings'
994
- );
995
-
996
-
997
  // CACHE
998
- if(has_action('alm_cache_settings')){
999
- do_action('alm_cache_settings');
1000
- }
1001
-
1002
-
1003
  // CUSTOM REPEATERS
1004
- if(has_action('alm_unlimited_settings')){
1005
- do_action('alm_unlimited_settings');
1006
  }
1007
-
1008
-
1009
  // LAYOUTS
1010
- if(has_action('alm_layouts_settings')){
1011
- do_action('alm_layouts_settings');
1012
  }
1013
-
1014
-
1015
  // PAGINATION
1016
- if(has_action('alm_paging_settings')){
1017
- do_action('alm_paging_settings');
1018
  }
1019
-
1020
-
1021
  // PREVIOUS POST
1022
- if(has_action('alm_prev_post_settings')){
1023
- do_action('alm_prev_post_settings');
1024
  }
1025
-
1026
-
1027
  // PRELOADED
1028
- if(has_action('alm_preloaded_settings')){
1029
- do_action('alm_preloaded_settings');
1030
  }
1031
-
1032
-
1033
  // REST API
1034
- if(has_action('alm_rest_api_settings')){
1035
- do_action('alm_rest_api_settings');
1036
  }
1037
-
1038
-
1039
  // SEO
1040
- if(has_action('alm_seo_settings')){
1041
- do_action('alm_seo_settings');
1042
  }
1043
-
1044
-
1045
  // THEME REPEATERS
1046
- if(has_action('alm_theme_repeaters_settings')){
1047
- do_action('alm_theme_repeaters_settings');
1048
- }
1049
  }
1050
 
1051
 
@@ -1097,13 +1098,13 @@ function alm_sanitize_settings( $input ) {
1097
 
1098
  function alm_disable_css_callback(){
1099
  $options = get_option( 'alm_settings' );
1100
- if(!isset($options['_alm_disable_css']))
1101
  $options['_alm_disable_css'] = '0';
1102
-
1103
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
1104
  $html .= '<input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' />';
1105
  $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>';
1106
-
1107
  echo $html;
1108
  }
1109
 
@@ -1118,12 +1119,12 @@ function alm_disable_css_callback(){
1118
 
1119
  function alm_hide_btn_callback(){
1120
  $options = get_option( 'alm_settings' );
1121
- if(!isset($options['_alm_hide_btn']))
1122
  $options['_alm_hide_btn'] = '0';
1123
-
1124
  $html = '<input type="hidden" name="alm_settings[_alm_hide_btn]" value="0" /><input type="checkbox" id="alm_hide_btn" name="alm_settings[_alm_hide_btn]" value="1"'. (($options['_alm_hide_btn']) ? ' checked="checked"' : '') .' />';
1125
- $html .= '<label for="alm_hide_btn">'.__('Hide shortcode button in WYSIWYG editor.', 'ajax-load-more').'</label>';
1126
-
1127
  echo $html;
1128
  }
1129
 
@@ -1137,14 +1138,14 @@ function alm_hide_btn_callback(){
1137
  */
1138
 
1139
  function _alm_error_notices_callback(){
1140
- $options = get_option( 'alm_settings' );
1141
- if(!isset($options['_alm_error_notices']))
1142
  $options['_alm_error_notices'] = '1';
1143
-
1144
  $html = '<input type="hidden" name="alm_settings[_alm_error_notices]" value="0" />';
1145
  $html .= '<input type="checkbox" name="alm_settings[_alm_error_notices]" id="_alm_error_notices" value="1"'. (($options['_alm_error_notices']) ? ' checked="checked"' : '') .' />';
1146
- $html .= '<label for="_alm_error_notices">'.__('Display error messaging regarding repeater template updates in the browser console.', 'ajax-load-more').'</label>';
1147
-
1148
  echo $html;
1149
  }
1150
 
@@ -1158,14 +1159,14 @@ function _alm_error_notices_callback(){
1158
  */
1159
 
1160
  function alm_disable_dynamic_callback(){
1161
- $options = get_option( 'alm_settings' );
1162
- if(!isset($options['_alm_disable_dynamic']))
1163
  $options['_alm_disable_dynamic'] = '0';
1164
-
1165
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
1166
  $html .= '<input type="checkbox" name="alm_settings[_alm_disable_dynamic]" id="_alm_disable_dynamic" value="1"'. (($options['_alm_disable_dynamic']) ? ' checked="checked"' : '') .' />';
1167
- $html .= '<label for="_alm_disable_dynamic">'.__('Disable dynamic population of categories, tags and authors in the Shortcode Builder.<span style="display:block">Recommended if you have an extraordinary number of categories, tags and/or authors.', 'ajax-load-more').'</label>';
1168
-
1169
  echo $html;
1170
  }
1171
 
@@ -1176,24 +1177,24 @@ function alm_disable_dynamic_callback(){
1176
  *
1177
  * @since 2.0.0
1178
  */
1179
-
1180
  function alm_container_type_callback() {
1181
-
1182
  $options = get_option( 'alm_settings' );
1183
-
1184
- if(!isset($options['_alm_container_type']))
1185
  $options['_alm_container_type'] = '1';
1186
-
1187
  $html = '<input type="radio" id="_alm_container_type_one" name="alm_settings[_alm_container_type]" value="1"' . checked( 1, $options['_alm_container_type'], false ) . '/>';
1188
  $html .= '<label for="_alm_container_type_one">&lt;ul&gt; <span>&lt;!-- '.__('Ajax Posts Here', 'ajax-load-more').' --&gt;</span> &lt;/ul&gt;</label><br/>';
1189
-
1190
  $html .= '<input type="radio" id="_alm_container_type_two" name="alm_settings[_alm_container_type]" value="2"' . checked( 2, $options['_alm_container_type'], false ) . '/>';
1191
  $html .= '<label for="_alm_container_type_two">&lt;div&gt; <span>&lt;!-- '.__('Ajax Posts Here', 'ajax-load-more').' --&gt;</span> &lt;/div&gt;</label>';
1192
-
1193
  $html .= '<label style="cursor: default !important"><span style="display:block">'.__('You can modify the container type when building a shortcode.', 'ajax-load-more').'</span></label>';
1194
-
1195
  echo $html;
1196
-
1197
  }
1198
 
1199
 
@@ -1206,10 +1207,10 @@ function alm_container_type_callback() {
1206
 
1207
  function alm_class_callback(){
1208
  $options = get_option( 'alm_settings' );
1209
-
1210
  $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - classes are applied globally and will appear with every instance of Ajax Load More. <span style="display:block">You can also add classes when building a shortcode.</span>', 'ajax-load-more').'</label><br/>';
1211
- $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
1212
-
1213
  echo $html;
1214
  }
1215
 
@@ -1221,54 +1222,54 @@ function alm_class_callback(){
1221
  *
1222
  * @since 2.0.0
1223
  */
1224
-
1225
  function alm_btn_color_callback() {
1226
-
1227
  $options = get_option( 'alm_settings' );
1228
  $type = $options['_alm_btn_color'];
1229
-
1230
- if(!isset($type))
1231
  $options['_alm_btn_color'] = '0';
1232
-
1233
- $selected0 = '';
1234
  if($type == 'default') $selected0 = 'selected="selected"';
1235
-
1236
- $selected1 = '';
1237
  if($type == 'blue') $selected1 = 'selected="selected"';
1238
-
1239
- $selected2 = '';
1240
  if($type == 'green') $selected2 = 'selected="selected"';
1241
-
1242
- $selected3 = '';
1243
  if($type == 'red') $selected3 = 'selected="selected"';
1244
-
1245
- $selected4 = '';
1246
  if($type == 'purple') $selected4 = 'selected="selected"';
1247
-
1248
- $selected5 = '';
1249
  if($type == 'grey') $selected5 = 'selected="selected"';
1250
-
1251
- $selected6 = '';
1252
  if($type == 'white') $selected6 = 'selected="selected"';
1253
-
1254
- $selected7 = '';
1255
  if($type == 'infinite classic') $selected7 = 'selected="selected"';
1256
-
1257
- $selected8 = '';
1258
  if($type == 'infinite skype') $selected8 = 'selected="selected"';
1259
-
1260
- $selected9 = '';
1261
  if($type == 'infinite ring') $selected9 = 'selected="selected"';
1262
-
1263
- $selected10 = '';
1264
  if($type == 'infinite fading-blocks') $selected10 = 'selected="selected"';
1265
-
1266
- $selected11 = '';
1267
  if($type == 'infinite fading-circles') $selected11 = 'selected="selected"';
1268
-
1269
- $selected12 = '';
1270
  if($type == 'infinite chasing-arrows') $selected12 = 'selected="selected"';
1271
-
1272
  $html = '<label for="alm_settings_btn_color">'.__('Select an Ajax loading style - you can choose between a <strong>button</strong> or <strong>infinite scroll</strong>', 'ajax-load-more');
1273
  $html .= '.<br/><span style="display:block">Selecting an Infinite Scroll button style will remove the click interaction and load content on scroll only.</span>';
1274
  $html .= '</label>';
@@ -1289,7 +1290,7 @@ function alm_btn_color_callback() {
1289
  $html .= '<option value="infinite chasing-arrows" class="infinite chasing-arrows" ' . $selected12 .'>Chasing Arrows</option>';
1290
  $html .= '</optgroup>';
1291
  $html .= '</select>';
1292
-
1293
  $html .= '<div class="clear"></div><div class="ajax-load-more-wrap core '.$type.'"><span>'.__('Preview', 'ajax-load-more') .'</span><button class="alm-load-more-btn loading" disabled="disabled">'.apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')).'</button></div>';
1294
  echo $html;
1295
  }
@@ -1305,17 +1306,17 @@ function alm_btn_color_callback() {
1305
 
1306
  function alm_btn_class_callback(){
1307
  $options = get_option( 'alm_settings' );
1308
-
1309
- if(!isset($options['_alm_btn_classname']))
1310
  $options['_alm_btn_classname'] = '';
1311
-
1312
  $html = '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to your <strong>Load More</strong> button', 'ajax-load-more').'.</label>';
1313
- $html .= '<input type="text" class="btn-classes" id="alm_settings[_alm_btn_classname]" name="alm_settings[_alm_btn_classname]" value="'.$options['_alm_btn_classname'].'" placeholder="button rounded listing etc..." /> ';
1314
-
1315
  echo $html;
1316
- ?>
1317
  <script>
1318
-
1319
  // Check if Disable CSS === true
1320
  if(jQuery('input#alm_disable_css_input').is(":checked")){
1321
  jQuery('select#alm_settings_btn_color').parent().parent().hide(); // Hide button color
@@ -1326,12 +1327,12 @@ function alm_btn_class_callback(){
1326
  if(el.is(":checked")) {
1327
  el.parent().parent('tr').next('tr').hide(); // Hide button color
1328
  //el.parent().parent('tr').next('tr').next('tr').hide(); // Hide Button Classes
1329
- }else{
1330
  el.parent().parent('tr').next('tr').show(); // show button color
1331
  //el.parent().parent('tr').next('tr').next('tr').show(); // show Button Classes
1332
  }
1333
  });
1334
-
1335
  </script>
1336
  <?php
1337
  }
@@ -1346,14 +1347,14 @@ function alm_btn_class_callback(){
1346
  */
1347
 
1348
  function _alm_scroll_top_callback(){
1349
- $options = get_option( 'alm_settings' );
1350
- if(!isset($options['_alm_scroll_top']))
1351
  $options['_alm_scroll_top'] = '0';
1352
-
1353
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
1354
  $html .= '<input type="checkbox" name="alm_settings[_alm_scroll_top]" id="_alm_scroll_top" value="1"'. (($options['_alm_scroll_top']) ? ' checked="checked"' : '') .' />';
1355
- $html .= '<label for="_alm_scroll_top">'.__('On initial page load, move the user\'s browser window to the top of the screen.<span style="display:block">This <u>may</u> help prevent the loading of unnecessary posts.</span>', 'ajax-load-more').'</label>';
1356
-
1357
  echo $html;
1358
  }
1359
 
@@ -1367,14 +1368,14 @@ function _alm_scroll_top_callback(){
1367
  */
1368
 
1369
  function _alm_nonce_security_callback(){
1370
- $options = get_option( 'alm_settings' );
1371
- if(!isset($options['_alm_nonce_security']))
1372
  $options['_alm_nonce_security'] = '0';
1373
-
1374
  $html = '<input type="hidden" name="alm_settings[_alm_nonce_security]" value="0" />';
1375
  $html .= '<input type="checkbox" name="alm_settings[_alm_nonce_security]" id="_alm_nonce_security" value="1"'. (($options['_alm_nonce_security']) ? ' checked="checked"' : '') .' />';
1376
- $html .= '<label for="_alm_nonce_security">'.__('Enable <a href="https://codex.wordpress.org/WordPress_Nonces" target="_blank">WP nonce</a> verification to help protect URLs against certain types of misuse, malicious or otherwise on each Ajax Load More query.', 'ajax-load-more').'</label>';
1377
-
1378
  echo $html;
1379
  }
1380
 
1
  <?php
2
+
3
  add_action( 'plugins_loaded', 'alm_core_update' ); // Core Update
4
  add_action( 'wp_ajax_alm_save_repeater', 'alm_save_repeater' ); // Ajax Save Repeater
5
  add_action( 'wp_ajax_alm_update_repeater', 'alm_update_repeater' ); // Ajax Update Repeater
7
  add_action( 'wp_ajax_alm_delete_cache', 'alm_delete_cache' ); // Delete Cache
8
  add_action( 'wp_ajax_alm_layouts_dismiss', 'alm_layouts_dismiss' ); // Dismiss Layouts CTA
9
  add_action( 'wp_ajax_alm_license_activation', 'alm_license_activation' ); // Activate Add-on
10
+ add_action( 'alm_get_layouts', 'alm_get_layouts' ); // Add layout selection
11
  add_action( 'wp_ajax_alm_get_layout', 'alm_get_layout' ); // Get layout
12
  add_action( 'wp_ajax_alm_dismiss_sharing', 'alm_dismiss_sharing' ); // Dismiss sharing
13
  add_filter( 'admin_footer_text', 'alm_filter_admin_footer_text'); // Admin menu text
22
  */
23
 
24
  function alm_license_activation(){
25
+
26
  if (current_user_can( 'edit_theme_options' )){
27
+
28
  $nonce = $_GET["nonce"];
29
  $type = $_GET["type"]; // activate / deactivate
30
+ $item = $_GET["item"];
31
+ $license = $_GET["license"];
32
+ $url = $_GET["url"];
33
+ $upgrade = $_GET["upgrade"];
34
+ $option_status = $_GET["status"];
35
+ $option_key = $_GET["key"];
36
+
37
  // Check our nonce, if they don't match then bounce!
38
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
39
+ die('Error - unable to verify nonce, please try again.');
40
+
41
  // data to send in our API request
42
  if($type === 'activate'){
43
  $action = 'activate_license';
44
  }else{
45
  $action = 'deactivate_license';
46
  }
47
+
48
+ $api_params = array(
49
+ 'edd_action'=> $action,
50
+ 'license' => $license,
51
  'item_id' => $item, // the ID of our product in EDD
52
  'url' => home_url()
53
  );
54
+
55
  // Call the custom API.
56
  //$response = wp_remote_get( add_query_arg( $api_params, $url ), array( 'timeout' => 15, 'sslverify' => false ) );
57
+
58
  // Updated 2.8.7
59
  $response = wp_remote_post( ALM_STORE_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
60
+
61
  // make sure the response came back okay
62
  if ( is_wp_error( $response ) )
63
  return false;
64
+
65
+
66
  $license_data = $response['body'];
67
  $license_data = json_decode($license_data); // decode the license data
68
+
69
+
70
  $return["success"] = $license_data->success;
71
+
72
  $msg = '';
73
+ if($type === 'activate'){
74
  $return["license_limit"] = $license_data->license_limit;
75
  $return["expires"] = $license_data->expires;
76
  $return["site_count"] = $license_data->site_count;
77
  $return["activations_left"] = $license_data->activations_left;
78
  $return["license"] = $license_data->license;
79
+ $return["item_name"] = $license_data->item_name;
80
  if($license_data->activations_left === 0 && $license_data->success === false){
81
  $msg = '<strong>Sorry, but you are out of available licenses <em>('. $license_data->license_limit .' / '. $license_data->site_count .')</em>.</strong> Please visit the <a href="'.$upgrade.'" target="_blank">'.$license_data->item_name.'</a> page to add additional licenses.';
82
+ }
83
  }
84
  $return["msg"] = $msg;
85
+
86
  update_option( $option_status, $license_data->license);
87
+ update_option( $option_key, $license );
88
+
89
  echo json_encode($return);
90
+
91
  die();
92
+
93
  } else {
94
  echo __('You don\'t belong here.', ALM_NAME);
95
+ }
96
  }
97
 
98
 
105
  * @updated 2.14.0
106
  */
107
 
108
+ function alm_get_layout(){
109
+ if (current_user_can( 'edit_theme_options' )){
110
+
111
  $nonce = sanitize_text_field($_GET["nonce"]);
112
+ $type = sanitize_text_field($_GET["type"]);
113
+ $custom = sanitize_text_field($_GET["custom"]);
114
+
115
  // Check our nonce, if they don't match then bounce!
116
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
117
+ die('Error - unable to verify nonce, please try again.');
118
+
119
  if($type === 'default'){
120
+
121
  // Default Layout
122
  $content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
123
+
124
  }else{
125
+
126
  // Custom Layout
127
  if($custom == 'true'){
128
  $dir = 'alm_layouts';
129
+
130
  if(is_child_theme()){
131
  $path = get_stylesheet_directory().'/'. $dir .'/' .$type;
132
  // if child theme does not have the layout, check the parent theme
137
  else{
138
  $path = get_template_directory().'/'. $dir .'/' .$type;
139
  }
140
+ $content = file_get_contents($path);
141
+
142
+ }
143
+
144
  // Layouts Add-on
145
+ else {
146
+ $content = file_get_contents(ALM_LAYOUTS_PATH.'layouts/'.$type.'.php');
147
+ }
148
+ }
149
+
150
  $return["value"] = $content;
151
+ echo json_encode($return);
152
  }else {
153
  echo __('You don\'t belong here.', ALM_NAME);
154
+ }
155
+ die();
156
  }
157
 
158
 
165
  * @since 2.8.7
166
  */
167
  function alm_get_layouts(){ // do_action
168
+ include( ALM_PATH . 'admin/includes/components/layout-list.php');
169
  }
170
 
 
171
  /*
172
  * alm_admin_vars
173
  * Create admin variables and ajax nonce
177
  function alm_admin_vars() { ?>
178
  <script type='text/javascript'>
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'),
216
  * @since 2.0.5
217
  */
218
 
219
+ function alm_core_update() {
220
+
221
  if(!get_option( 'alm_version')){ // Add 'alm_version' to WP options table if it does not exist
222
+ add_option( 'alm_version', ALM_VERSION );
223
+ }
224
+
225
  $alm_installed_ver = get_option( "alm_version" ); // Get value from WP Option tbl
226
  if ( $alm_installed_ver != ALM_VERSION ) {
227
+
228
  // Delete ALM transients
229
  delete_transient('alm_dismiss_sharing');
230
+
231
  // Update repeaters
232
+ alm_run_update();
233
+
234
+ }
235
  }
236
 
237
 
244
  */
245
 
246
  function alm_run_update(){
247
+ global $wpdb;
248
+
249
+ if ( is_multisite()) {
250
+ $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
251
+
252
+ // Loop all blogs and run update routine
253
  foreach ( $blog_ids as $blog_id ) {
254
  switch_to_blog( $blog_id );
255
  alm_update_template_files();
256
  restore_current_blog();
257
  }
258
+
259
  } else {
260
  alm_update_template_files();
261
  }
262
+
263
  update_option( "alm_version", ALM_VERSION ); // Update the WP Option tbl with the new version num
264
  }
265
 
273
  */
274
 
275
  function alm_update_template_files(){
276
+ global $wpdb;
277
  $table_name = $wpdb->prefix . "alm";
278
+ $blog_id = $wpdb->blogid;
279
+
280
+ // Get all templates ($rows) where name is 'default'
281
+ $rows = $wpdb->get_results("SELECT * FROM $table_name WHERE name = 'default'");
282
 
283
  if($rows){
284
  foreach( $rows as $row ) { // Loop $rows
285
+
286
  $data = $wpdb->get_var("SELECT repeaterDefault FROM $table_name WHERE name = 'default'");
287
+
288
  if($blog_id > 1){
289
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
290
  if( !is_dir($dir) ){
291
  mkdir($dir);
292
+ }
293
  $f = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
294
  }else{
295
  $f = ALM_PATH. 'core/repeater/default.php';
296
  }
297
+
298
  try {
299
  $o = fopen($f, 'w+'); //Open file
300
  if ( !$o ) {
301
  throw new Exception(__('[Ajax Load More] Error opening default repeater template - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/core/repeater directory', 'ajax-load-more'));
302
+ }
303
  $w = fwrite($o, $data); //Save the file
304
  if ( !$w ) {
305
  throw new Exception(__('[Ajax Load More] Error updating default repeater template - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files within the /ajax-load-more/core/repeater directory.', 'ajax-load-more'));
306
+ }
307
  fclose($o); //now close it
308
+
309
  } catch ( Exception $e ) {
310
  // Display error message in console.
311
+ if(!isset($options['_alm_error_notices']) || $options['_alm_error_notices'] == '1'){
312
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
313
  }
314
  }
315
+
316
  }
317
  }
318
+
319
  }
320
 
321
 
329
  */
330
 
331
  add_action( 'admin_menu', 'alm_admin_menu' );
332
+ function alm_admin_menu() {
333
  $icon = 'dashicons-plus-alt';
334
  $icon = ALM_ADMIN_URL . "/img/alm-logo-16x16.svg";
335
+
336
+ $alm_page = add_menu_page(
337
+ 'Ajax Load More',
338
+ 'Ajax Load More',
339
+ 'edit_theme_options',
340
+ 'ajax-load-more',
341
  'alm_settings_page',
342
  $icon
343
  );
344
+
345
+ $alm_settings_page = add_submenu_page(
346
+ 'ajax-load-more',
347
+ 'Settings',
348
+ 'Settings',
349
+ 'edit_theme_options',
350
+ 'ajax-load-more',
351
  'alm_settings_page'
352
+ );
353
+
354
+ $alm_template_page = add_submenu_page(
355
+ 'ajax-load-more',
356
+ 'Repeater Templates',
357
+ 'Repeater Templates',
358
+ 'edit_theme_options',
359
+ 'ajax-load-more-repeaters',
360
  'alm_repeater_page'
361
  );
362
+
363
+ $alm_shortcode_page = add_submenu_page(
364
+ 'ajax-load-more',
365
+ 'Shortcode Builder',
366
+ 'Shortcode Builder',
367
+ 'edit_theme_options',
368
+ 'ajax-load-more-shortcode-builder',
369
  'alm_shortcode_builder_page'
370
  );
371
+
372
+ $alm_addons_page = add_submenu_page(
373
+ 'ajax-load-more',
374
+ 'Add-ons',
375
+ 'Add-ons',
376
+ 'edit_theme_options',
377
+ 'ajax-load-more-add-ons',
378
  'alm_add_ons_page'
379
+ );
380
+
381
+ $alm_examples_page = add_submenu_page(
382
+ 'ajax-load-more',
383
+ 'Examples',
384
+ 'Examples',
385
+ 'edit_theme_options',
386
+ 'ajax-load-more-examples',
387
  'alm_examples_page'
388
+ );
389
+
390
+ $alm_help_page = add_submenu_page(
391
+ 'ajax-load-more',
392
+ 'Help',
393
+ 'Help',
394
+ 'edit_theme_options',
395
+ 'ajax-load-more-help',
396
  'alm_help_page'
397
+ );
398
+
399
  $alm_licenses_page = add_submenu_page(
400
+ 'ajax-load-more',
401
+ 'Licenses',
402
+ 'Licenses',
403
+ 'edit_theme_options',
404
+ 'ajax-load-more-licenses',
405
  'alm_licenses_page'
406
+ );
407
+
408
  if(has_action('alm_cache_installed')){
409
+ $alm_cache_page = add_submenu_page(
410
+ 'ajax-load-more',
411
+ 'Cache',
412
+ '<span style="color: #f2f5bf; display:block; border-top: 1px solid #555; padding-top: 8px; border-radius: 3px;">Cache<span>',
413
+ 'edit_theme_options',
414
+ 'ajax-load-more-cache',
415
  'alm_cache_page'
416
  );
417
  add_action( 'load-' . $alm_cache_page, 'alm_load_admin_js' );
418
  add_action( 'load-' . $alm_cache_page, 'alm_load_cache_admin_js' );
419
+ add_action( 'load-' . $alm_cache_page, 'alm_set_admin_nonce' );
420
  }
421
+
422
  //Add our admin scripts
423
  add_action( 'load-' . $alm_settings_page, 'alm_load_admin_js' );
424
+ add_action( 'load-' . $alm_settings_page, 'alm_set_admin_nonce' );
425
  add_action( 'load-' . $alm_template_page, 'alm_load_admin_js' );
426
+ add_action( 'load-' . $alm_template_page, 'alm_set_admin_nonce' );
427
  add_action( 'load-' . $alm_shortcode_page, 'alm_load_admin_js' );
428
  add_action( 'load-' . $alm_shortcode_page, 'alm_set_admin_nonce' );
429
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
434
  add_action( 'load-' . $alm_addons_page, 'alm_set_admin_nonce' );
435
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
436
  add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
437
+ }
438
+
439
 
440
 
441
  /**
471
  wp_enqueue_style( 'alm-tooltipster', ALM_ADMIN_URL. 'css/tooltipster/tooltipster.css');
472
  wp_enqueue_style( 'alm-core', ALM_URL. '/core/css/ajax-load-more.css');
473
  wp_enqueue_style( 'alm-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css');
474
+
475
+ wp_dequeue_style( 'acf-input' );
476
+
477
+ //Load CodeMirror Syntax Highlighting if on Repater Template page
478
  $screen = get_current_screen();
479
+ if ( in_array( $screen->id, array( 'ajax-load-more_page_ajax-load-more-repeaters') ) ){
480
+
481
  //CodeMirror CSS
482
  wp_enqueue_style( 'alm-codemirror-css', ALM_ADMIN_URL. 'codemirror/lib/codemirror.css' );
483
+
484
  //CodeMirror JS
485
+ wp_enqueue_script( 'alm-codemirror', ALM_ADMIN_URL. 'codemirror/lib/codemirror.js');
486
  wp_enqueue_script( 'alm-codemirror-matchbrackets', ALM_ADMIN_URL. 'codemirror/addon/edit/matchbrackets.js' );
487
  wp_enqueue_script( 'alm-codemirror-htmlmixed', ALM_ADMIN_URL. 'codemirror/mode/htmlmixed/htmlmixed.js' );
488
  wp_enqueue_script( 'alm-codemirror-xml', ALM_ADMIN_URL. 'codemirror/mode/xml/xml.js' );
490
  wp_enqueue_script( 'alm-codemirror-mode-css', ALM_ADMIN_URL. 'codemirror/mode/css/css.js' );
491
  wp_enqueue_script( 'alm-codemirror-clike', ALM_ADMIN_URL. 'codemirror/mode/clike/clike.js' );
492
  wp_enqueue_script( 'alm-codemirror-php', ALM_ADMIN_URL. 'codemirror/mode/php/php.js' );
493
+
494
  }
495
+
496
+ //Load JS
497
  wp_enqueue_script( 'jquery-form' );
498
  wp_enqueue_script( 'alm-select2', ALM_ADMIN_URL. 'js/libs/select2.min.js', array( 'jquery' ));
499
  wp_enqueue_script( 'alm-drops', ALM_ADMIN_URL. 'js/libs/jquery.drops.js', array( 'jquery' ));
512
  * @since 2.0.0
513
  */
514
 
515
+ function alm_settings_page(){
516
  include_once( ALM_PATH . 'admin/views/settings.php');
517
  }
518
 
525
  * @since 2.0.0
526
  */
527
 
528
+ function alm_repeater_page(){
529
  include_once( ALM_PATH . 'admin/views/repeater-templates.php');
530
  }
531
 
538
  * @since 2.0.0
539
  */
540
 
541
+ function alm_shortcode_builder_page(){
542
+ include_once( ALM_PATH . 'admin/views/shortcode-builder.php');
543
  }
544
 
545
 
551
  * @since 2.0.0
552
  */
553
 
554
+ function alm_examples_page(){
555
+ include_once( ALM_PATH . 'admin/views/examples.php');
556
  }
557
 
558
 
559
 
560
  /*
561
  * alm_help_page
562
+ * Help Page (Implementation Inforgraphic)
563
  *
564
  * @since 2.8.7
565
  */
566
 
567
+ function alm_help_page(){
568
+ include_once( ALM_PATH . 'admin/views/help.php');
569
  }
570
 
571
 
577
  * @since 2.0.0
578
  */
579
 
580
+ function alm_add_ons_page(){
581
  include_once( ALM_PATH . 'admin/views/add-ons.php');
582
  }
583
 
590
  * @since 2.7.0
591
  */
592
 
593
+ function alm_licenses_page(){
594
  include_once( ALM_PATH . 'admin/views/licenses.php');
595
  }
596
 
602
  * @since 2.6.0
603
  */
604
 
605
+ function alm_cache_page(){
606
  include_once( ALM_CACHE_PATH . 'admin/views/cache.php');
607
  }
608
 
617
  */
618
 
619
  function alm_save_repeater(){
620
+
621
  if (current_user_can( 'edit_theme_options' )){
622
+
623
  global $wpdb;
624
  $table_name = $wpdb->prefix . "alm";
625
+ $blog_id = $wpdb->blogid;
626
  $options = get_option( 'alm_settings' ); //Get plugin options
627
+
628
  $nonce = $_POST["nonce"];
629
  // Check our nonce, if they don't match then bounce!
630
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
631
  die('Error - unable to verify nonce, please try again.');
632
+
633
+ // Get _POST Vars
634
  $c = Trim(stripslashes($_POST["value"])); // Repeater Value
635
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
636
  $t = Trim(stripslashes($_POST["type"])); // Repeater name
637
  $a = Trim(stripslashes($_POST["alias"])); // Repeater alias
638
+
639
+ // Write to repeater templates
640
+
641
  // (Default)
642
  if($t === 'default'){
643
+
644
+ if($blog_id > 1){
645
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
646
  if( !is_dir($dir) ){
647
  mkdir($dir);
648
+ }
649
  $f = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
650
  }else{
651
+ $f = ALM_PATH. 'core/repeater/default.php';
652
  }
653
+
654
  }
655
  // (Unlimited)
656
  elseif($t === 'unlimited'){
657
+
658
  if($blog_id > 1){
659
  $dir = ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id;
660
  if( !is_dir($dir) ){
664
  }else{
665
  $f = ALM_UNLIMITED_PATH. 'repeaters/'.$n .'.php';
666
  }
667
+
668
  }
669
  // (Unlimited v1)
670
  else{
671
+
672
  $f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php';
673
+
674
  }
675
+
676
  try {
677
  $o = fopen($f, 'w+'); //Open file
678
  if ( !$o ) {
679
  throw new Exception(__('[Ajax Load More] Unable to open repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more'));
680
+ }
681
  $w = fwrite($o, $c); //Save the file
682
  if ( !$w ) {
683
  throw new Exception(__('[Ajax Load More] Error saving repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more'));
684
+ }
685
  fclose($o); //now close it
686
+
687
  } catch ( Exception $e ) {
688
  // Display error message in console.
689
+ if(!isset($options['_alm_error_notices']) || $options['_alm_error_notices'] == '1'){
690
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
691
  }
692
  }
693
+
694
+ //Save to database
695
+
696
+ if($t === 'default') {
697
  $data_update = array('repeaterDefault' => "$c", 'pluginVersion' => ALM_VERSION);
698
  $data_where = array('name' => "default");
699
  }
700
+ elseif($t === 'unlimited'){ // Unlimited Repeaters
701
+ $table_name = $wpdb->prefix . "alm_unlimited";
702
  $data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_UNLIMITED_VERSION);
703
  $data_where = array('name' => $n);
704
  }
706
  $data_update = array('repeaterDefault' => "$c", 'alias' => "$a", 'pluginVersion' => ALM_REPEATER_VERSION);
707
  $data_where = array('name' => $n);
708
  }
709
+
710
  $wpdb->update($table_name , $data_update, $data_where);
711
+
712
  //Our results
713
  if($w){
714
  echo '<span class="saved">Template Saved Successfully</span>';
716
  echo '<span class="saved-error"><b>'. __('Error Writing File', 'ajax-load-more') .'</b></span><br/>Something went wrong and the data could not be saved.';
717
  }
718
  die();
719
+
720
  }else {
721
  echo __('You don\'t belong here.', 'ajax-load-more');
722
  }
735
  */
736
 
737
  function alm_update_repeater(){
738
+
739
  if (current_user_can( 'edit_theme_options' )){
740
+
741
  $nonce = $_POST["nonce"];
742
  // Check our nonce, if they don't match then bounce!
743
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
744
  die('Error - unable to verify nonce, please try again.');
745
+
746
+ // Get _POST Vars
747
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
748
  $t = Trim(stripslashes($_POST["type"])); // Repeater type (default | unlimited)
749
+
750
+
751
  // Get value from database
752
  global $wpdb;
753
+ $table_name = $wpdb->prefix . "alm";
754
+
755
+ if($t === 'default') $n = 'default';
756
+ if($t === 'unlimited') $table_name = $wpdb->prefix . "alm_unlimited";
757
+
758
  $the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '$n'");
759
+
760
  echo $the_repeater; // Return repeater value
761
+
762
  die();
763
+
764
  } else {
765
  echo __('You don\'t belong here.', 'ajax-load-more');
766
  }
767
+
768
  }
769
 
770
 
777
  * @since 2.1.0
778
  */
779
 
780
+ function alm_get_tax_terms(){
781
  if (current_user_can( 'edit_theme_options' )){
782
+
783
  $nonce = $_GET["nonce"];
784
  // Check our nonce, if they don't match then bounce!
785
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
786
  die('Get Bounced!');
787
+
788
+ $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
789
+ $index = (isset($_GET['index'])) ? $_GET['index'] : '1';
790
+
791
  $tax_args = array(
792
+ 'orderby' => 'name',
793
  'order' => 'ASC',
794
  'hide_empty' => false
795
+ );
796
  $terms = get_terms($taxonomy, $tax_args);
797
  $returnVal = '';
798
+ if ( !empty( $terms ) && !is_wp_error( $terms ) ){
799
  $returnVal .= '<ul>';
800
  foreach ( $terms as $term ) {
801
 
802
+ $returnVal .='<li><input type="checkbox" class="alm_element" name="tax-term-'.$term->slug.'" id="tax-term-'.$term->slug.'-'.$index.'" data-type="'.$term->slug.'"><label for="tax-term-'.$term->slug.'-'.$index.'">'.$term->name.'</label></li>';
803
+
804
  }
805
+ $returnVal .= '</ul>';
806
  echo $returnVal;
807
+
808
  die();
809
  }else{
810
  echo "<p class='warning'>No terms exist within this taxonomy</p>";
811
  die();
812
  }
813
+
814
+ } else {
815
+ echo __('You don\'t belong here.', 'ajax-load-more');
816
  }
817
  }
818
 
826
  */
827
  function alm_layouts_dismiss(){
828
  if (current_user_can( 'edit_theme_options' )){
829
+
830
  $nonce = $_POST["nonce"];
831
+
832
  // Check our nonce, if they don't match then bounce!
833
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
834
+ die('Error - unable to verify nonce, please try again.');
835
+
836
  update_option('alm_layouts_dismiss', 'true');
837
  echo 'Success';
838
+
839
  die();
840
  }
841
  }
850
  */
851
  function alm_dismiss_sharing(){
852
  if (current_user_can( 'edit_theme_options' )){
853
+
854
  $nonce = $_POST["nonce"];
855
+
856
  // Check our nonce, if they don't match then bounce!
857
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
858
+ die('Error - unable to verify nonce, please try again.');
859
+
860
  set_transient( 'alm_dismiss_sharing', 'true', YEAR_IN_SECONDS );
861
  echo 'ALM sharing dismissed successfully.';
862
+
863
  die();
864
  }
865
  }
873
  * @since 2.12.0
874
  */
875
 
876
+ function alm_filter_admin_footer_text( $text ) {
877
+ $screen = alm_is_admin_screen();
878
  if(!$screen){
879
  return;
880
  }
881
+
882
  echo '<strong>Ajax Load More</strong> is made with <span style="color: #e25555;">♥</span> by <a href="https://connekthq.com" target="_blank" style="font-weight: 500;">Connekt</a> | <a href="https://wordpress.org/support/plugin/ajax-load-more/reviews/" target="_blank" style="font-weight: 500;">Leave a Review</a> | <a href="https://connekthq.com/plugins/ajax-load-more/support/" target="_blank" style="font-weight: 500;">Get Support</a>';
883
  }
884
 
894
  add_action( 'admin_init', 'alm_admin_init');
895
  function alm_admin_init(){
896
 
897
+ register_setting(
898
+ 'alm-setting-group',
899
+ 'alm_settings',
900
+ 'alm_sanitize_settings'
901
+ );
902
+
903
+ add_settings_section(
904
+ 'alm_general_settings',
905
+ 'Global Settings',
906
+ 'alm_general_settings_callback',
907
+ 'ajax-load-more'
908
  );
909
+
910
+ add_settings_section(
911
+ 'alm_admin_settings',
912
+ 'Admin Settings',
913
+ 'alm_admin_settings_callback',
914
+ 'ajax-load-more'
915
  );
916
+
 
 
 
 
 
 
 
917
  add_settings_field( // Container type
918
  '_alm_container_type',
919
  __('Container Type', 'ajax-load-more' ),
921
  'ajax-load-more',
922
  'alm_general_settings'
923
  );
924
+
925
  add_settings_field( // Classnames
926
+ '_alm_classname',
927
+ __('Container Classes', 'ajax-load-more' ),
928
+ 'alm_class_callback',
929
+ 'ajax-load-more',
930
+ 'alm_general_settings'
931
  );
932
+
933
  add_settings_field( // Disbale CSS
934
+ '_alm_disable_css',
935
+ __('Disable CSS', 'ajax-load-more' ),
936
+ 'alm_disable_css_callback',
937
+ 'ajax-load-more',
938
+ 'alm_general_settings'
939
  );
940
+
941
  add_settings_field( // Btn color
942
+ '_alm_btn_color',
943
+ __('Button/Loading Style', 'ajax-load-more' ),
944
+ 'alm_btn_color_callback',
945
+ 'ajax-load-more',
946
+ 'alm_general_settings'
947
+ );
948
+
949
  add_settings_field( // Button classes
950
+ '_alm_btn_classname',
951
+ __('Button Classes', 'ajax-load-more' ),
952
+ 'alm_btn_class_callback',
953
+ 'ajax-load-more',
954
+ 'alm_general_settings'
955
  );
956
+
957
  add_settings_field( // Nonce security
958
+ '_alm_nonce_security',
959
+ __('Ajax Security', 'ajax-load-more' ),
960
+ '_alm_nonce_security_callback',
961
+ 'ajax-load-more',
962
+ 'alm_general_settings'
963
+ );
964
+
965
  add_settings_field( // Scroll to top on load
966
+ '_alm_scroll_top',
967
+ __('Top of Page', 'ajax-load-more' ),
968
+ '_alm_scroll_top_callback',
969
+ 'ajax-load-more',
970
+ 'alm_general_settings'
971
+ );
972
+
973
  add_settings_field( // Load dynamic queries
974
+ '_alm_disable_dynamic',
975
+ __('Dynamic Content', 'ajax-load-more' ),
976
+ 'alm_disable_dynamic_callback',
977
+ 'ajax-load-more',
978
+ 'alm_admin_settings'
979
+ );
980
+
981
  add_settings_field( // Hide btn
982
+ '_alm_hide_btn',
983
+ __('Editor Button', 'ajax-load-more' ),
984
+ 'alm_hide_btn_callback',
985
+ 'ajax-load-more',
986
+ 'alm_admin_settings'
987
  );
988
+
989
  add_settings_field( // Display error notices
990
+ '_alm_error_notices',
991
+ __('Error Notices', 'ajax-load-more' ),
992
+ '_alm_error_notices_callback',
993
+ 'ajax-load-more',
994
+ 'alm_admin_settings'
995
+ );
996
+
997
+
998
  // CACHE
999
+ if(has_action('alm_cache_settings')){
1000
+ do_action('alm_cache_settings');
1001
+ }
1002
+
1003
+
1004
  // CUSTOM REPEATERS
1005
+ if(has_action('alm_unlimited_settings')){
1006
+ do_action('alm_unlimited_settings');
1007
  }
1008
+
1009
+
1010
  // LAYOUTS
1011
+ if(has_action('alm_layouts_settings')){
1012
+ do_action('alm_layouts_settings');
1013
  }
1014
+
1015
+
1016
  // PAGINATION
1017
+ if(has_action('alm_paging_settings')){
1018
+ do_action('alm_paging_settings');
1019
  }
1020
+
1021
+
1022
  // PREVIOUS POST
1023
+ if(has_action('alm_prev_post_settings')){
1024
+ do_action('alm_prev_post_settings');
1025
  }
1026
+
1027
+
1028
  // PRELOADED
1029
+ if(has_action('alm_preloaded_settings')){
1030
+ do_action('alm_preloaded_settings');
1031
  }
1032
+
1033
+
1034
  // REST API
1035
+ if(has_action('alm_rest_api_settings')){
1036
+ do_action('alm_rest_api_settings');
1037
  }
1038
+
1039
+
1040
  // SEO
1041
+ if(has_action('alm_seo_settings')){
1042
+ do_action('alm_seo_settings');
1043
  }
1044
+
1045
+
1046
  // THEME REPEATERS
1047
+ if(has_action('alm_theme_repeaters_settings')){
1048
+ do_action('alm_theme_repeaters_settings');
1049
+ }
1050
  }
1051
 
1052
 
1098
 
1099
  function alm_disable_css_callback(){
1100
  $options = get_option( 'alm_settings' );
1101
+ if(!isset($options['_alm_disable_css']))
1102
  $options['_alm_disable_css'] = '0';
1103
+
1104
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
1105
  $html .= '<input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' />';
1106
  $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>';
1107
+
1108
  echo $html;
1109
  }
1110
 
1119
 
1120
  function alm_hide_btn_callback(){
1121
  $options = get_option( 'alm_settings' );
1122
+ if(!isset($options['_alm_hide_btn']))
1123
  $options['_alm_hide_btn'] = '0';
1124
+
1125
  $html = '<input type="hidden" name="alm_settings[_alm_hide_btn]" value="0" /><input type="checkbox" id="alm_hide_btn" name="alm_settings[_alm_hide_btn]" value="1"'. (($options['_alm_hide_btn']) ? ' checked="checked"' : '') .' />';
1126
+ $html .= '<label for="alm_hide_btn">'.__('Hide shortcode button in WYSIWYG editor.', 'ajax-load-more').'</label>';
1127
+
1128
  echo $html;
1129
  }
1130
 
1138
  */
1139
 
1140
  function _alm_error_notices_callback(){
1141
+ $options = get_option( 'alm_settings' );
1142
+ if(!isset($options['_alm_error_notices']))
1143
  $options['_alm_error_notices'] = '1';
1144
+
1145
  $html = '<input type="hidden" name="alm_settings[_alm_error_notices]" value="0" />';
1146
  $html .= '<input type="checkbox" name="alm_settings[_alm_error_notices]" id="_alm_error_notices" value="1"'. (($options['_alm_error_notices']) ? ' checked="checked"' : '') .' />';
1147
+ $html .= '<label for="_alm_error_notices">'.__('Display error messaging regarding repeater template updates in the browser console.', 'ajax-load-more').'</label>';
1148
+
1149
  echo $html;
1150
  }
1151
 
1159
  */
1160
 
1161
  function alm_disable_dynamic_callback(){
1162
+ $options = get_option( 'alm_settings' );
1163
+ if(!isset($options['_alm_disable_dynamic']))
1164
  $options['_alm_disable_dynamic'] = '0';
1165
+
1166
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
1167
  $html .= '<input type="checkbox" name="alm_settings[_alm_disable_dynamic]" id="_alm_disable_dynamic" value="1"'. (($options['_alm_disable_dynamic']) ? ' checked="checked"' : '') .' />';
1168
+ $html .= '<label for="_alm_disable_dynamic">'.__('Disable dynamic population of categories, tags and authors in the Shortcode Builder.<span style="display:block">Recommended if you have an extraordinary number of categories, tags and/or authors.', 'ajax-load-more').'</label>';
1169
+
1170
  echo $html;
1171
  }
1172
 
1177
  *
1178
  * @since 2.0.0
1179
  */
1180
+
1181
  function alm_container_type_callback() {
1182
+
1183
  $options = get_option( 'alm_settings' );
1184
+
1185
+ if(!isset($options['_alm_container_type']))
1186
  $options['_alm_container_type'] = '1';
1187
+
1188
  $html = '<input type="radio" id="_alm_container_type_one" name="alm_settings[_alm_container_type]" value="1"' . checked( 1, $options['_alm_container_type'], false ) . '/>';
1189
  $html .= '<label for="_alm_container_type_one">&lt;ul&gt; <span>&lt;!-- '.__('Ajax Posts Here', 'ajax-load-more').' --&gt;</span> &lt;/ul&gt;</label><br/>';
1190
+
1191
  $html .= '<input type="radio" id="_alm_container_type_two" name="alm_settings[_alm_container_type]" value="2"' . checked( 2, $options['_alm_container_type'], false ) . '/>';
1192
  $html .= '<label for="_alm_container_type_two">&lt;div&gt; <span>&lt;!-- '.__('Ajax Posts Here', 'ajax-load-more').' --&gt;</span> &lt;/div&gt;</label>';
1193
+
1194
  $html .= '<label style="cursor: default !important"><span style="display:block">'.__('You can modify the container type when building a shortcode.', 'ajax-load-more').'</span></label>';
1195
+
1196
  echo $html;
1197
+
1198
  }
1199
 
1200
 
1207
 
1208
  function alm_class_callback(){
1209
  $options = get_option( 'alm_settings' );
1210
+
1211
  $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - classes are applied globally and will appear with every instance of Ajax Load More. <span style="display:block">You can also add classes when building a shortcode.</span>', 'ajax-load-more').'</label><br/>';
1212
+ $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
1213
+
1214
  echo $html;
1215
  }
1216
 
1222
  *
1223
  * @since 2.0.0
1224
  */
1225
+
1226
  function alm_btn_color_callback() {
1227
+
1228
  $options = get_option( 'alm_settings' );
1229
  $type = $options['_alm_btn_color'];
1230
+
1231
+ if(!isset($type))
1232
  $options['_alm_btn_color'] = '0';
1233
+
1234
+ $selected0 = '';
1235
  if($type == 'default') $selected0 = 'selected="selected"';
1236
+
1237
+ $selected1 = '';
1238
  if($type == 'blue') $selected1 = 'selected="selected"';
1239
+
1240
+ $selected2 = '';
1241
  if($type == 'green') $selected2 = 'selected="selected"';
1242
+
1243
+ $selected3 = '';
1244
  if($type == 'red') $selected3 = 'selected="selected"';
1245
+
1246
+ $selected4 = '';
1247
  if($type == 'purple') $selected4 = 'selected="selected"';
1248
+
1249
+ $selected5 = '';
1250
  if($type == 'grey') $selected5 = 'selected="selected"';
1251
+
1252
+ $selected6 = '';
1253
  if($type == 'white') $selected6 = 'selected="selected"';
1254
+
1255
+ $selected7 = '';
1256
  if($type == 'infinite classic') $selected7 = 'selected="selected"';
1257
+
1258
+ $selected8 = '';
1259
  if($type == 'infinite skype') $selected8 = 'selected="selected"';
1260
+
1261
+ $selected9 = '';
1262
  if($type == 'infinite ring') $selected9 = 'selected="selected"';
1263
+
1264
+ $selected10 = '';
1265
  if($type == 'infinite fading-blocks') $selected10 = 'selected="selected"';
1266
+
1267
+ $selected11 = '';
1268
  if($type == 'infinite fading-circles') $selected11 = 'selected="selected"';
1269
+
1270
+ $selected12 = '';
1271
  if($type == 'infinite chasing-arrows') $selected12 = 'selected="selected"';
1272
+
1273
  $html = '<label for="alm_settings_btn_color">'.__('Select an Ajax loading style - you can choose between a <strong>button</strong> or <strong>infinite scroll</strong>', 'ajax-load-more');
1274
  $html .= '.<br/><span style="display:block">Selecting an Infinite Scroll button style will remove the click interaction and load content on scroll only.</span>';
1275
  $html .= '</label>';
1290
  $html .= '<option value="infinite chasing-arrows" class="infinite chasing-arrows" ' . $selected12 .'>Chasing Arrows</option>';
1291
  $html .= '</optgroup>';
1292
  $html .= '</select>';
1293
+
1294
  $html .= '<div class="clear"></div><div class="ajax-load-more-wrap core '.$type.'"><span>'.__('Preview', 'ajax-load-more') .'</span><button class="alm-load-more-btn loading" disabled="disabled">'.apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')).'</button></div>';
1295
  echo $html;
1296
  }
1306
 
1307
  function alm_btn_class_callback(){
1308
  $options = get_option( 'alm_settings' );
1309
+
1310
+ if(!isset($options['_alm_btn_classname']))
1311
  $options['_alm_btn_classname'] = '';
1312
+
1313
  $html = '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to your <strong>Load More</strong> button', 'ajax-load-more').'.</label>';
1314
+ $html .= '<input type="text" class="btn-classes" id="alm_settings[_alm_btn_classname]" name="alm_settings[_alm_btn_classname]" value="'.$options['_alm_btn_classname'].'" placeholder="button rounded listing etc..." /> ';
1315
+
1316
  echo $html;
1317
+ ?>
1318
  <script>
1319
+
1320
  // Check if Disable CSS === true
1321
  if(jQuery('input#alm_disable_css_input').is(":checked")){
1322
  jQuery('select#alm_settings_btn_color').parent().parent().hide(); // Hide button color
1327
  if(el.is(":checked")) {
1328
  el.parent().parent('tr').next('tr').hide(); // Hide button color
1329
  //el.parent().parent('tr').next('tr').next('tr').hide(); // Hide Button Classes
1330
+ }else{
1331
  el.parent().parent('tr').next('tr').show(); // show button color
1332
  //el.parent().parent('tr').next('tr').next('tr').show(); // show Button Classes
1333
  }
1334
  });
1335
+
1336
  </script>
1337
  <?php
1338
  }
1347
  */
1348
 
1349
  function _alm_scroll_top_callback(){
1350
+ $options = get_option( 'alm_settings' );
1351
+ if(!isset($options['_alm_scroll_top']))
1352
  $options['_alm_scroll_top'] = '0';
1353
+
1354
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
1355
  $html .= '<input type="checkbox" name="alm_settings[_alm_scroll_top]" id="_alm_scroll_top" value="1"'. (($options['_alm_scroll_top']) ? ' checked="checked"' : '') .' />';
1356
+ $html .= '<label for="_alm_scroll_top">'.__('On initial page load, move the user\'s browser window to the top of the screen.<span style="display:block">This <u>may</u> help prevent the loading of unnecessary posts.</span>', 'ajax-load-more').'</label>';
1357
+
1358
  echo $html;
1359
  }
1360
 
1368
  */
1369
 
1370
  function _alm_nonce_security_callback(){
1371
+ $options = get_option( 'alm_settings' );
1372
+ if(!isset($options['_alm_nonce_security']))
1373
  $options['_alm_nonce_security'] = '0';
1374
+
1375
  $html = '<input type="hidden" name="alm_settings[_alm_nonce_security]" value="0" />';
1376
  $html .= '<input type="checkbox" name="alm_settings[_alm_nonce_security]" id="_alm_nonce_security" value="1"'. (($options['_alm_nonce_security']) ? ' checked="checked"' : '') .' />';
1377
+ $html .= '<label for="_alm_nonce_security">'.__('Enable <a href="https://codex.wordpress.org/WordPress_Nonces" target="_blank">WP nonce</a> verification to help protect URLs against certain types of misuse, malicious or otherwise on each Ajax Load More query.', 'ajax-load-more').'</label>';
1378
+
1379
  echo $html;
1380
  }
1381
 
admin/css/admin.css CHANGED
@@ -123,7 +123,10 @@
123
  min-width: 48%;
124
  display: inline-block;
125
  vertical-align: top;
126
- }
 
 
 
127
 
128
  #alm-settings form h2{
129
  padding: 12px 0 6px 12px;
@@ -1103,7 +1106,8 @@ a.layout-hover{
1103
  .form-table label span{
1104
  font-size: 13px;
1105
  color: #999;
1106
- padding-top: 4px;
 
1107
  }
1108
 
1109
  .form-table .template-tags{
@@ -1262,16 +1266,11 @@ a.layout-hover{
1262
  color: #999 !important;
1263
  }
1264
 
1265
- .ajax-load-more h3.add-on-title,
1266
- .ajax-load-more .cnkt-sidebar h3{
1267
  padding: 0 0 10px;
1268
  margin: 0 0 20px;
1269
  border-bottom: 1px solid #efefef;
1270
  }
1271
- .ajax-load-more .cnkt-sidebar h3{
1272
- font-size: 15px;
1273
- padding: 0 0 15px !important;
1274
- }
1275
  .ajax-load-more h3{
1276
  margin-bottom: 10px;
1277
  }
@@ -1838,11 +1837,18 @@ table.highlight{
1838
  }
1839
  .ajax-load-more .cnkt-sidebar .cta{
1840
  background: #fff;
1841
- padding: 20px;
1842
  margin: 0 0 20px;
1843
  overflow: visible;
1844
  position: relative;
1845
  }
 
 
 
 
 
 
 
1846
  .ajax-load-more .cnkt-sidebar .cta.mailing-list{
1847
  padding: 0;
1848
  }
@@ -1851,16 +1857,27 @@ table.highlight{
1851
  padding: 20px;
1852
  }
1853
  .ajax-load-more .cnkt-sidebar .cta.padding-bottom{
1854
- padding-bottom: 60px;
1855
  }
1856
  .ajax-load-more .cnkt-sidebar h3,
1857
  .ajax-load-more .cnkt-sidebar h4{
1858
  margin-top: 0;
 
 
 
 
 
 
 
 
 
 
 
1859
  }
1860
 
 
1861
  .ajax-load-more .cnkt-sidebar .item{
1862
  overflow: hidden;
1863
- padding: 0 0 10px;
1864
  }
1865
  .ajax-load-more .cnkt-sidebar .item h4{
1866
  margin: 0 0 5px;
@@ -1876,6 +1893,7 @@ table.highlight{
1876
  margin: 0 0 5px;
1877
  font-size: 14px;
1878
  }
 
1879
  .ajax-load-more .cnkt-sidebar .cta.dyk p{
1880
  margin: 15px 0 0;
1881
  display: block;
@@ -1925,9 +1943,8 @@ table.highlight{
1925
  background: #efefef;
1926
  line-height: 18px;
1927
  text-align: center;
1928
- margin:0 7px 0 0;
1929
  position: relative;
1930
- top: 1px;
1931
  }
1932
 
1933
  .ajax-load-more .cnkt-sidebar .item i.fa-check{
@@ -1941,8 +1958,8 @@ table.highlight{
1941
 
1942
 
1943
  .ajax-load-more .cnkt-sidebar a.visit{
1944
- background: #FF5A58;
1945
- padding: 20px 20px 20px 50px;
1946
  position: absolute;
1947
  bottom: 0;
1948
  left: 0;
@@ -1952,21 +1969,27 @@ table.highlight{
1952
  z-index: 2;
1953
  text-decoration: none;
1954
  line-height: 1;
 
 
 
1955
  }
1956
  .ajax-load-more .cnkt-sidebar a.visit i{
1957
- font-size: 24px;
1958
- opacity: 0.7;
1959
  margin: 0 5px 0 0;
1960
  position: absolute;
1961
- top: 14px;
1962
- left: 19px;
1963
  display: inline-block;
1964
  }
1965
  .ajax-load-more .cnkt-sidebar a.visit:hover{
1966
- background: #ec4745;
1967
  }
 
 
 
1968
  .ajax-load-more .cnkt-sidebar a.visit:active{
1969
- background: #db403e;
1970
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1971
  }
1972
 
@@ -2481,18 +2504,17 @@ table.highlight{
2481
  font-weight: 600;
2482
  }
2483
 
2484
-
 
 
 
2485
  p.cache-stats{
2486
- height: 44px;
2487
  line-height: 37px;
2488
  margin: 0;
2489
- display: block;
 
2490
  }
2491
- p.cache-stats.last{
2492
- height: 52px;
2493
- padding-bottom: 16px;
2494
- border-bottom: 1px solid #efefef;
2495
- }
2496
  p.cache-stats span{
2497
  display: inline-block;
2498
  width: 38px;
@@ -2513,13 +2535,19 @@ p.cache-stats{
2513
  background: -ms-linear-gradient(top, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
2514
  background: linear-gradient(to bottom, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
2515
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
2516
-
2517
  border: 1px solid #8586be;
2518
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
2519
  color: #fff;
2520
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1);
2521
  }
2522
 
 
 
 
 
 
 
 
2523
 
2524
  /*
2525
  * Error Handling
@@ -3182,6 +3210,7 @@ p.cache-stats{
3182
 
3183
 
3184
  /* share-alm*/
 
3185
  .dotted{
3186
  border: 1px dashed #ccc;
3187
  background: #f7f7f7;
@@ -3192,7 +3221,8 @@ p.cache-stats{
3192
  background: none;
3193
  padding: 5px 10px 0;
3194
  }
3195
- .share-alm h3{
 
3196
  font-size: 16px;
3197
  }
3198
  .share-alm i.fa-star,
@@ -3205,7 +3235,6 @@ p.cache-stats{
3205
  color: #ff5a58;
3206
  }
3207
  .share-alm p{
3208
- font-size: 13px;
3209
  color: #777;
3210
  }
3211
  .share-alm .sharing{
@@ -3217,6 +3246,7 @@ p.cache-stats{
3217
  width: 52%;
3218
  margin-left: 0 !important;
3219
  padding-left: 40px;
 
3220
  border-left: 1px dashed #ccc;
3221
  }
3222
  ul.share{
@@ -3239,9 +3269,9 @@ ul.share{
3239
  margin: 0 3px;
3240
  float: left;
3241
  vertical-align: top;
3242
- height: 30px;
3243
- line-height: 30px;
3244
- font-size: 12px;
3245
  width: auto;
3246
  position: relative;
3247
  font-weight: 400;
123
  min-width: 48%;
124
  display: inline-block;
125
  vertical-align: top;
126
+ }
127
+ #alm-settings .row.alm-save-settings{
128
+ padding-bottom: 5px !important;
129
+ }
130
 
131
  #alm-settings form h2{
132
  padding: 12px 0 6px 12px;
1106
  .form-table label span{
1107
  font-size: 13px;
1108
  color: #999;
1109
+ padding-top: 5px;
1110
+ font-style: italic;
1111
  }
1112
 
1113
  .form-table .template-tags{
1266
  color: #999 !important;
1267
  }
1268
 
1269
+ .ajax-load-more h3.add-on-title{
 
1270
  padding: 0 0 10px;
1271
  margin: 0 0 20px;
1272
  border-bottom: 1px solid #efefef;
1273
  }
 
 
 
 
1274
  .ajax-load-more h3{
1275
  margin-bottom: 10px;
1276
  }
1837
  }
1838
  .ajax-load-more .cnkt-sidebar .cta{
1839
  background: #fff;
1840
+ padding: 0;
1841
  margin: 0 0 20px;
1842
  overflow: visible;
1843
  position: relative;
1844
  }
1845
+ .ajax-load-more .cnkt-sidebar .cta-inner{
1846
+ padding: 20px;
1847
+ display: block;
1848
+ }
1849
+ .ajax-load-more .cnkt-sidebar .cta-inner.padding-bottom{
1850
+ padding-bottom: 80px;
1851
+ }
1852
  .ajax-load-more .cnkt-sidebar .cta.mailing-list{
1853
  padding: 0;
1854
  }
1857
  padding: 20px;
1858
  }
1859
  .ajax-load-more .cnkt-sidebar .cta.padding-bottom{
1860
+ padding-bottom: 50px;
1861
  }
1862
  .ajax-load-more .cnkt-sidebar h3,
1863
  .ajax-load-more .cnkt-sidebar h4{
1864
  margin-top: 0;
1865
+ }
1866
+ .ajax-load-more .cnkt-sidebar h3{
1867
+ padding: 15px 20px;
1868
+ border-bottom: 1px solid #efefef;
1869
+ background: #f7f7f7;
1870
+ margin: 0;
1871
+ display: block;
1872
+ font-size: 15px;
1873
+ -webkit-border-radius: 2px 2px 0 0;
1874
+ -moz-border-radius: 2px 2px 0 0;
1875
+ border-radius: 2px 2px 0 0;
1876
  }
1877
 
1878
+
1879
  .ajax-load-more .cnkt-sidebar .item{
1880
  overflow: hidden;
 
1881
  }
1882
  .ajax-load-more .cnkt-sidebar .item h4{
1883
  margin: 0 0 5px;
1893
  margin: 0 0 5px;
1894
  font-size: 14px;
1895
  }
1896
+ .ajax-load-more .cnkt-sidebar .cta.dyk img{}
1897
  .ajax-load-more .cnkt-sidebar .cta.dyk p{
1898
  margin: 15px 0 0;
1899
  display: block;
1943
  background: #efefef;
1944
  line-height: 18px;
1945
  text-align: center;
1946
+ margin: 2px 7px 0 0;
1947
  position: relative;
 
1948
  }
1949
 
1950
  .ajax-load-more .cnkt-sidebar .item i.fa-check{
1958
 
1959
 
1960
  .ajax-load-more .cnkt-sidebar a.visit{
1961
+ background: #1e8cbe;
1962
+ padding: 18px 20px 19px 44px;
1963
  position: absolute;
1964
  bottom: 0;
1965
  left: 0;
1969
  z-index: 2;
1970
  text-decoration: none;
1971
  line-height: 1;
1972
+ -webkit-border-radius: 0 0 2px 2px;
1973
+ -moz-border-radius: 0 0 2px 2px;
1974
+ border-radius: 0 0 2px 2px;
1975
  }
1976
  .ajax-load-more .cnkt-sidebar a.visit i{
1977
+ font-size: 20px;
1978
+ opacity: 0.4;
1979
  margin: 0 5px 0 0;
1980
  position: absolute;
1981
+ top: 15px;
1982
+ left: 18px;
1983
  display: inline-block;
1984
  }
1985
  .ajax-load-more .cnkt-sidebar a.visit:hover{
1986
+ background: #2fa2d6;
1987
  }
1988
+ .ajax-load-more .cnkt-sidebar a.visit:hover i{
1989
+ opacity: 0.8;
1990
+ }
1991
  .ajax-load-more .cnkt-sidebar a.visit:active{
1992
+ background: #42aedf;
1993
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1994
  }
1995
 
2504
  font-weight: 600;
2505
  }
2506
 
2507
+ #alm-cache.ajax-load-more .cnkt-sidebar .item{
2508
+ padding: 20px;
2509
+ display: block;
2510
+ }
2511
  p.cache-stats{
2512
+ min-height: 38px;
2513
  line-height: 37px;
2514
  margin: 0;
2515
+ display: block;
2516
+ padding: 20px 20px 0 20px;
2517
  }
 
 
 
 
 
2518
  p.cache-stats span{
2519
  display: inline-block;
2520
  width: 38px;
2535
  background: -ms-linear-gradient(top, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
2536
  background: linear-gradient(to bottom, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
2537
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
 
2538
  border: 1px solid #8586be;
2539
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
2540
  color: #fff;
2541
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1);
2542
  }
2543
 
2544
+ form#delete-all-cache{
2545
+ display: block;
2546
+ padding: 20px;
2547
+ border-top: 1px solid #efefef;
2548
+ margin-top: 10px;
2549
+ }
2550
+
2551
 
2552
  /*
2553
  * Error Handling
3210
 
3211
 
3212
  /* share-alm*/
3213
+ .ajax-load-more .cnkt-main .group.share-alm{}
3214
  .dotted{
3215
  border: 1px dashed #ccc;
3216
  background: #f7f7f7;
3221
  background: none;
3222
  padding: 5px 10px 0;
3223
  }
3224
+ .share-alm h3,
3225
+ .share-alm h4{
3226
  font-size: 16px;
3227
  }
3228
  .share-alm i.fa-star,
3235
  color: #ff5a58;
3236
  }
3237
  .share-alm p{
 
3238
  color: #777;
3239
  }
3240
  .share-alm .sharing{
3246
  width: 52%;
3247
  margin-left: 0 !important;
3248
  padding-left: 40px;
3249
+ padding-right: 30px;
3250
  border-left: 1px dashed #ccc;
3251
  }
3252
  ul.share{
3269
  margin: 0 3px;
3270
  float: left;
3271
  vertical-align: top;
3272
+ height: 34px;
3273
+ line-height: 34px;
3274
+ font-size: 13px;
3275
  width: auto;
3276
  position: relative;
3277
  font-weight: 400;
admin/editor/editor-build.php CHANGED
@@ -10,48 +10,48 @@
10
  <link rel="stylesheet" href="<?php echo includes_url(); ?>css/buttons.css" />
11
  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
12
  <script type="text/javascript" src="<?php echo includes_url('/js/tinymce/tiny_mce_popup.js'); ?>"></script>
13
- <script type="text/javascript">
14
- // ****** Build Button Shortcode ****** //
15
  var AjaxLoadMoreModal = {
16
  local_ed : 'ed',
17
  init : function(ed) {
18
  AjaxLoadMoreModal.local_ed = ed;
19
  tinyMCEPopup.resizeToInnerSize();
20
  },
21
- insert : function insertButton(ed) {
22
  // Try and remove existing style / blockquote
23
  tinyMCEPopup.execCommand('mceRemoveNode', false, null);
24
-
25
  // setup the output of our shortcode to show in the wp editor
26
  output = $('#shortcode_output').text();
27
-
28
- tinyMCEPopup.execCommand('mceInsertContent', false, output);
29
  // Return
30
  tinyMCEPopup.close();
31
  }
32
  };
33
- tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
34
  </script>
35
  <?php $is_modal = true; ?>
36
  </head>
37
  <body id="alm-builder">
38
  <div id="alm-container" class="ajax-load-more shortcode-builder wp-core-ui">
39
- <div id="alm-shortcode-builder-form">
40
-
41
  <div class="pop-up-jump">
42
  <div class="jump-menu-wrap">
43
  <select class="jump-menu">
44
- <option value="null" selected="selected">-- <?php _e('Jump to Option', 'ajax-load-more'); ?> --</option>
45
  </select>
46
  </div>
47
  <div class="intro-wrap">
48
- <p class="intro"><?php _e('Create your own Ajax Load More shortcode by adjusting the parameters below:', 'ajax-load-more'); ?></p>
49
- </div>
50
- </div>
51
  <div class="clear"></div>
52
-
53
- <?php include (ALM_PATH . '/admin/shortcode-builder/shortcode-builder.php'); ?>
54
-
55
  <div class="output-wrap">
56
  <a href="javascript:AjaxLoadMoreModal.insert(AjaxLoadMoreModal.local_ed)" id="insert" class="insert_alm"><i class="fa fa-chevron-circle-right"></i> <?php _e('Insert Shortcode', 'ajax-load-more'); ?></a>
57
  <div class="shortcode-display">
@@ -59,15 +59,15 @@ tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
59
  <span class="copy"><?php _e('Copy', 'ajax-load-more'); ?></span>
60
  </div>
61
  </div>
62
-
63
  </div>
64
- </div>
65
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/select2.min.js"></script>
66
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>shortcode-builder/js/shortcode-builder.js"></script>
67
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/jquery.tooltipster.min.js"></script>
68
  <script type='text/javascript'>
69
  /* <![CDATA[ */
70
- var alm_admin_localize = <?php echo json_encode( array(
71
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
72
  'active' => __('Active', 'ajax-load-more'),
73
  'inactive' => __('Inactive', 'ajax-load-more'),
@@ -81,8 +81,8 @@ tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
81
  'jump_to_template' => __('Jump to Template', 'ajax-load-more')
82
  )); ?>
83
  /* ]]> */
84
- </script>
85
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/jquery.tooltipster.min.js"></script>
86
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/admin.js"></script>
87
  </body>
88
- </html>
10
  <link rel="stylesheet" href="<?php echo includes_url(); ?>css/buttons.css" />
11
  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
12
  <script type="text/javascript" src="<?php echo includes_url('/js/tinymce/tiny_mce_popup.js'); ?>"></script>
13
+ <script type="text/javascript">
14
+ // ****** Build Button Shortcode ****** //
15
  var AjaxLoadMoreModal = {
16
  local_ed : 'ed',
17
  init : function(ed) {
18
  AjaxLoadMoreModal.local_ed = ed;
19
  tinyMCEPopup.resizeToInnerSize();
20
  },
21
+ insert : function insertButton(ed) {
22
  // Try and remove existing style / blockquote
23
  tinyMCEPopup.execCommand('mceRemoveNode', false, null);
24
+
25
  // setup the output of our shortcode to show in the wp editor
26
  output = $('#shortcode_output').text();
27
+
28
+ tinyMCEPopup.execCommand('mceInsertContent', false, output);
29
  // Return
30
  tinyMCEPopup.close();
31
  }
32
  };
33
+ tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
34
  </script>
35
  <?php $is_modal = true; ?>
36
  </head>
37
  <body id="alm-builder">
38
  <div id="alm-container" class="ajax-load-more shortcode-builder wp-core-ui">
39
+ <div id="alm-shortcode-builder-form">
40
+
41
  <div class="pop-up-jump">
42
  <div class="jump-menu-wrap">
43
  <select class="jump-menu">
44
+ <option value="null" selected="selected">-- <?php _e('Jump to Option', 'ajax-load-more'); ?> --</option>
45
  </select>
46
  </div>
47
  <div class="intro-wrap">
48
+ <p class="intro"><?php _e('Create your own Ajax Load More shortcode by adjusting the parameters below:', 'ajax-load-more'); ?></p>
49
+ </div>
50
+ </div>
51
  <div class="clear"></div>
52
+
53
+ <?php include (ALM_PATH . '/admin/shortcode-builder/shortcode-builder.php'); ?>
54
+
55
  <div class="output-wrap">
56
  <a href="javascript:AjaxLoadMoreModal.insert(AjaxLoadMoreModal.local_ed)" id="insert" class="insert_alm"><i class="fa fa-chevron-circle-right"></i> <?php _e('Insert Shortcode', 'ajax-load-more'); ?></a>
57
  <div class="shortcode-display">
59
  <span class="copy"><?php _e('Copy', 'ajax-load-more'); ?></span>
60
  </div>
61
  </div>
62
+
63
  </div>
64
+ </div>
65
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/select2.min.js"></script>
66
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>shortcode-builder/js/shortcode-builder.js"></script>
67
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/jquery.tooltipster.min.js"></script>
68
  <script type='text/javascript'>
69
  /* <![CDATA[ */
70
+ var alm_admin_localize = <?php echo json_encode( array(
71
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
72
  'active' => __('Active', 'ajax-load-more'),
73
  'inactive' => __('Inactive', 'ajax-load-more'),
81
  'jump_to_template' => __('Jump to Template', 'ajax-load-more')
82
  )); ?>
83
  /* ]]> */
84
+ </script>
85
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/jquery.tooltipster.min.js"></script>
86
  <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/admin.js"></script>
87
  </body>
88
+ </html>
admin/editor/editor.php CHANGED
@@ -31,13 +31,13 @@ function alm_shortcode_buttons() {
31
  // Don't bother doing this stuff if the current user lacks permissions
32
  if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
33
  return;
34
-
35
- // Check options for hiding shortcode builder
36
  $options = get_option( 'alm_settings' );
37
-
38
  if(!isset($options['_alm_hide_btn'])) // Check if '_alm_hide_btn isset
39
  $options['_alm_hide_btn'] = '0';
40
-
41
  if($options['_alm_hide_btn'] != '1'){
42
  // Add only in Rich Editor mode
43
  if ( get_user_option('rich_editing') == 'true') {
@@ -59,7 +59,7 @@ function alm_friendly_buttons($buttons) {
59
 
60
 
61
  // add the button to the tinyMCE bar
62
- function alm_tinymce_plugin($plugin_array) {
63
  $plugin_array['alm_shortcode_button'] = plugins_url( '/js/editor-btn.js' , __FILE__ );
64
  return $plugin_array;
65
  }
31
  // Don't bother doing this stuff if the current user lacks permissions
32
  if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
33
  return;
34
+
35
+ // Check options for hiding shortcode builder
36
  $options = get_option( 'alm_settings' );
37
+
38
  if(!isset($options['_alm_hide_btn'])) // Check if '_alm_hide_btn isset
39
  $options['_alm_hide_btn'] = '0';
40
+
41
  if($options['_alm_hide_btn'] != '1'){
42
  // Add only in Rich Editor mode
43
  if ( get_user_option('rich_editing') == 'true') {
59
 
60
 
61
  // add the button to the tinyMCE bar
62
+ function alm_tinymce_plugin($plugin_array) {
63
  $plugin_array['alm_shortcode_button'] = plugins_url( '/js/editor-btn.js' , __FILE__ );
64
  return $plugin_array;
65
  }
admin/includes/components/custom-layouts.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
- $custom_layouts = apply_filters('alm_custom_layouts', '');
3
- if($custom_layouts){
4
  foreach($custom_layouts as $layout){
5
  echo '<li><a href="javascript:void(0);" class="layout custom" data-type="'.$layout['layout'].'"><i class="fa fa-list-alt"></i>'.$layout['name'].'</a></li>';
6
  }
7
  }
8
- ?>
1
+ <?php
2
+ $custom_layouts = apply_filters('alm_custom_layouts', '');
3
+ if($custom_layouts){
4
  foreach($custom_layouts as $layout){
5
  echo '<li><a href="javascript:void(0);" class="layout custom" data-type="'.$layout['layout'].'"><i class="fa fa-list-alt"></i>'.$layout['name'].'</a></li>';
6
  }
7
  }
8
+ ?>
admin/includes/components/layout-list.php CHANGED
@@ -4,29 +4,29 @@
4
  <div class="alm-dropdown">
5
  <div class="alm-drop-inner">
6
  <ul>
7
- <?php if (has_action('alm_layouts_installed')){
8
-
9
- include( ALM_PATH . 'admin/includes/components/custom-layouts.php'); // Custom Layouts
10
  do_action('alm_get_layouts_add_on'); // Get Layouts
11
-
12
- } else { ?>
13
  <li>
14
  <a href="javascript:void(0);" class="layout" data-type="default">
15
- <i class="fa fa-list-alt"></i>
16
  <?php _e('Default Layout', 'ajax-load-more'); ?>
17
  </a>
18
- </li>
19
- <?php
20
-
21
  include( ALM_PATH . 'admin/includes/components/custom-layouts.php'); // Custom Layouts
22
-
23
  echo '<li><a href="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=Extend&utm_campaign=Layouts" class="add-on" target="_blank">';
24
  echo '<i class="fa fa-key"></i>';
25
  _e('Unlock additional layout templates with the <strong>Layouts add-on</strong>', 'ajax-load-more');
26
  echo '</a></li>';
27
  }?>
28
-
29
  </ul>
30
  </div>
31
  </div>
32
- </div>
4
  <div class="alm-dropdown">
5
  <div class="alm-drop-inner">
6
  <ul>
7
+ <?php if (has_action('alm_layouts_installed')){
8
+
9
+ include( ALM_PATH . 'admin/includes/components/custom-layouts.php'); // Custom Layouts
10
  do_action('alm_get_layouts_add_on'); // Get Layouts
11
+
12
+ } else { ?>
13
  <li>
14
  <a href="javascript:void(0);" class="layout" data-type="default">
15
+ <i class="fa fa-list-alt"></i>
16
  <?php _e('Default Layout', 'ajax-load-more'); ?>
17
  </a>
18
+ </li>
19
+ <?php
20
+
21
  include( ALM_PATH . 'admin/includes/components/custom-layouts.php'); // Custom Layouts
22
+
23
  echo '<li><a href="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=Extend&utm_campaign=Layouts" class="add-on" target="_blank">';
24
  echo '<i class="fa fa-key"></i>';
25
  _e('Unlock additional layout templates with the <strong>Layouts add-on</strong>', 'ajax-load-more');
26
  echo '</a></li>';
27
  }?>
28
+
29
  </ul>
30
  </div>
31
  </div>
32
+ </div>
admin/includes/components/repeater-options.php CHANGED
@@ -8,4 +8,4 @@
8
  </ul>
9
  </div>
10
  </div>
11
- </div>
8
  </ul>
9
  </div>
10
  </div>
11
+ </div>
admin/includes/cta/about.php CHANGED
@@ -1,34 +1,36 @@
1
  <div class="cta">
2
  <h3>Other Projects</h3>
3
- <ul class="project-listing">
4
- <li>
5
- <a target="blank" href="https://connekthq.com/plugins/easy-query/">
6
- <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/eq-48x48.png" alt="">
7
- <strong>Easy Query</strong>
8
- <span>A simple solution to build and display WordPress queries without touching a single line of code.</span>
9
- </a>
10
- </li>
11
- <li>
12
- <a target="blank" href="https://connekthq.com/plugins/instant-images/">
13
- <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/instant-images-48x48.png" alt="">
14
- <strong>Instant Images</strong>
15
- <span>Upload quality, high resolution photos directly to your media library without leaving WordPress.</span>
16
- </a>
17
- </li>
18
- <li>
19
- <a target="blank" href="https://connekthq.com/plugins/post-explorer/">
20
- <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/post-explorer-48x48.png" alt="">
21
- <strong>Post Explorer</strong>
22
- <span>A premium WordPress plugin for loading single posts and custom post types with Ajax.</span>
23
- </a>
24
- </li>
25
- <li>
26
- <a target="blank" href="https://connekthq.com/plugins/velocity/">
27
- <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/velocity-48x48.png" alt="">
28
- <strong>Velocity</strong>
29
- <span>Improve website performance by lazy loading and customizing your embedded media with Velocity.</span>
30
- </a>
31
- </li>
32
- </ul>
 
 
33
  </div>
34
 
1
  <div class="cta">
2
  <h3>Other Projects</h3>
3
+ <div class="cta-inner">
4
+ <ul class="project-listing">
5
+ <li>
6
+ <a target="blank" href="https://connekthq.com/plugins/easy-query/">
7
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/eq-48x48.png" alt="">
8
+ <strong>Easy Query</strong>
9
+ <span>A simple solution to build and display WordPress queries without touching a single line of code.</span>
10
+ </a>
11
+ </li>
12
+ <li>
13
+ <a target="blank" href="https://connekthq.com/plugins/instant-images/">
14
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/instant-images-48x48.png" alt="">
15
+ <strong>Instant Images</strong>
16
+ <span>Upload quality, high resolution photos directly to your media library without leaving WordPress.</span>
17
+ </a>
18
+ </li>
19
+ <li>
20
+ <a target="blank" href="https://connekthq.com/plugins/post-explorer/">
21
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/post-explorer-48x48.png" alt="">
22
+ <strong>Post Explorer</strong>
23
+ <span>A premium WordPress plugin for loading single posts and custom post types with Ajax.</span>
24
+ </a>
25
+ </li>
26
+ <li>
27
+ <a target="blank" href="https://connekthq.com/plugins/velocity/">
28
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/logos/velocity-48x48.png" alt="">
29
+ <strong>Velocity</strong>
30
+ <span>Improve website performance by lazy loading and customizing your embedded media with Velocity.</span>
31
+ </a>
32
+ </li>
33
+ </ul>
34
+ </div>
35
  </div>
36
 
admin/includes/cta/add-ons.php CHANGED
@@ -1,6 +1,8 @@
1
  <div class="cta padding-bottom">
2
  <h3>Add-ons</h3>
3
- <p style="padding-bottom: 10px;">Ajax Load More offers a variety of unique <a href="admin.php?page=ajax-load-more-add-ons">add-ons</a> that will extend and enhance the core functionality of the plugin.</p>
4
-
 
 
5
  <a href="admin.php?page=ajax-load-more-add-ons" class="visit" target="_blank"><i class="fa fa-chevron-circle-right"></i> View Add-ons</a>
6
  </div>
1
  <div class="cta padding-bottom">
2
  <h3>Add-ons</h3>
3
+ <div class="cta-inner">
4
+ <p style="padding-bottom: 10px;">Ajax Load More offers a variety of unique <a href="admin.php?page=ajax-load-more-add-ons">add-ons</a> that will extend and enhance the core functionality of the plugin.</p>
5
+ <p>Add-ons can be purchased individually or in a <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/bundle/?utm_source=WP%20Admin&utm_medium=ALM%20Dashboard&utm_campaign=Bundle" target="_blank">bundle</a> which gives you access all of the Ajax Load More add-ons at over 50% off the regular price!</p>
6
+ </div>
7
  <a href="admin.php?page=ajax-load-more-add-ons" class="visit" target="_blank"><i class="fa fa-chevron-circle-right"></i> View Add-ons</a>
8
  </div>
admin/includes/cta/dyk.php CHANGED
@@ -1,40 +1,48 @@
1
  <div class="cta dyk">
2
  <h3><?php _e('Did You Know?', 'ajax-load-more'); ?></h3>
3
- <?php
4
- $random = rand(1, 5);
5
- ?>
6
  <?php if($random == 1){ ?>
7
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
8
- <p class="addon-intro">You can generate shortcodes while editing pages!</p>
9
- <p>Click the Ajax Load More icon in the content editor toolbar and the <a href="?page=ajax-load-more-shortcode-builder">shortcode builder</a> will open up in an lightbox window.</p>
 
 
10
  <?php } ?>
11
 
12
  <?php if($random == 2){ ?>
13
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg"><br/>
14
- <p class="addon-intro">You can cache your server requests with Ajax Load More!</p>
15
- <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Cache">Cache</a> add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.</p>
16
- <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Cache">Learn More &raquo;</a></p>
 
 
17
  <?php } ?>
18
 
19
  <?php if($random == 3){ ?>
20
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg"><br/>
21
- <p class="addon-intro">You can lazy load your single posts with Ajax Load More!</p>
22
- <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost">Previous Post</a> add-on will load single posts as you scroll and update the browser URL to the current post.</p>
23
- <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost">Learn More &raquo;</a></p>
 
 
24
  <?php } ?>
25
 
26
  <?php if($random == 4){ ?>
27
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg"><br/>
28
- <p class="addon-intro">You can lazy load your comments with Ajax Load More!</p>
29
- <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments">Comments</a> add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.</p>
30
- <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments">Learn More &raquo;</a></p>
 
 
31
  <?php } ?>
32
 
33
  <?php if($random == 5){ ?>
34
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg"><br/>
35
- <p class="addon-intro">You can infinite scroll just about anything with the Next Page add-on!</p>
36
- <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page">Next Page</a> add-on will allow you to split post content into pages using the <span style="display: inline-block; font-style: italic; color: #999;">&lt;!--nextpage--&gt;</span> <a href="https://codex.wordpress.org/Write_Post_SubPanel#Quicktags" target="_blank">Quicktag</a> and load the generated pages on demand.</p>
37
- <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page">Learn More &raquo;</a></p>
 
 
38
  <?php } ?>
39
 
40
  </div>
1
  <div class="cta dyk">
2
  <h3><?php _e('Did You Know?', 'ajax-load-more'); ?></h3>
3
+ <?php $random = rand(1, 5); ?>
 
 
4
  <?php if($random == 1){ ?>
5
+ <div class="cta-inner">
6
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
7
+ <p class="addon-intro">You can generate shortcodes while editing pages!</p>
8
+ <p>Click the Ajax Load More icon in the content editor toolbar and the <a href="?page=ajax-load-more-shortcode-builder">shortcode builder</a> will open up in an lightbox window.</p>
9
+ </div>
10
  <?php } ?>
11
 
12
  <?php if($random == 2){ ?>
13
+ <div class="cta-inner padding-bottom">
14
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg"><br/>
15
+ <p class="addon-intro">You can cache your server requests with Ajax Load More!</p>
16
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Cache">Cache</a> add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.</p>
17
+ <a target="blank" class="visit" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Cache"><i class="fa fa-chevron-circle-right"></i> Learn More</a>
18
+ </div>
19
  <?php } ?>
20
 
21
  <?php if($random == 3){ ?>
22
+ <div class="cta-inner padding-bottom">
23
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg"><br/>
24
+ <p class="addon-intro">You can lazy load your single posts with Ajax Load More!</p>
25
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost">Previous Post</a> add-on will load single posts as you scroll and update the browser URL to the current post.</p>
26
+ <a target="blank" class="visit" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost"><i class="fa fa-chevron-circle-right"></i> Learn More</a>
27
+ </div>
28
  <?php } ?>
29
 
30
  <?php if($random == 4){ ?>
31
+ <div class="cta-inner padding-bottom">
32
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg"><br/>
33
+ <p class="addon-intro">You can lazy load your comments with Ajax Load More!</p>
34
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments">Comments</a> add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.</p>
35
+ <a target="blank" class="visit" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments"><i class="fa fa-chevron-circle-right"></i> Learn More</a>
36
+ </div>
37
  <?php } ?>
38
 
39
  <?php if($random == 5){ ?>
40
+ <div class="cta-inner padding-bottom">
41
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg"><br/>
42
+ <p class="addon-intro">You can infinite scroll just about anything with the Next Page add-on!</p>
43
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page">Next Page</a> add-on will allow you to split post content into pages using the <span style="display: inline-block; font-style: italic; color: #999;">&lt;!--nextpage--&gt;</span> <a href="https://codex.wordpress.org/Write_Post_SubPanel#Quicktags" target="_blank">Quicktag</a> and load the generated pages on demand.</p>
44
+ <a target="blank" class="visit" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page"><i class="fa fa-chevron-circle-right"></i> Learn More</a>
45
+ </div>
46
  <?php } ?>
47
 
48
  </div>
admin/includes/cta/mailinglist.php DELETED
@@ -1,17 +0,0 @@
1
- <div class="cta mailing-list social" id="alm-mailing-list">
2
- <div class="head-wrap">
3
- <h3><?php _e('Join our mailing list', 'ajax-load-more'); ?></h3>
4
- <p><?php _e('Get product updates delivered directly to your inbox.', 'ajax-load-more'); ?></p>
5
- </div>
6
- <form action="" method="post" id="alm-mc-embedded" name="mc-embedded-subscribe-form" class="validate" data-path="<?php echo ALM_ADMIN_URL; ?>includes/mailchimp/mailchimp-info.php" novalidate>
7
- <div class="form-wrap">
8
- <div class="inner-wrap">
9
- <i class="fa fa-envelope"></i>
10
- <label for="mc_email" class="offscreen"><?php _e('Email Address', 'ajax-load-more'); ?> <span class="asterisk">*</span> </label>
11
- <input type="email" value="" name="email" placeholder="<?php _e('Enter email address', 'ajax-load-more'); ?>" class="required email" id="mc_email">
12
- <button type="submit" class="submit" id="mc_signup_submit" name="mc_signup_submit" title="Subscribe"><span class="offscreen"><?php _e('Subscribe', 'ajax-load-more'); ?></span><i class="fa fa-arrow-circle-right"></i></button>
13
- <div id="response"><div class="p-wrap"><p></p></div></div>
14
- </div>
15
- </div>
16
- </form>
17
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/cta/resources.php CHANGED
@@ -1,13 +1,15 @@
1
  <div class="cta padding-bottom resources">
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
- <ul>
4
- <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
5
- <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/docs/"><i class="fa fa-pencil"></i> <?php _e('Documentation', 'ajax-load-more'); ?></a></li>
6
- <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support and Issues', 'ajax-load-more'); ?></a></li>
7
- <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
8
- <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
9
- <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
10
- <li><a target="blank" href="https://github.com/dcooney/wordpress-ajax-load-more"><i class="fa fa-github"></i> <?php _e('Github', 'ajax-load-more'); ?></a></li>
11
- </ul>
 
 
12
  <a href="https://wordpress.org/plugins/ajax-load-more/" target="blank" class="visit"><i class="fa fa-wordpress"></i> <?php _e('WordPress Repository', 'ajax-load-more'); ?></a>
13
  </div>
1
  <div class="cta padding-bottom resources">
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
+ <div class="cta-inner">
4
+ <ul>
5
+ <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
6
+ <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/docs/"><i class="fa fa-pencil"></i> <?php _e('Documentation', 'ajax-load-more'); ?></a></li>
7
+ <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support and Issues', 'ajax-load-more'); ?></a></li>
8
+ <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
9
+ <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
10
+ <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
11
+ <li><a target="blank" href="https://github.com/dcooney/wordpress-ajax-load-more"><i class="fa fa-github"></i> <?php _e('Github', 'ajax-load-more'); ?></a></li>
12
+ </ul>
13
+ </div>
14
  <a href="https://wordpress.org/plugins/ajax-load-more/" target="blank" class="visit"><i class="fa fa-wordpress"></i> <?php _e('WordPress Repository', 'ajax-load-more'); ?></a>
15
  </div>
admin/includes/cta/reviews.php CHANGED
@@ -1,5 +1,5 @@
1
  <h4><?php _e('Leave a Review', 'ajax-load-more'); ?> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></h4>
2
- <p><?php _e('Good <em>or</em> bad - all reviews will help the plugin push forward and grow.', 'ajax-load-more'); ?> </p>
3
  <ul class="share">
4
  <li><a href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more" target="_blank"><?php _e('Write Review', 'ajax-load-more'); ?></a></li>
5
  </ul>
1
  <h4><?php _e('Leave a Review', 'ajax-load-more'); ?> <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></h4>
2
+ <p><?php _e('Good <em>or</em> bad - all reviews will help Ajax Load More push forward and grow.', 'ajax-load-more'); ?> </p>
3
  <ul class="share">
4
  <li><a href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more" target="_blank"><?php _e('Write Review', 'ajax-load-more'); ?></a></li>
5
  </ul>
admin/includes/cta/sharing.php CHANGED
@@ -1,5 +1,5 @@
1
  <h4><?php _e('Share Ajax Load More', 'ajax-load-more'); ?> <i class="fa fa-share-alt"></i></h4>
2
- <p><?php _e('Use the links below to share with your friends on Twitter and Facebook.', 'ajax-load-more'); ?></p>
3
  <ul class="share">
4
  <li class="twitter">
5
  <a target="blank" title="Share on Twitter" href="//twitter.com/home?status=Ajax Load More - WordPress plugin for infinite scrolling posts with Ajax - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter">Twitter</a>
1
  <h4><?php _e('Share Ajax Load More', 'ajax-load-more'); ?> <i class="fa fa-share-alt"></i></h4>
2
+ <p><?php _e('Help <a href="https://twitter.com/KaptonKaos" target="_blank">me</a> spread the word by sharing with your friends and colleagues on Twitter and Facebook.', 'ajax-load-more'); ?></p>
3
  <ul class="share">
4
  <li class="twitter">
5
  <a target="blank" title="Share on Twitter" href="//twitter.com/home?status=Ajax Load More - WordPress plugin for infinite scrolling posts with Ajax - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter">Twitter</a>
admin/includes/cta/writeable.php CHANGED
@@ -1,50 +1,52 @@
1
  <div class="cta">
2
  <h3><?php _e('Read/Write Access', 'ajax-load-more'); ?></h3>
3
- <div class="item">
4
- <?php
5
- //Test server for write capabilities
6
-
7
- $alm_file = ALM_PATH .'core/repeater/default.php'; // Default ALM repeater
8
- if(file_exists($alm_file)){
9
- if (is_writable($alm_file))
10
- echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>Ajax Load More</strong></p><p class="desc">Yay! Read/Write access is enabled within the /ajax-load-more/ directory.', 'ajax-load-more');
11
- else
12
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p>Access Denied! You must enable read and write access for Ajax Load More directory (/ajax-load-more/core/repeater/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
13
- }else{
14
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
15
- }
16
- ?>
17
-
18
- <?php
19
- // Custom Repeaters Add-on
20
- if (has_action('alm_custom_repeaters')){
21
- echo '<div class="spacer"></div>';
22
- $alm_custom_repeater_file = ALM_REPEATER_PATH. '/repeaters/repeater2.php'; // Test file
23
- if(file_exists($alm_custom_repeater_file)){
24
- if (is_writable($alm_custom_repeater_file))
25
- echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>ALM - Custom Repeaters</strong></p><p class="desc">Nice! Read/Write access is enabled within the /ajax-load-more-repeaters/repeaters/ directory.', 'ajax-load-more');
26
  else
27
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Custom Repeaters directory (/ajax-load-more-repeaters/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
28
  }else{
29
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
30
- }
31
- }
32
- ?>
33
-
34
- <?php
35
- // Unlimited Repeaters Add-on
36
- if (has_action('alm_unlimited_repeaters')){
37
- echo '<div class="spacer"></div>';
38
- $alm_unlimited_file = ALM_UNLIMITED_REPEATER_PATH .'_is_writeable.php'; // Test file
39
- if(file_exists($alm_unlimited_file)){
40
- if (is_writable($alm_unlimited_file))
41
- echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Oh Ya! Read/Write access is enabled within the /ajax-load-more-repeaters-v2/repeaters/ directory.', 'ajax-load-more');
42
- else
43
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Unlimited directory (/ajax-load-more-repeaters-v2/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
44
- }else{
45
- echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Unlimited</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
46
- }
47
- }
48
- ?>
49
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  </div>
1
  <div class="cta">
2
  <h3><?php _e('Read/Write Access', 'ajax-load-more'); ?></h3>
3
+ <div class="cta-inner">
4
+ <div class="item">
5
+ <?php
6
+ //Test server for write capabilities
7
+
8
+ $alm_file = ALM_PATH .'core/repeater/default.php'; // Default ALM repeater
9
+ if(file_exists($alm_file)){
10
+ if (is_writable($alm_file))
11
+ echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>Ajax Load More</strong></p><p class="desc">Yay! Read/Write access is enabled within the /ajax-load-more/ directory.', 'ajax-load-more');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  else
13
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p>Access Denied! You must enable read and write access for Ajax Load More directory (/ajax-load-more/core/repeater/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
14
  }else{
15
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>Ajax Load More</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
16
+ }
17
+ ?>
18
+
19
+ <?php
20
+ // Custom Repeaters Add-on
21
+ if (has_action('alm_custom_repeaters')){
22
+ echo '<div class="spacer"></div>';
23
+ $alm_custom_repeater_file = ALM_REPEATER_PATH. '/repeaters/repeater2.php'; // Test file
24
+ if(file_exists($alm_custom_repeater_file)){
25
+ if (is_writable($alm_custom_repeater_file))
26
+ echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>ALM - Custom Repeaters</strong></p><p class="desc">Nice! Read/Write access is enabled within the /ajax-load-more-repeaters/repeaters/ directory.', 'ajax-load-more');
27
+ else
28
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Custom Repeaters directory (/ajax-load-more-repeaters/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
29
+ }else{
30
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Custom Repeaters</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
31
+ }
32
+ }
33
+ ?>
34
+
35
+ <?php
36
+ // Unlimited Repeaters Add-on
37
+ if (has_action('alm_unlimited_repeaters')){
38
+ echo '<div class="spacer"></div>';
39
+ $alm_unlimited_file = ALM_UNLIMITED_REPEATER_PATH .'_is_writeable.php'; // Test file
40
+ if(file_exists($alm_unlimited_file)){
41
+ if (is_writable($alm_unlimited_file))
42
+ echo __('<p class="writeable-title"><i class="fa fa-check"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Oh Ya! Read/Write access is enabled within the /ajax-load-more-repeaters-v2/repeaters/ directory.', 'ajax-load-more');
43
+ else
44
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM - Custom Repeaters v2</strong></p><p class="desc">Access Denied! You must enable read and write access for Ajax Load More Unlimited directory (/ajax-load-more-repeaters-v2/repeaters/) in order to save repeater template data.<br/><br/>Please contact your hosting provider or site administrator for more information.', 'ajax-load-more');
45
+ }else{
46
+ echo __('<p class="writeable-title"><i class="fa fa-exclamation"></i><strong>ALM Unlimited</strong></p><p class="desc">Unable to locate configuration file. Directory access may not be granted.', 'ajax-load-more');
47
+ }
48
+ }
49
+ ?>
50
+ </div>
51
+ </div>
52
  </div>
admin/includes/layout/default.php CHANGED
@@ -1,10 +1,10 @@
1
  <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
2
- <?php if ( has_post_thumbnail() ) {
3
  the_post_thumbnail(array(150,150));
4
  }?>
5
  <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
6
  <p class="entry-meta">
7
  <?php the_time("F d, Y"); ?>
8
  </p>
9
- <?php the_excerpt(); ?>
10
- </li>
1
  <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
2
+ <?php if ( has_post_thumbnail() ) {
3
  the_post_thumbnail(array(150,150));
4
  }?>
5
  <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
6
  <p class="entry-meta">
7
  <?php the_time("F d, Y"); ?>
8
  </p>
9
+ <?php the_excerpt(); ?>
10
+ </li>
admin/includes/mailchimp/MailChimp.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
-
3
- namespace Drewm;
4
-
5
- /**
6
- * Super-simple, minimum abstraction MailChimp API v2 wrapper
7
- *
8
- * Uses curl if available, falls back to file_get_contents and HTTP stream.
9
- * This probably has more comments than code.
10
- *
11
- * Contributors:
12
- * Michael Minor <me@pixelbacon.com>
13
- * Lorna Jane Mitchell, github.com/lornajane
14
- *
15
- * @author Drew McLellan <drew.mclellan@gmail.com>
16
- * @version 1.1.1
17
- */
18
- class MailChimp
19
- {
20
- private $api_key;
21
- private $api_endpoint = 'https://<dc>.api.mailchimp.com/2.0';
22
- private $verify_ssl = false;
23
-
24
- /**
25
- * Create a new instance
26
- * @param string $api_key Your MailChimp API key
27
- */
28
- function __construct($api_key)
29
- {
30
- $this->api_key = $api_key;
31
- list(, $datacentre) = explode('-', $this->api_key);
32
- $this->api_endpoint = str_replace('<dc>', $datacentre, $this->api_endpoint);
33
- }
34
-
35
- /**
36
- * Call an API method. Every request needs the API key, so that is added automatically -- you don't need to pass it in.
37
- * @param string $method The API method to call, e.g. 'lists/list'
38
- * @param array $args An array of arguments to pass to the method. Will be json-encoded for you.
39
- * @return array Associative array of json decoded API response.
40
- */
41
- public function call($method, $args=array(), $timeout = 10)
42
- {
43
- return $this->makeRequest($method, $args, $timeout);
44
- }
45
-
46
- /**
47
- * Performs the underlying HTTP request. Not very exciting
48
- * @param string $method The API method to be called
49
- * @param array $args Assoc array of parameters to be passed
50
- * @return array Assoc array of decoded result
51
- */
52
- private function makeRequest($method, $args=array(), $timeout = 10)
53
- {
54
- $args['apikey'] = $this->api_key;
55
-
56
- $url = $this->api_endpoint.'/'.$method.'.json';
57
- $json_data = json_encode($args);
58
-
59
- if (function_exists('curl_init') && function_exists('curl_setopt')){
60
- $ch = curl_init();
61
- curl_setopt($ch, CURLOPT_URL, $url);
62
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
63
- curl_setopt($ch, CURLOPT_USERAGENT, 'PHP-MCAPI/2.0');
64
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
65
- curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
66
- curl_setopt($ch, CURLOPT_POST, true);
67
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl);
68
- curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
69
- $result = curl_exec($ch);
70
- curl_close($ch);
71
- } else {
72
- $result = file_get_contents($url, null, stream_context_create(array(
73
- 'http' => array(
74
- 'protocol_version' => 1.1,
75
- 'user_agent' => 'PHP-MCAPI/2.0',
76
- 'method' => 'POST',
77
- 'header' => "Content-type: application/json\r\n".
78
- "Connection: close\r\n" .
79
- "Content-length: " . strlen($json_data) . "\r\n",
80
- 'content' => $json_data,
81
- ),
82
- )));
83
- }
84
-
85
- return $result ? json_decode($result, true) : false;
86
- }
87
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/mailchimp/mailchimp-info.php DELETED
@@ -1,33 +0,0 @@
1
-
2
- <?php
3
- function mailchimpInfo(){
4
- require_once('MailChimp.php'); // same directory as mailchimp-info.php
5
-
6
- $email_field = trim($_GET['email']);
7
- $merge_vars = Array(
8
- 'EMAIL' => $email_field,
9
- );
10
-
11
-
12
- $MailChimp = new \Drewm\MailChimp('ec3c9165886020b954bde777ad52b432-us2');
13
- $result = $MailChimp->call('lists/subscribe', array(
14
- 'id' => '216cf21285',
15
- 'email' => array('email'=> $email_field),
16
- 'merge_vars' => $merge_vars,
17
- 'double_optin' => false,
18
- 'send_welcome' => true,
19
- ));
20
-
21
- $status = $result['status'];
22
- if($status != 'error'){
23
- // It worked!
24
- echo '<i class="fa fa-check-square"></i> You\'ve been subscribed to our list!';
25
- }else{
26
- echo '<i class="fa fa-exclamation-circle"></i> Error - ' . $result['error'];
27
- }
28
- }
29
- // If being called via ajax, autorun the function
30
- if($_GET['ajax']){
31
- echo mailchimpInfo();
32
- }
33
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/admin.js CHANGED
@@ -73,54 +73,7 @@ jQuery(document).ready(function($) {
73
  $('.alm-template-toggle', parent).hide()
74
  $('.alm-template-toggle', parent).eq(index).show();
75
  }
76
- });
77
-
78
-
79
-
80
-
81
- /*
82
- * Mailchimp Signup
83
- * From the setting screen
84
- *
85
- * @since 2.7.2
86
- */
87
-
88
- $('form#alm-mc-embedded').submit(function() {
89
- var el = $('#alm-mailing-list'),
90
- email = $('input#mc_email', el).val(),
91
- data_path = $('form', el).data('path');
92
-
93
- // update user interface
94
- $('#response', el).fadeIn(250).addClass('loading');
95
- $('#response p', el).html('Adding email address...');
96
-
97
- // Verify email address
98
- if(!IsEmail(email)){
99
- $('#response p', el).html('<i class="fa fa-exclamation-circle"></i> Please enter a valid email address.');
100
- $('#response', el).removeClass('loading');
101
- $('#response', el).delay(2000).fadeOut(250);
102
- return false;
103
- }
104
- // Prepare query string and send AJAX request
105
- $.ajax({
106
- url: data_path,
107
- data: 'ajax=true&email=' + escape(email),
108
- success: function(msg) {
109
- $('#response', el).removeClass('loading');
110
- $('#response p', el).html(msg);
111
- },
112
- error: function() {
113
- $('#response', el).removeClass('loading').delay(2000).fadeOut(250);
114
- $('#response p', el).html('There was an error submitting your email address.');
115
- }
116
- });
117
-
118
- return false;
119
- });
120
- function IsEmail(email) {
121
- var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
122
- return regex.test(email);
123
- }
124
 
125
 
126
 
73
  $('.alm-template-toggle', parent).hide()
74
  $('.alm-template-toggle', parent).eq(index).show();
75
  }
76
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
 
79
 
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -194,13 +194,13 @@ jQuery(document).ready(function($) {
194
  if($('input#cache-id').val() === '')
195
  _alm.generateUniqueID(10); // Generate unique ID on first load
196
 
197
- $('.cache_id').slideDown(100, 'alm_easeInOutQuad');
198
  output += ' cache="'+cache+'"';
199
  var cache_id = $('input#cache-id').val();
200
  if(cache_id)
201
  output += ' cache_id="'+cache_id+'"';
202
  }else{
203
- $('.cache_id').slideUp(100, 'alm_easeInOutQuad')
204
  }
205
 
206
 
@@ -216,7 +216,7 @@ jQuery(document).ready(function($) {
216
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
217
 
218
  if(cta !== 'false' && cta != undefined){
219
- $('.cta_template_wrap').slideDown(100, 'alm_easeInOutQuad');
220
  // Standard repeater
221
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
222
  output += ' cta="'+cta+'"';
@@ -232,7 +232,7 @@ jQuery(document).ready(function($) {
232
  $('#sequence-update').text(cta_position);
233
  $('#sequence-update-before-after').text(cta_before_after);
234
  }else{
235
- $('.cta_template_wrap').slideUp(100, 'alm_easeInOutQuad');
236
  }
237
 
238
 
@@ -275,9 +275,9 @@ jQuery(document).ready(function($) {
275
  if(comments_callback !== '')
276
  output += ' comments_callback="'+comments_callback+'"';
277
 
278
- $('.comments_extras').slideDown(100, 'alm_easeInOutQuad');
279
  }else{
280
- $('.comments_extras').slideUp(100, 'alm_easeInOutQuad');
281
  }
282
 
283
 
@@ -295,7 +295,7 @@ jQuery(document).ready(function($) {
295
  nextpage_scrollspeed = $('input#next-page-scroll-speed').val(),
296
  nextpage_scrolltop = $('input#next-page-scroll-top').val();
297
 
298
- $('.next-page-content').slideDown(100, 'alm_easeInOutQuad');
299
 
300
  output += ' nextpage="'+nextpage+'"';
301
  output += ' nextpage_post_id="\'.'+nextpage_post_id+'.\'"';
@@ -314,7 +314,7 @@ jQuery(document).ready(function($) {
314
 
315
 
316
  }else{
317
- $('.next-page-content').slideUp(100, 'alm_easeInOutQuad');
318
  }
319
 
320
 
@@ -334,9 +334,9 @@ jQuery(document).ready(function($) {
334
  if(paging_classes !== ''){
335
  output += ' paging_classes="'+paging_classes+'"';
336
  }
337
- $('#nav-controls').slideDown(100, 'alm_easeInOutQuad');
338
  }else{
339
- $('#nav-controls').slideUp(100, 'alm_easeInOutQuad');
340
  }
341
 
342
 
@@ -350,14 +350,14 @@ jQuery(document).ready(function($) {
350
  if(preload !== 'false' && preload != undefined){
351
 
352
  if(seo !== 'true')
353
- $('.preload_amount').slideDown(100, 'alm_easeInOutQuad');
354
 
355
  output += ' preloaded="'+preload+'"';
356
  var preload_amount = $('.preload input#preload-amount').val();
357
  if(preload_amount > 0 && preload_amount != 5)
358
  output += ' preloaded_amount="'+preload_amount+'"';
359
  }else{
360
- $('.preload_amount').slideUp(100, 'alm_easeInOutQuad');
361
  }
362
 
363
 
@@ -371,7 +371,7 @@ jQuery(document).ready(function($) {
371
 
372
  var prev_post_id = $('#prev_post_id').val(),
373
  previous_post_taxonomy = $('#pp-taxonomy-select').val();
374
- $('.prev_post_id').slideDown(100, 'alm_easeInOutQuad');
375
 
376
  output += ' previous_post="'+previous+'"';
377
  output += ' previous_post_id="\'.'+prev_post_id+'.\'"';
@@ -380,7 +380,7 @@ jQuery(document).ready(function($) {
380
  output += ' previous_post_taxonomy="'+previous_post_taxonomy+'"';
381
 
382
  }else{
383
- $('.prev_post_id').slideUp(100, 'alm_easeInOutQuad');
384
  }
385
 
386
 
@@ -391,7 +391,7 @@ jQuery(document).ready(function($) {
391
 
392
  var rest = $('#alm-rest input[name=rest]:checked').val();
393
  if(rest !== 'false' && rest != undefined){
394
- $('.restapi_options').slideDown(100, 'alm_easeInOutQuad');
395
  output += ' restapi="'+rest+'"';
396
 
397
  var restapi_base = $('#alm-rest input#rest-base').val().trim(),
@@ -418,7 +418,7 @@ jQuery(document).ready(function($) {
418
  output += ' restapi_debug="'+restapi_debug+'"';
419
 
420
  }else{
421
- $('.restapi_options').slideUp(100, 'alm_easeInOutQuad')
422
  }
423
 
424
 
@@ -428,7 +428,7 @@ jQuery(document).ready(function($) {
428
 
429
  if(seo !== 'false' && seo != undefined){
430
  if(preload === 'true')
431
- $('.preload_amount').slideUp(100, 'alm_easeInOutQuad');
432
 
433
  output += ' seo="'+seo+'"';
434
  }
@@ -456,8 +456,9 @@ jQuery(document).ready(function($) {
456
 
457
  if(comments === 'false' || comments === false || comments === undefined){ // Hide post_types if comments is active
458
 
459
- var post_type_count = 0;
460
- $('.post_types input[type=checkbox]').each(function(e){
 
461
  if($(this).is(":checked")) {
462
  post_type_count++;
463
  if(post_type_count>1){
@@ -467,13 +468,30 @@ jQuery(document).ready(function($) {
467
  output += ' post_type="'+$(this).data('type')+'';
468
  }
469
  }
 
470
  }
471
  });
472
  if(post_type_count>0){
473
  output += '"';
474
  }
 
 
 
 
 
 
 
 
 
 
 
 
475
  }
476
 
 
 
 
 
477
 
478
  // ---------------------------
479
  // - Posts Per Page
@@ -846,11 +864,11 @@ jQuery(document).ready(function($) {
846
 
847
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
848
  if(scroll_load === 'f'){
849
- $('.max_pages, .scroll_distance, .pause_override').slideUp(100, 'alm_easeInOutQuad');
850
  if($('.scroll_load input').hasClass('changed'))
851
  output += ' scroll="false"';
852
  }else{
853
- $('.max_pages, .scroll_distance, .pause_override').slideDown(100, 'alm_easeInOutQuad');
854
 
855
  var scroll_distance = $('.scroll_distance input').val();
856
  if(scroll_distance != 150)
@@ -959,8 +977,8 @@ jQuery(document).ready(function($) {
959
  }
960
 
961
  // If post type is not selected, select 'post'.
962
- if(!$('.post_types input[type=checkbox]:checked').length > 0){
963
- $('.post_types input[type=checkbox]#chk-post').prop('checked', true);
964
  }
965
 
966
  // If Tax Term Operator is not selected, select 'IN'.
@@ -1091,20 +1109,42 @@ jQuery(document).ready(function($) {
1091
  almResizeTOC()
1092
  });
1093
 
1094
- $(window).scroll(function(){
1095
- almSidebarAttach();
1096
- });
1097
 
1098
- function almSidebarAttach(){
1099
- var scrollT = $(window).scrollTop(),
1100
- target = 60;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1101
 
1102
- if(scrollT > target)
1103
- $('.table-of-contents').addClass('attached');
1104
- else
1105
- $('.table-of-contents').removeClass('attached');
1106
  }
1107
- almSidebarAttach();
1108
 
1109
 
1110
 
194
  if($('input#cache-id').val() === '')
195
  _alm.generateUniqueID(10); // Generate unique ID on first load
196
 
197
+ $('.cache_id').slideDown(150, 'alm_easeInOutQuad');
198
  output += ' cache="'+cache+'"';
199
  var cache_id = $('input#cache-id').val();
200
  if(cache_id)
201
  output += ' cache_id="'+cache_id+'"';
202
  }else{
203
+ $('.cache_id').slideUp(150, 'alm_easeInOutQuad')
204
  }
205
 
206
 
216
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
217
 
218
  if(cta !== 'false' && cta != undefined){
219
+ $('.cta_template_wrap').slideDown(150, 'alm_easeInOutQuad');
220
  // Standard repeater
221
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
222
  output += ' cta="'+cta+'"';
232
  $('#sequence-update').text(cta_position);
233
  $('#sequence-update-before-after').text(cta_before_after);
234
  }else{
235
+ $('.cta_template_wrap').slideUp(150, 'alm_easeInOutQuad');
236
  }
237
 
238
 
275
  if(comments_callback !== '')
276
  output += ' comments_callback="'+comments_callback+'"';
277
 
278
+ $('.comments_extras').slideDown(150, 'alm_easeInOutQuad');
279
  }else{
280
+ $('.comments_extras').slideUp(150, 'alm_easeInOutQuad');
281
  }
282
 
283
 
295
  nextpage_scrollspeed = $('input#next-page-scroll-speed').val(),
296
  nextpage_scrolltop = $('input#next-page-scroll-top').val();
297
 
298
+ $('.next-page-content').slideDown(150, 'alm_easeInOutQuad');
299
 
300
  output += ' nextpage="'+nextpage+'"';
301
  output += ' nextpage_post_id="\'.'+nextpage_post_id+'.\'"';
314
 
315
 
316
  }else{
317
+ $('.next-page-content').slideUp(150, 'alm_easeInOutQuad');
318
  }
319
 
320
 
334
  if(paging_classes !== ''){
335
  output += ' paging_classes="'+paging_classes+'"';
336
  }
337
+ $('#nav-controls').slideDown(150, 'alm_easeInOutQuad');
338
  }else{
339
+ $('#nav-controls').slideUp(150, 'alm_easeInOutQuad');
340
  }
341
 
342
 
350
  if(preload !== 'false' && preload != undefined){
351
 
352
  if(seo !== 'true')
353
+ $('.preload_amount').slideDown(150, 'alm_easeInOutQuad');
354
 
355
  output += ' preloaded="'+preload+'"';
356
  var preload_amount = $('.preload input#preload-amount').val();
357
  if(preload_amount > 0 && preload_amount != 5)
358
  output += ' preloaded_amount="'+preload_amount+'"';
359
  }else{
360
+ $('.preload_amount').slideUp(150, 'alm_easeInOutQuad');
361
  }
362
 
363
 
371
 
372
  var prev_post_id = $('#prev_post_id').val(),
373
  previous_post_taxonomy = $('#pp-taxonomy-select').val();
374
+ $('.prev_post_id').slideDown(150, 'alm_easeInOutQuad');
375
 
376
  output += ' previous_post="'+previous+'"';
377
  output += ' previous_post_id="\'.'+prev_post_id+'.\'"';
380
  output += ' previous_post_taxonomy="'+previous_post_taxonomy+'"';
381
 
382
  }else{
383
+ $('.prev_post_id').slideUp(150, 'alm_easeInOutQuad');
384
  }
385
 
386
 
391
 
392
  var rest = $('#alm-rest input[name=rest]:checked').val();
393
  if(rest !== 'false' && rest != undefined){
394
+ $('.restapi_options').slideDown(150, 'alm_easeInOutQuad');
395
  output += ' restapi="'+rest+'"';
396
 
397
  var restapi_base = $('#alm-rest input#rest-base').val().trim(),
418
  output += ' restapi_debug="'+restapi_debug+'"';
419
 
420
  }else{
421
+ $('.restapi_options').slideUp(150, 'alm_easeInOutQuad')
422
  }
423
 
424
 
428
 
429
  if(seo !== 'false' && seo != undefined){
430
  if(preload === 'true')
431
+ $('.preload_amount').slideUp(150, 'alm_easeInOutQuad');
432
 
433
  output += ' seo="'+seo+'"';
434
  }
456
 
457
  if(comments === 'false' || comments === false || comments === undefined){ // Hide post_types if comments is active
458
 
459
+ var post_type_count = 0,
460
+ selected_post_type = '';
461
+ $('ul.alm-post-type-list input[type=checkbox]').each(function(e){
462
  if($(this).is(":checked")) {
463
  post_type_count++;
464
  if(post_type_count>1){
468
  output += ' post_type="'+$(this).data('type')+'';
469
  }
470
  }
471
+ selected_post_type = $(this).data('type');
472
  }
473
  });
474
  if(post_type_count>0){
475
  output += '"';
476
  }
477
+ }
478
+
479
+
480
+ // ---------------------------
481
+ // - Sticky Posts
482
+ // ---------------------------
483
+
484
+ if(selected_post_type !== 'post'){
485
+ $('.sticky-wrap').slideUp(150, 'alm_easeInOutQuad');
486
+ $('input[name=alm_sticky_posts]').prop('checked', false);
487
+ }else{
488
+ $('.sticky-wrap').slideDown(150, 'alm_easeInOutQuad');
489
  }
490
 
491
+ var sticky_posts = $('input[name=alm_sticky_posts]:checked').val();
492
+ if(sticky_posts && selected_post_type === 'post')
493
+ output += ' sticky_posts="'+sticky_posts+'"';
494
+
495
 
496
  // ---------------------------
497
  // - Posts Per Page
864
 
865
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
866
  if(scroll_load === 'f'){
867
+ $('.max_pages, .scroll_distance, .pause_override').slideUp(150, 'alm_easeInOutQuad');
868
  if($('.scroll_load input').hasClass('changed'))
869
  output += ' scroll="false"';
870
  }else{
871
+ $('.max_pages, .scroll_distance, .pause_override').slideDown(150, 'alm_easeInOutQuad');
872
 
873
  var scroll_distance = $('.scroll_distance input').val();
874
  if(scroll_distance != 150)
977
  }
978
 
979
  // If post type is not selected, select 'post'.
980
+ if(!$('ul.alm-post-type-list input[type=checkbox]:checked').length > 0){
981
+ $('ul.alm-post-type-list input[type=checkbox]#chk-post').prop('checked', true);
982
  }
983
 
984
  // If Tax Term Operator is not selected, select 'IN'.
1109
  almResizeTOC()
1110
  });
1111
 
 
 
 
1112
 
1113
+ /* Table of Contents - Sticky Sidebar */
1114
+
1115
+ _alm.attachShare = function(el, anchor, sticky_top){
1116
+
1117
+ var top = sticky_top, // sticky element top
1118
+ h = el.height() + top, // height of sticky el
1119
+ scrollTop = $(window).scrollTop(),
1120
+ window_height = $(window).height(),
1121
+ offset = anchor.offset().top,
1122
+ el_height = el.outerHeight(),
1123
+ container_height = el.outerHeight();
1124
+
1125
+ if(container_height < window_height){
1126
+ // If container height is larger than window
1127
+ if(scrollTop > top) {
1128
+ el.addClass('attached');
1129
+ } else {
1130
+ if(scrollTop <= (offset - top)) {
1131
+ el.removeClass('attached').removeClass('hidden');
1132
+ }
1133
+ }
1134
+ }
1135
+ };
1136
+
1137
+ if($('.table-of-contents').length){
1138
+ var sticky_el = $('.table-of-contents'),
1139
+ sticky_anchor = $(".cnkt-sidebar"),
1140
+ sticky_top = 50;
1141
+
1142
+ $(window).bind('resize scroll', function(){
1143
+ _alm.attachShare(sticky_el, sticky_anchor, sticky_top);
1144
+ });
1145
 
1146
+ _alm.attachShare(sticky_el, sticky_anchor, sticky_top);
 
 
 
1147
  }
 
1148
 
1149
 
1150
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -1,20 +1,20 @@
1
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em><em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em></span></span>
2
 
3
- <?php
4
- $alm_options = get_option( 'alm_settings' );
5
  if(!isset($alm_options['_alm_disable_dynamic'])) // Check if '_alm_disable_dynamic is set within settings
6
- $alm_options['_alm_disable_dynamic'] = '0';
7
-
8
- $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
9
  ?>
10
 
11
 
12
  <!-- Add-ons -->
13
  <?php if(alm_has_addon_shortcodes()) : ?>
14
 
15
- <div class="shortcode-parameter-wrap">
16
  <h2 class="shortcode-title"><?php _e('Add-ons', 'ajax-load-more'); ?></h2>
17
-
18
  <?php if(has_action('alm_cache_installed')){ ?>
19
  <!-- CACHE -->
20
  <div class="row input cache add-on" id="alm-cache">
@@ -24,7 +24,7 @@
24
  <p><?php _e('Turn on content caching.', 'ajax-load-more'); ?></p>
25
  </div>
26
  <div class="wrap">
27
- <div class="inner">
28
  <ul>
29
  <li>
30
  <input class="alm_element" type="radio" name="cache" value="true" id="cache-true" >
@@ -38,37 +38,37 @@
38
  </div>
39
  </div>
40
  <div class="clear"></div>
41
- <div class="cache_id">
42
  <div class="clear"></div>
43
  <hr>
44
  <div class="section-title">
45
  <h4><?php _e('Cache ID', 'ajax-load-more'); ?></h4>
46
- <p><?php _e('You <u>must</u> generate a unique ID for this cached query - this unique ID will be used as a content identifier.', 'ajax-load-more'); ?></p>
47
  </div>
48
  <div class="wrap">
49
- <div class="inner">
50
- <input type="text" class="alm_element disabled" name="cache-id" id="cache-id" disabled="disabled">
51
  <div class="clear"></div>
52
- <p class="generate-id"><a href="javascript:void(0);" data-id="cache-id"><i class="fa fa-random"></i> <?php _e('Generate Cache ID', 'ajax-load-more'); ?></a></p>
53
  </div>
54
- </div>
55
- </div>
56
  </div>
57
- </div>
58
  <?php } ?>
59
-
60
-
61
  <?php if(has_action('alm_cta_installed')){ ?>
62
  <!-- Call to Actions -->
63
  <div class="row cta add-on" id="alm-cta">
64
  <h3 class="heading"><?php _e('Call to Actions', 'ajax-load-more'); ?></h3>
65
  <div class="expand-wrap">
66
-
67
  <div class="section-title">
68
  <p><?php _e('Insert call to action block.', 'ajax-load-more'); ?></p>
69
  </div>
70
  <div class="wrap">
71
- <div class="inner">
72
  <ul>
73
  <li>
74
  <input class="alm_element" type="radio" name="cta" value="true" id="cta-true" >
@@ -82,19 +82,19 @@
82
  </div>
83
  </div>
84
  <div class="clear"></div>
85
-
86
  <div class="cta_template_wrap">
87
-
88
  <hr/>
89
  <div class="spacer"></div>
90
-
91
- <div class="section-title">
92
  <h4><?php _e('CTA Positioning', 'ajax-load-more'); ?></h4>
93
  <p><?php _e('Insert call to action <strong><em id="sequence-update-before-after">before</em></strong> post #<strong><em id="sequence-update">1</em></strong>', 'ajax-load-more'); ?>.</p>
94
  </div>
95
  <div class="wrap">
96
- <div class="inner">
97
-
98
  <label class="full"><?php _e('Before / After', 'ajax-load-more'); ?>:</label>
99
  <select class="alm_element cta-before-after" name="cta-before-after" id="cta-before-after">
100
  <option value="before" selected="selected"><?php _e('Before', 'ajax-load-more'); ?></option>
@@ -104,15 +104,15 @@
104
  <div class="spacer" style="height: 30px;"></div>
105
  <label class="full" for="cta-position"><?php _e('Post #', 'ajax-load-more'); ?>:</label>
106
  <input type="number" min="1" step="1" value="1" placeholder="1" id="cta-position" class="alm_element numbers-only" name="cta-position">
107
-
108
  </div>
109
  </div>
110
-
111
- <div class="clear"></div>
112
  <hr/>
113
  <div class="spacer"></div>
114
-
115
- <div class="section-title">
116
  <h4><?php _e('Template', 'ajax-load-more'); ?></h4>
117
  <?php
118
  echo '<p>'.__('Select the <a href="admin.php?page=ajax-load-more-repeaters" target="_parent">repeater template</a> that will display your call to action.', 'ajax-load-more'). '</p>';
@@ -122,37 +122,37 @@
122
  <div class="inner">
123
  <?php
124
  echo '<select name="cta-repeater-select" class="alm_element">';
125
- echo '<option name="" value="" selected="selected">'.__('-- Select Repeater --', 'ajax-load-more').'</option>';
126
- echo '<option name="default" value="default">Default</option>';
127
  if (has_action('alm_get_custom_repeaters')) {
128
  do_action('alm_get_custom_repeaters');
129
  }
130
  if (has_action('alm_get_unlimited_repeaters')) {
131
  do_action('alm_get_unlimited_repeaters');
132
  }
133
- echo '</select>';
134
  ?>
135
  </div>
136
  </div>
137
- <?php
138
  // Get Theme Repeaters
139
  if (has_action('alm_theme_repeaters_selection')){
140
- do_action('alm_theme_repeaters_selection');
141
- }
142
- ?>
143
-
144
  <p class="warning-callout">
145
  <?php _e('Call to actions do NOT count as a post within an Ajax Load More loop.<br/>
146
  For example, if you set <strong>posts_per_page="5"</strong> in your shortcode, 6 items will be displayed.', 'ajax-load-more'); ?>
147
  </p>
148
-
149
  </div>
150
-
151
  </div>
152
  </div>
153
  <?php } ?>
154
-
155
-
156
  <?php if(has_action('alm_comments_installed')){ ?>
157
  <!-- COMMENTS -->
158
  <div class="row input comments add-on" id="alm-comments">
@@ -162,7 +162,7 @@
162
  <p><?php _e('Enable Ajax Load More to display blog comments.', 'ajax-load-more'); ?></p>
163
  </div>
164
  <div class="wrap">
165
- <div class="inner">
166
  <ul>
167
  <li>
168
  <input class="alm_element" type="radio" name="comments" value="true" id="comments-true" >
@@ -176,8 +176,8 @@
176
  </div>
177
  </div>
178
  <div class="clear"></div>
179
- <div class="comments_extras">
180
-
181
  <div class="clear"></div>
182
  <hr>
183
  <div class="section-title">
@@ -185,26 +185,26 @@
185
  <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
186
  </div>
187
  <div class="wrap">
188
- <div class="inner">
189
- <input type="text" value="get_the_ID()" id="comments_post_id" class="alm_element disabled-input" disabled="disabled">
190
  </div>
191
- </div>
192
-
193
- <div class="clear"></div>
194
- <hr>
195
  <div class="section-title">
196
  <h4><?php _e('Comments Per Page', 'ajax-load-more'); ?></h4>
197
- <p><?php _e('The number of top level items to show for each page of comments.', 'ajax-load-more'); ?></p>
198
- </div>
199
- <div class="wrap">
200
- <div class="inner">
201
- <input type="number" class="alm_element numbers-only" name="comments-per-page" id="comments-per-page" step="1" min="1" value="5">
202
  </div>
203
- </div>
204
  <div class="section-title full">
205
  <p><?php _e('<strong>Note</strong>: The amount selected does NOT include comment replies.', 'ajax-load-more'); ?></p>
206
  </div>
207
-
208
  <div class="clear"></div>
209
  <hr>
210
  <div class="section-title">
@@ -212,55 +212,55 @@
212
  <p><?php _e('The type of comment(s) to display.', 'ajax-load-more'); ?></p>
213
  </div>
214
  <div class="wrap">
215
- <div class="inner">
216
  <select class="alm_element comments_type" id="comments_type">
217
  <option value="comment" selected="selected"><?php _e('Comment', 'ajax-load-more'); ?></option>
218
  <option value="all"><?php _e('All', 'ajax-load-more'); ?></option>
219
  <option value="trackback"><?php _e('Trackback', 'ajax-load-more'); ?></option>
220
  <option value="pingback"><?php _e('Pingback', 'ajax-load-more'); ?></option>
221
  <option value="pings"><?php _e('Pings', 'ajax-load-more'); ?></option>
222
- </select>
223
  </div>
224
- </div>
225
-
226
  <div class="clear"></div>
227
- <hr>
228
  <div class="section-title">
229
  <h4><?php _e('Comment Style', 'ajax-load-more'); ?></h4>
230
  <p><?php _e('Select the HTML container style for your comments.', 'ajax-load-more'); ?></p>
231
  </div>
232
  <div class="wrap">
233
  <div class="inner">
234
- <ul class="comment_container_type">
235
  <li>
236
  <input type="radio" id="comment-type-ol" value="ol" name="alm_comment_style" class="alm_element" checked="checked">
237
  <label for="comment-type-ol">&lt;ol&gt; &lt;/ol&gt;</label>
238
- </li>
239
  <li>
240
  <input type="radio" id="comment-type-ul" value="ul" name="alm_comment_style" class="alm_element">
241
  <label for="comment-type-ul">&lt;ul&gt; &lt;/ul&gt;</label>
242
- </li>
243
  <li>
244
  <input type="radio" id="comment-type-div" value="div" name="alm_comment_style" class="alm_element">
245
  <label for="comment-type-div">&lt;div&gt; &lt;/div&gt;</label>
246
  </li>
247
  </ul>
248
  </div>
249
- </div>
250
-
251
  <div class="clear"></div>
252
  <hr>
253
-
254
  <div class="section-title">
255
  <h4><?php _e('Comment Template', 'ajax-load-more'); ?></h4>
256
  <p><?php _e('Select a repeater template that will display comment data.', 'ajax-load-more'); ?></p>
257
  </div>
258
-
259
  <div class="wrap">
260
- <div class="inner">
261
  <select class="alm_element comments_template" id="comments_template">
262
  <option value="none" selected="selected"><?php _e('None', 'ajax-load-more'); ?></option>
263
- <option name="default" id="chk-default" value="default"><?php _e('Default', 'ajax-load-more'); ?></option>
264
  <?php if (has_action('alm_get_custom_repeaters')) {
265
  do_action('alm_get_custom_repeaters');
266
  }
@@ -268,9 +268,9 @@
268
  do_action('alm_get_unlimited_repeaters');
269
  }
270
  ?>
271
- </select>
272
  </div>
273
- </div>
274
  <div class="section-title full">
275
  <p><?php _e('<strong>Note</strong>: <span>None</span> will use the default WordPress comment layout.', 'ajax-load-more'); ?></p>
276
  </div>
@@ -285,25 +285,25 @@
285
  <p><?php _e('A custom <a href="https://codex.wordpress.org/Function_Reference/wp_list_comments#Arguments" target="_blank">callback</a> function that will display each comment.', 'ajax-load-more'); ?></p>
286
  </div>
287
  <div class="wrap">
288
- <div class="inner">
289
- <input type="text" value="" placeholder="function_name" id="comments_callback" class="alm_element">
290
  </div>
291
  </div>
292
  <div class="section-title full">
293
  <p><?php _e('<strong>Note</strong>: The majority of premium themes have a custom callback function for displaying comments. Please see comments.php or functions.php within your theme directory to locate the callback function for your theme.', 'ajax-load-more'); ?></p>
294
  </div>
295
- </div>
296
-
297
  <p class="warning-callout">
298
  <?php _e('You must add the comments shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
299
- </p>
300
-
301
- </div>
302
  </div>
303
- </div>
304
  <?php } ?>
305
-
306
-
307
  <?php if(has_action('alm_nextpage_installed')){ ?>
308
  <!-- NEXT PAGE -->
309
  <div class="row input next-page add-on" id="alm-next-page">
@@ -313,7 +313,7 @@
313
  <p><?php _e('Enable the infinite scrolling of multipage WordPress content using the', 'ajax-load-more'); ?> <span>< !--nextpage-- ></span> <?php _e('Quicktag', 'ajax-load-more'); ?>.</p>
314
  </div>
315
  <div class="wrap">
316
- <div class="inner">
317
  <ul>
318
  <li>
319
  <input class="alm_element" type="radio" name="next-page" value="true" id="next-page-true" >
@@ -323,14 +323,14 @@
323
  <input class="alm_element" type="radio" name="next-page" value="false" id="next-page-false" checked="checked">
324
  <label for="next-page-false"><?php _e('False', 'ajax-load-more'); ?></label>
325
  </li>
326
- </ul>
327
  </div>
328
  </div>
329
-
330
  <div class="clear"></div>
331
-
332
- <div class="next-page-content" style="display: none;">
333
-
334
  <div class="clear"></div>
335
  <hr>
336
  <div class="section-title">
@@ -338,52 +338,52 @@
338
  <p><?php _e('The ID of the current page/post.', 'ajax-load-more'); ?></p>
339
  </div>
340
  <div class="wrap">
341
- <div class="inner">
342
- <input type="text" value="get_the_ID()" id="next-page_post_id" class="alm_element disabled-input" disabled="disabled">
343
  </div>
344
  </div>
345
-
346
  <div class="clear"></div>
347
  <hr/>
348
-
349
  <div class="section-title">
350
  <h4><?php _e('URL Rewrite', 'ajax-load-more'); ?></h4>
351
  <p><?php _e('Update the browser address bar as pages come into view', 'ajax-load-more'); ?>.</p>
352
  </div>
353
- <div class="wrap">
354
- <div class="inner">
355
  <ul>
356
  <li style="width:100%;">
357
  <input class="alm_element" type="checkbox" name="next-page-url" id="next-page-url" value="true" checked="checked">
358
  <label for="next-page-url"><?php _e('Yes, update the URL', 'ajax-load-more'); ?>.</label>
359
  </li>
360
- </ul>
361
- <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
362
  </div>
363
- </div>
364
-
365
  <div class="clear"></div>
366
  <hr/>
367
-
368
  <div class="section-title">
369
  <h4>
370
- <?php _e('Google Analytics', 'ajax-load-more'); ?>
371
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You must have a reference to your Google Analytics tracking code already on the page','ajax-load-more'); ?>"></a>
372
  </h4>
373
  <p><?php _e('Each time a page is loaded it will count as a pageview', 'ajax-load-more'); ?>.</p>
374
  </div>
375
- <div class="wrap">
376
- <div class="inner">
377
  <ul>
378
  <li style="width:100%;">
379
  <input class="alm_element" type="checkbox" name="next-page-pageviews" id="next-page-pageviews" value="true" checked="checked">
380
  <label for="next-page-pageviews"><?php _e('Yes, send pageviews to Google Analytics', 'ajax-load-more'); ?>.</label>
381
  </li>
382
- </ul>
383
- <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
384
  </div>
385
- </div>
386
-
387
  <div class="clear"></div>
388
  <hr>
389
  <div class="section-title">
@@ -396,32 +396,32 @@
396
  </p>
397
  </div>
398
  <div class="wrap">
399
- <div class="inner half">
400
  <label for="next-page-scroll-speed" class="full">
401
- <?php _e('Scroll Speed', 'ajax-load-more'); ?>
402
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>"></a>
403
  </label>
404
- <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
405
  </div>
406
  <div class="inner half">
407
  <label for="next-page-scroll-top" class="full">
408
- <?php _e('Scroll Top', 'ajax-load-more'); ?>
409
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The scrolltop position of the window (used with scrolling and fwd/back browser buttons)','ajax-load-more'); ?>"></a>
410
  </label>
411
- <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
412
  </div>
413
  </div>
414
-
415
  <p class="warning-callout">
416
  <?php _e('You must add the Next Page shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
417
  </p>
418
-
419
- </div>
420
  </div>
421
- </div>
422
  <?php } ?>
423
-
424
-
425
  <?php if(has_action('alm_paging_installed')){ ?>
426
  <!-- PAGING -->
427
  <div class="row input paging add-on" id="alm-paging">
@@ -430,7 +430,7 @@
430
  <div class="section-title"> <p><?php _e('Replace infinite scrolling with a paged ajax navigation system.', 'ajax-load-more'); ?></p>
431
  </div>
432
  <div class="wrap">
433
- <div class="inner">
434
  <ul>
435
  <li>
436
  <input class="alm_element" type="radio" name="paging" value="true" id="paging-true" >
@@ -443,17 +443,17 @@
443
  </ul>
444
  </div>
445
  </div>
446
-
447
  <div class="clear"></div>
448
  <div id="nav-controls">
449
-
450
  <hr/>
451
  <div class="section-title">
452
  <h4><?php _e('Paging Controls', 'ajax-load-more'); ?></h4>
453
  <p><?php _e('Show (&laquo;)previous and next(&raquo;) buttons.', 'ajax-load-more'); ?></p>
454
  </div>
455
  <div class="wrap">
456
- <div class="inner">
457
  <ul>
458
  <li>
459
  <input class="alm_element" type="radio" name="paging-controls" value="true" id="paging-controls-true" >
@@ -466,38 +466,38 @@
466
  </ul>
467
  </div>
468
  </div>
469
-
470
  <div class="clear"></div>
471
  <hr/>
472
  <div class="section-title">
473
  <h4><?php _e('Paging Navigation Classes', 'ajax-load-more'); ?></h4>
474
  <p><?php _e('Add custom CSS classes to the paging navigation menu.', 'ajax-load-more'); ?></p>
475
  </div>
476
- <div class="wrap">
477
- <div class="inner">
478
- <input type="text" class="alm_element" name="paging-classes" id="paging-classes" placeholder="portfolio-paging-menu">
479
  </div>
480
  </div>
481
-
482
  <div class="clear"></div>
483
  <hr/>
484
  <div class="section-title">
485
  <h4><?php _e('Show at Most', 'ajax-load-more'); ?></h4>
486
  <p><?php _e('The maximum amount of page menu items to show at a time. <br/.>0 = no maximum', 'ajax-load-more'); ?></p>
487
  </div>
488
- <div class="wrap">
489
- <div class="inner">
490
- <input type="number" class="alm_element numbers-only" name="show-at-most" id="show-at-most" step="2" min="0" value="7">
491
  </div>
492
  </div>
493
-
494
  </div>
495
-
496
  </div>
497
- </div>
498
  <?php } ?>
499
-
500
-
501
  <?php if(has_action('alm_preload_installed')){ ?>
502
  <!-- PRELOADED -->
503
  <div class="row input preload add-on" id="alm-preload">
@@ -507,7 +507,7 @@
507
  <p><?php _e('Preload posts prior to making Ajax requests.', 'ajax-load-more'); ?></p>
508
  </div>
509
  <div class="wrap">
510
- <div class="inner">
511
  <ul>
512
  <li>
513
  <input class="alm_element" type="radio" name="preload" value="true" id="preload-true" >
@@ -521,24 +521,24 @@
521
  </div>
522
  </div>
523
  <div class="clear"></div>
524
- <div class="preload_amount">
525
  <div class="clear"></div>
526
  <hr>
527
  <div class="section-title">
528
  <h4><?php _e('Preload Amount', 'ajax-load-more'); ?></h4>
529
- <p><?php _e('Enter the number of posts to preload.', 'ajax-load-more'); ?></p>
530
  </div>
531
  <div class="wrap">
532
- <div class="inner">
533
- <input type="number" class="alm_element numbers-only" name="preload-amount" id="preload-amount" step="1" min="1" value="5">
534
  </div>
535
- </div>
536
- </div>
537
  </div>
538
- </div>
539
  <?php } ?>
540
-
541
-
542
  <?php if(has_action('alm_prev_post_installed')){ ?>
543
  <!-- PREV POST -->
544
  <div class="row input previous-post add-on" id="alm-previous-post">
@@ -548,7 +548,7 @@
548
  <p><?php _e('Enable the infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
549
  </div>
550
  <div class="wrap">
551
- <div class="inner">
552
  <ul>
553
  <li>
554
  <input class="alm_element" type="radio" name="prev-post" value="true" id="prev-post-true" >
@@ -558,11 +558,11 @@
558
  <input class="alm_element" type="radio" name="prev-post" value="false" id="prev-post-false" checked="checked">
559
  <label for="prev-post-false"><?php _e('False', 'ajax-load-more'); ?></label>
560
  </li>
561
- </ul>
562
  </div>
563
  </div>
564
  <div class="clear"></div>
565
- <div class="prev_post_id" style="display: none;">
566
  <div class="clear"></div>
567
  <hr>
568
  <div class="section-title">
@@ -570,12 +570,12 @@
570
  <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
571
  </div>
572
  <div class="wrap">
573
- <div class="inner">
574
- <input type="text" value="get_the_ID()" id="prev_post_id" class="alm_element disabled-input" disabled="disabled">
575
  </div>
576
- </div>
577
-
578
-
579
  <div class="clear"></div>
580
  <hr>
581
  <div class="section-title">
@@ -583,55 +583,55 @@
583
  <p><?php _e('Query previous posts from the same taxonomy.', 'ajax-load-more'); ?></p>
584
  </div>
585
  <div class="wrap">
586
- <div class="inner">
587
  <?php
588
  // Taxonomies
589
  $pp_tax_args = array(
590
  'public' => true,
591
- '_builtin' => false
592
- );
593
  $pp_tax_output = 'objects';
594
- $pp_taxonomies = get_taxonomies( $pp_tax_args, $pp_tax_output );
595
  echo '<select class="alm_element" name="pp-taxonomy-select" id="pp-taxonomy-select">';
596
  echo '<option value="" selected="selected">-- ' . __('Select Taxonomy', 'ajax-load-more') . ' --</option>';
597
  echo '<option value="category">' . __('Category', 'ajax-load-more') . '</option>';
598
  echo '<option value="post_tag">' . __('Tag', 'ajax-load-more') . '</option>';
599
- if ( $pp_taxonomies ) {
600
-
601
  foreach( $pp_taxonomies as $pp_taxonomy ){
602
  echo '<option name="pp-'.$pp_taxonomy->query_var.'" id="pp-'.$pp_taxonomy->query_var.'" value="'.$pp_taxonomy->query_var.'">'.$pp_taxonomy->label.'</option>';
603
- }
604
-
605
- }
606
  echo '</select>';
607
  ?>
608
  </div>
609
- </div>
610
-
611
  <p class="warning-callout">
612
  <?php _e('You must add the Previous Post shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
613
  </p>
614
  </div>
615
  </div>
616
- </div>
617
- <?php } ?>
618
-
619
-
620
- <?php if(has_action('alm_rest_api_installed')){
621
-
622
  // get rest defaults (from core alm settings)
623
  $restapi_baseurl = '/wp-json';
624
  if(isset($alm_options['_alm_rest_api_base_url']))
625
  $restapi_baseurl = $alm_options['_alm_rest_api_base_url'];
626
-
627
  $restapi_namespace = 'ajaxloadmore';
628
  if(isset($alm_options['_alm_rest_api_namespace']))
629
  $restapi_namespace = $alm_options['_alm_rest_api_namespace'];
630
-
631
  $restapi_endpoint = 'posts';
632
  if(isset($alm_options['_alm_rest_api_endpoint']))
633
  $restapi_endpoint = $alm_options['_alm_rest_api_endpoint'];
634
-
635
  ?>
636
  <!-- REST API -->
637
  <div class="row input rest add-on" id="alm-rest">
@@ -641,7 +641,7 @@
641
  <p><?php _e('Enable the WordPress REST API.', 'ajax-load-more'); ?></p>
642
  </div>
643
  <div class="wrap">
644
- <div class="inner">
645
  <ul>
646
  <li>
647
  <input class="alm_element" type="radio" name="rest" value="true" id="rest-true" >
@@ -654,74 +654,74 @@
654
  </ul>
655
  </div>
656
  </div>
657
-
658
- <div class="clear"></div>
659
- <div class="restapi_options">
660
-
661
  <div class="clear"></div>
662
  <hr>
663
-
664
  <div class="section-title">
665
- <h4><?php _e('Base URL', 'ajax-load-more'); ?>
666
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Base URL in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
667
  <p><?php _e('Enter the base URL to your installation of the REST API.', 'ajax-load-more'); ?></p>
668
  </div>
669
- <div class="wrap">
670
- <div class="inner">
671
  <input type="text" id="rest-base" class="alm_element" name="rest-base" value="<?php echo $restapi_baseurl; ?>">
672
  </div>
673
- </div>
674
-
675
  <div class="clear"></div>
676
  <hr>
677
-
678
  <div class="section-title">
679
- <h4><?php _e('Namespace', 'ajax-load-more'); ?>
680
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Namespace in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
681
  <p><?php _e('Enter the custom namespace for this Ajax Load More query.', 'ajax-load-more'); ?></p>
682
  </div>
683
- <div class="wrap">
684
- <div class="inner">
685
  <input type="text" id="rest-namespace" class="alm_element" name="rest-namespace" value="<?php echo $restapi_namespace; ?>">
686
  </div>
687
- </div>
688
-
689
  <div class="clear"></div>
690
  <hr>
691
-
692
  <div class="section-title">
693
- <h4><?php _e('Endpoint', 'ajax-load-more'); ?>
694
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Endpoint in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
695
  <p><?php _e('Enter your custom endpoint for this Ajax Load More query.', 'ajax-load-more'); ?></p>
696
  </div>
697
- <div class="wrap">
698
- <div class="inner">
699
  <input type="text" id="rest-endpoint" class="alm_element" name="rest-endpoint" value="<?php echo $restapi_endpoint; ?>">
700
  </div>
701
- </div>
702
-
703
  <div class="clear"></div>
704
  <hr>
705
-
706
  <div class="section-title">
707
  <h4><?php _e('Template ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Ajax Load More references this ID while looping and displaying your data. You must still select a repeater template for this instance of Ajax Load More','ajax-load-more'); ?>">.</a></h4>
708
  <p><?php _e('Enter the ID of your javascript template.<br/><br/>e.g. <em>tmpl-alm-template</em> = <em>alm-template</em>', 'ajax-load-more'); ?><br/>&raquo; <a href="https://gist.github.com/dcooney/c89f5859b73256b36de4a0c3320d9b07" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
709
  </div>
710
- <div class="wrap">
711
- <div class="inner">
712
  <input type="text" id="rest-template-id" class="alm_element" name="rest-template-id" value="">
713
  </div>
714
- </div>
715
-
716
  <div class="clear"></div>
717
  <hr>
718
-
719
  <div class="section-title">
720
  <h4><?php _e('Debug Mode', 'ajax-load-more'); ?></h4>
721
  <p><?php _e('Enable debugging (console.log) of REST API responses in the browser console. ', 'ajax-load-more'); ?></p>
722
  </div>
723
- <div class="wrap">
724
- <div class="inner">
725
  <ul>
726
  <li>
727
  <input class="alm_element" type="radio" name="rest-debug" value="true" id="rest-debug-true" >
@@ -733,19 +733,19 @@
733
  </li>
734
  </ul>
735
  </div>
736
- </div>
737
-
738
  <p class="warning-callout">
739
  <?php _e('Visit <a href="http://v2.wp-api.org/" target="_blank">http://v2.wp-api.org</a> for documentation on creating custom <a href="http://v2.wp-api.org/extending/adding/" target="_blank">Endpoints</a> for use with Ajax Load More.', 'ajax-load-more'); ?>
740
  </p>
741
-
742
  </div>
743
-
744
  </div>
745
- </div>
746
- <?php } ?>
747
-
748
-
749
  <?php if(has_action('alm_seo_installed')){ ?>
750
  <!-- SEO -->
751
  <div class="row input seo add-on" id="alm-seo">
@@ -755,7 +755,7 @@
755
  <p><?php _e('Enable address bar URL rewrites as users page through ajax loaded content.', 'ajax-load-more'); ?></p>
756
  </div>
757
  <div class="wrap">
758
- <div class="inner">
759
  <ul>
760
  <li>
761
  <input class="alm_element" type="radio" name="seo" value="true" id="seo-true" >
@@ -769,22 +769,22 @@
769
  </div>
770
  </div>
771
  </div>
772
- </div>
773
- <?php } ?>
774
 
775
- </div>
776
  <?php endif; ?>
777
  <!-- End Add-ons -->
778
 
779
  <!-- ****************************** -->
780
 
781
  <!-- Display Settings -->
782
- <div class="shortcode-parameter-wrap">
783
- <h2 class="shortcode-title"><?php _e('Display Settings', 'ajax-load-more'); ?></h2>
784
-
785
  <!-- Template Selection -->
786
  <?php
787
- echo '<div class="row repeater" id="alm-repeaters">';
788
  echo '<h3 class="heading">'.__('Template', 'ajax-load-more'). '</h3>';
789
  echo '<div class="expand-wrap">';
790
  echo '<div class="section-title">';
@@ -795,7 +795,7 @@
795
  echo '</div>';
796
  echo '<div class="wrap"><div class="inner">';
797
  echo '<select name="repeater-select" class="alm_element">';
798
- echo '<option name="default" value="default" selected="selected">Default</option>';
799
  if (has_action('alm_get_custom_repeaters')) {
800
  do_action('alm_get_custom_repeaters');
801
  }
@@ -803,54 +803,54 @@
803
  do_action('alm_get_unlimited_repeaters');
804
  }
805
  echo '</select>';
806
-
807
  echo '</div></div>';
808
  ?>
809
-
810
  <?php // Get Theme Repeaters
811
  if (has_action('alm_theme_repeaters_selection')){
812
- do_action('alm_theme_repeaters_selection');
813
- }
814
  ?>
815
-
816
  <?php // Custom Repeaters v2 - /cta/extend.php
817
  if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters') && !has_action('alm_theme_repeaters_installed')) {
818
  include( ALM_PATH . 'admin/includes/cta/extend.php');
819
  }
820
-
821
  echo '</div>';
822
  echo '</div>';
823
- ?>
824
- <!-- End Template Selection -->
825
-
826
  <!-- Options -->
827
  <div class="row input alm-instance-options" id="alm-instance-options">
828
  <h3 class="heading"><?php _e('Options', 'ajax-load-more'); ?></h3>
829
- <div class="expand-wrap">
830
-
831
  <div class="section-title">
832
  <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter.','ajax-load-more'); ?>"></a></h4>
833
  <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?><br/>
834
  &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args_[id]" target="_blank">Learn More</a></p>
835
  </div>
836
- <div class="wrap">
837
- <div class="inner">
838
  <input type="text" class="alm_element" name="unique-id" id="unique-id">
839
  <div class="clear"></div>
840
- <p class="generate-id"><a href="javascript:void(0);" data-id="unique-id"><i class="fa fa-random"></i> <?php _e('Generate Unique ID', 'ajax-load-more'); ?></a></p>
841
  </div>
842
  </div>
843
-
844
  <div class="clear"></div>
845
  <hr/>
846
-
847
  <div class="section-title">
848
  <h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
849
  <p><?php _e('Override the global Container Type that was set on <a href="admin.php?page=ajax-load-more">ALM Settings page</a>.', 'ajax-load-more'); ?></p>
850
  </div>
851
  <div class="wrap">
852
  <div class="inner">
853
- <ul class="container_type">
854
  <li>
855
  <input type="radio" id="type-ul" value="ul" name="alm_container_type" class="alm_element">
856
  <label for="type-ul">&lt;ul&gt; &lt;/ul&gt;</label>
@@ -870,10 +870,10 @@
870
  </ul>
871
  </div>
872
  </div>
873
-
874
  <div class="clear"></div>
875
  <hr/>
876
-
877
  <div class="section-title">
878
  <h4><?php _e('Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define global container classes on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
879
  <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', 'ajax-load-more'); ?></p>
@@ -883,17 +883,17 @@
883
  <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
884
  </div>
885
  </div>
886
-
887
  </div>
888
  </div>
889
  <!-- End Options -->
890
-
891
  <!-- Button Labels -->
892
  <div class="row input btn-label" id="alm-btn-label">
893
  <h3 class="heading"><?php _e('Button Labels', 'ajax-load-more'); ?></h3>
894
-
895
  <div class="expand-wrap">
896
-
897
  <div class="section-title">
898
  <h4><?php _e('Label', 'ajax-load-more'); ?></h4>
899
  <p><?php _e('Customize the text of the <em>Load More</em> button.', 'ajax-load-more'); ?></p>
@@ -903,10 +903,10 @@
903
  <input class="alm_element" name="button-label" type="text" id="button-label" value="<?php _e('Older Posts', 'ajax-load-more'); ?>">
904
  </div>
905
  </div>
906
-
907
  <div class="clear"></div>
908
  <hr/>
909
-
910
  <div class="section-title">
911
  <h4><?php _e('Loading Label', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave field empty to not update text while loading content','ajax-load-more'); ?>"></a></h4>
912
  <p><?php _e('Update the text of the <em>Load More</em> button while content is loading.', 'ajax-load-more'); ?></p>
@@ -915,23 +915,23 @@
915
  <div class="inner">
916
  <input class="alm_element" name="button-loading-label" type="text" id="button-loading-label" value="" placeholder="<?php _e('Loading Posts...', 'ajax-load-more'); ?>">
917
  </div>
918
- </div>
919
-
920
  </div>
921
- </div>
922
- <!-- Button Labels -->
923
-
924
  <!-- Images Loaded -->
925
  <div class="row checkbox images_loaded" id="alm-images-loaded">
926
  <h3 class="heading"><?php _e('Images Loaded', 'ajax-load-more'); ?></h3>
927
  <div class="expand-wrap">
928
  <div class="section-title">
929
  <p><?php _e('Wait for all images to load before displaying ajax loaded content', 'ajax-load-more'); ?>.
930
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Background images are currently not supported','ajax-load-more'); ?>"></a>
931
  </p>
932
  </div>
933
  <div class="wrap">
934
- <div class="inner">
935
  <ul>
936
  <li>
937
  <input class="alm_element" type="radio" name="images_loaded" value="t" id="images_loaded_t">
@@ -946,8 +946,8 @@
946
  </div>
947
  </div>
948
  </div>
949
- <!-- End Images Loaded -->
950
-
951
  <!-- Pause -->
952
  <div class="row checkbox pause_load" id="alm-pause">
953
  <h3 class="heading"><?php _e('Pause', 'ajax-load-more'); ?></h3>
@@ -956,7 +956,7 @@
956
  <p><?php _e('Do <u>NOT</u> load any posts until user clicks the <em>Load More</em> button.', 'ajax-load-more'); ?></p>
957
  </div>
958
  <div class="wrap">
959
- <div class="inner">
960
  <ul>
961
  <li>
962
  <input class="alm_element" type="radio" name="pause" value="t" id="pause_t">
@@ -970,9 +970,9 @@
970
  </div>
971
  </div>
972
  </div>
973
- </div>
974
- <!-- End Pause -->
975
-
976
  <!-- Scrolling -->
977
  <div class="row checkbox scroll_load" id="alm-scroll">
978
  <h3 class="heading"><?php _e('Scrolling', 'ajax-load-more'); ?></h3>
@@ -982,7 +982,7 @@
982
  <p><?php _e('Load more posts as the user scrolls the page.', 'ajax-load-more'); ?></p>
983
  </div>
984
  <div class="wrap">
985
- <div class="inner">
986
  <ul>
987
  <li>
988
  <input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked>
@@ -994,9 +994,9 @@
994
  </li>
995
  </ul>
996
  </div>
997
- </div>
998
  <div class="clear"></div>
999
- <div class="scroll_distance">
1000
  <div class="clear"></div>
1001
  <hr>
1002
  <div class="section-title">
@@ -1004,12 +1004,12 @@
1004
  <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 150)', 'ajax-load-more'); ?></p>
1005
  </div>
1006
  <div class="wrap">
1007
- <div class="inner">
1008
- <input type="number" class="alm_element numbers-only" name="scroll-distance" id="scroll-distance" step="10" min="0" value="150">
1009
  </div>
1010
- </div>
1011
  </div>
1012
- <div class="max_pages">
1013
  <div class="clear"></div>
1014
  <hr>
1015
  <div class="section-title">
@@ -1017,12 +1017,12 @@
1017
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', 'ajax-load-more'); ?></p>
1018
  </div>
1019
  <div class="wrap">
1020
- <div class="inner">
1021
- <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="0">
1022
  </div>
1023
- </div>
1024
  </div>
1025
- <div class="pause_override">
1026
  <div class="clear"></div>
1027
  <hr>
1028
  <div class="section-title">
@@ -1040,12 +1040,12 @@
1040
  <label for="pause_override_f"><?php _e('False', 'ajax-load-more'); ?></label>
1041
  </li>
1042
  </ul>
1043
- </div>
1044
- </div>
1045
  </div>
1046
- </div>
1047
- <!-- End Scrolling -->
1048
-
1049
  <!-- Transition -->
1050
  <div class="row input transition" id="alm-transition">
1051
  <h3 class="heading"><?php _e('Transition', 'ajax-load-more'); ?></h3>
@@ -1055,7 +1055,7 @@
1055
  <p><?php _e('Select a loading transition style.', 'ajax-load-more'); ?></p>
1056
  </div>
1057
  <div class="wrap">
1058
- <div class="inner">
1059
  <ul>
1060
  <li>
1061
  <input class="alm_element" type="radio" name="transition" value="slide" id="transition-slide" checked="checked">
@@ -1072,41 +1072,41 @@
1072
  </ul>
1073
  </div>
1074
  </div>
1075
-
1076
  <div class="clear"></div>
1077
  <hr>
1078
-
1079
  <div class="section-title">
1080
  <h4><?php _e('Transition Speed', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('0.5 seconds = 500, 1 second = 1000 etc.','ajax-load-more'); ?>"></a></h4>
1081
  <p><?php _e('The speed of the loading transition in milliseconds', 'ajax-load-more'); ?>.<br/></p>
1082
  </div>
1083
  <div class="wrap">
1084
- <div class="inner">
1085
- <input type="number" class="alm_element numbers-only" name="transition-speed" id="transition-speed" step="50" min="50" value="250">
1086
  </div>
1087
- </div>
1088
-
1089
  <div class="clear"></div>
1090
  <hr>
1091
-
1092
  <div class="section-title">
1093
  <h4><?php _e('Transition Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Removing the transition container may have undesired results and is not recommended.','ajax-load-more'); ?>"></a></h4>
1094
  <p><?php _e('Remove the Ajax Load More (.alm-reveal) loading container.', 'ajax-load-more'); ?></p>
1095
  </div>
1096
  <div class="wrap">
1097
- <div class="inner">
1098
  <ul>
1099
  <li style="width:100%;">
1100
  <input class="alm_element" type="checkbox" name="remove_container" id="remove_container" value="f">
1101
  <label for="remove_container"><?php _e('Remove Container', 'ajax-load-more'); ?></label>
1102
  </li>
1103
- </ul>
1104
  </div>
1105
  </div>
1106
  </div>
1107
- </div>
1108
- <!-- End Transition -->
1109
-
1110
  <!-- Destroy After -->
1111
  <div class="row input destroy-after" id="alm-destroy-after">
1112
  <h3 class="heading"><?php _e('Destroy After', 'ajax-load-more'); ?></h3>
@@ -1115,23 +1115,23 @@
1115
  <p><?php _e('Remove ajax load more functionality after \'<em>n</em>\' number of pages have been loaded.', 'ajax-load-more'); ?></p>
1116
  </div>
1117
  <div class="wrap">
1118
- <div class="inner">
1119
- <input type="number" class="alm_element numbers-only" name="destroy-after" id="disable-after" step="1" min="0" value="">
1120
  </div>
1121
  </div>
1122
  </div>
1123
  </div>
1124
  <!-- End Destroy After -->
1125
-
1126
  </div>
1127
  <!-- End Display Settings -->
1128
 
1129
  <!-- ****************************** -->
1130
 
1131
  <!-- Query Parameters -->
1132
- <div class="shortcode-parameter-wrap">
1133
- <h2 class="shortcode-title"><?php _e('Query Parameters', 'ajax-load-more'); ?></h2>
1134
-
1135
  <!-- Posts Per Page -->
1136
  <div class="row input posts_per_page" id="alm-post-page">
1137
  <h3 class="heading"><?php _e('Posts Per Page', 'ajax-load-more'); ?></h3>
@@ -1141,49 +1141,82 @@
1141
  </div>
1142
  <div class="wrap">
1143
  <div class="inner">
1144
- <input type="number" class="alm_element numbers-only" name="display_posts-select" id="display_posts-select" step="1" min="1" value="5">
1145
  </div>
1146
  </div>
1147
  </div>
1148
  </div>
1149
- <!-- End Posts Per Page -->
1150
-
1151
  <!-- Post Types -->
1152
  <?php
1153
  $pt_args = array(
1154
  'public' => true
1155
  );
1156
  $types = get_post_types($pt_args);
1157
- if($types){
1158
- echo '<div class="row checkboxes post_types" id="alm-post-types">';
1159
- echo '<h3 class="heading">'.__('Post Type', 'ajax-load-more'). '</h3>';
1160
- echo '<div class="expand-wrap">';
1161
- echo '<div class="section-title">';
1162
- echo '<p>'.__('Select Post Types to query.', 'ajax-load-more'). '</p>';
1163
- echo '</div>';
1164
- echo '<div class="wrap"><div class="inner"><ul>';
1165
- foreach( $types as $type ){
1166
- $typeobj = get_post_type_object( $type );
1167
- $name = $typeobj->name;
1168
- if( $name != 'revision' && $name != 'nav_menu_item' && $name != 'acf'){
1169
- echo '<li><input class="alm_element" type="checkbox" name="chk-'.$typeobj->name.'" id="chk-'.$typeobj->name.'" data-type="'.$typeobj->name.'"><label for="chk-'.$typeobj->name.'">'.$typeobj->labels->singular_name.'</label></li>';
1170
- }
1171
- }
1172
- echo '<li><input class="alm_element chk-any" type="checkbox" name="chk-any" id="chk-any" data-type="any"><label for="chk-any">Any</label></li>';
1173
- echo '</ul></div></div>';
1174
- echo '</div>';
1175
- echo '</div>';
1176
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1177
  ?>
1178
  <!-- End Post Types -->
1179
-
1180
-
1181
  <!-- Post Formats -->
1182
  <?php
1183
  if ( current_theme_supports( 'post-formats' ) ) {
1184
  $post_formats = get_theme_support( 'post-formats' );
1185
  if($post_formats){
1186
- echo '<div class="row checkboxes post_format" id="alm-post-format">';
1187
  echo '<h3 class="heading">'.__('Post Format', 'ajax-load-more'). '</h3>';
1188
  echo '<div class="expand-wrap">';
1189
  echo '<div class="section-title">';
@@ -1191,10 +1224,10 @@
1191
  echo '</div>';
1192
  echo '<div class="wrap"><div class="inner"><select class="alm_element" name="post-format-select" id="post-format-select">';
1193
  echo '<option value="" selected="selected">-- ' . __('Select Post Format', 'ajax-load-more') . ' --</option>';
1194
- echo '<option name="chk-standard" id="chk-standard" value="standard">' . __('Standard', 'ajax-load-more') . '</option>';
1195
  foreach( $post_formats[0] as $post_format ){
1196
  echo '<option name="chk-'.$post_format.'" id="chk-'.$post_format.'" value="'.$post_format.'">'.ucwords($post_format).'</option>';
1197
- }
1198
  echo '</select></div></div>';
1199
  echo '</div>';
1200
  echo '</div>';
@@ -1202,8 +1235,8 @@
1202
  }
1203
  ?>
1204
  <!-- End Post Formats -->
1205
-
1206
-
1207
  <!-- Categories -->
1208
  <?php
1209
  if($disable_dynamic_content){
@@ -1211,7 +1244,7 @@
1211
  }else{
1212
  $cats = get_categories();
1213
  }
1214
- if($cats){ ?>
1215
  <div class="row checkboxes categories" id="alm-categories">
1216
  <h3 class="heading"><?php _e('Category', 'ajax-load-more'); ?></h3>
1217
  <div class="expand-wrap">
@@ -1221,7 +1254,7 @@
1221
  &raquo; <a href="admin.php?page=ajax-load-more-examples#example-category"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1222
  </div>
1223
  <div class="wrap">
1224
- <div class="inner">
1225
  <?php
1226
  if(!$disable_dynamic_content){
1227
  echo '<select class="alm_element multiple" name="category-select" id="category-select" multiple="multiple">';
@@ -1235,16 +1268,16 @@
1235
  ?>
1236
  </div>
1237
  </div>
1238
-
1239
  <div class="clear"></div>
1240
  <hr/>
1241
-
1242
- <div class="section-title">
1243
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1244
  <p><?php _e('A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)', 'ajax-load-more'); ?></p>
1245
  </div>
1246
  <div class="wrap">
1247
- <div class="inner">
1248
  <?php
1249
  if(!$disable_dynamic_content){
1250
  echo '<select class="alm_element multiple" name="category-exclude-select" id="category-exclude-select" multiple="multiple">';
@@ -1258,14 +1291,14 @@
1258
  ?>
1259
  </div>
1260
  <div class="clear"></div>
1261
- </div>
1262
  </div>
1263
  </div>
1264
  <!-- End Category -->
1265
-
1266
  <?php }
1267
-
1268
- // Tags
1269
  if($disable_dynamic_content){
1270
  $tags = 'null';
1271
  }else{
@@ -1296,13 +1329,13 @@
1296
  </div>
1297
  <div class="clear"></div>
1298
  <hr/>
1299
-
1300
- <div class="section-title">
1301
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1302
  <p><?php _e('A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)', 'ajax-load-more'); ?></p>
1303
  </div>
1304
  <div class="wrap">
1305
- <div class="inner">
1306
  <?php
1307
  if(!$disable_dynamic_content){
1308
  echo '<select class="alm_element multiple" name="tag-exclude-select" id="tag-exclude-select" multiple="multiple">';
@@ -1321,33 +1354,33 @@
1321
  </div>
1322
  <?php } ?>
1323
  <!-- End Tags -->
1324
-
1325
  <?php
1326
  // Taxonomies
1327
  $tax_args = array(
1328
  'public' => true,
1329
- '_builtin' => false
1330
- );
1331
  $tax_output = 'objects';
1332
- $taxonomies = get_taxonomies( $tax_args, $tax_output );
1333
  if ( $taxonomies ) { ?>
1334
  <div class="row taxonomy" id="alm-taxonomy">
1335
  <h3 class="heading"><?php _e('Taxonomy', 'ajax-load-more'); ?></h3>
1336
- <div class="expand-wrap">
1337
- <div class="section-title">
1338
  <p><?php _e('Select a taxonomy then select the terms and an operator.', 'ajax-load-more'); ?></p>
1339
  </div>
1340
- <div class="wrap">
1341
- <?php include( ALM_PATH . 'admin/shortcode-builder/includes/tax-query-options.php'); ?>
1342
  <div class="controls">
1343
- <button id="add-tax-query" class="button button-primary"><?php _e('Add Another', 'ajax-load-more'); ?></button>
1344
- </div>
1345
- </div>
1346
  </div>
1347
  </div>
1348
  <?php }?>
1349
  <!-- End Taxonomies -->
1350
-
1351
  <!-- Date -->
1352
  <div class="row input date" id="alm-date">
1353
  <h3 class="heading"><?php _e('Date', 'ajax-load-more'); ?></h3>
@@ -1374,8 +1407,8 @@
1374
  </div>
1375
  </div>
1376
  </div>
1377
- <!-- End Date -->
1378
-
1379
  <!-- Meta_Query -->
1380
  <div class="row input meta-key" id="alm-meta-key">
1381
  <h3 class="heading"><?php _e('Custom Fields (Meta_Query)', 'ajax-load-more'); ?></h3>
@@ -1400,26 +1433,26 @@
1400
  </div>
1401
  </div>
1402
  </div>
1403
-
1404
  <div id="meta-query-extended">
1405
-
1406
- </div>
1407
-
1408
  <div class="controls">
1409
- <button class="button button-primary" id="add-meta-query"><?php _e('Add Another', 'ajax-load-more'); ?></button>
1410
- </div>
1411
-
1412
- </div>
1413
  </div>
1414
  </div>
1415
- <!-- End Meta Query -->
1416
-
1417
  <?php // List Authors
1418
  if($disable_dynamic_content){
1419
  $authors = 'null';
1420
  }else{
1421
  $authors = get_users();
1422
- }
1423
  if($authors){
1424
  echo '<div class="row select authors" id="alm-authors">';
1425
  echo '<h3 class="heading">' . __('Author', 'ajax-load-more') . '</h3>';
@@ -1436,14 +1469,14 @@
1436
  echo '</select>';
1437
  }else{
1438
  echo '<input type="text" class="alm_element numbers-only" name="author-select" id="author-select" placeholder="1">';
1439
- }
1440
  echo '</div></div>';
1441
  echo '</div>';
1442
  echo '</div>';
1443
  }
1444
- ?>
1445
  <!-- End Authors -->
1446
-
1447
  <!-- Search -->
1448
  <div class="row input search-term" id="alm-search">
1449
  <h3 class="heading"><?php _e('Search Term', 'ajax-load-more'); ?></h3>
@@ -1457,9 +1490,9 @@
1457
  </div>
1458
  </div>
1459
  </div>
1460
- </div>
1461
  <!-- End Search -->
1462
-
1463
  <!-- Post Parameters -->
1464
  <div class="row input post-in" id="alm-post-in">
1465
  <h3 class="heading"><?php _e('Post Parameters', 'ajax-load-more'); ?></h3>
@@ -1491,7 +1524,7 @@
1491
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1492
  </div>
1493
  <div class="wrap">
1494
- <div class="inner">
1495
  <select class="alm_element" name="post-status" id="post-status">
1496
  <option value="publish" selected="selected"><?php _e('Published', 'ajax-load-more'); ?></option>
1497
  <option value="any">Any</option>
@@ -1506,8 +1539,8 @@
1506
  </div>
1507
  </div>
1508
  </div>
1509
- <!-- End Post Parameters -->
1510
-
1511
  <!-- Ordering -->
1512
  <div class="row ordering" id="alm-order">
1513
  <h3 class="heading"><?php _e('Ordering', 'ajax-load-more'); ?></h3>
@@ -1534,14 +1567,14 @@
1534
  <option value="ID">ID</option>
1535
  <option value="comment_count">Comment Count</option>
1536
  <option value="modified">Modified</option>
1537
- <option value="meta_value_num">meta_value_num</option>
1538
  </select>
1539
  </div>
1540
  </div>
1541
  </div>
1542
- </div>
1543
  <!-- End Ordering -->
1544
-
1545
  <!-- Offset -->
1546
  <div class="row input offset" id="alm-offset">
1547
  <h3 class="heading"><?php _e('Offset', 'ajax-load-more'); ?></h3>
@@ -1550,14 +1583,14 @@
1550
  <p><?php _e('Offset the initial query by <em>\'n\'</em> number of posts', 'ajax-load-more'); ?>.</p>
1551
  </div>
1552
  <div class="wrap">
1553
- <div class="inner">
1554
  <input type="number" class="alm_element numbers-only" name="offset-select" id="offset-select" value="0" step="1" min="0">
1555
  </div>
1556
  </div>
1557
  </div>
1558
  </div>
1559
  <!-- End Offset -->
1560
-
1561
  <!-- Custom Arguments -->
1562
  <div class="row input custom-arguments" id="alm-custom-args">
1563
  <h3 class="heading"><?php _e('Custom Arguments', 'ajax-load-more'); ?></h3>
@@ -1571,11 +1604,11 @@
1571
  </div>
1572
  </div>
1573
  </div>
1574
- </div>
1575
  <!-- End Custom Arguments -->
1576
-
1577
  </div>
1578
  <!-- End Query Parameters -->
1579
-
1580
-
1581
- <div class="clear"></div>
1
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em><em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em></span></span>
2
 
3
+ <?php
4
+ $alm_options = get_option( 'alm_settings' );
5
  if(!isset($alm_options['_alm_disable_dynamic'])) // Check if '_alm_disable_dynamic is set within settings
6
+ $alm_options['_alm_disable_dynamic'] = '0';
7
+
8
+ $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
9
  ?>
10
 
11
 
12
  <!-- Add-ons -->
13
  <?php if(alm_has_addon_shortcodes()) : ?>
14
 
15
+ <div class="shortcode-parameter-wrap">
16
  <h2 class="shortcode-title"><?php _e('Add-ons', 'ajax-load-more'); ?></h2>
17
+
18
  <?php if(has_action('alm_cache_installed')){ ?>
19
  <!-- CACHE -->
20
  <div class="row input cache add-on" id="alm-cache">
24
  <p><?php _e('Turn on content caching.', 'ajax-load-more'); ?></p>
25
  </div>
26
  <div class="wrap">
27
+ <div class="inner">
28
  <ul>
29
  <li>
30
  <input class="alm_element" type="radio" name="cache" value="true" id="cache-true" >
38
  </div>
39
  </div>
40
  <div class="clear"></div>
41
+ <div class="cache_id">
42
  <div class="clear"></div>
43
  <hr>
44
  <div class="section-title">
45
  <h4><?php _e('Cache ID', 'ajax-load-more'); ?></h4>
46
+ <p><?php _e('You <u>must</u> generate a unique ID for this cached query - this unique ID will be used as a content identifier.', 'ajax-load-more'); ?></p>
47
  </div>
48
  <div class="wrap">
49
+ <div class="inner">
50
+ <input type="text" class="alm_element" name="cache-id" id="cache-id">
51
  <div class="clear"></div>
52
+ <p class="generate-id"><a href="javascript:void(0);" data-id="cache-id"><i class="fa fa-random"></i> <?php _e('Generate Cache ID', 'ajax-load-more'); ?></a></p>
53
  </div>
54
+ </div>
55
+ </div>
56
  </div>
57
+ </div>
58
  <?php } ?>
59
+
60
+
61
  <?php if(has_action('alm_cta_installed')){ ?>
62
  <!-- Call to Actions -->
63
  <div class="row cta add-on" id="alm-cta">
64
  <h3 class="heading"><?php _e('Call to Actions', 'ajax-load-more'); ?></h3>
65
  <div class="expand-wrap">
66
+
67
  <div class="section-title">
68
  <p><?php _e('Insert call to action block.', 'ajax-load-more'); ?></p>
69
  </div>
70
  <div class="wrap">
71
+ <div class="inner">
72
  <ul>
73
  <li>
74
  <input class="alm_element" type="radio" name="cta" value="true" id="cta-true" >
82
  </div>
83
  </div>
84
  <div class="clear"></div>
85
+
86
  <div class="cta_template_wrap">
87
+
88
  <hr/>
89
  <div class="spacer"></div>
90
+
91
+ <div class="section-title">
92
  <h4><?php _e('CTA Positioning', 'ajax-load-more'); ?></h4>
93
  <p><?php _e('Insert call to action <strong><em id="sequence-update-before-after">before</em></strong> post #<strong><em id="sequence-update">1</em></strong>', 'ajax-load-more'); ?>.</p>
94
  </div>
95
  <div class="wrap">
96
+ <div class="inner">
97
+
98
  <label class="full"><?php _e('Before / After', 'ajax-load-more'); ?>:</label>
99
  <select class="alm_element cta-before-after" name="cta-before-after" id="cta-before-after">
100
  <option value="before" selected="selected"><?php _e('Before', 'ajax-load-more'); ?></option>
104
  <div class="spacer" style="height: 30px;"></div>
105
  <label class="full" for="cta-position"><?php _e('Post #', 'ajax-load-more'); ?>:</label>
106
  <input type="number" min="1" step="1" value="1" placeholder="1" id="cta-position" class="alm_element numbers-only" name="cta-position">
107
+
108
  </div>
109
  </div>
110
+
111
+ <div class="clear"></div>
112
  <hr/>
113
  <div class="spacer"></div>
114
+
115
+ <div class="section-title">
116
  <h4><?php _e('Template', 'ajax-load-more'); ?></h4>
117
  <?php
118
  echo '<p>'.__('Select the <a href="admin.php?page=ajax-load-more-repeaters" target="_parent">repeater template</a> that will display your call to action.', 'ajax-load-more'). '</p>';
122
  <div class="inner">
123
  <?php
124
  echo '<select name="cta-repeater-select" class="alm_element">';
125
+ echo '<option name="" value="" selected="selected">'.__('-- Select Repeater --', 'ajax-load-more').'</option>';
126
+ echo '<option name="default" value="default">Default</option>';
127
  if (has_action('alm_get_custom_repeaters')) {
128
  do_action('alm_get_custom_repeaters');
129
  }
130
  if (has_action('alm_get_unlimited_repeaters')) {
131
  do_action('alm_get_unlimited_repeaters');
132
  }
133
+ echo '</select>';
134
  ?>
135
  </div>
136
  </div>
137
+ <?php
138
  // Get Theme Repeaters
139
  if (has_action('alm_theme_repeaters_selection')){
140
+ do_action('alm_theme_repeaters_selection');
141
+ }
142
+ ?>
143
+
144
  <p class="warning-callout">
145
  <?php _e('Call to actions do NOT count as a post within an Ajax Load More loop.<br/>
146
  For example, if you set <strong>posts_per_page="5"</strong> in your shortcode, 6 items will be displayed.', 'ajax-load-more'); ?>
147
  </p>
148
+
149
  </div>
150
+
151
  </div>
152
  </div>
153
  <?php } ?>
154
+
155
+
156
  <?php if(has_action('alm_comments_installed')){ ?>
157
  <!-- COMMENTS -->
158
  <div class="row input comments add-on" id="alm-comments">
162
  <p><?php _e('Enable Ajax Load More to display blog comments.', 'ajax-load-more'); ?></p>
163
  </div>
164
  <div class="wrap">
165
+ <div class="inner">
166
  <ul>
167
  <li>
168
  <input class="alm_element" type="radio" name="comments" value="true" id="comments-true" >
176
  </div>
177
  </div>
178
  <div class="clear"></div>
179
+ <div class="comments_extras">
180
+
181
  <div class="clear"></div>
182
  <hr>
183
  <div class="section-title">
185
  <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
186
  </div>
187
  <div class="wrap">
188
+ <div class="inner">
189
+ <input type="text" value="get_the_ID()" id="comments_post_id" class="alm_element disabled-input" disabled="disabled">
190
  </div>
191
+ </div>
192
+
193
+ <div class="clear"></div>
194
+ <hr>
195
  <div class="section-title">
196
  <h4><?php _e('Comments Per Page', 'ajax-load-more'); ?></h4>
197
+ <p><?php _e('The number of top level items to show for each page of comments.', 'ajax-load-more'); ?></p>
198
+ </div>
199
+ <div class="wrap">
200
+ <div class="inner">
201
+ <input type="number" class="alm_element numbers-only" name="comments-per-page" id="comments-per-page" step="1" min="1" value="5">
202
  </div>
203
+ </div>
204
  <div class="section-title full">
205
  <p><?php _e('<strong>Note</strong>: The amount selected does NOT include comment replies.', 'ajax-load-more'); ?></p>
206
  </div>
207
+
208
  <div class="clear"></div>
209
  <hr>
210
  <div class="section-title">
212
  <p><?php _e('The type of comment(s) to display.', 'ajax-load-more'); ?></p>
213
  </div>
214
  <div class="wrap">
215
+ <div class="inner">
216
  <select class="alm_element comments_type" id="comments_type">
217
  <option value="comment" selected="selected"><?php _e('Comment', 'ajax-load-more'); ?></option>
218
  <option value="all"><?php _e('All', 'ajax-load-more'); ?></option>
219
  <option value="trackback"><?php _e('Trackback', 'ajax-load-more'); ?></option>
220
  <option value="pingback"><?php _e('Pingback', 'ajax-load-more'); ?></option>
221
  <option value="pings"><?php _e('Pings', 'ajax-load-more'); ?></option>
222
+ </select>
223
  </div>
224
+ </div>
225
+
226
  <div class="clear"></div>
227
+ <hr>
228
  <div class="section-title">
229
  <h4><?php _e('Comment Style', 'ajax-load-more'); ?></h4>
230
  <p><?php _e('Select the HTML container style for your comments.', 'ajax-load-more'); ?></p>
231
  </div>
232
  <div class="wrap">
233
  <div class="inner">
234
+ <ul class="comment_container_type">
235
  <li>
236
  <input type="radio" id="comment-type-ol" value="ol" name="alm_comment_style" class="alm_element" checked="checked">
237
  <label for="comment-type-ol">&lt;ol&gt; &lt;/ol&gt;</label>
238
+ </li>
239
  <li>
240
  <input type="radio" id="comment-type-ul" value="ul" name="alm_comment_style" class="alm_element">
241
  <label for="comment-type-ul">&lt;ul&gt; &lt;/ul&gt;</label>
242
+ </li>
243
  <li>
244
  <input type="radio" id="comment-type-div" value="div" name="alm_comment_style" class="alm_element">
245
  <label for="comment-type-div">&lt;div&gt; &lt;/div&gt;</label>
246
  </li>
247
  </ul>
248
  </div>
249
+ </div>
250
+
251
  <div class="clear"></div>
252
  <hr>
253
+
254
  <div class="section-title">
255
  <h4><?php _e('Comment Template', 'ajax-load-more'); ?></h4>
256
  <p><?php _e('Select a repeater template that will display comment data.', 'ajax-load-more'); ?></p>
257
  </div>
258
+
259
  <div class="wrap">
260
+ <div class="inner">
261
  <select class="alm_element comments_template" id="comments_template">
262
  <option value="none" selected="selected"><?php _e('None', 'ajax-load-more'); ?></option>
263
+ <option name="default" id="chk-default" value="default"><?php _e('Default', 'ajax-load-more'); ?></option>
264
  <?php if (has_action('alm_get_custom_repeaters')) {
265
  do_action('alm_get_custom_repeaters');
266
  }
268
  do_action('alm_get_unlimited_repeaters');
269
  }
270
  ?>
271
+ </select>
272
  </div>
273
+ </div>
274
  <div class="section-title full">
275
  <p><?php _e('<strong>Note</strong>: <span>None</span> will use the default WordPress comment layout.', 'ajax-load-more'); ?></p>
276
  </div>
285
  <p><?php _e('A custom <a href="https://codex.wordpress.org/Function_Reference/wp_list_comments#Arguments" target="_blank">callback</a> function that will display each comment.', 'ajax-load-more'); ?></p>
286
  </div>
287
  <div class="wrap">
288
+ <div class="inner">
289
+ <input type="text" value="" placeholder="function_name" id="comments_callback" class="alm_element">
290
  </div>
291
  </div>
292
  <div class="section-title full">
293
  <p><?php _e('<strong>Note</strong>: The majority of premium themes have a custom callback function for displaying comments. Please see comments.php or functions.php within your theme directory to locate the callback function for your theme.', 'ajax-load-more'); ?></p>
294
  </div>
295
+ </div>
296
+
297
  <p class="warning-callout">
298
  <?php _e('You must add the comments shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
299
+ </p>
300
+
301
+ </div>
302
  </div>
303
+ </div>
304
  <?php } ?>
305
+
306
+
307
  <?php if(has_action('alm_nextpage_installed')){ ?>
308
  <!-- NEXT PAGE -->
309
  <div class="row input next-page add-on" id="alm-next-page">
313
  <p><?php _e('Enable the infinite scrolling of multipage WordPress content using the', 'ajax-load-more'); ?> <span>< !--nextpage-- ></span> <?php _e('Quicktag', 'ajax-load-more'); ?>.</p>
314
  </div>
315
  <div class="wrap">
316
+ <div class="inner">
317
  <ul>
318
  <li>
319
  <input class="alm_element" type="radio" name="next-page" value="true" id="next-page-true" >
323
  <input class="alm_element" type="radio" name="next-page" value="false" id="next-page-false" checked="checked">
324
  <label for="next-page-false"><?php _e('False', 'ajax-load-more'); ?></label>
325
  </li>
326
+ </ul>
327
  </div>
328
  </div>
329
+
330
  <div class="clear"></div>
331
+
332
+ <div class="next-page-content" style="display: none;">
333
+
334
  <div class="clear"></div>
335
  <hr>
336
  <div class="section-title">
338
  <p><?php _e('The ID of the current page/post.', 'ajax-load-more'); ?></p>
339
  </div>
340
  <div class="wrap">
341
+ <div class="inner">
342
+ <input type="text" value="get_the_ID()" id="next-page_post_id" class="alm_element disabled-input" disabled="disabled">
343
  </div>
344
  </div>
345
+
346
  <div class="clear"></div>
347
  <hr/>
348
+
349
  <div class="section-title">
350
  <h4><?php _e('URL Rewrite', 'ajax-load-more'); ?></h4>
351
  <p><?php _e('Update the browser address bar as pages come into view', 'ajax-load-more'); ?>.</p>
352
  </div>
353
+ <div class="wrap">
354
+ <div class="inner">
355
  <ul>
356
  <li style="width:100%;">
357
  <input class="alm_element" type="checkbox" name="next-page-url" id="next-page-url" value="true" checked="checked">
358
  <label for="next-page-url"><?php _e('Yes, update the URL', 'ajax-load-more'); ?>.</label>
359
  </li>
360
+ </ul>
361
+ <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
362
  </div>
363
+ </div>
364
+
365
  <div class="clear"></div>
366
  <hr/>
367
+
368
  <div class="section-title">
369
  <h4>
370
+ <?php _e('Google Analytics', 'ajax-load-more'); ?>
371
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You must have a reference to your Google Analytics tracking code already on the page','ajax-load-more'); ?>"></a>
372
  </h4>
373
  <p><?php _e('Each time a page is loaded it will count as a pageview', 'ajax-load-more'); ?>.</p>
374
  </div>
375
+ <div class="wrap">
376
+ <div class="inner">
377
  <ul>
378
  <li style="width:100%;">
379
  <input class="alm_element" type="checkbox" name="next-page-pageviews" id="next-page-pageviews" value="true" checked="checked">
380
  <label for="next-page-pageviews"><?php _e('Yes, send pageviews to Google Analytics', 'ajax-load-more'); ?>.</label>
381
  </li>
382
+ </ul>
383
+ <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
384
  </div>
385
+ </div>
386
+
387
  <div class="clear"></div>
388
  <hr>
389
  <div class="section-title">
396
  </p>
397
  </div>
398
  <div class="wrap">
399
+ <div class="inner half">
400
  <label for="next-page-scroll-speed" class="full">
401
+ <?php _e('Scroll Speed', 'ajax-load-more'); ?>
402
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>"></a>
403
  </label>
404
+ <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
405
  </div>
406
  <div class="inner half">
407
  <label for="next-page-scroll-top" class="full">
408
+ <?php _e('Scroll Top', 'ajax-load-more'); ?>
409
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The scrolltop position of the window (used with scrolling and fwd/back browser buttons)','ajax-load-more'); ?>"></a>
410
  </label>
411
+ <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
412
  </div>
413
  </div>
414
+
415
  <p class="warning-callout">
416
  <?php _e('You must add the Next Page shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
417
  </p>
418
+
419
+ </div>
420
  </div>
421
+ </div>
422
  <?php } ?>
423
+
424
+
425
  <?php if(has_action('alm_paging_installed')){ ?>
426
  <!-- PAGING -->
427
  <div class="row input paging add-on" id="alm-paging">
430
  <div class="section-title"> <p><?php _e('Replace infinite scrolling with a paged ajax navigation system.', 'ajax-load-more'); ?></p>
431
  </div>
432
  <div class="wrap">
433
+ <div class="inner">
434
  <ul>
435
  <li>
436
  <input class="alm_element" type="radio" name="paging" value="true" id="paging-true" >
443
  </ul>
444
  </div>
445
  </div>
446
+
447
  <div class="clear"></div>
448
  <div id="nav-controls">
449
+
450
  <hr/>
451
  <div class="section-title">
452
  <h4><?php _e('Paging Controls', 'ajax-load-more'); ?></h4>
453
  <p><?php _e('Show (&laquo;)previous and next(&raquo;) buttons.', 'ajax-load-more'); ?></p>
454
  </div>
455
  <div class="wrap">
456
+ <div class="inner">
457
  <ul>
458
  <li>
459
  <input class="alm_element" type="radio" name="paging-controls" value="true" id="paging-controls-true" >
466
  </ul>
467
  </div>
468
  </div>
469
+
470
  <div class="clear"></div>
471
  <hr/>
472
  <div class="section-title">
473
  <h4><?php _e('Paging Navigation Classes', 'ajax-load-more'); ?></h4>
474
  <p><?php _e('Add custom CSS classes to the paging navigation menu.', 'ajax-load-more'); ?></p>
475
  </div>
476
+ <div class="wrap">
477
+ <div class="inner">
478
+ <input type="text" class="alm_element" name="paging-classes" id="paging-classes" placeholder="portfolio-paging-menu">
479
  </div>
480
  </div>
481
+
482
  <div class="clear"></div>
483
  <hr/>
484
  <div class="section-title">
485
  <h4><?php _e('Show at Most', 'ajax-load-more'); ?></h4>
486
  <p><?php _e('The maximum amount of page menu items to show at a time. <br/.>0 = no maximum', 'ajax-load-more'); ?></p>
487
  </div>
488
+ <div class="wrap">
489
+ <div class="inner">
490
+ <input type="number" class="alm_element numbers-only" name="show-at-most" id="show-at-most" step="2" min="0" value="7">
491
  </div>
492
  </div>
493
+
494
  </div>
495
+
496
  </div>
497
+ </div>
498
  <?php } ?>
499
+
500
+
501
  <?php if(has_action('alm_preload_installed')){ ?>
502
  <!-- PRELOADED -->
503
  <div class="row input preload add-on" id="alm-preload">
507
  <p><?php _e('Preload posts prior to making Ajax requests.', 'ajax-load-more'); ?></p>
508
  </div>
509
  <div class="wrap">
510
+ <div class="inner">
511
  <ul>
512
  <li>
513
  <input class="alm_element" type="radio" name="preload" value="true" id="preload-true" >
521
  </div>
522
  </div>
523
  <div class="clear"></div>
524
+ <div class="preload_amount">
525
  <div class="clear"></div>
526
  <hr>
527
  <div class="section-title">
528
  <h4><?php _e('Preload Amount', 'ajax-load-more'); ?></h4>
529
+ <p><?php _e('Enter the number of posts to preload.', 'ajax-load-more'); ?></p>
530
  </div>
531
  <div class="wrap">
532
+ <div class="inner">
533
+ <input type="number" class="alm_element numbers-only" name="preload-amount" id="preload-amount" step="1" min="1" value="5">
534
  </div>
535
+ </div>
536
+ </div>
537
  </div>
538
+ </div>
539
  <?php } ?>
540
+
541
+
542
  <?php if(has_action('alm_prev_post_installed')){ ?>
543
  <!-- PREV POST -->
544
  <div class="row input previous-post add-on" id="alm-previous-post">
548
  <p><?php _e('Enable the infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
549
  </div>
550
  <div class="wrap">
551
+ <div class="inner">
552
  <ul>
553
  <li>
554
  <input class="alm_element" type="radio" name="prev-post" value="true" id="prev-post-true" >
558
  <input class="alm_element" type="radio" name="prev-post" value="false" id="prev-post-false" checked="checked">
559
  <label for="prev-post-false"><?php _e('False', 'ajax-load-more'); ?></label>
560
  </li>
561
+ </ul>
562
  </div>
563
  </div>
564
  <div class="clear"></div>
565
+ <div class="prev_post_id" style="display: none;">
566
  <div class="clear"></div>
567
  <hr>
568
  <div class="section-title">
570
  <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
571
  </div>
572
  <div class="wrap">
573
+ <div class="inner">
574
+ <input type="text" value="get_the_ID()" id="prev_post_id" class="alm_element disabled-input" disabled="disabled">
575
  </div>
576
+ </div>
577
+
578
+
579
  <div class="clear"></div>
580
  <hr>
581
  <div class="section-title">
583
  <p><?php _e('Query previous posts from the same taxonomy.', 'ajax-load-more'); ?></p>
584
  </div>
585
  <div class="wrap">
586
+ <div class="inner">
587
  <?php
588
  // Taxonomies
589
  $pp_tax_args = array(
590
  'public' => true,
591
+ '_builtin' => false
592
+ );
593
  $pp_tax_output = 'objects';
594
+ $pp_taxonomies = get_taxonomies( $pp_tax_args, $pp_tax_output );
595
  echo '<select class="alm_element" name="pp-taxonomy-select" id="pp-taxonomy-select">';
596
  echo '<option value="" selected="selected">-- ' . __('Select Taxonomy', 'ajax-load-more') . ' --</option>';
597
  echo '<option value="category">' . __('Category', 'ajax-load-more') . '</option>';
598
  echo '<option value="post_tag">' . __('Tag', 'ajax-load-more') . '</option>';
599
+ if ( $pp_taxonomies ) {
600
+
601
  foreach( $pp_taxonomies as $pp_taxonomy ){
602
  echo '<option name="pp-'.$pp_taxonomy->query_var.'" id="pp-'.$pp_taxonomy->query_var.'" value="'.$pp_taxonomy->query_var.'">'.$pp_taxonomy->label.'</option>';
603
+ }
604
+
605
+ }
606
  echo '</select>';
607
  ?>
608
  </div>
609
+ </div>
610
+
611
  <p class="warning-callout">
612
  <?php _e('You must add the Previous Post shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
613
  </p>
614
  </div>
615
  </div>
616
+ </div>
617
+ <?php } ?>
618
+
619
+
620
+ <?php if(has_action('alm_rest_api_installed')){
621
+
622
  // get rest defaults (from core alm settings)
623
  $restapi_baseurl = '/wp-json';
624
  if(isset($alm_options['_alm_rest_api_base_url']))
625
  $restapi_baseurl = $alm_options['_alm_rest_api_base_url'];
626
+
627
  $restapi_namespace = 'ajaxloadmore';
628
  if(isset($alm_options['_alm_rest_api_namespace']))
629
  $restapi_namespace = $alm_options['_alm_rest_api_namespace'];
630
+
631
  $restapi_endpoint = 'posts';
632
  if(isset($alm_options['_alm_rest_api_endpoint']))
633
  $restapi_endpoint = $alm_options['_alm_rest_api_endpoint'];
634
+
635
  ?>
636
  <!-- REST API -->
637
  <div class="row input rest add-on" id="alm-rest">
641
  <p><?php _e('Enable the WordPress REST API.', 'ajax-load-more'); ?></p>
642
  </div>
643
  <div class="wrap">
644
+ <div class="inner">
645
  <ul>
646
  <li>
647
  <input class="alm_element" type="radio" name="rest" value="true" id="rest-true" >
654
  </ul>
655
  </div>
656
  </div>
657
+
658
+ <div class="clear"></div>
659
+ <div class="restapi_options">
660
+
661
  <div class="clear"></div>
662
  <hr>
663
+
664
  <div class="section-title">
665
+ <h4><?php _e('Base URL', 'ajax-load-more'); ?>
666
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Base URL in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
667
  <p><?php _e('Enter the base URL to your installation of the REST API.', 'ajax-load-more'); ?></p>
668
  </div>
669
+ <div class="wrap">
670
+ <div class="inner">
671
  <input type="text" id="rest-base" class="alm_element" name="rest-base" value="<?php echo $restapi_baseurl; ?>">
672
  </div>
673
+ </div>
674
+
675
  <div class="clear"></div>
676
  <hr>
677
+
678
  <div class="section-title">
679
+ <h4><?php _e('Namespace', 'ajax-load-more'); ?>
680
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Namespace in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
681
  <p><?php _e('Enter the custom namespace for this Ajax Load More query.', 'ajax-load-more'); ?></p>
682
  </div>
683
+ <div class="wrap">
684
+ <div class="inner">
685
  <input type="text" id="rest-namespace" class="alm_element" name="rest-namespace" value="<?php echo $restapi_namespace; ?>">
686
  </div>
687
+ </div>
688
+
689
  <div class="clear"></div>
690
  <hr>
691
+
692
  <div class="section-title">
693
+ <h4><?php _e('Endpoint', 'ajax-load-more'); ?>
694
  <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Endpoint in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
695
  <p><?php _e('Enter your custom endpoint for this Ajax Load More query.', 'ajax-load-more'); ?></p>
696
  </div>
697
+ <div class="wrap">
698
+ <div class="inner">
699
  <input type="text" id="rest-endpoint" class="alm_element" name="rest-endpoint" value="<?php echo $restapi_endpoint; ?>">
700
  </div>
701
+ </div>
702
+
703
  <div class="clear"></div>
704
  <hr>
705
+
706
  <div class="section-title">
707
  <h4><?php _e('Template ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Ajax Load More references this ID while looping and displaying your data. You must still select a repeater template for this instance of Ajax Load More','ajax-load-more'); ?>">.</a></h4>
708
  <p><?php _e('Enter the ID of your javascript template.<br/><br/>e.g. <em>tmpl-alm-template</em> = <em>alm-template</em>', 'ajax-load-more'); ?><br/>&raquo; <a href="https://gist.github.com/dcooney/c89f5859b73256b36de4a0c3320d9b07" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
709
  </div>
710
+ <div class="wrap">
711
+ <div class="inner">
712
  <input type="text" id="rest-template-id" class="alm_element" name="rest-template-id" value="">
713
  </div>
714
+ </div>
715
+
716
  <div class="clear"></div>
717
  <hr>
718
+
719
  <div class="section-title">
720
  <h4><?php _e('Debug Mode', 'ajax-load-more'); ?></h4>
721
  <p><?php _e('Enable debugging (console.log) of REST API responses in the browser console. ', 'ajax-load-more'); ?></p>
722
  </div>
723
+ <div class="wrap">
724
+ <div class="inner">
725
  <ul>
726
  <li>
727
  <input class="alm_element" type="radio" name="rest-debug" value="true" id="rest-debug-true" >
733
  </li>
734
  </ul>
735
  </div>
736
+ </div>
737
+
738
  <p class="warning-callout">
739
  <?php _e('Visit <a href="http://v2.wp-api.org/" target="_blank">http://v2.wp-api.org</a> for documentation on creating custom <a href="http://v2.wp-api.org/extending/adding/" target="_blank">Endpoints</a> for use with Ajax Load More.', 'ajax-load-more'); ?>
740
  </p>
741
+
742
  </div>
743
+
744
  </div>
745
+ </div>
746
+ <?php } ?>
747
+
748
+
749
  <?php if(has_action('alm_seo_installed')){ ?>
750
  <!-- SEO -->
751
  <div class="row input seo add-on" id="alm-seo">
755
  <p><?php _e('Enable address bar URL rewrites as users page through ajax loaded content.', 'ajax-load-more'); ?></p>
756
  </div>
757
  <div class="wrap">
758
+ <div class="inner">
759
  <ul>
760
  <li>
761
  <input class="alm_element" type="radio" name="seo" value="true" id="seo-true" >
769
  </div>
770
  </div>
771
  </div>
772
+ </div>
773
+ <?php } ?>
774
 
775
+ </div>
776
  <?php endif; ?>
777
  <!-- End Add-ons -->
778
 
779
  <!-- ****************************** -->
780
 
781
  <!-- Display Settings -->
782
+ <div class="shortcode-parameter-wrap">
783
+ <h2 class="shortcode-title"><?php _e('Display Settings', 'ajax-load-more'); ?></h2>
784
+
785
  <!-- Template Selection -->
786
  <?php
787
+ echo '<div class="row repeater" id="alm-repeaters">';
788
  echo '<h3 class="heading">'.__('Template', 'ajax-load-more'). '</h3>';
789
  echo '<div class="expand-wrap">';
790
  echo '<div class="section-title">';
795
  echo '</div>';
796
  echo '<div class="wrap"><div class="inner">';
797
  echo '<select name="repeater-select" class="alm_element">';
798
+ echo '<option name="default" value="default" selected="selected">Default</option>';
799
  if (has_action('alm_get_custom_repeaters')) {
800
  do_action('alm_get_custom_repeaters');
801
  }
803
  do_action('alm_get_unlimited_repeaters');
804
  }
805
  echo '</select>';
806
+
807
  echo '</div></div>';
808
  ?>
809
+
810
  <?php // Get Theme Repeaters
811
  if (has_action('alm_theme_repeaters_selection')){
812
+ do_action('alm_theme_repeaters_selection');
813
+ }
814
  ?>
815
+
816
  <?php // Custom Repeaters v2 - /cta/extend.php
817
  if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters') && !has_action('alm_theme_repeaters_installed')) {
818
  include( ALM_PATH . 'admin/includes/cta/extend.php');
819
  }
820
+
821
  echo '</div>';
822
  echo '</div>';
823
+ ?>
824
+ <!-- End Template Selection -->
825
+
826
  <!-- Options -->
827
  <div class="row input alm-instance-options" id="alm-instance-options">
828
  <h3 class="heading"><?php _e('Options', 'ajax-load-more'); ?></h3>
829
+ <div class="expand-wrap">
830
+
831
  <div class="section-title">
832
  <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter.','ajax-load-more'); ?>"></a></h4>
833
  <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?><br/>
834
  &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args_[id]" target="_blank">Learn More</a></p>
835
  </div>
836
+ <div class="wrap">
837
+ <div class="inner">
838
  <input type="text" class="alm_element" name="unique-id" id="unique-id">
839
  <div class="clear"></div>
840
+ <p class="generate-id"><a href="javascript:void(0);" data-id="unique-id"><i class="fa fa-random"></i> <?php _e('Generate Unique ID', 'ajax-load-more'); ?></a></p>
841
  </div>
842
  </div>
843
+
844
  <div class="clear"></div>
845
  <hr/>
846
+
847
  <div class="section-title">
848
  <h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
849
  <p><?php _e('Override the global Container Type that was set on <a href="admin.php?page=ajax-load-more">ALM Settings page</a>.', 'ajax-load-more'); ?></p>
850
  </div>
851
  <div class="wrap">
852
  <div class="inner">
853
+ <ul class="container_type">
854
  <li>
855
  <input type="radio" id="type-ul" value="ul" name="alm_container_type" class="alm_element">
856
  <label for="type-ul">&lt;ul&gt; &lt;/ul&gt;</label>
870
  </ul>
871
  </div>
872
  </div>
873
+
874
  <div class="clear"></div>
875
  <hr/>
876
+
877
  <div class="section-title">
878
  <h4><?php _e('Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define global container classes on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
879
  <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', 'ajax-load-more'); ?></p>
883
  <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
884
  </div>
885
  </div>
886
+
887
  </div>
888
  </div>
889
  <!-- End Options -->
890
+
891
  <!-- Button Labels -->
892
  <div class="row input btn-label" id="alm-btn-label">
893
  <h3 class="heading"><?php _e('Button Labels', 'ajax-load-more'); ?></h3>
894
+
895
  <div class="expand-wrap">
896
+
897
  <div class="section-title">
898
  <h4><?php _e('Label', 'ajax-load-more'); ?></h4>
899
  <p><?php _e('Customize the text of the <em>Load More</em> button.', 'ajax-load-more'); ?></p>
903
  <input class="alm_element" name="button-label" type="text" id="button-label" value="<?php _e('Older Posts', 'ajax-load-more'); ?>">
904
  </div>
905
  </div>
906
+
907
  <div class="clear"></div>
908
  <hr/>
909
+
910
  <div class="section-title">
911
  <h4><?php _e('Loading Label', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave field empty to not update text while loading content','ajax-load-more'); ?>"></a></h4>
912
  <p><?php _e('Update the text of the <em>Load More</em> button while content is loading.', 'ajax-load-more'); ?></p>
915
  <div class="inner">
916
  <input class="alm_element" name="button-loading-label" type="text" id="button-loading-label" value="" placeholder="<?php _e('Loading Posts...', 'ajax-load-more'); ?>">
917
  </div>
918
+ </div>
919
+
920
  </div>
921
+ </div>
922
+ <!-- Button Labels -->
923
+
924
  <!-- Images Loaded -->
925
  <div class="row checkbox images_loaded" id="alm-images-loaded">
926
  <h3 class="heading"><?php _e('Images Loaded', 'ajax-load-more'); ?></h3>
927
  <div class="expand-wrap">
928
  <div class="section-title">
929
  <p><?php _e('Wait for all images to load before displaying ajax loaded content', 'ajax-load-more'); ?>.
930
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Background images are currently not supported','ajax-load-more'); ?>"></a>
931
  </p>
932
  </div>
933
  <div class="wrap">
934
+ <div class="inner">
935
  <ul>
936
  <li>
937
  <input class="alm_element" type="radio" name="images_loaded" value="t" id="images_loaded_t">
946
  </div>
947
  </div>
948
  </div>
949
+ <!-- End Images Loaded -->
950
+
951
  <!-- Pause -->
952
  <div class="row checkbox pause_load" id="alm-pause">
953
  <h3 class="heading"><?php _e('Pause', 'ajax-load-more'); ?></h3>
956
  <p><?php _e('Do <u>NOT</u> load any posts until user clicks the <em>Load More</em> button.', 'ajax-load-more'); ?></p>
957
  </div>
958
  <div class="wrap">
959
+ <div class="inner">
960
  <ul>
961
  <li>
962
  <input class="alm_element" type="radio" name="pause" value="t" id="pause_t">
970
  </div>
971
  </div>
972
  </div>
973
+ </div>
974
+ <!-- End Pause -->
975
+
976
  <!-- Scrolling -->
977
  <div class="row checkbox scroll_load" id="alm-scroll">
978
  <h3 class="heading"><?php _e('Scrolling', 'ajax-load-more'); ?></h3>
982
  <p><?php _e('Load more posts as the user scrolls the page.', 'ajax-load-more'); ?></p>
983
  </div>
984
  <div class="wrap">
985
+ <div class="inner">
986
  <ul>
987
  <li>
988
  <input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked>
994
  </li>
995
  </ul>
996
  </div>
997
+ </div>
998
  <div class="clear"></div>
999
+ <div class="scroll_distance">
1000
  <div class="clear"></div>
1001
  <hr>
1002
  <div class="section-title">
1004
  <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 150)', 'ajax-load-more'); ?></p>
1005
  </div>
1006
  <div class="wrap">
1007
+ <div class="inner">
1008
+ <input type="number" class="alm_element numbers-only" name="scroll-distance" id="scroll-distance" step="10" min="0" value="150">
1009
  </div>
1010
+ </div>
1011
  </div>
1012
+ <div class="max_pages">
1013
  <div class="clear"></div>
1014
  <hr>
1015
  <div class="section-title">
1017
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', 'ajax-load-more'); ?></p>
1018
  </div>
1019
  <div class="wrap">
1020
+ <div class="inner">
1021
+ <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="0">
1022
  </div>
1023
+ </div>
1024
  </div>
1025
+ <div class="pause_override">
1026
  <div class="clear"></div>
1027
  <hr>
1028
  <div class="section-title">
1040
  <label for="pause_override_f"><?php _e('False', 'ajax-load-more'); ?></label>
1041
  </li>
1042
  </ul>
1043
+ </div>
1044
+ </div>
1045
  </div>
1046
+ </div>
1047
+ <!-- End Scrolling -->
1048
+
1049
  <!-- Transition -->
1050
  <div class="row input transition" id="alm-transition">
1051
  <h3 class="heading"><?php _e('Transition', 'ajax-load-more'); ?></h3>
1055
  <p><?php _e('Select a loading transition style.', 'ajax-load-more'); ?></p>
1056
  </div>
1057
  <div class="wrap">
1058
+ <div class="inner">
1059
  <ul>
1060
  <li>
1061
  <input class="alm_element" type="radio" name="transition" value="slide" id="transition-slide" checked="checked">
1072
  </ul>
1073
  </div>
1074
  </div>
1075
+
1076
  <div class="clear"></div>
1077
  <hr>
1078
+
1079
  <div class="section-title">
1080
  <h4><?php _e('Transition Speed', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('0.5 seconds = 500, 1 second = 1000 etc.','ajax-load-more'); ?>"></a></h4>
1081
  <p><?php _e('The speed of the loading transition in milliseconds', 'ajax-load-more'); ?>.<br/></p>
1082
  </div>
1083
  <div class="wrap">
1084
+ <div class="inner">
1085
+ <input type="number" class="alm_element numbers-only" name="transition-speed" id="transition-speed" step="50" min="50" value="250">
1086
  </div>
1087
+ </div>
1088
+
1089
  <div class="clear"></div>
1090
  <hr>
1091
+
1092
  <div class="section-title">
1093
  <h4><?php _e('Transition Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Removing the transition container may have undesired results and is not recommended.','ajax-load-more'); ?>"></a></h4>
1094
  <p><?php _e('Remove the Ajax Load More (.alm-reveal) loading container.', 'ajax-load-more'); ?></p>
1095
  </div>
1096
  <div class="wrap">
1097
+ <div class="inner">
1098
  <ul>
1099
  <li style="width:100%;">
1100
  <input class="alm_element" type="checkbox" name="remove_container" id="remove_container" value="f">
1101
  <label for="remove_container"><?php _e('Remove Container', 'ajax-load-more'); ?></label>
1102
  </li>
1103
+ </ul>
1104
  </div>
1105
  </div>
1106
  </div>
1107
+ </div>
1108
+ <!-- End Transition -->
1109
+
1110
  <!-- Destroy After -->
1111
  <div class="row input destroy-after" id="alm-destroy-after">
1112
  <h3 class="heading"><?php _e('Destroy After', 'ajax-load-more'); ?></h3>
1115
  <p><?php _e('Remove ajax load more functionality after \'<em>n</em>\' number of pages have been loaded.', 'ajax-load-more'); ?></p>
1116
  </div>
1117
  <div class="wrap">
1118
+ <div class="inner">
1119
+ <input type="number" class="alm_element numbers-only" name="destroy-after" id="disable-after" step="1" min="0" value="">
1120
  </div>
1121
  </div>
1122
  </div>
1123
  </div>
1124
  <!-- End Destroy After -->
1125
+
1126
  </div>
1127
  <!-- End Display Settings -->
1128
 
1129
  <!-- ****************************** -->
1130
 
1131
  <!-- Query Parameters -->
1132
+ <div class="shortcode-parameter-wrap">
1133
+ <h2 class="shortcode-title"><?php _e('Query Parameters', 'ajax-load-more'); ?></h2>
1134
+
1135
  <!-- Posts Per Page -->
1136
  <div class="row input posts_per_page" id="alm-post-page">
1137
  <h3 class="heading"><?php _e('Posts Per Page', 'ajax-load-more'); ?></h3>
1141
  </div>
1142
  <div class="wrap">
1143
  <div class="inner">
1144
+ <input type="number" class="alm_element numbers-only" name="display_posts-select" id="display_posts-select" step="1" min="1" value="5">
1145
  </div>
1146
  </div>
1147
  </div>
1148
  </div>
1149
+ <!-- End Posts Per Page -->
1150
+
1151
  <!-- Post Types -->
1152
  <?php
1153
  $pt_args = array(
1154
  'public' => true
1155
  );
1156
  $types = get_post_types($pt_args);
1157
+ if($types){ ?>
1158
+ <div class="row checkboxes post_types" id="alm-post-types">
1159
+ <h3 class="heading"><?php _e('Post Type', 'ajax-load-more'); ?></h3>
1160
+
1161
+ <div class="expand-wrap">
1162
+
1163
+ <div class="section-title">
1164
+ <p><?php _e('Select the Post Types to include in this Ajax Load More query.', 'ajax-load-more'); ?></p>
1165
+ </div>
1166
+ <div class="wrap">
1167
+ <div class="inner">
1168
+ <ul class="alm-post-type-list">
1169
+ <?php
1170
+ foreach( $types as $type ){
1171
+ $typeobj = get_post_type_object( $type );
1172
+ $name = $typeobj->name;
1173
+ if( $name != 'revision' && $name != 'nav_menu_item' && $name != 'acf'){
1174
+ echo '<li><input class="alm_element" type="checkbox" name="chk-'.$typeobj->name.'" id="chk-'.$typeobj->name.'" data-type="'.$typeobj->name.'"><label for="chk-'.$typeobj->name.'">'.$typeobj->labels->singular_name.'</label></li>';
1175
+ }
1176
+ }
1177
+ ?>
1178
+ <li><input class="alm_element chk-any" type="checkbox" name="chk-any" id="chk-any" data-type="any"><label for="chk-any"><?php _e('Any', 'ajax-load-more'); ?></label></li>
1179
+ </ul>
1180
+ </div>
1181
+ </div>
1182
+ <div class="clear"></div>
1183
+
1184
+ <div class="sticky-wrap">
1185
+ <div style="display: block;">
1186
+ <div class="clear"></div>
1187
+ <hr/>
1188
+
1189
+ <div class="section-title">
1190
+ <h4><?php _e('Sticky Posts', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Sticky posts are only available for Posts.','ajax-load-more'); ?>"></a></h4>
1191
+ <p><?php _e('Preserve the ordering of sticky posts by having them appear first in the Ajax listing.', 'ajax-load-more'); ?></p>
1192
+ </div>
1193
+ <div class="wrap">
1194
+ <div class="inner">
1195
+ <ul>
1196
+ <li style="width:100%;">
1197
+ <input class="alm_element" type="checkbox" name="alm_sticky_posts" id="alm_sticky_posts" value="true">
1198
+ <label for="alm_sticky_posts"><?php _e('Enable Sticky Posts', 'ajax-load-more'); ?></label>
1199
+ </li>
1200
+ </ul>
1201
+ </div>
1202
+ </div>
1203
+ </div>
1204
+ </div>
1205
+
1206
+ </div>
1207
+
1208
+ </div>
1209
+ <?php }
1210
  ?>
1211
  <!-- End Post Types -->
1212
+
1213
+
1214
  <!-- Post Formats -->
1215
  <?php
1216
  if ( current_theme_supports( 'post-formats' ) ) {
1217
  $post_formats = get_theme_support( 'post-formats' );
1218
  if($post_formats){
1219
+ echo '<div class="row checkboxes post_format" id="alm-post-format">';
1220
  echo '<h3 class="heading">'.__('Post Format', 'ajax-load-more'). '</h3>';
1221
  echo '<div class="expand-wrap">';
1222
  echo '<div class="section-title">';
1224
  echo '</div>';
1225
  echo '<div class="wrap"><div class="inner"><select class="alm_element" name="post-format-select" id="post-format-select">';
1226
  echo '<option value="" selected="selected">-- ' . __('Select Post Format', 'ajax-load-more') . ' --</option>';
1227
+ echo '<option name="chk-standard" id="chk-standard" value="standard">' . __('Standard', 'ajax-load-more') . '</option>';
1228
  foreach( $post_formats[0] as $post_format ){
1229
  echo '<option name="chk-'.$post_format.'" id="chk-'.$post_format.'" value="'.$post_format.'">'.ucwords($post_format).'</option>';
1230
+ }
1231
  echo '</select></div></div>';
1232
  echo '</div>';
1233
  echo '</div>';
1235
  }
1236
  ?>
1237
  <!-- End Post Formats -->
1238
+
1239
+
1240
  <!-- Categories -->
1241
  <?php
1242
  if($disable_dynamic_content){
1244
  }else{
1245
  $cats = get_categories();
1246
  }
1247
+ if($cats){ ?>
1248
  <div class="row checkboxes categories" id="alm-categories">
1249
  <h3 class="heading"><?php _e('Category', 'ajax-load-more'); ?></h3>
1250
  <div class="expand-wrap">
1254
  &raquo; <a href="admin.php?page=ajax-load-more-examples#example-category"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1255
  </div>
1256
  <div class="wrap">
1257
+ <div class="inner">
1258
  <?php
1259
  if(!$disable_dynamic_content){
1260
  echo '<select class="alm_element multiple" name="category-select" id="category-select" multiple="multiple">';
1268
  ?>
1269
  </div>
1270
  </div>
1271
+
1272
  <div class="clear"></div>
1273
  <hr/>
1274
+
1275
+ <div class="section-title">
1276
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1277
  <p><?php _e('A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)', 'ajax-load-more'); ?></p>
1278
  </div>
1279
  <div class="wrap">
1280
+ <div class="inner">
1281
  <?php
1282
  if(!$disable_dynamic_content){
1283
  echo '<select class="alm_element multiple" name="category-exclude-select" id="category-exclude-select" multiple="multiple">';
1291
  ?>
1292
  </div>
1293
  <div class="clear"></div>
1294
+ </div>
1295
  </div>
1296
  </div>
1297
  <!-- End Category -->
1298
+
1299
  <?php }
1300
+
1301
+ // Tags
1302
  if($disable_dynamic_content){
1303
  $tags = 'null';
1304
  }else{
1329
  </div>
1330
  <div class="clear"></div>
1331
  <hr/>
1332
+
1333
+ <div class="section-title">
1334
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1335
  <p><?php _e('A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)', 'ajax-load-more'); ?></p>
1336
  </div>
1337
  <div class="wrap">
1338
+ <div class="inner">
1339
  <?php
1340
  if(!$disable_dynamic_content){
1341
  echo '<select class="alm_element multiple" name="tag-exclude-select" id="tag-exclude-select" multiple="multiple">';
1354
  </div>
1355
  <?php } ?>
1356
  <!-- End Tags -->
1357
+
1358
  <?php
1359
  // Taxonomies
1360
  $tax_args = array(
1361
  'public' => true,
1362
+ '_builtin' => false
1363
+ );
1364
  $tax_output = 'objects';
1365
+ $taxonomies = get_taxonomies( $tax_args, $tax_output );
1366
  if ( $taxonomies ) { ?>
1367
  <div class="row taxonomy" id="alm-taxonomy">
1368
  <h3 class="heading"><?php _e('Taxonomy', 'ajax-load-more'); ?></h3>
1369
+ <div class="expand-wrap">
1370
+ <div class="section-title">
1371
  <p><?php _e('Select a taxonomy then select the terms and an operator.', 'ajax-load-more'); ?></p>
1372
  </div>
1373
+ <div class="wrap">
1374
+ <?php include( ALM_PATH . 'admin/shortcode-builder/includes/tax-query-options.php'); ?>
1375
  <div class="controls">
1376
+ <button id="add-tax-query" class="button button-primary"><?php _e('Add Another', 'ajax-load-more'); ?></button>
1377
+ </div>
1378
+ </div>
1379
  </div>
1380
  </div>
1381
  <?php }?>
1382
  <!-- End Taxonomies -->
1383
+
1384
  <!-- Date -->
1385
  <div class="row input date" id="alm-date">
1386
  <h3 class="heading"><?php _e('Date', 'ajax-load-more'); ?></h3>
1407
  </div>
1408
  </div>
1409
  </div>
1410
+ <!-- End Date -->
1411
+
1412
  <!-- Meta_Query -->
1413
  <div class="row input meta-key" id="alm-meta-key">
1414
  <h3 class="heading"><?php _e('Custom Fields (Meta_Query)', 'ajax-load-more'); ?></h3>
1433
  </div>
1434
  </div>
1435
  </div>
1436
+
1437
  <div id="meta-query-extended">
1438
+
1439
+ </div>
1440
+
1441
  <div class="controls">
1442
+ <button class="button button-primary" id="add-meta-query"><?php _e('Add Another', 'ajax-load-more'); ?></button>
1443
+ </div>
1444
+
1445
+ </div>
1446
  </div>
1447
  </div>
1448
+ <!-- End Meta Query -->
1449
+
1450
  <?php // List Authors
1451
  if($disable_dynamic_content){
1452
  $authors = 'null';
1453
  }else{
1454
  $authors = get_users();
1455
+ }
1456
  if($authors){
1457
  echo '<div class="row select authors" id="alm-authors">';
1458
  echo '<h3 class="heading">' . __('Author', 'ajax-load-more') . '</h3>';
1469
  echo '</select>';
1470
  }else{
1471
  echo '<input type="text" class="alm_element numbers-only" name="author-select" id="author-select" placeholder="1">';
1472
+ }
1473
  echo '</div></div>';
1474
  echo '</div>';
1475
  echo '</div>';
1476
  }
1477
+ ?>
1478
  <!-- End Authors -->
1479
+
1480
  <!-- Search -->
1481
  <div class="row input search-term" id="alm-search">
1482
  <h3 class="heading"><?php _e('Search Term', 'ajax-load-more'); ?></h3>
1490
  </div>
1491
  </div>
1492
  </div>
1493
+ </div>
1494
  <!-- End Search -->
1495
+
1496
  <!-- Post Parameters -->
1497
  <div class="row input post-in" id="alm-post-in">
1498
  <h3 class="heading"><?php _e('Post Parameters', 'ajax-load-more'); ?></h3>
1524
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1525
  </div>
1526
  <div class="wrap">
1527
+ <div class="inner">
1528
  <select class="alm_element" name="post-status" id="post-status">
1529
  <option value="publish" selected="selected"><?php _e('Published', 'ajax-load-more'); ?></option>
1530
  <option value="any">Any</option>
1539
  </div>
1540
  </div>
1541
  </div>
1542
+ <!-- End Post Parameters -->
1543
+
1544
  <!-- Ordering -->
1545
  <div class="row ordering" id="alm-order">
1546
  <h3 class="heading"><?php _e('Ordering', 'ajax-load-more'); ?></h3>
1567
  <option value="ID">ID</option>
1568
  <option value="comment_count">Comment Count</option>
1569
  <option value="modified">Modified</option>
1570
+ <option value="meta_value_num">meta_value_num</option>
1571
  </select>
1572
  </div>
1573
  </div>
1574
  </div>
1575
+ </div>
1576
  <!-- End Ordering -->
1577
+
1578
  <!-- Offset -->
1579
  <div class="row input offset" id="alm-offset">
1580
  <h3 class="heading"><?php _e('Offset', 'ajax-load-more'); ?></h3>
1583
  <p><?php _e('Offset the initial query by <em>\'n\'</em> number of posts', 'ajax-load-more'); ?>.</p>
1584
  </div>
1585
  <div class="wrap">
1586
+ <div class="inner">
1587
  <input type="number" class="alm_element numbers-only" name="offset-select" id="offset-select" value="0" step="1" min="0">
1588
  </div>
1589
  </div>
1590
  </div>
1591
  </div>
1592
  <!-- End Offset -->
1593
+
1594
  <!-- Custom Arguments -->
1595
  <div class="row input custom-arguments" id="alm-custom-args">
1596
  <h3 class="heading"><?php _e('Custom Arguments', 'ajax-load-more'); ?></h3>
1604
  </div>
1605
  </div>
1606
  </div>
1607
+ </div>
1608
  <!-- End Custom Arguments -->
1609
+
1610
  </div>
1611
  <!-- End Query Parameters -->
1612
+
1613
+
1614
+ <div class="clear"></div>
admin/views/add-ons.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php $target = 'target="_blank"'; ?>
2
- <div class="admin ajax-load-more" id="alm-add-ons">
3
  <div class="wrap">
4
  <div class="header-wrap">
5
  <h1>
@@ -8,166 +8,166 @@
8
  </h1>
9
  </div>
10
  <div class="cnkt-main full">
11
-
12
  <!-- Cache -->
13
  <div class="group<?php if (has_action('alm_cache_installed')){echo ' installed'; } ?>">
14
  <div class="row no-brd">
15
- <?php
16
  $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
17
-
18
  <a href="<?php echo $cache_url; ?>" <?php echo $target; ?>>
19
  <div class="expand-wrap">
20
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg" alt="">
21
  <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
22
  <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', 'ajax-load-more'); ?></p>
23
- <p><?php _e('The Cache add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.', 'ajax-load-more'); ?></p>
24
  <?php
25
  if (has_action('alm_cache_installed')){
26
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
27
  }else{
28
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
29
  }
30
- ?>
31
  </div>
32
  </a>
33
- </div>
34
-
35
  </div>
36
- <!-- End Cache -->
37
-
38
-
39
  <!-- Call to Actions -->
40
  <div class="group<?php if (has_action('alm_cta_installed')){echo ' installed'; } ?>">
41
  <div class="row no-brd">
42
- <?php
43
  $cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Call to Actions'; ?>
44
-
45
  <a href="<?php echo $cta_url; ?>" <?php echo $target; ?>>
46
  <div class="expand-wrap">
47
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
48
  <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
49
  <p class="addon-intro"><?php _e('Ajax Load More extension for displaying advertisements and call to actions.', 'ajax-load-more'); ?></p>
50
- <p><?php _e('The Call to Actions add-on will provide the ability to inject a custom CTA template within each Ajax Load More loop.', 'ajax-load-more'); ?></p>
51
  <?php
52
  if (has_action('alm_cta_installed')){
53
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
54
  }else{
55
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
56
  }
57
- ?>
58
  </div>
59
  </a>
60
- </div>
61
-
62
  </div>
63
- <!-- End Call to Actions -->
64
-
65
-
66
  <!-- Comments -->
67
  <div class="group<?php if (has_action('alm_comments_installed')){echo ' installed'; } ?>">
68
  <div class="row no-brd">
69
- <?php
70
  $comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Comments'; ?>
71
-
72
  <a href="<?php echo $comments_url; ?>" <?php echo $target; ?>>
73
  <div class="expand-wrap">
74
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg" alt="">
75
  <h2 class="addon-title"><?php _e('Comments', 'ajax-load-more'); ?></h2>
76
  <p class="addon-intro"><?php _e('Load blog comments on demand with Ajax Load More.', 'ajax-load-more'); ?></p>
77
- <p><?php _e('The Comments add-on will display your blog comments with Ajax Load More\'s infinite scroll functionality.', 'ajax-load-more'); ?></p>
78
  <?php
79
  if (has_action('alm_comments_installed')){
80
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
81
  }else{
82
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
83
  }
84
- ?>
85
  </div>
86
  </a>
87
- </div>
88
-
89
  </div>
90
  <!-- End Comments -->
91
-
92
-
93
  <!-- Custom Repeaters -->
94
  <div class="group<?php if (has_action('alm_unlimited_installed')){echo ' installed'; } ?>">
95
  <div class="row no-brd">
96
  <?php $cr_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Custom%20Repeaters'; ?>
97
  <a href="<?php echo $cr_url; ?>" <?php echo $target; ?>>
98
  <div class="expand-wrap">
99
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg" alt="">
100
  <h2 class="addon-title"><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
101
  <p class="addon-intro"><?php _e('Extend Ajax Load More with unlimited repeater templates.', 'ajax-load-more'); ?></p>
102
  <p><?php _e('Create, delete and modify repeater templates as you need them with absolutely zero restrictions.', 'ajax-load-more'); ?></p>
103
  <?php
104
-
105
  if (has_action('alm_unlimited_installed')){
106
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
107
  }else{
108
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
109
  }
110
- ?>
111
- </div>
112
  </a>
113
- </div>
114
-
115
  </div>
116
- <!-- End Custom Repeaters -->
117
-
118
-
119
  <!-- Layouts -->
120
  <div class="group<?php if (has_action('alm_layouts_installed')){echo ' installed'; } ?>">
121
- <div class="row no-brd">
122
  <?php
123
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Layouts';
124
  ?>
125
  <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
126
  <div class="expand-wrap">
127
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/layouts-add-on.jpg" alt="">
128
  <h2 class="addon-title"><?php _e('Layouts', 'ajax-load-more'); ?></h2>
129
  <p class="addon-intro"><?php _e('Predefined layouts for your repeater templates.', 'ajax-load-more'); ?></p>
130
- <p><?php _e('The Layouts add-on provides a collection of unique, well designed and fully responsive templates.', 'ajax-load-more'); ?></p>
131
  <?php
132
  if (has_action('alm_layouts_installed')){
133
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
134
  }else{
135
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
136
  }
137
- ?>
138
  </div>
139
  </a>
140
- </div>
141
  </div>
142
- <!-- End Layouts -->
143
-
144
-
145
  <!-- Layouts -->
146
  <div class="group<?php if (has_action('alm_nextpage_installed')){echo ' installed'; } ?>">
147
- <div class="row no-brd">
148
  <?php
149
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Next Page';
150
  ?>
151
  <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
152
  <div class="expand-wrap">
153
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg" alt="">
154
  <h2 class="addon-title"><?php _e('Next Page', 'ajax-load-more'); ?></h2>
155
  <p class="addon-intro"><?php _e('Load and display multipage WordPress content.', 'ajax-load-more'); ?></p>
156
- <p><?php _e('The Next Page add-on will provide functionality for infinite scrolling paginated posts and pages.', 'ajax-load-more'); ?></p>
157
  <?php
158
  if (has_action('alm_nextpage_installed')){
159
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
160
  }else{
161
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
162
  }
163
- ?>
164
  </div>
165
  </a>
166
- </div>
167
  </div>
168
  <!-- End Next Page -->
169
-
170
-
171
  <!-- Paging -->
172
  <div class="group<?php if (has_action('alm_paging_installed')){echo ' installed'; } ?>">
173
  <div class="row no-brd">
@@ -176,105 +176,77 @@
176
  ?>
177
  <a href="<?php echo $paging_url; ?>" <?php echo $target; ?>>
178
  <div class="expand-wrap">
179
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg" alt="">
180
  <h2 class="addon-title"><?php _e('Paging', 'ajax-load-more'); ?></h2>
181
  <p class="addon-intro"><?php _e('Extend Ajax Load More with a numbered navigation.', 'ajax-load-more'); ?></p>
182
- <p><?php _e('The Paging add-on will transform the default infinite scroll functionality into a robust ajax powered navigation system.', 'ajax-load-more'); ?></p>
183
  <?php
184
  if (has_action('alm_paging_installed')){
185
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
186
  }else{
187
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
188
  }
189
- ?>
190
  </div>
191
  </a>
192
- </div>
193
-
194
  </div>
195
- <!-- End Paging -->
196
-
197
-
198
  <!-- Preloaded -->
199
  <div class="group<?php if (has_action('alm_preload_installed')){echo ' installed'; } ?>">
200
- <div class="row no-brd">
201
  <?php
202
  $preload_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Preloaded';
203
  ?>
204
  <a href="<?php echo $preload_url; ?>" <?php echo $target; ?>>
205
  <div class="expand-wrap">
206
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/preloaded-add-ons.jpg" alt="">
207
  <h2 class="addon-title"><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
208
  <p class="addon-intro"><?php _e('Load an initial set of posts before making Ajax requests to the server.', 'ajax-load-more'); ?></p>
209
- <p><?php _e('The Preloaded add-on will display content quicker and allow caching of the initial query which can reduce stress on your server.', 'ajax-load-more'); ?></p>
210
  <?php
211
  if (has_action('alm_preload_installed')){
212
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
213
  }else{
214
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
215
  }
216
- ?>
217
  </div>
218
  </a>
219
- </div>
220
  </div>
221
- <!-- End Preloaded -->
222
-
223
-
224
  <!-- Previous Post -->
225
  <div class="group<?php if (has_action('alm_prev_post_installed')){echo ' installed'; } ?>">
226
- <div class="row no-brd">
227
  <?php
228
  $prev_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Previous Post';
229
  ?>
230
  <a href="<?php echo $prev_url; ?>" <?php echo $target; ?>>
231
  <div class="expand-wrap">
232
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg" alt="">
233
  <h2 class="addon-title"><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
234
  <p class="addon-intro"><?php _e('An extension to enable infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
235
- <p><?php _e('The Previous Post add-on will load single posts as you scroll and update the browser URL to the current post.', 'ajax-load-more'); ?></p>
236
  <?php
237
  if (has_action('alm_prev_post_installed')){
238
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
239
  }else{
240
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
241
  }
242
- ?>
243
- </div>
244
- </a>
245
- </div>
246
- </div>
247
- <!-- End Previous Post -->
248
-
249
-
250
- <!-- REST API -->
251
- <div class="group<?php if (has_action('alm_rest_api_installed')){echo ' installed'; } ?>">
252
- <div class="row no-brd">
253
- <?php
254
- $seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=RESTAPI';
255
- ?>
256
- <a href="<?php echo $seo_url; ?>" <?php echo $target; ?>>
257
- <div class="expand-wrap">
258
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/rest-api-add-on.jpg" alt="">
259
- <h2 class="addon-title"><?php _e('REST API', 'ajax-load-more'); ?></h2>
260
- <p class="addon-intro"><?php _e('Infinite scroll with the WP REST API and Ajax Load More plugins.', 'ajax-load-more'); ?></p>
261
- <p><?php _e('The REST API add-on will enable compatibility between Ajax Load More and the WP REST API plugins.</p>', 'ajax-load-more'); ?></p>
262
- <?php
263
-
264
- if (has_action('alm_rest_api_installed')){
265
- echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
266
- }else{
267
- echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
268
- }
269
- ?>
270
  </div>
271
  </a>
272
- </div>
273
-
274
  </div>
275
- <!-- End SEO -->
276
-
277
-
278
  <!-- SEO -->
279
  <div class="group<?php if (has_action('alm_seo_installed')){echo ' installed'; } ?>">
280
  <div class="row no-brd">
@@ -283,56 +255,56 @@
283
  ?>
284
  <a href="<?php echo $seo_url; ?>" <?php echo $target; ?>>
285
  <div class="expand-wrap">
286
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg" alt="">
287
  <h2 class="addon-title"><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
288
  <p class="addon-intro"><?php _e('Generate unique paging URLs with every Ajax Load More query.', 'ajax-load-more'); ?></p>
289
- <p><?php _e('The SEO add-on will optimize your ajax loaded content for search engines by generating unique URLs with every query.</p>', 'ajax-load-more'); ?></p>
290
  <?php
291
-
292
  if (has_action('alm_seo_installed')){
293
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
294
  }else{
295
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
296
  }
297
- ?>
298
  </div>
299
  </a>
300
- </div>
301
-
302
  </div>
303
  <!-- End SEO -->
304
-
305
-
306
  <!-- Theme Repeaters -->
307
  <div class="group<?php if (has_action('alm_theme_repeaters_installed')){echo ' installed'; } ?>">
308
  <div class="row no-brd">
309
  <?php $themer_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Theme Repeaters'; ?>
310
  <a href="<?php echo $themer_url; ?>" <?php echo $target; ?>>
311
  <div class="expand-wrap">
312
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg" alt="">
313
  <h2 class="addon-title"><?php _e('Theme Repeaters', 'ajax-load-more'); ?></h2>
314
  <p class="addon-intro"><?php _e('Manage repeater templates within your current theme directory.', 'ajax-load-more'); ?></p>
315
- <p><?php _e('The Theme Repeater add-on will allow you load, edit and maintain templates from your current theme directory.</p>', 'ajax-load-more'); ?></p>
316
  <?php
317
-
318
  if (has_action('alm_theme_repeaters_installed')){
319
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
320
  }else{
321
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
322
  }
323
- ?>
324
  </div>
325
- </a>
326
- </div>
327
-
328
  </div>
329
  <!-- End Theme Repeaters -->
330
-
331
- </div>
332
-
333
  <div class="call-out light">
334
  <p><?php _e('All add-ons are installed as stand alone plugins and with a valid license key will receive plugin update notifications directly within the <a href="plugins.php">WordPress plugin dashboard</a>.', 'ajax-load-more'); ?></p>
335
- </div>
336
-
337
  </div>
338
- </div>
1
  <?php $target = 'target="_blank"'; ?>
2
+ <div class="admin ajax-load-more" id="alm-add-ons">
3
  <div class="wrap">
4
  <div class="header-wrap">
5
  <h1>
8
  </h1>
9
  </div>
10
  <div class="cnkt-main full">
11
+
12
  <!-- Cache -->
13
  <div class="group<?php if (has_action('alm_cache_installed')){echo ' installed'; } ?>">
14
  <div class="row no-brd">
15
+ <?php
16
  $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
17
+
18
  <a href="<?php echo $cache_url; ?>" <?php echo $target; ?>>
19
  <div class="expand-wrap">
20
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg" alt="">
21
  <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
22
  <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', 'ajax-load-more'); ?></p>
23
+ <p><?php _e('The Cache add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.', 'ajax-load-more'); ?></p>
24
  <?php
25
  if (has_action('alm_cache_installed')){
26
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
27
  }else{
28
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
29
  }
30
+ ?>
31
  </div>
32
  </a>
33
+ </div>
34
+
35
  </div>
36
+ <!-- End Cache -->
37
+
38
+
39
  <!-- Call to Actions -->
40
  <div class="group<?php if (has_action('alm_cta_installed')){echo ' installed'; } ?>">
41
  <div class="row no-brd">
42
+ <?php
43
  $cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Call to Actions'; ?>
44
+
45
  <a href="<?php echo $cta_url; ?>" <?php echo $target; ?>>
46
  <div class="expand-wrap">
47
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
48
  <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
49
  <p class="addon-intro"><?php _e('Ajax Load More extension for displaying advertisements and call to actions.', 'ajax-load-more'); ?></p>
50
+ <p><?php _e('The Call to Actions add-on will provide the ability to inject a custom CTA template within each Ajax Load More loop.', 'ajax-load-more'); ?></p>
51
  <?php
52
  if (has_action('alm_cta_installed')){
53
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
54
  }else{
55
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
56
  }
57
+ ?>
58
  </div>
59
  </a>
60
+ </div>
61
+
62
  </div>
63
+ <!-- End Call to Actions -->
64
+
65
+
66
  <!-- Comments -->
67
  <div class="group<?php if (has_action('alm_comments_installed')){echo ' installed'; } ?>">
68
  <div class="row no-brd">
69
+ <?php
70
  $comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Comments'; ?>
71
+
72
  <a href="<?php echo $comments_url; ?>" <?php echo $target; ?>>
73
  <div class="expand-wrap">
74
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg" alt="">
75
  <h2 class="addon-title"><?php _e('Comments', 'ajax-load-more'); ?></h2>
76
  <p class="addon-intro"><?php _e('Load blog comments on demand with Ajax Load More.', 'ajax-load-more'); ?></p>
77
+ <p><?php _e('The Comments add-on will display your blog comments with Ajax Load More\'s infinite scroll functionality.', 'ajax-load-more'); ?></p>
78
  <?php
79
  if (has_action('alm_comments_installed')){
80
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
81
  }else{
82
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
83
  }
84
+ ?>
85
  </div>
86
  </a>
87
+ </div>
88
+
89
  </div>
90
  <!-- End Comments -->
91
+
92
+
93
  <!-- Custom Repeaters -->
94
  <div class="group<?php if (has_action('alm_unlimited_installed')){echo ' installed'; } ?>">
95
  <div class="row no-brd">
96
  <?php $cr_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Custom%20Repeaters'; ?>
97
  <a href="<?php echo $cr_url; ?>" <?php echo $target; ?>>
98
  <div class="expand-wrap">
99
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg" alt="">
100
  <h2 class="addon-title"><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
101
  <p class="addon-intro"><?php _e('Extend Ajax Load More with unlimited repeater templates.', 'ajax-load-more'); ?></p>
102
  <p><?php _e('Create, delete and modify repeater templates as you need them with absolutely zero restrictions.', 'ajax-load-more'); ?></p>
103
  <?php
104
+
105
  if (has_action('alm_unlimited_installed')){
106
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
107
  }else{
108
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
109
  }
110
+ ?>
111
+ </div>
112
  </a>
113
+ </div>
114
+
115
  </div>
116
+ <!-- End Custom Repeaters -->
117
+
118
+
119
  <!-- Layouts -->
120
  <div class="group<?php if (has_action('alm_layouts_installed')){echo ' installed'; } ?>">
121
+ <div class="row no-brd">
122
  <?php
123
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Layouts';
124
  ?>
125
  <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
126
  <div class="expand-wrap">
127
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/layouts-add-on.jpg" alt="">
128
  <h2 class="addon-title"><?php _e('Layouts', 'ajax-load-more'); ?></h2>
129
  <p class="addon-intro"><?php _e('Predefined layouts for your repeater templates.', 'ajax-load-more'); ?></p>
130
+ <p><?php _e('The Layouts add-on provides a collection of unique, well designed and fully responsive templates.', 'ajax-load-more'); ?></p>
131
  <?php
132
  if (has_action('alm_layouts_installed')){
133
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
134
  }else{
135
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
136
  }
137
+ ?>
138
  </div>
139
  </a>
140
+ </div>
141
  </div>
142
+ <!-- End Layouts -->
143
+
144
+
145
  <!-- Layouts -->
146
  <div class="group<?php if (has_action('alm_nextpage_installed')){echo ' installed'; } ?>">
147
+ <div class="row no-brd">
148
  <?php
149
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Next Page';
150
  ?>
151
  <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
152
  <div class="expand-wrap">
153
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg" alt="">
154
  <h2 class="addon-title"><?php _e('Next Page', 'ajax-load-more'); ?></h2>
155
  <p class="addon-intro"><?php _e('Load and display multipage WordPress content.', 'ajax-load-more'); ?></p>
156
+ <p><?php _e('The Next Page add-on will provide functionality for infinite scrolling paginated posts and pages.', 'ajax-load-more'); ?></p>
157
  <?php
158
  if (has_action('alm_nextpage_installed')){
159
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
160
  }else{
161
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
162
  }
163
+ ?>
164
  </div>
165
  </a>
166
+ </div>
167
  </div>
168
  <!-- End Next Page -->
169
+
170
+
171
  <!-- Paging -->
172
  <div class="group<?php if (has_action('alm_paging_installed')){echo ' installed'; } ?>">
173
  <div class="row no-brd">
176
  ?>
177
  <a href="<?php echo $paging_url; ?>" <?php echo $target; ?>>
178
  <div class="expand-wrap">
179
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg" alt="">
180
  <h2 class="addon-title"><?php _e('Paging', 'ajax-load-more'); ?></h2>
181
  <p class="addon-intro"><?php _e('Extend Ajax Load More with a numbered navigation.', 'ajax-load-more'); ?></p>
182
+ <p><?php _e('The Paging add-on will transform the default infinite scroll functionality into a robust ajax powered navigation system.', 'ajax-load-more'); ?></p>
183
  <?php
184
  if (has_action('alm_paging_installed')){
185
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
186
  }else{
187
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
188
  }
189
+ ?>
190
  </div>
191
  </a>
192
+ </div>
193
+
194
  </div>
195
+ <!-- End Paging -->
196
+
197
+
198
  <!-- Preloaded -->
199
  <div class="group<?php if (has_action('alm_preload_installed')){echo ' installed'; } ?>">
200
+ <div class="row no-brd">
201
  <?php
202
  $preload_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Preloaded';
203
  ?>
204
  <a href="<?php echo $preload_url; ?>" <?php echo $target; ?>>
205
  <div class="expand-wrap">
206
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/preloaded-add-ons.jpg" alt="">
207
  <h2 class="addon-title"><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
208
  <p class="addon-intro"><?php _e('Load an initial set of posts before making Ajax requests to the server.', 'ajax-load-more'); ?></p>
209
+ <p><?php _e('The Preloaded add-on will display content quicker and allow caching of the initial query which can reduce stress on your server.', 'ajax-load-more'); ?></p>
210
  <?php
211
  if (has_action('alm_preload_installed')){
212
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
213
  }else{
214
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
215
  }
216
+ ?>
217
  </div>
218
  </a>
219
+ </div>
220
  </div>
221
+ <!-- End Preloaded -->
222
+
223
+
224
  <!-- Previous Post -->
225
  <div class="group<?php if (has_action('alm_prev_post_installed')){echo ' installed'; } ?>">
226
+ <div class="row no-brd">
227
  <?php
228
  $prev_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Previous Post';
229
  ?>
230
  <a href="<?php echo $prev_url; ?>" <?php echo $target; ?>>
231
  <div class="expand-wrap">
232
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg" alt="">
233
  <h2 class="addon-title"><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
234
  <p class="addon-intro"><?php _e('An extension to enable infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
235
+ <p><?php _e('The Previous Post add-on will load single posts as you scroll and update the browser URL to the current post.', 'ajax-load-more'); ?></p>
236
  <?php
237
  if (has_action('alm_prev_post_installed')){
238
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
239
  }else{
240
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
241
  }
242
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  </div>
244
  </a>
245
+ </div>
 
246
  </div>
247
+ <!-- End Previous Post -->
248
+
249
+
250
  <!-- SEO -->
251
  <div class="group<?php if (has_action('alm_seo_installed')){echo ' installed'; } ?>">
252
  <div class="row no-brd">
255
  ?>
256
  <a href="<?php echo $seo_url; ?>" <?php echo $target; ?>>
257
  <div class="expand-wrap">
258
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg" alt="">
259
  <h2 class="addon-title"><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
260
  <p class="addon-intro"><?php _e('Generate unique paging URLs with every Ajax Load More query.', 'ajax-load-more'); ?></p>
261
+ <p><?php _e('The SEO add-on will optimize your ajax loaded content for search engines by generating unique URLs with every query.</p>', 'ajax-load-more'); ?></p>
262
  <?php
263
+
264
  if (has_action('alm_seo_installed')){
265
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
266
  }else{
267
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
268
  }
269
+ ?>
270
  </div>
271
  </a>
272
+ </div>
273
+
274
  </div>
275
  <!-- End SEO -->
276
+
277
+
278
  <!-- Theme Repeaters -->
279
  <div class="group<?php if (has_action('alm_theme_repeaters_installed')){echo ' installed'; } ?>">
280
  <div class="row no-brd">
281
  <?php $themer_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Theme Repeaters'; ?>
282
  <a href="<?php echo $themer_url; ?>" <?php echo $target; ?>>
283
  <div class="expand-wrap">
284
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg" alt="">
285
  <h2 class="addon-title"><?php _e('Theme Repeaters', 'ajax-load-more'); ?></h2>
286
  <p class="addon-intro"><?php _e('Manage repeater templates within your current theme directory.', 'ajax-load-more'); ?></p>
287
+ <p><?php _e('The Theme Repeater add-on will allow you load, edit and maintain templates from your current theme directory.</p>', 'ajax-load-more'); ?></p>
288
  <?php
289
+
290
  if (has_action('alm_theme_repeaters_installed')){
291
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
292
  }else{
293
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
294
  }
295
+ ?>
296
  </div>
297
+ </a>
298
+ </div>
299
+
300
  </div>
301
  <!-- End Theme Repeaters -->
302
+
303
+ </div>
304
+
305
  <div class="call-out light">
306
  <p><?php _e('All add-ons are installed as stand alone plugins and with a valid license key will receive plugin update notifications directly within the <a href="plugins.php">WordPress plugin dashboard</a>.', 'ajax-load-more'); ?></p>
307
+ </div>
308
+
309
  </div>
310
+ </div>
admin/views/examples.php CHANGED
@@ -1,15 +1,15 @@
1
- <div class="admin ajax-load-more" id="alm-examples">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
5
  <?php echo ALM_TITLE; ?>: <strong><?php _e('Examples', 'ajax-load-more'); ?></strong>
6
  <em><?php _e('A collection of everyday shortcode usages and implementation examples', 'ajax-load-more'); ?></em>
7
- </h1>
8
  </div>
9
  <div class="cnkt-main forceColors">
10
- <div class="group">
11
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em><em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em></span></span>
12
-
13
  <div class="row gist" id="example-archive">
14
  <h3 class="heading"><?php _e('Archive.php', 'ajax-load-more'); ?></h3>
15
  <div class="expand-wrap">
@@ -19,7 +19,7 @@
19
  </div>
20
  </div>
21
  </div>
22
-
23
  <div class="row gist" id="example-author">
24
  <h3 class="heading"><?php _e('Author.php', 'ajax-load-more'); ?></h3>
25
  <div class="expand-wrap">
@@ -54,7 +54,7 @@
54
  <script src="https://gist.github.com/dcooney/9b037efbd166b4dba5ae.js"></script>
55
  </div>
56
  </div>
57
-
58
  <div class="row gist" id="example-tag">
59
  <h3 class="heading"><?php _e('Tag.php', 'ajax-load-more'); ?></h3>
60
  <div class="expand-wrap">
@@ -65,20 +65,21 @@
65
  </div>
66
  </div>
67
  </div>
68
-
69
  <p class="back2top"><a href="#wpcontent" class="group"><i class="fa fa-angle-up"></i> Back to Top</a></p>
70
-
71
- </div>
72
  <div class="cnkt-sidebar">
73
  <div class="cta padding-bottom">
74
- <h3>Example Library</h3>
75
- <p style="padding-bottom: 10px;">We have a collection of over 20 real-world Ajax Load More <a href="https://connekthq.com/plugins/ajax-load-more/examples/" target="_blank">examples</a> available on the plugin website.</p>
76
-
77
- <a href="https://connekthq.com/plugins/ajax-load-more/examples/" class="visit" target="_blank"><i class="fa fa-chevron-circle-right"></i> <?php _e('View All Examples', 'ajax-load-more'); ?></a>
78
- </div>
79
- <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
 
80
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
81
- </div>
82
-
83
  </div>
84
- </div>
1
+ <div class="admin ajax-load-more" id="alm-examples">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
5
  <?php echo ALM_TITLE; ?>: <strong><?php _e('Examples', 'ajax-load-more'); ?></strong>
6
  <em><?php _e('A collection of everyday shortcode usages and implementation examples', 'ajax-load-more'); ?></em>
7
+ </h1>
8
  </div>
9
  <div class="cnkt-main forceColors">
10
+ <div class="group">
11
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em><em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em></span></span>
12
+
13
  <div class="row gist" id="example-archive">
14
  <h3 class="heading"><?php _e('Archive.php', 'ajax-load-more'); ?></h3>
15
  <div class="expand-wrap">
19
  </div>
20
  </div>
21
  </div>
22
+
23
  <div class="row gist" id="example-author">
24
  <h3 class="heading"><?php _e('Author.php', 'ajax-load-more'); ?></h3>
25
  <div class="expand-wrap">
54
  <script src="https://gist.github.com/dcooney/9b037efbd166b4dba5ae.js"></script>
55
  </div>
56
  </div>
57
+
58
  <div class="row gist" id="example-tag">
59
  <h3 class="heading"><?php _e('Tag.php', 'ajax-load-more'); ?></h3>
60
  <div class="expand-wrap">
65
  </div>
66
  </div>
67
  </div>
68
+
69
  <p class="back2top"><a href="#wpcontent" class="group"><i class="fa fa-angle-up"></i> Back to Top</a></p>
70
+
71
+ </div>
72
  <div class="cnkt-sidebar">
73
  <div class="cta padding-bottom">
74
+ <h3>Example Library</h3>
75
+ <div class="cta-inner">
76
+ <p style="padding-bottom: 10px;">We have a collection of over 20 real-world Ajax Load More <a href="https://connekthq.com/plugins/ajax-load-more/examples/" target="_blank">examples</a> available on the plugin website.</p>
77
+ </div>
78
+ <a href="https://connekthq.com/plugins/ajax-load-more/examples/" class="visit" target="_blank"><i class="fa fa-chevron-circle-right"></i> <?php _e('View All Examples', 'ajax-load-more'); ?></a>
79
+ </div>
80
+ <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
81
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
82
+ </div>
83
+
84
  </div>
85
+ </div>
admin/views/help.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="admin ajax-load-more" id="alm-help">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
@@ -7,16 +7,16 @@
7
  </h1>
8
  </div>
9
  <div class="cnkt-main forceColors">
10
- <div class="group">
11
-
12
  <img src="<?php echo ALM_ADMIN_URL; ?>img/infographic.png">
13
-
14
- </div>
15
- </div>
16
- <div class="cnkt-sidebar">
17
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
18
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
19
- </div>
20
-
21
  </div>
22
- </div>
1
+ <div class="admin ajax-load-more" id="alm-help">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
7
  </h1>
8
  </div>
9
  <div class="cnkt-main forceColors">
10
+ <div class="group">
11
+
12
  <img src="<?php echo ALM_ADMIN_URL; ?>img/infographic.png">
13
+
14
+ </div>
15
+ </div>
16
+ <div class="cnkt-sidebar">
17
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
18
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
19
+ </div>
20
+
21
  </div>
22
+ </div>
admin/views/licenses.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="admin ajax-load-more" id="alm-licenses">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
@@ -9,10 +9,10 @@
9
  <div class="cnkt-main">
10
  <div class="group">
11
  <h3><?php _e('License Keys', 'ajax-load-more'); ?></h3>
12
-
13
  <p><?php _e('Manage your Ajax Load More license key\'s below - enter a key for each of your add-ons to receive plugin update notifications directly within the <a href="plugins.php">WP Plugins dashboard</a>.', 'ajax-load-more'); ?></p>
14
-
15
- <?php
16
  // alm_cache_installed
17
  // alm_cta_installed
18
  // alm_comments_installed
@@ -22,42 +22,41 @@
22
  // alm_preload_installed
23
  // alm_paging_installed
24
  // alm_prev_post_installed
25
- // alm_rest_api_installed
26
- // alm_seo_installed
27
  // alm_theme_repeaters_installed
28
  ?>
29
-
30
- <?php
31
  // Check if any add ons are installed. /admin/admin-functions.php
32
- if(alm_has_addon()) : ?>
33
-
34
-
35
- <?php
36
  if (has_action('alm_cache_installed')){
37
- // CACHE
38
  $alm_cache_license = get_option( 'alm_cache_license_key' );
39
  $alm_cache_status = get_option( 'alm_cache_license_status' );
40
  $alm_cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/';
41
  ?>
42
  <div class="license" id="license-cache">
43
- <div class="license-title">
44
- <div class="status <?php if($alm_cache_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
45
- <h2><?php _e('Cache', 'ajax-load-more'); ?></h2>
46
- </div>
47
  <div class="license-wrap">
48
- <form method="post" action="options.php">
49
-
50
  <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
51
  <!-- nothing -->
52
  <?php } else { ?>
53
  <div class="no-license">
54
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
55
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_cache_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Cache" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
56
- </div>
57
  <?php } ?>
58
-
59
- <?php settings_fields('alm_cache_license'); ?>
60
-
61
  <label class="description offscreen" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
62
  <div class="license-key-field">
63
  <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -71,58 +70,58 @@
71
  </span>
72
  <?php } ?>
73
  </div>
74
-
75
  <?php wp_nonce_field( 'alm_cache_license_nonce', 'alm_cache_license_nonce' ); ?>
76
- <div class="license-btn-wrap"
77
- data-name="<?php echo ALM_CACHE_ITEM_NAME; ?>"
78
- data-url="<?php echo ALM_STORE_URL; ?>"
79
- data-option-status="alm_cache_license_status"
80
  data-option-key="alm_cache_license_key"
81
  data-upgrade-url="<?php echo $alm_cache_url; ?>">
82
  <button type="button" class="activate license-btn <?php if($alm_cache_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
83
  <?php _e('Activate License', 'ajax-load-more'); ?>
84
  </button>
85
-
86
  <button type="button" class="deactivate license-btn <?php if($alm_cache_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
87
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
88
- </button>
89
  </div>
90
-
91
  </form>
92
- </div>
93
  <div class="loading"></div>
94
- </div>
95
- <?php
96
  }
97
- // End CACHE
98
- ?>
99
-
100
- <?php
101
  if (has_action('alm_cta_installed')){
102
- // Call to Actions
103
  $alm_cta_license = get_option( 'alm_cta_license_key' );
104
  $alm_cta_status = get_option( 'alm_cta_license_status' );
105
  $alm_cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/';
106
  ?>
107
  <div class="license" id="license-cta">
108
- <div class="license-title">
109
- <div class="status <?php if($alm_cta_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
110
- <h2><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
111
- </div>
112
  <div class="license-wrap">
113
- <form method="post" action="options.php">
114
-
115
  <?php if( $alm_cta_status !== false && $alm_cta_status == 'valid' ) { ?>
116
  <!-- nothing -->
117
  <?php } else { ?>
118
  <div class="no-license">
119
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
120
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_cta_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=CTA" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
121
- </div>
122
- <?php } ?>
123
-
124
- <?php settings_fields('alm_cta_license'); ?>
125
-
126
  <label class="description offscreen" for="alm_cta_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
127
  <div class="license-key-field">
128
  <input id="alm_cta_license_key" name="alm_cta_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cta_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -136,58 +135,58 @@
136
  </span>
137
  <?php } ?>
138
  </div>
139
-
140
  <?php wp_nonce_field( 'alm_cta_license_nonce', 'alm_cta_license_nonce' ); ?>
141
- <div class="license-btn-wrap"
142
- data-name="<?php echo ALM_CTA_ITEM_NAME; ?>"
143
- data-url="<?php echo ALM_STORE_URL; ?>"
144
- data-option-status="alm_cta_license_status"
145
  data-option-key="alm_cta_license_key"
146
  data-upgrade-url="<?php echo $alm_cta_url; ?>">
147
  <button type="button" class="activate license-btn <?php if($alm_cta_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
148
  <?php _e('Activate License', 'ajax-load-more'); ?>
149
  </button>
150
-
151
  <button type="button" class="deactivate license-btn <?php if($alm_cta_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
152
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
153
- </button>
154
  </div>
155
-
156
  </form>
157
- </div>
158
  <div class="loading"></div>
159
- </div>
160
- <?php
161
  }
162
- // End Call to Actions
163
- ?>
164
-
165
- <?php
166
  if (has_action('alm_comments_installed')){
167
- // Comments
168
  $alm_comments_license = get_option( 'alm_comments_license_key' );
169
  $alm_comments_status = get_option( 'alm_comments_license_status' );
170
  $alm_comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/';
171
  ?>
172
  <div class="license" id="license-comments">
173
- <div class="license-title">
174
- <div class="status <?php if($alm_comments_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
175
- <h2><?php _e('Comments', 'ajax-load-more'); ?></h2>
176
- </div>
177
  <div class="license-wrap">
178
- <form method="post" action="options.php">
179
-
180
  <?php if( $alm_comments_status !== false && $alm_comments_status == 'valid' ) { ?>
181
  <!-- nothing -->
182
  <?php } else { ?>
183
  <div class="no-license">
184
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
185
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_comments_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Comments" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
186
- </div>
187
- <?php } ?>
188
-
189
- <?php settings_fields('alm_comments_license'); ?>
190
-
191
  <label class="description offscreen" for="alm_comments_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
192
  <div class="license-key-field">
193
  <input id="alm_comments_license_key" name="alm_comments_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_comments_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -201,59 +200,59 @@
201
  </span>
202
  <?php } ?>
203
  </div>
204
-
205
  <?php wp_nonce_field( 'alm_comments_license_nonce', 'alm_comments_license_nonce' ); ?>
206
- <div class="license-btn-wrap"
207
- data-name="<?php echo ALM_COMMENTS_ITEM_NAME; ?>"
208
- data-url="<?php echo ALM_STORE_URL; ?>"
209
- data-option-status="alm_comments_license_status"
210
  data-option-key="alm_comments_license_key"
211
  data-upgrade-url="<?php echo $alm_comments_url; ?>">
212
  <button type="button" class="activate license-btn <?php if($alm_comments_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
213
  <?php _e('Activate License', 'ajax-load-more'); ?>
214
  </button>
215
-
216
  <button type="button" class="deactivate license-btn <?php if($alm_comments_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
217
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
218
- </button>
219
  </div>
220
-
221
  </form>
222
- </div>
223
  <div class="loading"></div>
224
- </div>
225
- <?php
226
  }
227
- // End Comments
228
- ?>
229
-
230
-
231
- <?php
232
  if (has_action('alm_unlimited_installed')){
233
- // Custom Repeaters
234
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
235
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
236
  $alm_unlimited_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/';
237
  ?>
238
  <div class="license" id="license-repeaters">
239
- <div class="license-title">
240
- <div class="status <?php if($alm_unlimited_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
241
- <h2><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
242
- </div>
243
  <div class="license-wrap">
244
- <form method="post" action="options.php">
245
-
246
  <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
247
  <!-- nothing -->
248
  <?php } else { ?>
249
  <div class="no-license">
250
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
251
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_unlimited_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Custom Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
252
- </div>
253
  <?php } ?>
254
-
255
- <?php settings_fields('alm_unlimited_license'); ?>
256
-
257
  <label class="description offscreen" for="alm_unlimited_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
258
  <div class="license-key-field">
259
  <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -267,60 +266,60 @@
267
  </span>
268
  <?php } ?>
269
  </div>
270
-
271
  <?php wp_nonce_field( 'alm_unlimited_license_nonce', 'alm_unlimited_license_nonce' ); ?>
272
- <div class="license-btn-wrap"
273
- data-name="<?php echo ALM_UNLIMITED_ITEM_NAME; ?>"
274
- data-url="<?php echo ALM_STORE_URL; ?>"
275
- data-option-status="alm_unlimited_license_status"
276
  data-option-key="alm_unlimited_license_key"
277
  data-upgrade-url="<?php echo $alm_unlimited_url; ?>">
278
  <button type="button" class="activate license-btn <?php if($alm_unlimited_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
279
  <?php _e('Activate License', 'ajax-load-more'); ?>
280
  </button>
281
-
282
  <button type="button" class="deactivate license-btn <?php if($alm_unlimited_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
283
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
284
- </button>
285
  </div>
286
-
287
  </form>
288
- </div>
289
  <div class="loading"></div>
290
- </div>
291
- <?php
292
  }
293
- // End Custom Repeaters v2
294
  ?>
295
-
296
-
297
-
298
- <?php
299
  if (has_action('alm_layouts_installed')){
300
- // LAYOUTS
301
  $alm_layouts_license = get_option( 'alm_layouts_license_key' );
302
  $alm_layouts_status = get_option( 'alm_layouts_license_status' );
303
  $alm_layouts_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/';
304
  ?>
305
  <div class="license" id="license-layouts">
306
- <div class="license-title">
307
- <div class="status <?php if($alm_layouts_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
308
- <h2><?php _e('Layouts', 'ajax-load-more'); ?></h2>
309
- </div>
310
  <div class="license-wrap">
311
- <form method="post" action="options.php">
312
-
313
  <?php if( $alm_layouts_status !== false && $alm_layouts_status == 'valid' ) { ?>
314
  <!-- nothing -->
315
  <?php } else { ?>
316
  <div class="no-license">
317
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
318
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_layouts_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Layouts" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
319
- </div>
320
  <?php } ?>
321
-
322
- <?php settings_fields('alm_layouts_license'); ?>
323
-
324
  <label class="description offscreen" for="alm_layouts_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
325
  <div class="license-key-field">
326
  <input id="alm_layouts_license_key" name="alm_layouts_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_layouts_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -334,59 +333,59 @@
334
  </span>
335
  <?php } ?>
336
  </div>
337
-
338
  <?php wp_nonce_field( 'alm_layouts_license_nonce', 'alm_layouts_license_nonce' ); ?>
339
- <div class="license-btn-wrap"
340
- data-name="<?php echo ALM_LAYOUTS_ITEM_NAME; ?>"
341
- data-url="<?php echo ALM_STORE_URL; ?>"
342
- data-option-status="alm_layouts_license_status"
343
  data-option-key="alm_layouts_license_key"
344
  data-upgrade-url="<?php echo $alm_layouts_url; ?>">
345
  <button type="button" class="activate license-btn <?php if($alm_layouts_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
346
  <?php _e('Activate License', 'ajax-load-more'); ?>
347
  </button>
348
-
349
  <button type="button" class="deactivate license-btn <?php if($alm_layouts_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
350
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
351
- </button>
352
  </div>
353
-
354
  </form>
355
- </div>
356
  <div class="loading"></div>
357
- </div>
358
- <?php
359
  }
360
- // End LAYOUTS
361
- ?>
362
-
363
-
364
- <?php
365
  if (has_action('alm_nextpage_installed')){
366
- // NEXT PAGE
367
  $alm_nextpage_license = get_option( 'alm_nextpage_license_key' );
368
  $alm_nextpage_status = get_option( 'alm_nextpage_license_status' );
369
  $alm_nextpage_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/';
370
  ?>
371
  <div class="license" id="license-nextpage">
372
- <div class="license-title">
373
- <div class="status <?php if($alm_nextpage_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
374
- <h2><?php _e('Next Page', 'ajax-load-more'); ?></h2>
375
- </div>
376
  <div class="license-wrap">
377
- <form method="post" action="options.php">
378
-
379
  <?php if( $alm_nextpage_status !== false && $alm_nextpage_status == 'valid' ) { ?>
380
  <!-- nothing -->
381
  <?php } else { ?>
382
  <div class="no-license">
383
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
384
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_nextpage_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=nextpage" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
385
- </div>
386
  <?php } ?>
387
-
388
- <?php settings_fields('alm_nextpage_license'); ?>
389
-
390
  <label class="description offscreen" for="alm_nextpage_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
391
  <div class="license-key-field">
392
  <input id="alm_nextpage_license_key" name="alm_nextpage_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_nextpage_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -400,60 +399,60 @@
400
  </span>
401
  <?php } ?>
402
  </div>
403
-
404
  <?php wp_nonce_field( 'alm_nextpage_license_nonce', 'alm_nextpage_license_nonce' ); ?>
405
- <div class="license-btn-wrap"
406
- data-name="<?php echo ALM_NEXTPAGE_ITEM_NAME; ?>"
407
- data-url="<?php echo ALM_STORE_URL; ?>"
408
- data-option-status="alm_nextpage_license_status"
409
  data-option-key="alm_nextpage_license_key"
410
  data-upgrade-url="<?php echo $alm_nextpage_url; ?>">
411
  <button type="button" class="activate license-btn <?php if($alm_nextpage_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
412
  <?php _e('Activate License', 'ajax-load-more'); ?>
413
  </button>
414
-
415
  <button type="button" class="deactivate license-btn <?php if($alm_nextpage_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
416
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
417
- </button>
418
  </div>
419
-
420
  </form>
421
- </div>
422
  <div class="loading"></div>
423
- </div>
424
- <?php
425
  }
426
- // End NEXT PAGE
427
  ?>
428
-
429
-
430
-
431
- <?php
432
  if (has_action('alm_paging_installed')){
433
- // PAGING
434
  $alm_paging_license = get_option( 'alm_paging_license_key' );
435
  $alm_paging_status = get_option( 'alm_paging_license_status' );
436
  $alm_paging_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/paging/';
437
  ?>
438
  <div class="license" id="license-paging">
439
- <div class="license-title">
440
- <div class="status <?php if($alm_paging_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
441
- <h2><?php _e('Paging', 'ajax-load-more'); ?></h2>
442
- </div>
443
  <div class="license-wrap">
444
- <form method="post" action="options.php">
445
-
446
  <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
447
  <!-- nothing -->
448
  <?php } else { ?>
449
  <div class="no-license">
450
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
451
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_paging_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Paging" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
452
- </div>
453
- <?php } ?>
454
-
455
- <?php settings_fields('alm_paging_license'); ?>
456
-
457
  <label class="description offscreen" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
458
  <div class="license-key-field">
459
  <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -467,58 +466,58 @@
467
  </span>
468
  <?php } ?>
469
  </div>
470
-
471
  <?php wp_nonce_field( 'alm_paging_license_nonce', 'alm_paging_license_nonce' ); ?>
472
- <div class="license-btn-wrap"
473
- data-name="<?php echo ALM_PAGING_ITEM_NAME; ?>"
474
- data-url="<?php echo ALM_STORE_URL; ?>"
475
- data-option-status="alm_paging_license_status"
476
  data-option-key="alm_paging_license_key"
477
  data-upgrade-url="<?php echo $alm_paging_url; ?>">
478
  <button type="button" class="activate license-btn <?php if($alm_paging_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
479
  <?php _e('Activate License', 'ajax-load-more'); ?>
480
  </button>
481
-
482
  <button type="button" class="deactivate license-btn <?php if($alm_paging_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
483
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
484
- </button>
485
  </div>
486
-
487
  </form>
488
- </div>
489
  <div class="loading"></div>
490
- </div>
491
- <?php
492
  }
493
- // End PAGING
494
- ?>
495
-
496
- <?php
497
  if (has_action('alm_preload_installed')){
498
- // PRELOADED
499
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
500
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
501
  $alm_preloaded_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/';
502
  ?>
503
  <div class="license" id="license-preloaded">
504
- <div class="license-title">
505
- <div class="status <?php if($alm_preloaded_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
506
- <h2><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
507
- </div>
508
  <div class="license-wrap">
509
- <form method="post" action="options.php">
510
-
511
  <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
512
  <!-- nothing -->
513
  <?php } else { ?>
514
  <div class="no-license">
515
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
516
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_preloaded_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Preloaded" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
517
- </div>
518
  <?php } ?>
519
-
520
- <?php settings_fields('alm_preloaded_license'); ?>
521
-
522
  <label class="description offscreen" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
523
  <div class="license-key-field">
524
  <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -533,56 +532,56 @@
533
  <?php } ?>
534
  </div>
535
  <?php wp_nonce_field( 'alm_preloaded_license_nonce', 'alm_preloaded_license_nonce' ); ?>
536
- <div class="license-btn-wrap"
537
- data-name="<?php echo ALM_PRELOADED_ITEM_NAME; ?>"
538
- data-url="<?php echo ALM_STORE_URL; ?>"
539
- data-option-status="alm_preloaded_license_status"
540
  data-option-key="alm_preloaded_license_key"
541
  data-upgrade-url="<?php echo $alm_preloaded_url; ?>">
542
  <button type="button" class="activate license-btn <?php if($alm_preloaded_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
543
  <?php _e('Activate License', 'ajax-load-more'); ?>
544
  </button>
545
-
546
  <button type="button" class="deactivate license-btn <?php if($alm_preloaded_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
547
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
548
- </button>
549
  </div>
550
-
551
  </form>
552
- </div>
553
  <div class="loading"></div>
554
- </div>
555
- <?php
556
  }
557
- // End PRELOADED
558
- ?>
559
-
560
- <?php
561
  if (has_action('alm_prev_post_installed')){
562
- // PREVIOUS POST
563
  $alm_prev_post_license = get_option( 'alm_prev_post_license_key' );
564
  $alm_prev_post_status = get_option( 'alm_prev_post_license_status' );
565
  $alm_prev_post_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/';
566
  ?>
567
  <div class="license" id="license-previous-post">
568
- <div class="license-title">
569
- <div class="status <?php if($alm_prev_post_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
570
- <h2><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
571
- </div>
572
  <div class="license-wrap">
573
- <form method="post" action="options.php">
574
-
575
  <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
576
  <!-- nothing -->
577
  <?php } else { ?>
578
  <div class="no-license">
579
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
580
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_prev_post_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Previous Post" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
581
- </div>
582
  <?php } ?>
583
-
584
- <?php settings_fields('alm_prev_post_license'); ?>
585
-
586
  <label class="description offscreen" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
587
  <div class="license-key-field">
588
  <input id="alm_prev_post_license_key" name="alm_prev_post_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_prev_post_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -596,125 +595,59 @@
596
  </span>
597
  <?php } ?>
598
  </div>
599
-
600
  <?php wp_nonce_field( 'alm_prev_post_license_nonce', 'alm_prev_post_license_nonce' ); ?>
601
- <div class="license-btn-wrap"
602
- data-name="<?php echo ALM_PREV_POST_ITEM_NAME; ?>"
603
- data-url="<?php echo ALM_STORE_URL; ?>"
604
- data-option-status="alm_prev_post_license_status"
605
  data-option-key="alm_prev_post_license_key"
606
  data-upgrade-url="<?php echo $alm_prev_post_url; ?>">
607
  <button type="button" class="activate license-btn <?php if($alm_prev_post_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
608
  <?php _e('Activate License', 'ajax-load-more'); ?>
609
  </button>
610
-
611
  <button type="button" class="deactivate license-btn <?php if($alm_prev_post_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
612
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
613
- </button>
614
- </div>
615
-
616
- </form>
617
- </div>
618
- <div class="loading"></div>
619
- </div>
620
- <?php
621
- }
622
- // End PREVIOUS POST
623
- ?>
624
-
625
-
626
- <?php
627
- if (has_action('alm_rest_api_installed')){
628
- // REST API
629
- $alm_restapi_license = get_option( 'alm_rest_api_license_key' );
630
- $alm_restapi_status = get_option( 'alm_rest_api_license_status' );
631
- $alm_restapi_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/';
632
- ?>
633
- <div class="license" id="license-rest">
634
- <div class="license-title">
635
- <div class="status <?php if($alm_restapi_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
636
- <h2><?php _e('REST API', 'ajax-load-more'); ?></h2>
637
- </div>
638
- <div class="license-wrap">
639
- <form method="post" action="options.php">
640
-
641
- <?php if( $alm_restapi_status !== false && $alm_restapi_status == 'valid' ) { ?>
642
- <!-- nothing -->
643
- <?php } else { ?>
644
- <div class="no-license">
645
- <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
646
- <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_restapi_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=RESTAPI" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
647
- </div>
648
- <?php } ?>
649
-
650
- <?php settings_fields('alm_rest_api_license'); ?>
651
-
652
- <label class="description offscreen" for="alm_rest_api_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
653
- <div class="license-key-field">
654
- <input id="alm_rest_api_license_key" name="alm_rest_api_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_restapi_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
655
- <?php if( $alm_restapi_status !== false && $alm_restapi_status == 'valid' ) { ?>
656
- <span class="status active">
657
- <?php _e('Active', 'ajax-load-more'); ?>
658
- </span>
659
- <?php } else { ?>
660
- <span class="status inactive">
661
- <?php _e('Inactive', 'ajax-load-more'); ?>
662
- </span>
663
- <?php } ?>
664
- </div>
665
-
666
- <?php wp_nonce_field( 'alm_rest_api_license_nonce', 'alm_rest_api_license_nonce' ); ?>
667
- <div class="license-btn-wrap"
668
- data-name="<?php echo ALM_RESTAPI_ITEM_NAME; ?>"
669
- data-url="<?php echo ALM_STORE_URL; ?>"
670
- data-option-status="alm_rest_api_license_status"
671
- data-option-key="alm_rest_api_license_key"
672
- data-upgrade-url="<?php echo $alm_restapi_url; ?>">
673
- <button type="button" class="activate license-btn <?php if($alm_restapi_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
674
- <?php _e('Activate License', 'ajax-load-more'); ?>
675
  </button>
676
-
677
- <button type="button" class="deactivate license-btn <?php if($alm_restapi_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
678
- <?php _e('Deactivate License', 'ajax-load-more'); ?>
679
- </button>
680
- </div>
681
-
682
  </form>
683
- </div>
684
-
685
- <div class="loading"></div>
686
- </div>
687
- <?php
688
  }
689
- // End REST API
690
  ?>
691
-
692
- <?php
 
693
  if (has_action('alm_seo_installed')){
694
- // SEO
695
  $alm_seo_license = get_option( 'alm_seo_license_key' );
696
  $alm_seo_status = get_option( 'alm_seo_license_status' );
697
  $alm_seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/';
698
  ?>
699
  <div class="license" id="license-seo">
700
- <div class="license-title">
701
- <div class="status <?php if($alm_seo_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
702
- <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
703
- </div>
704
  <div class="license-wrap">
705
- <form method="post" action="options.php">
706
-
707
  <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
708
  <!-- nothing -->
709
  <?php } else { ?>
710
  <div class="no-license">
711
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
712
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_seo_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=SEO" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
713
- </div>
714
  <?php } ?>
715
-
716
- <?php settings_fields('alm_seo_license'); ?>
717
-
718
  <label class="description offscreen" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
719
  <div class="license-key-field">
720
  <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -728,61 +661,61 @@
728
  </span>
729
  <?php } ?>
730
  </div>
731
-
732
  <?php wp_nonce_field( 'alm_seo_license_nonce', 'alm_seo_license_nonce' ); ?>
733
- <div class="license-btn-wrap"
734
- data-name="<?php echo ALM_SEO_ITEM_NAME; ?>"
735
- data-url="<?php echo ALM_STORE_URL; ?>"
736
- data-option-status="alm_seo_license_status"
737
  data-option-key="alm_seo_license_key"
738
  data-upgrade-url="<?php echo $alm_seo_url; ?>">
739
  <button type="button" class="activate license-btn <?php if($alm_seo_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
740
  <?php _e('Activate License', 'ajax-load-more'); ?>
741
  </button>
742
-
743
  <button type="button" class="deactivate license-btn <?php if($alm_seo_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
744
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
745
- </button>
746
- </div>
747
-
748
  </form>
749
- </div>
750
-
751
  <div class="loading"></div>
752
- </div>
753
- <?php
754
  }
755
- // End SEO
756
  ?>
757
-
758
-
759
- <?php
760
  if (has_action('alm_theme_repeaters_installed')){
761
- // Theme Templates
762
-
763
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
764
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
765
  $alm_theme_repeaters_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/';
766
  ?>
767
  <div class="license" id="license-theme_repeaters">
768
- <div class="license-title">
769
- <div class="status <?php if($alm_theme_repeaters_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
770
- <h2><?php _e('Theme Repeaters', 'ajax-load-more'); ?> </h2>
771
- </div>
772
  <div class="license-wrap">
773
- <form method="post" action="options.php">
774
-
775
  <?php if( $alm_theme_repeaters_status !== false && $alm_theme_repeaters_status == 'valid' ) { ?>
776
  <!-- nothing -->
777
  <?php } else { ?>
778
  <div class="no-license">
779
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
780
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_theme_repeaters_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Theme Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
781
- </div>
782
  <?php } ?>
783
-
784
  <?php settings_fields('alm_theme_repeaters_license'); ?>
785
-
786
  <label class="description offscreen" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
787
  <div class="license-key-field">
788
  <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_theme_repeaters_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -797,50 +730,50 @@
797
  <?php } ?>
798
  </div>
799
  <?php wp_nonce_field( 'alm_theme_repeaters_license_nonce', 'alm_theme_repeaters_license_nonce' ); ?>
800
-
801
- <div class="license-btn-wrap"
802
- data-name="<?php echo ALM_THEME_REPEATERS_ITEM_NAME; ?>"
803
  data-url="<?php echo ALM_STORE_URL; ?>"
804
  data-upgrade-url="<?php echo $alm_theme_repeaters_url; ?>"
805
- data-option-status="alm_theme_repeaters_license_status"
806
  data-option-key="alm_theme_repeaters_license_key"
807
  >
808
  <button type="button" class="activate license-btn <?php if($alm_theme_repeaters_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
809
  <?php _e('Activate License', 'ajax-load-more'); ?>
810
  </button>
811
-
812
  <button type="button" class="deactivate license-btn <?php if($alm_theme_repeaters_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
813
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
814
  </button>
815
  </div>
816
-
817
  </form>
818
-
819
- </div>
820
  <div class="loading"></div>
821
- </div>
822
- <?php
823
  }
824
- // End Theme Repeaters
825
  ?>
826
-
827
-
828
  <?php else : ?>
829
-
830
  <div class="license-no-addons">
831
  <p><?php _e('You do not have any Ajax Load More add-ons installed', 'ajax-load-more'); ?>. &raquo; <a href="admin.php?page=ajax-load-more-add-ons"><strong><?php _e('Browse Add-ons', 'ajax-load-more'); ?></strong></a></p>
832
  </div>
833
-
834
- <?php endif; ?>
835
-
836
-
837
  </div>
838
  </div>
839
-
840
  <div class="cnkt-sidebar">
841
  <div class="cta padding-bottom">
842
  <h3><?php _e('About Licenses', 'ajax-load-more'); ?></h3>
843
- <div class="cta-wrap">
844
  <ul>
845
  <li><?php _e('Add-on licenses will enable updates directly in your WP dashboard.', 'ajax-load-more');?></li>
846
  <li><?php _e('License keys are found in the purchase receipt email that was sent immediately after your successful purchase and in the <a target="_blank" href="https://connekthq.com/account/">Account</a> section on our website', 'ajax-load-more');?></li>
@@ -848,16 +781,16 @@
848
  </ul>
849
  </div>
850
  <a class="visit" target="_blank" href="https://connekthq.com/account/"><i class="fa fa-chevron-circle-right"></i> Sign Into Your Account</a>
851
- </div>
852
  <div class="cta">
853
  <h3><?php _e('Legacy Users', 'ajax-load-more'); ?></h3>
854
- <div class="cta-wrap">
855
  <ul>
856
  <li>If you have made a purchase prior to <u>July 6, 2015</u> you will require a license after updating your add-ons. Please <a href="https://connekthq.com/plugins/ajax-load-more/support/#contact-form" target="_blank">email us</a> with a reference to the email address used when you completed the add-on purchase and we will send your license key.</li>
857
  </ul>
858
  </div>
859
- </div>
860
- </div>
861
-
862
  </div>
863
- </div>
1
+ <div class="admin ajax-load-more" id="alm-licenses">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
9
  <div class="cnkt-main">
10
  <div class="group">
11
  <h3><?php _e('License Keys', 'ajax-load-more'); ?></h3>
12
+
13
  <p><?php _e('Manage your Ajax Load More license key\'s below - enter a key for each of your add-ons to receive plugin update notifications directly within the <a href="plugins.php">WP Plugins dashboard</a>.', 'ajax-load-more'); ?></p>
14
+
15
+ <?php
16
  // alm_cache_installed
17
  // alm_cta_installed
18
  // alm_comments_installed
22
  // alm_preload_installed
23
  // alm_paging_installed
24
  // alm_prev_post_installed
25
+ // alm_seo_installed
 
26
  // alm_theme_repeaters_installed
27
  ?>
28
+
29
+ <?php
30
  // Check if any add ons are installed. /admin/admin-functions.php
31
+ if(alm_has_addon()) : ?>
32
+
33
+
34
+ <?php
35
  if (has_action('alm_cache_installed')){
36
+ // CACHE
37
  $alm_cache_license = get_option( 'alm_cache_license_key' );
38
  $alm_cache_status = get_option( 'alm_cache_license_status' );
39
  $alm_cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/';
40
  ?>
41
  <div class="license" id="license-cache">
42
+ <div class="license-title">
43
+ <div class="status <?php if($alm_cache_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
44
+ <h2><?php _e('Cache', 'ajax-load-more'); ?></h2>
45
+ </div>
46
  <div class="license-wrap">
47
+ <form method="post" action="options.php">
48
+
49
  <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
50
  <!-- nothing -->
51
  <?php } else { ?>
52
  <div class="no-license">
53
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
54
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_cache_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Cache" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
55
+ </div>
56
  <?php } ?>
57
+
58
+ <?php settings_fields('alm_cache_license'); ?>
59
+
60
  <label class="description offscreen" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
61
  <div class="license-key-field">
62
  <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
70
  </span>
71
  <?php } ?>
72
  </div>
73
+
74
  <?php wp_nonce_field( 'alm_cache_license_nonce', 'alm_cache_license_nonce' ); ?>
75
+ <div class="license-btn-wrap"
76
+ data-name="<?php echo ALM_CACHE_ITEM_NAME; ?>"
77
+ data-url="<?php echo ALM_STORE_URL; ?>"
78
+ data-option-status="alm_cache_license_status"
79
  data-option-key="alm_cache_license_key"
80
  data-upgrade-url="<?php echo $alm_cache_url; ?>">
81
  <button type="button" class="activate license-btn <?php if($alm_cache_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
82
  <?php _e('Activate License', 'ajax-load-more'); ?>
83
  </button>
84
+
85
  <button type="button" class="deactivate license-btn <?php if($alm_cache_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
86
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
87
+ </button>
88
  </div>
89
+
90
  </form>
91
+ </div>
92
  <div class="loading"></div>
93
+ </div>
94
+ <?php
95
  }
96
+ // End CACHE
97
+ ?>
98
+
99
+ <?php
100
  if (has_action('alm_cta_installed')){
101
+ // Call to Actions
102
  $alm_cta_license = get_option( 'alm_cta_license_key' );
103
  $alm_cta_status = get_option( 'alm_cta_license_status' );
104
  $alm_cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/';
105
  ?>
106
  <div class="license" id="license-cta">
107
+ <div class="license-title">
108
+ <div class="status <?php if($alm_cta_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
109
+ <h2><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
110
+ </div>
111
  <div class="license-wrap">
112
+ <form method="post" action="options.php">
113
+
114
  <?php if( $alm_cta_status !== false && $alm_cta_status == 'valid' ) { ?>
115
  <!-- nothing -->
116
  <?php } else { ?>
117
  <div class="no-license">
118
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
119
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_cta_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=CTA" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
120
+ </div>
121
+ <?php } ?>
122
+
123
+ <?php settings_fields('alm_cta_license'); ?>
124
+
125
  <label class="description offscreen" for="alm_cta_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
126
  <div class="license-key-field">
127
  <input id="alm_cta_license_key" name="alm_cta_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cta_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
135
  </span>
136
  <?php } ?>
137
  </div>
138
+
139
  <?php wp_nonce_field( 'alm_cta_license_nonce', 'alm_cta_license_nonce' ); ?>
140
+ <div class="license-btn-wrap"
141
+ data-name="<?php echo ALM_CTA_ITEM_NAME; ?>"
142
+ data-url="<?php echo ALM_STORE_URL; ?>"
143
+ data-option-status="alm_cta_license_status"
144
  data-option-key="alm_cta_license_key"
145
  data-upgrade-url="<?php echo $alm_cta_url; ?>">
146
  <button type="button" class="activate license-btn <?php if($alm_cta_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
147
  <?php _e('Activate License', 'ajax-load-more'); ?>
148
  </button>
149
+
150
  <button type="button" class="deactivate license-btn <?php if($alm_cta_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
151
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
152
+ </button>
153
  </div>
154
+
155
  </form>
156
+ </div>
157
  <div class="loading"></div>
158
+ </div>
159
+ <?php
160
  }
161
+ // End Call to Actions
162
+ ?>
163
+
164
+ <?php
165
  if (has_action('alm_comments_installed')){
166
+ // Comments
167
  $alm_comments_license = get_option( 'alm_comments_license_key' );
168
  $alm_comments_status = get_option( 'alm_comments_license_status' );
169
  $alm_comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/';
170
  ?>
171
  <div class="license" id="license-comments">
172
+ <div class="license-title">
173
+ <div class="status <?php if($alm_comments_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
174
+ <h2><?php _e('Comments', 'ajax-load-more'); ?></h2>
175
+ </div>
176
  <div class="license-wrap">
177
+ <form method="post" action="options.php">
178
+
179
  <?php if( $alm_comments_status !== false && $alm_comments_status == 'valid' ) { ?>
180
  <!-- nothing -->
181
  <?php } else { ?>
182
  <div class="no-license">
183
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
184
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_comments_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Comments" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
185
+ </div>
186
+ <?php } ?>
187
+
188
+ <?php settings_fields('alm_comments_license'); ?>
189
+
190
  <label class="description offscreen" for="alm_comments_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
191
  <div class="license-key-field">
192
  <input id="alm_comments_license_key" name="alm_comments_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_comments_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
200
  </span>
201
  <?php } ?>
202
  </div>
203
+
204
  <?php wp_nonce_field( 'alm_comments_license_nonce', 'alm_comments_license_nonce' ); ?>
205
+ <div class="license-btn-wrap"
206
+ data-name="<?php echo ALM_COMMENTS_ITEM_NAME; ?>"
207
+ data-url="<?php echo ALM_STORE_URL; ?>"
208
+ data-option-status="alm_comments_license_status"
209
  data-option-key="alm_comments_license_key"
210
  data-upgrade-url="<?php echo $alm_comments_url; ?>">
211
  <button type="button" class="activate license-btn <?php if($alm_comments_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
212
  <?php _e('Activate License', 'ajax-load-more'); ?>
213
  </button>
214
+
215
  <button type="button" class="deactivate license-btn <?php if($alm_comments_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
216
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
217
+ </button>
218
  </div>
219
+
220
  </form>
221
+ </div>
222
  <div class="loading"></div>
223
+ </div>
224
+ <?php
225
  }
226
+ // End Comments
227
+ ?>
228
+
229
+
230
+ <?php
231
  if (has_action('alm_unlimited_installed')){
232
+ // Custom Repeaters
233
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
234
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
235
  $alm_unlimited_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/';
236
  ?>
237
  <div class="license" id="license-repeaters">
238
+ <div class="license-title">
239
+ <div class="status <?php if($alm_unlimited_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
240
+ <h2><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
241
+ </div>
242
  <div class="license-wrap">
243
+ <form method="post" action="options.php">
244
+
245
  <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
246
  <!-- nothing -->
247
  <?php } else { ?>
248
  <div class="no-license">
249
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
250
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_unlimited_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Custom Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
251
+ </div>
252
  <?php } ?>
253
+
254
+ <?php settings_fields('alm_unlimited_license'); ?>
255
+
256
  <label class="description offscreen" for="alm_unlimited_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
257
  <div class="license-key-field">
258
  <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
266
  </span>
267
  <?php } ?>
268
  </div>
269
+
270
  <?php wp_nonce_field( 'alm_unlimited_license_nonce', 'alm_unlimited_license_nonce' ); ?>
271
+ <div class="license-btn-wrap"
272
+ data-name="<?php echo ALM_UNLIMITED_ITEM_NAME; ?>"
273
+ data-url="<?php echo ALM_STORE_URL; ?>"
274
+ data-option-status="alm_unlimited_license_status"
275
  data-option-key="alm_unlimited_license_key"
276
  data-upgrade-url="<?php echo $alm_unlimited_url; ?>">
277
  <button type="button" class="activate license-btn <?php if($alm_unlimited_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
278
  <?php _e('Activate License', 'ajax-load-more'); ?>
279
  </button>
280
+
281
  <button type="button" class="deactivate license-btn <?php if($alm_unlimited_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
282
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
283
+ </button>
284
  </div>
285
+
286
  </form>
287
+ </div>
288
  <div class="loading"></div>
289
+ </div>
290
+ <?php
291
  }
292
+ // End Custom Repeaters v2
293
  ?>
294
+
295
+
296
+
297
+ <?php
298
  if (has_action('alm_layouts_installed')){
299
+ // LAYOUTS
300
  $alm_layouts_license = get_option( 'alm_layouts_license_key' );
301
  $alm_layouts_status = get_option( 'alm_layouts_license_status' );
302
  $alm_layouts_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/';
303
  ?>
304
  <div class="license" id="license-layouts">
305
+ <div class="license-title">
306
+ <div class="status <?php if($alm_layouts_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
307
+ <h2><?php _e('Layouts', 'ajax-load-more'); ?></h2>
308
+ </div>
309
  <div class="license-wrap">
310
+ <form method="post" action="options.php">
311
+
312
  <?php if( $alm_layouts_status !== false && $alm_layouts_status == 'valid' ) { ?>
313
  <!-- nothing -->
314
  <?php } else { ?>
315
  <div class="no-license">
316
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
317
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_layouts_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Layouts" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
318
+ </div>
319
  <?php } ?>
320
+
321
+ <?php settings_fields('alm_layouts_license'); ?>
322
+
323
  <label class="description offscreen" for="alm_layouts_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
324
  <div class="license-key-field">
325
  <input id="alm_layouts_license_key" name="alm_layouts_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_layouts_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
333
  </span>
334
  <?php } ?>
335
  </div>
336
+
337
  <?php wp_nonce_field( 'alm_layouts_license_nonce', 'alm_layouts_license_nonce' ); ?>
338
+ <div class="license-btn-wrap"
339
+ data-name="<?php echo ALM_LAYOUTS_ITEM_NAME; ?>"
340
+ data-url="<?php echo ALM_STORE_URL; ?>"
341
+ data-option-status="alm_layouts_license_status"
342
  data-option-key="alm_layouts_license_key"
343
  data-upgrade-url="<?php echo $alm_layouts_url; ?>">
344
  <button type="button" class="activate license-btn <?php if($alm_layouts_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
345
  <?php _e('Activate License', 'ajax-load-more'); ?>
346
  </button>
347
+
348
  <button type="button" class="deactivate license-btn <?php if($alm_layouts_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
349
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
350
+ </button>
351
  </div>
352
+
353
  </form>
354
+ </div>
355
  <div class="loading"></div>
356
+ </div>
357
+ <?php
358
  }
359
+ // End LAYOUTS
360
+ ?>
361
+
362
+
363
+ <?php
364
  if (has_action('alm_nextpage_installed')){
365
+ // NEXT PAGE
366
  $alm_nextpage_license = get_option( 'alm_nextpage_license_key' );
367
  $alm_nextpage_status = get_option( 'alm_nextpage_license_status' );
368
  $alm_nextpage_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/';
369
  ?>
370
  <div class="license" id="license-nextpage">
371
+ <div class="license-title">
372
+ <div class="status <?php if($alm_nextpage_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
373
+ <h2><?php _e('Next Page', 'ajax-load-more'); ?></h2>
374
+ </div>
375
  <div class="license-wrap">
376
+ <form method="post" action="options.php">
377
+
378
  <?php if( $alm_nextpage_status !== false && $alm_nextpage_status == 'valid' ) { ?>
379
  <!-- nothing -->
380
  <?php } else { ?>
381
  <div class="no-license">
382
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
383
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_nextpage_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=nextpage" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
384
+ </div>
385
  <?php } ?>
386
+
387
+ <?php settings_fields('alm_nextpage_license'); ?>
388
+
389
  <label class="description offscreen" for="alm_nextpage_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
390
  <div class="license-key-field">
391
  <input id="alm_nextpage_license_key" name="alm_nextpage_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_nextpage_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
399
  </span>
400
  <?php } ?>
401
  </div>
402
+
403
  <?php wp_nonce_field( 'alm_nextpage_license_nonce', 'alm_nextpage_license_nonce' ); ?>
404
+ <div class="license-btn-wrap"
405
+ data-name="<?php echo ALM_NEXTPAGE_ITEM_NAME; ?>"
406
+ data-url="<?php echo ALM_STORE_URL; ?>"
407
+ data-option-status="alm_nextpage_license_status"
408
  data-option-key="alm_nextpage_license_key"
409
  data-upgrade-url="<?php echo $alm_nextpage_url; ?>">
410
  <button type="button" class="activate license-btn <?php if($alm_nextpage_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
411
  <?php _e('Activate License', 'ajax-load-more'); ?>
412
  </button>
413
+
414
  <button type="button" class="deactivate license-btn <?php if($alm_nextpage_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
415
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
416
+ </button>
417
  </div>
418
+
419
  </form>
420
+ </div>
421
  <div class="loading"></div>
422
+ </div>
423
+ <?php
424
  }
425
+ // End NEXT PAGE
426
  ?>
427
+
428
+
429
+
430
+ <?php
431
  if (has_action('alm_paging_installed')){
432
+ // PAGING
433
  $alm_paging_license = get_option( 'alm_paging_license_key' );
434
  $alm_paging_status = get_option( 'alm_paging_license_status' );
435
  $alm_paging_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/paging/';
436
  ?>
437
  <div class="license" id="license-paging">
438
+ <div class="license-title">
439
+ <div class="status <?php if($alm_paging_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
440
+ <h2><?php _e('Paging', 'ajax-load-more'); ?></h2>
441
+ </div>
442
  <div class="license-wrap">
443
+ <form method="post" action="options.php">
444
+
445
  <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
446
  <!-- nothing -->
447
  <?php } else { ?>
448
  <div class="no-license">
449
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
450
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_paging_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Paging" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
451
+ </div>
452
+ <?php } ?>
453
+
454
+ <?php settings_fields('alm_paging_license'); ?>
455
+
456
  <label class="description offscreen" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
457
  <div class="license-key-field">
458
  <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
466
  </span>
467
  <?php } ?>
468
  </div>
469
+
470
  <?php wp_nonce_field( 'alm_paging_license_nonce', 'alm_paging_license_nonce' ); ?>
471
+ <div class="license-btn-wrap"
472
+ data-name="<?php echo ALM_PAGING_ITEM_NAME; ?>"
473
+ data-url="<?php echo ALM_STORE_URL; ?>"
474
+ data-option-status="alm_paging_license_status"
475
  data-option-key="alm_paging_license_key"
476
  data-upgrade-url="<?php echo $alm_paging_url; ?>">
477
  <button type="button" class="activate license-btn <?php if($alm_paging_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
478
  <?php _e('Activate License', 'ajax-load-more'); ?>
479
  </button>
480
+
481
  <button type="button" class="deactivate license-btn <?php if($alm_paging_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
482
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
483
+ </button>
484
  </div>
485
+
486
  </form>
487
+ </div>
488
  <div class="loading"></div>
489
+ </div>
490
+ <?php
491
  }
492
+ // End PAGING
493
+ ?>
494
+
495
+ <?php
496
  if (has_action('alm_preload_installed')){
497
+ // PRELOADED
498
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
499
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
500
  $alm_preloaded_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/';
501
  ?>
502
  <div class="license" id="license-preloaded">
503
+ <div class="license-title">
504
+ <div class="status <?php if($alm_preloaded_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
505
+ <h2><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
506
+ </div>
507
  <div class="license-wrap">
508
+ <form method="post" action="options.php">
509
+
510
  <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
511
  <!-- nothing -->
512
  <?php } else { ?>
513
  <div class="no-license">
514
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
515
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_preloaded_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Preloaded" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
516
+ </div>
517
  <?php } ?>
518
+
519
+ <?php settings_fields('alm_preloaded_license'); ?>
520
+
521
  <label class="description offscreen" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
522
  <div class="license-key-field">
523
  <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
532
  <?php } ?>
533
  </div>
534
  <?php wp_nonce_field( 'alm_preloaded_license_nonce', 'alm_preloaded_license_nonce' ); ?>
535
+ <div class="license-btn-wrap"
536
+ data-name="<?php echo ALM_PRELOADED_ITEM_NAME; ?>"
537
+ data-url="<?php echo ALM_STORE_URL; ?>"
538
+ data-option-status="alm_preloaded_license_status"
539
  data-option-key="alm_preloaded_license_key"
540
  data-upgrade-url="<?php echo $alm_preloaded_url; ?>">
541
  <button type="button" class="activate license-btn <?php if($alm_preloaded_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
542
  <?php _e('Activate License', 'ajax-load-more'); ?>
543
  </button>
544
+
545
  <button type="button" class="deactivate license-btn <?php if($alm_preloaded_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
546
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
547
+ </button>
548
  </div>
549
+
550
  </form>
551
+ </div>
552
  <div class="loading"></div>
553
+ </div>
554
+ <?php
555
  }
556
+ // End PRELOADED
557
+ ?>
558
+
559
+ <?php
560
  if (has_action('alm_prev_post_installed')){
561
+ // PREVIOUS POST
562
  $alm_prev_post_license = get_option( 'alm_prev_post_license_key' );
563
  $alm_prev_post_status = get_option( 'alm_prev_post_license_status' );
564
  $alm_prev_post_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/';
565
  ?>
566
  <div class="license" id="license-previous-post">
567
+ <div class="license-title">
568
+ <div class="status <?php if($alm_prev_post_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
569
+ <h2><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
570
+ </div>
571
  <div class="license-wrap">
572
+ <form method="post" action="options.php">
573
+
574
  <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
575
  <!-- nothing -->
576
  <?php } else { ?>
577
  <div class="no-license">
578
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
579
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_prev_post_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Previous Post" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
580
+ </div>
581
  <?php } ?>
582
+
583
+ <?php settings_fields('alm_prev_post_license'); ?>
584
+
585
  <label class="description offscreen" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
586
  <div class="license-key-field">
587
  <input id="alm_prev_post_license_key" name="alm_prev_post_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_prev_post_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
595
  </span>
596
  <?php } ?>
597
  </div>
598
+
599
  <?php wp_nonce_field( 'alm_prev_post_license_nonce', 'alm_prev_post_license_nonce' ); ?>
600
+ <div class="license-btn-wrap"
601
+ data-name="<?php echo ALM_PREV_POST_ITEM_NAME; ?>"
602
+ data-url="<?php echo ALM_STORE_URL; ?>"
603
+ data-option-status="alm_prev_post_license_status"
604
  data-option-key="alm_prev_post_license_key"
605
  data-upgrade-url="<?php echo $alm_prev_post_url; ?>">
606
  <button type="button" class="activate license-btn <?php if($alm_prev_post_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
607
  <?php _e('Activate License', 'ajax-load-more'); ?>
608
  </button>
609
+
610
  <button type="button" class="deactivate license-btn <?php if($alm_prev_post_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
611
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612
  </button>
613
+ </div>
614
+
 
 
 
 
615
  </form>
616
+ </div>
617
+ <div class="loading"></div>
618
+ </div>
619
+ <?php
 
620
  }
621
+ // End PREVIOUS POST
622
  ?>
623
+
624
+
625
+ <?php
626
  if (has_action('alm_seo_installed')){
627
+ // SEO
628
  $alm_seo_license = get_option( 'alm_seo_license_key' );
629
  $alm_seo_status = get_option( 'alm_seo_license_status' );
630
  $alm_seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/';
631
  ?>
632
  <div class="license" id="license-seo">
633
+ <div class="license-title">
634
+ <div class="status <?php if($alm_seo_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
635
+ <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
636
+ </div>
637
  <div class="license-wrap">
638
+ <form method="post" action="options.php">
639
+
640
  <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
641
  <!-- nothing -->
642
  <?php } else { ?>
643
  <div class="no-license">
644
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
645
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_seo_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=SEO" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
646
+ </div>
647
  <?php } ?>
648
+
649
+ <?php settings_fields('alm_seo_license'); ?>
650
+
651
  <label class="description offscreen" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
652
  <div class="license-key-field">
653
  <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
661
  </span>
662
  <?php } ?>
663
  </div>
664
+
665
  <?php wp_nonce_field( 'alm_seo_license_nonce', 'alm_seo_license_nonce' ); ?>
666
+ <div class="license-btn-wrap"
667
+ data-name="<?php echo ALM_SEO_ITEM_NAME; ?>"
668
+ data-url="<?php echo ALM_STORE_URL; ?>"
669
+ data-option-status="alm_seo_license_status"
670
  data-option-key="alm_seo_license_key"
671
  data-upgrade-url="<?php echo $alm_seo_url; ?>">
672
  <button type="button" class="activate license-btn <?php if($alm_seo_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
673
  <?php _e('Activate License', 'ajax-load-more'); ?>
674
  </button>
675
+
676
  <button type="button" class="deactivate license-btn <?php if($alm_seo_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
677
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
678
+ </button>
679
+ </div>
680
+
681
  </form>
682
+ </div>
683
+
684
  <div class="loading"></div>
685
+ </div>
686
+ <?php
687
  }
688
+ // End SEO
689
  ?>
690
+
691
+
692
+ <?php
693
  if (has_action('alm_theme_repeaters_installed')){
694
+ // Theme Templates
695
+
696
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
697
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
698
  $alm_theme_repeaters_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/';
699
  ?>
700
  <div class="license" id="license-theme_repeaters">
701
+ <div class="license-title">
702
+ <div class="status <?php if($alm_theme_repeaters_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
703
+ <h2><?php _e('Theme Repeaters', 'ajax-load-more'); ?> </h2>
704
+ </div>
705
  <div class="license-wrap">
706
+ <form method="post" action="options.php">
707
+
708
  <?php if( $alm_theme_repeaters_status !== false && $alm_theme_repeaters_status == 'valid' ) { ?>
709
  <!-- nothing -->
710
  <?php } else { ?>
711
  <div class="no-license">
712
  <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
713
  <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_theme_repeaters_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Theme Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
714
+ </div>
715
  <?php } ?>
716
+
717
  <?php settings_fields('alm_theme_repeaters_license'); ?>
718
+
719
  <label class="description offscreen" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
720
  <div class="license-key-field">
721
  <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_theme_repeaters_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
730
  <?php } ?>
731
  </div>
732
  <?php wp_nonce_field( 'alm_theme_repeaters_license_nonce', 'alm_theme_repeaters_license_nonce' ); ?>
733
+
734
+ <div class="license-btn-wrap"
735
+ data-name="<?php echo ALM_THEME_REPEATERS_ITEM_NAME; ?>"
736
  data-url="<?php echo ALM_STORE_URL; ?>"
737
  data-upgrade-url="<?php echo $alm_theme_repeaters_url; ?>"
738
+ data-option-status="alm_theme_repeaters_license_status"
739
  data-option-key="alm_theme_repeaters_license_key"
740
  >
741
  <button type="button" class="activate license-btn <?php if($alm_theme_repeaters_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
742
  <?php _e('Activate License', 'ajax-load-more'); ?>
743
  </button>
744
+
745
  <button type="button" class="deactivate license-btn <?php if($alm_theme_repeaters_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
746
  <?php _e('Deactivate License', 'ajax-load-more'); ?>
747
  </button>
748
  </div>
749
+
750
  </form>
751
+
752
+ </div>
753
  <div class="loading"></div>
754
+ </div>
755
+ <?php
756
  }
757
+ // End Theme Repeaters
758
  ?>
759
+
760
+
761
  <?php else : ?>
762
+
763
  <div class="license-no-addons">
764
  <p><?php _e('You do not have any Ajax Load More add-ons installed', 'ajax-load-more'); ?>. &raquo; <a href="admin.php?page=ajax-load-more-add-ons"><strong><?php _e('Browse Add-ons', 'ajax-load-more'); ?></strong></a></p>
765
  </div>
766
+
767
+ <?php endif; ?>
768
+
769
+
770
  </div>
771
  </div>
772
+
773
  <div class="cnkt-sidebar">
774
  <div class="cta padding-bottom">
775
  <h3><?php _e('About Licenses', 'ajax-load-more'); ?></h3>
776
+ <div class="cta-inner">
777
  <ul>
778
  <li><?php _e('Add-on licenses will enable updates directly in your WP dashboard.', 'ajax-load-more');?></li>
779
  <li><?php _e('License keys are found in the purchase receipt email that was sent immediately after your successful purchase and in the <a target="_blank" href="https://connekthq.com/account/">Account</a> section on our website', 'ajax-load-more');?></li>
781
  </ul>
782
  </div>
783
  <a class="visit" target="_blank" href="https://connekthq.com/account/"><i class="fa fa-chevron-circle-right"></i> Sign Into Your Account</a>
784
+ </div>
785
  <div class="cta">
786
  <h3><?php _e('Legacy Users', 'ajax-load-more'); ?></h3>
787
+ <div class="cta-inner">
788
  <ul>
789
  <li>If you have made a purchase prior to <u>July 6, 2015</u> you will require a license after updating your add-ons. Please <a href="https://connekthq.com/plugins/ajax-load-more/support/#contact-form" target="_blank">email us</a> with a reference to the email address used when you completed the add-on purchase and we will send your license key.</li>
790
  </ul>
791
  </div>
792
+ </div>
793
+ </div>
794
+
795
  </div>
796
+ </div>
admin/views/repeater-templates.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="admin ajax-load-more" id="alm-repeaters">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
@@ -6,28 +6,28 @@
6
  <em><?php _e('The library of editable templates for use within your theme', 'ajax-load-more'); ?></em>
7
  </h1>
8
  </div>
9
- <div class="cnkt-main form-table repeaters">
10
  <!-- Repeaters -->
11
  <div class="group">
12
-
13
- <?php
14
  if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
15
  <span class="toggle-all">
16
  <span class="inner-wrap">
17
  <em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em>
18
  <em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em>
19
  </span>
20
- </span>
21
  <?php } ?>
22
-
23
  <!-- Default Template -->
24
  <div class="row template default-repeater" id="default-template">
25
-
26
- <?php
27
  // Check for local repeater template
28
  $local_template = false;
29
  $readOnly = 'false';
30
- $template_dir = 'alm_templates';
31
  if(is_child_theme()){
32
  $template_theme_file = get_stylesheet_directory().'/'. $template_dir .'/default.php';
33
  if(!file_exists($template_theme_file)){
@@ -41,27 +41,27 @@
41
  if(file_exists($template_theme_file)){
42
  $local_template = true;
43
  $readOnly = true;
44
- }
45
-
46
  $filename = alm_get_default_repeater(); // Get default repeater template
47
-
48
  $handle = fopen ($filename, "r"); // Open file
49
  $contents = '';
50
  if(filesize ($filename) != 0){
51
- $contents = fread ($handle, filesize ($filename));
52
  }
53
  fclose ($handle);
54
- ?>
55
- <h3 class="heading"><?php _e('Default Template', 'ajax-load-more'); ?></h3>
56
- <div class="expand-wrap">
57
- <div class="wrap repeater-wrap<?php if($local_template){ echo ' cm-readonly'; } ?>" data-name="default" data-type="default">
58
  <label class="template-title" for="template-default">
59
  <?php _e('Enter the HTML and PHP code for the default template', 'ajax-load-more'); ?>:
60
- </label>
61
-
62
- <?php
63
  do_action('alm_get_layouts'); // Layouts - Template Selection
64
- ?>
65
  <textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
66
  <script>
67
  var editorDefault = CodeMirror.fromTextArea(document.getElementById("template-default"), {
@@ -74,51 +74,55 @@
74
  viewportMargin: Infinity,
75
  extraKeys: {"Ctrl-Space": "autocomplete"},
76
  });
77
- </script>
78
- <?php if(!$local_template){ ?>
 
79
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
80
- <div class="saved-response">&nbsp;</div>
81
  <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
 
82
  <?php } else { ?>
 
83
  <p class="warning-callout"><?php _e('It appears you are loading the <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template" target="_blank"><b>default template</b></a> (<em>default.php</em>) from your current theme directory. To modify this template, you must edit the file directly on your server.', 'ajax-load-more'); ?></p>
84
- <?php } ?>
85
- </div>
86
- </div>
 
87
  </div>
88
-
89
- <!-- End Default Template -->
90
-
91
- <!-- Custom Repeaters -->
92
- <?php
93
-
94
- if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters')){
95
  // If Custom Repeaters & Theme Repeaters is NOT installed
96
  echo '<div class="row no-brd">';
97
  include( ALM_PATH . 'admin/includes/cta/extend.php');
98
- echo '</div>';
99
- }
100
-
101
  if (has_action('alm_custom_repeaters')){ // List custom repeaters v1
102
- do_action('alm_custom_repeaters');
103
- }
104
  if (has_action('alm_unlimited_repeaters')){ // List custom repeaters v2
105
- do_action('alm_unlimited_repeaters');
106
  }
107
  ?>
108
-
109
  <script>
110
- jQuery(document).ready(function($) {
111
  "use strict";
112
- var _alm_admin = {};
113
-
114
  /*
115
  * _alm_admin.saveRepeater
116
  * Save Custom Repeater Value
117
  *
118
  * @since 2.0.0
119
- */
120
-
121
- _alm_admin.saveRepeater = function(btn, editorId) {
122
  var container = btn.parent('.repeater-wrap'),
123
  el = $('textarea._alm_repeater', container),
124
  textarea = el.next('.CodeMirror'),
@@ -128,102 +132,102 @@
128
  type = container.data('type'), // Get template type (default/repeater/unlimited)
129
  alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
130
  responseText = $(".saved-response", container);
131
-
132
  if(type === undefined) // Fix for custom repeaters v1
133
  type = 'undefined';
134
-
135
- //Get value from CodeMirror textarea
136
- var id = editorId.replace('template-', ''); // Editor ID
137
-
138
- if(id === 'default'){ // Default Template
139
  value = editorDefault.getValue();
140
- }else{ // Repeater Templates
141
  var eid = window['editor_'+id]; // Set editor ID
142
- value = eid.getValue();
143
  }
144
-
145
  // if value is null, then set repeater to non breaking space
146
  if(value === '' || value === 'undefined'){
147
  value = '&nbsp;';
148
- }
149
-
150
  //If template is not already saving, then proceed
151
  if (!btn.hasClass('saving')) {
152
  btn.addClass('saving');
153
  textarea.addClass('loading');
154
  responseText.addClass('loading').html('<?php _e('Saving template...', 'ajax-load-more') ?>');
155
  responseText.animate({'opacity' : 1});
156
-
157
  $.ajax({
158
  type: 'POST',
159
  url: alm_admin_localize.ajax_admin_url,
160
  data: {
161
  action: 'alm_save_repeater',
162
- value: value,
163
  repeater: repeater,
164
  type: type,
165
  alias: alias,
166
  nonce: alm_admin_localize.alm_admin_nonce,
167
  },
168
- success: function(response) {
169
-
170
  $('textarea#'+editorId).val(value); // Set the target textarea val to 'value'
171
-
172
- setTimeout(function() {
173
  responseText.delay(500).html(response).removeClass('loading');
174
- textarea.removeClass('loading');
175
  }, 250);
176
-
177
- setTimeout(function() {
178
  responseText.animate({'opacity': 0}, function(){
179
  responseText.html('&nbsp;');
180
  btn.removeClass('saving');
181
  });
182
-
183
- }, 4500);
184
-
185
  },
186
  error: function(xhr, status, error) {
187
  responseText.html('<?php _e('Something went wrong and the data could not be saved.', 'ajax-load-more') ?>').removeClass('loading');
188
  btn.removeClass('saving');
189
  textarea.removeClass('loading');
190
  }
191
- });
192
  }
193
  }
194
-
195
-
196
  $(document).on('click', 'input.save-repeater', function(){
197
  var btn = $(this),
198
- editorId = btn.data('editor-id');
199
  _alm_admin.saveRepeater(btn, editorId);
200
- });
201
-
202
-
203
  /*
204
  * _alm_admin.updateRepeater
205
  * Update Repeater Value
206
- *
207
  * @since 2.5
208
- */
209
-
210
- _alm_admin.updateRepeater = function(btn, editorId) {
211
  var container = btn.closest('.repeater-wrap'),
212
  el = $('textarea._alm_repeater', container),
213
  btn = btn,
214
  btn_text = btn.html(),
215
  editor = $('.CodeMirror', container),
216
  repeater = container.data('name'), // Get templete name
217
- type = container.data('type'); // Get template type (default/repeater/unlimited)
218
-
219
- //Get value from CodeMirror textarea
220
  var editorId = repeater,
221
- id = editorId.replace('template-', ''); // Editor ID
222
-
223
  //If template is not already saving, then proceed
224
  if (!btn.hasClass('updating')) {
225
  btn.addClass('updating').text("<?php _e('Updating template...', 'ajax-load-more'); ?>");
226
- editor.addClass('loading');
227
  $.ajax({
228
  type: 'POST',
229
  url: alm_admin_localize.ajax_admin_url,
@@ -233,70 +237,72 @@
233
  type: type,
234
  nonce: alm_admin_localize.alm_admin_nonce,
235
  },
236
- success: function(response) {
237
- if(id === 'default'){ // Default Template
238
  editorDefault.setValue(response);
239
- }else{ // Repeater Templates
240
  var eid = window['editor_'+id]; // Set editor ID
241
- eid.setValue(response);
242
  }
243
-
244
- // Clear button styles
245
- setTimeout(function() {
246
- btn.text("<?php _e('Template Updated', 'ajax-load-more'); ?>").blur();
247
- setTimeout(function() {
248
  btn.closest('.alm-drop-btn').trigger('click'); // CLose drop menu
249
- btn.removeClass('updating').html(btn_text).blur();
250
- editor.removeClass('loading');
251
- }, 400);
252
- }, 400);
253
-
254
  },
255
  error: function(xhr, status, error) {
256
- btn.removeClass('updating').html(btn_text).blur();
257
- editor.removeClass('loading');
258
  }
259
- });
260
  }
261
- }
262
-
263
  $('.option-update a').click(function(){
264
- var btn = $(this);
265
  _alm_admin.updateRepeater(btn);
266
  });
267
-
268
- });
269
  </script>
270
-
271
  </div>
272
- <!-- End Repeaters -->
273
-
274
  </div>
275
-
276
  <div class="cnkt-sidebar">
277
- <?php if (has_action('alm_unlimited_repeaters')){
278
  // Add TOC if users has Custom Repeaters
279
  ?>
280
  <div class="table-of-contents repeaters-toc">
281
  <div class="cta">
282
- <select class="toc"></select>
 
 
283
  </div>
284
  <?php } ?>
285
  <div class="cta padding-bottom">
286
  <h3><?php _e('Repeater Template Help', 'ajax-load-more'); ?></h3>
287
- <div class="item">
288
  <p><strong><?php _e('What is a repeater template?', 'ajax-load-more'); ?></strong></p>
289
  <p><?php _e('A <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/" target="_blank">repeater template</a> is a snippet of code that will execute over and over within a <a href="http://codex.wordpress.org/The_Loop" target="_blank">WordPress loop</a>', 'ajax-load-more'); ?>.</p>
290
  </div>
291
- <a class="visit" href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/" target="_blank"><i class="fa fa-chevron-circle-right"></i> <?php _e('More About Templating', 'ajax-load-more'); ?></a>
292
  </div>
293
  <?php include_once( ALM_PATH . 'admin/includes/cta/writeable.php'); ?>
294
-
295
  <?php if (has_action('alm_unlimited_repeaters')){ ?>
296
  </div>
297
  <?php } ?>
298
-
299
- </div>
300
-
301
  </div>
302
- </div>
1
+ <div class="admin ajax-load-more" id="alm-repeaters">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
6
  <em><?php _e('The library of editable templates for use within your theme', 'ajax-load-more'); ?></em>
7
  </h1>
8
  </div>
9
+ <div class="cnkt-main form-table repeaters">
10
  <!-- Repeaters -->
11
  <div class="group">
12
+
13
+ <?php
14
  if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
15
  <span class="toggle-all">
16
  <span class="inner-wrap">
17
  <em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em>
18
  <em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em>
19
  </span>
20
+ </span>
21
  <?php } ?>
22
+
23
  <!-- Default Template -->
24
  <div class="row template default-repeater" id="default-template">
25
+
26
+ <?php
27
  // Check for local repeater template
28
  $local_template = false;
29
  $readOnly = 'false';
30
+ $template_dir = 'alm_templates';
31
  if(is_child_theme()){
32
  $template_theme_file = get_stylesheet_directory().'/'. $template_dir .'/default.php';
33
  if(!file_exists($template_theme_file)){
41
  if(file_exists($template_theme_file)){
42
  $local_template = true;
43
  $readOnly = true;
44
+ }
45
+
46
  $filename = alm_get_default_repeater(); // Get default repeater template
47
+
48
  $handle = fopen ($filename, "r"); // Open file
49
  $contents = '';
50
  if(filesize ($filename) != 0){
51
+ $contents = fread ($handle, filesize ($filename));
52
  }
53
  fclose ($handle);
54
+ ?>
55
+ <h3 class="heading"><?php _e('Default Template', 'ajax-load-more'); ?></h3>
56
+ <div class="expand-wrap">
57
+ <div class="wrap repeater-wrap<?php if($local_template){ echo ' cm-readonly'; } ?>" data-name="default" data-type="default">
58
  <label class="template-title" for="template-default">
59
  <?php _e('Enter the HTML and PHP code for the default template', 'ajax-load-more'); ?>:
60
+ </label>
61
+
62
+ <?php
63
  do_action('alm_get_layouts'); // Layouts - Template Selection
64
+ ?>
65
  <textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
66
  <script>
67
  var editorDefault = CodeMirror.fromTextArea(document.getElementById("template-default"), {
74
  viewportMargin: Infinity,
75
  extraKeys: {"Ctrl-Space": "autocomplete"},
76
  });
77
+ </script>
78
+ <?php if(!$local_template){ ?>
79
+
80
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
81
+ <div class="saved-response">&nbsp;</div>
82
  <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
83
+
84
  <?php } else { ?>
85
+
86
  <p class="warning-callout"><?php _e('It appears you are loading the <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template" target="_blank"><b>default template</b></a> (<em>default.php</em>) from your current theme directory. To modify this template, you must edit the file directly on your server.', 'ajax-load-more'); ?></p>
87
+
88
+ <?php } ?>
89
+ </div>
90
+ </div>
91
  </div>
92
+
93
+ <!-- End Default Template -->
94
+
95
+ <!-- Custom Repeaters -->
96
+ <?php
97
+
98
+ if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters')){
99
  // If Custom Repeaters & Theme Repeaters is NOT installed
100
  echo '<div class="row no-brd">';
101
  include( ALM_PATH . 'admin/includes/cta/extend.php');
102
+ echo '</div>';
103
+ }
104
+
105
  if (has_action('alm_custom_repeaters')){ // List custom repeaters v1
106
+ do_action('alm_custom_repeaters');
107
+ }
108
  if (has_action('alm_unlimited_repeaters')){ // List custom repeaters v2
109
+ do_action('alm_unlimited_repeaters');
110
  }
111
  ?>
112
+
113
  <script>
114
+ jQuery(document).ready(function($) {
115
  "use strict";
116
+ var _alm_admin = {};
117
+
118
  /*
119
  * _alm_admin.saveRepeater
120
  * Save Custom Repeater Value
121
  *
122
  * @since 2.0.0
123
+ */
124
+
125
+ _alm_admin.saveRepeater = function(btn, editorId) {
126
  var container = btn.parent('.repeater-wrap'),
127
  el = $('textarea._alm_repeater', container),
128
  textarea = el.next('.CodeMirror'),
132
  type = container.data('type'), // Get template type (default/repeater/unlimited)
133
  alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
134
  responseText = $(".saved-response", container);
135
+
136
  if(type === undefined) // Fix for custom repeaters v1
137
  type = 'undefined';
138
+
139
+ //Get value from CodeMirror textarea
140
+ var id = editorId.replace('template-', ''); // Editor ID
141
+
142
+ if(id === 'default'){ // Default Template
143
  value = editorDefault.getValue();
144
+ }else{ // Repeater Templates
145
  var eid = window['editor_'+id]; // Set editor ID
146
+ value = eid.getValue();
147
  }
148
+
149
  // if value is null, then set repeater to non breaking space
150
  if(value === '' || value === 'undefined'){
151
  value = '&nbsp;';
152
+ }
153
+
154
  //If template is not already saving, then proceed
155
  if (!btn.hasClass('saving')) {
156
  btn.addClass('saving');
157
  textarea.addClass('loading');
158
  responseText.addClass('loading').html('<?php _e('Saving template...', 'ajax-load-more') ?>');
159
  responseText.animate({'opacity' : 1});
160
+
161
  $.ajax({
162
  type: 'POST',
163
  url: alm_admin_localize.ajax_admin_url,
164
  data: {
165
  action: 'alm_save_repeater',
166
+ value: value,
167
  repeater: repeater,
168
  type: type,
169
  alias: alias,
170
  nonce: alm_admin_localize.alm_admin_nonce,
171
  },
172
+ success: function(response) {
173
+
174
  $('textarea#'+editorId).val(value); // Set the target textarea val to 'value'
175
+
176
+ setTimeout(function() {
177
  responseText.delay(500).html(response).removeClass('loading');
178
+ textarea.removeClass('loading');
179
  }, 250);
180
+
181
+ setTimeout(function() {
182
  responseText.animate({'opacity': 0}, function(){
183
  responseText.html('&nbsp;');
184
  btn.removeClass('saving');
185
  });
186
+
187
+ }, 4500);
188
+
189
  },
190
  error: function(xhr, status, error) {
191
  responseText.html('<?php _e('Something went wrong and the data could not be saved.', 'ajax-load-more') ?>').removeClass('loading');
192
  btn.removeClass('saving');
193
  textarea.removeClass('loading');
194
  }
195
+ });
196
  }
197
  }
198
+
199
+
200
  $(document).on('click', 'input.save-repeater', function(){
201
  var btn = $(this),
202
+ editorId = btn.data('editor-id');
203
  _alm_admin.saveRepeater(btn, editorId);
204
+ });
205
+
206
+
207
  /*
208
  * _alm_admin.updateRepeater
209
  * Update Repeater Value
210
+ *
211
  * @since 2.5
212
+ */
213
+
214
+ _alm_admin.updateRepeater = function(btn, editorId) {
215
  var container = btn.closest('.repeater-wrap'),
216
  el = $('textarea._alm_repeater', container),
217
  btn = btn,
218
  btn_text = btn.html(),
219
  editor = $('.CodeMirror', container),
220
  repeater = container.data('name'), // Get templete name
221
+ type = container.data('type'); // Get template type (default/repeater/unlimited)
222
+
223
+ //Get value from CodeMirror textarea
224
  var editorId = repeater,
225
+ id = editorId.replace('template-', ''); // Editor ID
226
+
227
  //If template is not already saving, then proceed
228
  if (!btn.hasClass('updating')) {
229
  btn.addClass('updating').text("<?php _e('Updating template...', 'ajax-load-more'); ?>");
230
+ editor.addClass('loading');
231
  $.ajax({
232
  type: 'POST',
233
  url: alm_admin_localize.ajax_admin_url,
237
  type: type,
238
  nonce: alm_admin_localize.alm_admin_nonce,
239
  },
240
+ success: function(response) {
241
+ if(id === 'default'){ // Default Template
242
  editorDefault.setValue(response);
243
+ }else{ // Repeater Templates
244
  var eid = window['editor_'+id]; // Set editor ID
245
+ eid.setValue(response);
246
  }
247
+
248
+ // Clear button styles
249
+ setTimeout(function() {
250
+ btn.text("<?php _e('Template Updated', 'ajax-load-more'); ?>").blur();
251
+ setTimeout(function() {
252
  btn.closest('.alm-drop-btn').trigger('click'); // CLose drop menu
253
+ btn.removeClass('updating').html(btn_text).blur();
254
+ editor.removeClass('loading');
255
+ }, 400);
256
+ }, 400);
257
+
258
  },
259
  error: function(xhr, status, error) {
260
+ btn.removeClass('updating').html(btn_text).blur();
261
+ editor.removeClass('loading');
262
  }
263
+ });
264
  }
265
+ }
266
+
267
  $('.option-update a').click(function(){
268
+ var btn = $(this);
269
  _alm_admin.updateRepeater(btn);
270
  });
271
+
272
+ });
273
  </script>
274
+
275
  </div>
276
+ <!-- End Repeaters -->
277
+
278
  </div>
279
+
280
  <div class="cnkt-sidebar">
281
+ <?php if (has_action('alm_unlimited_repeaters')){
282
  // Add TOC if users has Custom Repeaters
283
  ?>
284
  <div class="table-of-contents repeaters-toc">
285
  <div class="cta">
286
+ <div class="cta-inner">
287
+ <select class="toc"></select>
288
+ </div>
289
  </div>
290
  <?php } ?>
291
  <div class="cta padding-bottom">
292
  <h3><?php _e('Repeater Template Help', 'ajax-load-more'); ?></h3>
293
+ <div class="cta-inner">
294
  <p><strong><?php _e('What is a repeater template?', 'ajax-load-more'); ?></strong></p>
295
  <p><?php _e('A <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/" target="_blank">repeater template</a> is a snippet of code that will execute over and over within a <a href="http://codex.wordpress.org/The_Loop" target="_blank">WordPress loop</a>', 'ajax-load-more'); ?>.</p>
296
  </div>
297
+ <a class="visit" href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/" target="_blank"><i class="fa fa-chevron-circle-right"></i> <?php _e('More About Templating', 'ajax-load-more'); ?></a>
298
  </div>
299
  <?php include_once( ALM_PATH . 'admin/includes/cta/writeable.php'); ?>
300
+
301
  <?php if (has_action('alm_unlimited_repeaters')){ ?>
302
  </div>
303
  <?php } ?>
304
+
305
+ </div>
306
+
307
  </div>
308
+ </div>
admin/views/settings.php CHANGED
@@ -1,41 +1,40 @@
1
  <div class="admin ajax-load-more settings" id="alm-settings">
2
  <div class="wrap">
 
3
  <div class="header-wrap">
4
  <h1><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span>
5
  <em><?php _e('A powerful plugin to add infinite scroll functionality to your website.', 'ajax-load-more'); ?></em>
6
  </h1>
7
- </div>
8
- <?php if( isset($_GET['settings-updated']) ) { ?>
9
- <div id="message" class="updated inline">
10
- <p><strong><?php _e('Ajax Load More settings have been saved.') ?></strong></p>
11
- </div>
12
- <?php } ?>
13
  <div class="cnkt-main">
14
-
15
  <?php
16
- $alm_dismiss_sharing = get_transient( 'alm_dismiss_sharing');
17
  if(!isset($alm_dismiss_sharing) || empty($alm_dismiss_sharing)){
18
  // If transient has not been set - display this notice.
19
  ?>
20
  <div class="group share-alm">
21
- <div class="dotted">
22
- <h2 style="padding: 0; margin: 0 0 10px;"><?php _e('A small favor to ask', 'ajax-load-more'); ?>...</h2>
 
23
  <p style="padding: 0 0 15px; margin: 0 0 20px; border-bottom: 1px dashed #ccc; font-size: 14px;">
24
- <?php _e('If you\'re an Ajax Load More user, please consider helping <a href="https://twitter.com/KaptonKaos" target="_blank">me</a> spread the word by sharing with your networks and/or leaving a review on <a href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more" target="_blank">wordpress.org</a> forums.', 'ajax-load-more'); ?></p>
 
25
  <div class="one_half sharing">
26
- <?php include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
27
  </div>
28
-
29
  <div class="one_half mailing">
30
- <?php include_once( ALM_PATH . 'admin/includes/cta/reviews.php'); ?>
31
  </div>
32
  </div>
33
  <div class="clear"></div>
34
  <a href="javascript: void(0);" class="dismiss" id="alm_dismiss_sharing" title="<?php _e('Don\'t show me this again!', 'ajax-load-more');?>">&times;</a>
35
  </div>
36
  <?php } ?>
37
-
38
-
39
  <div class="group">
40
  <?php
41
  if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
@@ -47,57 +46,47 @@
47
  <select id="alm-settings-nav">
48
  <option value="#">-- <?php _e('Jump to Setting', 'ajax-load-more'); ?> --</option>
49
  <option value="0"><?php _e('Global Settings', 'ajax-load-more'); ?></option>
50
- <option value="1"><?php _e('Admin', 'ajax-load-more'); ?></option>
51
- <?php
52
- if(has_action('alm_cache_settings'))
53
  echo '<option value="2">'.__('Cache', 'ajax-load-more').'</option>';
54
- if(has_action('alm_layouts_installed'))
55
  echo '<option value="3">'.__('Layouts', 'ajax-load-more').'</options>';
56
- if(has_action('alm_paging_settings'))
57
  echo '<option value="4">'.__('Paging', 'ajax-load-more').'</option>';
58
- if(has_action('alm_prev_post_settings'))
59
  echo '<option value="5">'.__('Previous Post', 'ajax-load-more').'</option>';
60
- if(has_action('alm_rest_api_settings'))
61
- echo '<option value="6">'.__('REST API', 'ajax-load-more').'</option>';
62
- if(has_action('alm_seo_settings'))
63
  echo '<option value="7">'.__('SEO', 'ajax-load-more').'</option>';
64
- if(has_action('alm_theme_repeaters_settings'))
65
- echo '<option value="8">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
66
  ?>
67
  </select>
68
  </div>
69
  <?php
70
  }
71
  ?>
 
72
  <form action="options.php" method="post" id="alm_OptionsForm">
73
- <?php
74
  settings_fields( 'alm-setting-group' );
75
- do_settings_sections( 'ajax-load-more' );
76
  //get the older values, wont work the first time
77
- $options = get_option( '_alm_settings' ); ?>
78
- <div class="row no-brd alm-save-settings">
79
  <?php submit_button('Save Settings'); ?>
80
- <div class="spinner"></div>
81
- </div>
82
  </form>
83
  <script type="text/javascript">
84
  jQuery(document).ready(function() {
85
- jQuery('#alm_OptionsForm').submit(function() {
86
  jQuery('.alm-save-settings .spinner').fadeIn();
87
- jQuery(this).ajaxSubmit({
88
- success: function(){
89
- jQuery('.alm-save-settings .spinner').fadeOut(250, function(){
90
- window.location.reload();
91
- });
92
- },
93
- error: function(){
94
- alert("<?php _e('Sorry, settings could not be saved.', 'ajax-load-more'); ?>");
95
- }
96
- });
97
- return false;
98
  });
99
  });
100
- </script>
101
  </div>
102
  </div>
103
  <div class="cnkt-sidebar">
@@ -106,6 +95,6 @@
106
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
107
  <?php include_once( ALM_PATH . 'admin/includes/cta/add-ons.php'); ?>
108
  <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
109
- </div>
110
  </div>
111
- </div>
1
  <div class="admin ajax-load-more settings" id="alm-settings">
2
  <div class="wrap">
3
+
4
  <div class="header-wrap">
5
  <h1><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span>
6
  <em><?php _e('A powerful plugin to add infinite scroll functionality to your website.', 'ajax-load-more'); ?></em>
7
  </h1>
8
+ </div>
9
+
 
 
 
 
10
  <div class="cnkt-main">
11
+
12
  <?php
13
+ $alm_dismiss_sharing = get_transient( 'alm_dismiss_sharing');
14
  if(!isset($alm_dismiss_sharing) || empty($alm_dismiss_sharing)){
15
  // If transient has not been set - display this notice.
16
  ?>
17
  <div class="group share-alm">
18
+ <div class="dotted">
19
+ <!--
20
+ <h2 style="padding: 0; margin: 0 0 10px;"><?php _e('Thanks for using Ajax Load More', 'ajax-load-more'); ?>...</h2>
21
  <p style="padding: 0 0 15px; margin: 0 0 20px; border-bottom: 1px dashed #ccc; font-size: 14px;">
22
+ <?php _e('Please consider helping <a href="https://twitter.com/KaptonKaos" target="_blank">me</a> spread the word by sharing with your networks and/or leaving a review on <a href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more" target="_blank">wordpress.org</a> forums.', 'ajax-load-more'); ?></p>
23
+ -->
24
  <div class="one_half sharing">
25
+ <?php include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
26
  </div>
27
+
28
  <div class="one_half mailing">
29
+ <?php include_once( ALM_PATH . 'admin/includes/cta/reviews.php'); ?>
30
  </div>
31
  </div>
32
  <div class="clear"></div>
33
  <a href="javascript: void(0);" class="dismiss" id="alm_dismiss_sharing" title="<?php _e('Don\'t show me this again!', 'ajax-load-more');?>">&times;</a>
34
  </div>
35
  <?php } ?>
36
+
37
+
38
  <div class="group">
39
  <?php
40
  if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
46
  <select id="alm-settings-nav">
47
  <option value="#">-- <?php _e('Jump to Setting', 'ajax-load-more'); ?> --</option>
48
  <option value="0"><?php _e('Global Settings', 'ajax-load-more'); ?></option>
49
+ <option value="1"><?php _e('Admin', 'ajax-load-more'); ?></option>
50
+ <?php
51
+ if(has_action('alm_cache_settings'))
52
  echo '<option value="2">'.__('Cache', 'ajax-load-more').'</option>';
53
+ if(has_action('alm_layouts_installed'))
54
  echo '<option value="3">'.__('Layouts', 'ajax-load-more').'</options>';
55
+ if(has_action('alm_paging_settings'))
56
  echo '<option value="4">'.__('Paging', 'ajax-load-more').'</option>';
57
+ if(has_action('alm_prev_post_settings'))
58
  echo '<option value="5">'.__('Previous Post', 'ajax-load-more').'</option>';
59
+ if(has_action('alm_rest_api_settings'))
60
+ echo '<option value="6">'.__('REST API', 'ajax-load-more').'</option>';
61
+ if(has_action('alm_seo_settings'))
62
  echo '<option value="7">'.__('SEO', 'ajax-load-more').'</option>';
63
+ if(has_action('alm_theme_repeaters_settings'))
64
+ echo '<option value="8">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
65
  ?>
66
  </select>
67
  </div>
68
  <?php
69
  }
70
  ?>
71
+ <?php settings_errors(); ?>
72
  <form action="options.php" method="post" id="alm_OptionsForm">
73
+ <?php
74
  settings_fields( 'alm-setting-group' );
75
+ do_settings_sections( 'ajax-load-more' );
76
  //get the older values, wont work the first time
77
+ $options = get_option( '_alm_settings' ); ?>
78
+ <div class="row no-brd alm-save-settings">
79
  <?php submit_button('Save Settings'); ?>
80
+ <div class="spinner"></div>
81
+ </div>
82
  </form>
83
  <script type="text/javascript">
84
  jQuery(document).ready(function() {
85
+ jQuery('#alm_OptionsForm').submit(function() {
86
  jQuery('.alm-save-settings .spinner').fadeIn();
 
 
 
 
 
 
 
 
 
 
 
87
  });
88
  });
89
+ </script>
90
  </div>
91
  </div>
92
  <div class="cnkt-sidebar">
95
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
96
  <?php include_once( ALM_PATH . 'admin/includes/cta/add-ons.php'); ?>
97
  <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
98
+ </div>
99
  </div>
100
+ </div>
admin/views/shortcode-builder.php CHANGED
@@ -1,10 +1,10 @@
1
- <div class="admin ajax-load-more shortcode-builder" id="alm-builder">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
5
  <?php echo ALM_TITLE; ?>: <strong><?php _e('Shortcode Builder', 'ajax-load-more'); ?></strong>
6
  <em><?php _e('Create your own Ajax Load More <a href="http://en.support.wordpress.com/shortcodes/" target="_blank">shortcode</a> by adjusting the values below', 'ajax-load-more'); ?></em>
7
- </h1>
8
  </div>
9
  <div class="cnkt-main">
10
  <form id="alm-shortcode-builder-form">
@@ -15,18 +15,22 @@
15
  <div class="cnkt-sidebar">
16
  <div class="table-of-contents">
17
  <div class="cta">
18
- <select class="toc"></select>
 
 
19
  </div>
20
  <div class="cta">
21
  <h3><?php _e('Shortcode Output', 'ajax-load-more'); ?></h3>
22
- <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', 'ajax-load-more'); ?></p>
23
- <div class="output-wrap">
24
- <div id="shortcode_output"></div>
25
- <span class="copy"><?php _e('Copy', 'ajax-load-more'); ?></span>
 
 
 
26
  </div>
27
- <p class="small reset-shortcode-builder"><a href="javascript:void(0);"><i class="fa fa-refresh"></i> <?php _e('Reset Shortcode Builder', 'ajax-load-more'); ?></a></p>
28
  </div>
29
  </div>
30
  </div>
31
  </div>
32
- </div>
1
+ <div class="admin ajax-load-more shortcode-builder" id="alm-builder">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h1>
5
  <?php echo ALM_TITLE; ?>: <strong><?php _e('Shortcode Builder', 'ajax-load-more'); ?></strong>
6
  <em><?php _e('Create your own Ajax Load More <a href="http://en.support.wordpress.com/shortcodes/" target="_blank">shortcode</a> by adjusting the values below', 'ajax-load-more'); ?></em>
7
+ </h1>
8
  </div>
9
  <div class="cnkt-main">
10
  <form id="alm-shortcode-builder-form">
15
  <div class="cnkt-sidebar">
16
  <div class="table-of-contents">
17
  <div class="cta">
18
+ <div class="cta-inner">
19
+ <select class="toc"></select>
20
+ </div>
21
  </div>
22
  <div class="cta">
23
  <h3><?php _e('Shortcode Output', 'ajax-load-more'); ?></h3>
24
+ <div class="cta-inner">
25
+ <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', 'ajax-load-more'); ?></p>
26
+ <div class="output-wrap">
27
+ <div id="shortcode_output"></div>
28
+ <span class="copy"><?php _e('Copy', 'ajax-load-more'); ?></span>
29
+ </div>
30
+ <p class="small reset-shortcode-builder"><a href="javascript:void(0);"><i class="fa fa-refresh"></i> <?php _e('Reset Shortcode Builder', 'ajax-load-more'); ?></a></p>
31
  </div>
 
32
  </div>
33
  </div>
34
  </div>
35
  </div>
36
+ </div>
ajax-load-more.php CHANGED
@@ -7,34 +7,33 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
- Version: 2.14.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
- */
14
 
15
-
16
- define('ALM_VERSION', '2.14.0');
17
- define('ALM_RELEASE', 'February 14, 2016');
18
- define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
21
 
22
  /*
23
  * alm_install
24
- *
25
  * Activation hook
26
  * Create table for storing repeater
27
  *
28
  * @since 2.0.0
29
  */
30
 
31
- function alm_install($network_wide) {
32
-
33
  global $wpdb;
34
- add_option( "alm_version", ALM_VERSION ); // Add to WP Option tbl
35
-
36
- if ( is_multisite() && $network_wide ) {
37
-
38
  // Get all blogs in the network and activate plugin on each one
39
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
40
  foreach ( $blog_ids as $blog_id ) {
@@ -45,7 +44,7 @@ function alm_install($network_wide) {
45
  } else {
46
  alm_create_table();
47
  }
48
-
49
  }
50
  register_activation_hook( __FILE__, 'alm_install' );
51
  add_action( 'wpmu_new_blog', 'alm_install' );
@@ -54,40 +53,40 @@ add_action( 'wpmu_new_blog', 'alm_install' );
54
 
55
  /*
56
  * alm_create_table
57
- *
58
  * Create new table and repeater template
59
  *
60
  * @since 2.0.0
61
  */
62
  function alm_create_table(){
63
-
64
- global $wpdb;
65
  $table_name = $wpdb->prefix . "alm";
66
  $blog_id = $wpdb->blogid;
67
-
68
- $defaultRepeater = '<li <?php if (!has_post_thumbnail()) { ?> class="no-img"<?php } ?>><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(150,150));}?><h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><p class="entry-meta"><?php the_time("F d, Y"); ?></p><?php the_excerpt(); ?></li>';
69
-
70
  /* MULTISITE */
71
  /* if this is a multisite blog and it's not id = 1, create default template */
72
- if($blog_id > 1){
73
-
74
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
75
  if( !is_dir($dir) ){
76
  mkdir($dir);
77
  }
78
-
79
  $file = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
80
  if( !file_exists($file) ){
81
  $tmp = fopen($file, 'w');
82
  $w = fwrite($tmp, $defaultRepeater);
83
  fclose($tmp);
84
  }
85
-
86
- }
87
-
88
- //Create table, if it doesn't already exist.
89
- if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
90
-
91
  $sql = "CREATE TABLE $table_name (
92
  id mediumint(9) NOT NULL AUTO_INCREMENT,
93
  name text NOT NULL,
@@ -95,58 +94,58 @@ function alm_create_table(){
95
  repeaterType text NOT NULL,
96
  pluginVersion text NOT NULL,
97
  UNIQUE KEY id (id)
98
- );";
99
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
100
  dbDelta( $sql );
101
-
102
  //Insert the default data in created table
103
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'repeaterType' => 'default', 'pluginVersion' => ALM_VERSION));
104
-
105
- }
106
-
107
  }
108
 
109
 
110
  if( !class_exists('AjaxLoadMore') ):
111
 
112
- class AjaxLoadMore {
113
-
114
- function __construct(){
115
-
116
  $this->alm_define_constants();
117
  $this->alm_includes();
118
-
119
  add_action( 'wp_ajax_alm_query_posts', array(&$this, 'alm_query_posts') );
120
  add_action( 'wp_ajax_nopriv_alm_query_posts', array(&$this, 'alm_query_posts') );
121
  add_action( 'wp_ajax_alm_query_total', array(&$this, 'alm_query_total') );
122
- add_action( 'wp_ajax_nopriv_alm_query_total', array(&$this, 'alm_query_total') );
123
- add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
124
- add_action( 'after_setup_theme', array(&$this, 'alm_image_sizes') );
125
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links') );
126
- add_filter( 'plugin_row_meta', array(&$this, 'alm_plugin_meta_links'), 10, 2 );
127
- add_shortcode( 'ajax_load_more', array(&$this, 'alm_shortcode') );
128
- add_filter( 'widget_text', 'do_shortcode' ); // Allow shortcodes in widget areas
129
- load_plugin_textdomain( 'ajax-load-more', false, dirname(plugin_basename( __FILE__ )).'/lang/'); //load text domain
130
-
131
  }
132
-
133
-
134
-
135
  /*
136
  * alm_define_constants
137
  * Define plugin constants
138
  *
139
  * @since 2.10.1
140
  */
141
-
142
  public function alm_define_constants(){
143
-
144
  define('ALM_PATH', plugin_dir_path(__FILE__));
145
  define('ALM_URL', plugins_url('', __FILE__));
146
- define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
147
- define('ALM_NAME', '_ajax_load_more');
148
- define('ALM_TITLE', 'Ajax Load More');
149
-
150
  if (!defined('ALM_CACHE_ITEM_NAME')) define('ALM_CACHE_ITEM_NAME', '4878');
151
  if (!defined('ALM_CTA_ITEM_NAME')) define('ALM_CTA_ITEM_NAME', '14456');
152
  if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
@@ -159,106 +158,117 @@ if( !class_exists('AjaxLoadMore') ):
159
  if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105');
160
  if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
161
  if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
162
-
163
  }
164
-
165
-
166
  /*
167
  * alm_includes
168
  * Load these files before the theme loads
169
  *
170
  * @since 2.0.0
171
  */
172
-
173
  public function alm_includes(){
174
-
175
  include_once( ALM_PATH . 'core/functions.php'); // Functions
176
  include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Shortcode
177
  include_once( ALM_PATH . 'core/classes/class.alm-enqueue.php'); // Enqueue
178
-
179
  if( is_admin() ){
180
  include_once('admin/editor/editor.php');
181
  include_once('admin/admin.php');
182
  include_once('admin/admin-functions.php');
183
  }
184
-
185
- }
186
-
187
-
188
-
189
  /*
190
  * alm_action_links
191
  * Add plugin action links to WP plugin screen
192
  *
193
  * @since 2.2.3
194
- */
195
-
196
  public function alm_action_links( $links ) {
197
  $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more') .'">'.__('Settings', 'ajax-load-more').'</a>';
198
  return $links;
199
  }
200
-
201
-
202
-
203
  /*
204
  * alm_plugin_meta_links
205
  * Add plugin meta links to WP plugin screen
206
  *
207
  * @since 2.7.2.1
208
- */
209
-
210
  public function alm_plugin_meta_links( $links, $file ) {
211
  if ( strpos( $file, 'ajax-load-more.php' ) !== false ) {
212
  $new_links = array(
213
  '<a href="admin.php?page=ajax-load-more-shortcode-builder">Shortcode Builder</a>',
214
  '<a href="admin.php?page=ajax-load-more-add-ons">Add-ons</a>',
215
  );
216
-
217
  $links = array_merge( $links, $new_links );
218
  }
219
-
220
- return $links;
221
  }
222
-
223
-
224
-
225
  /*
226
  * alm_image_sizes
227
  * Add default image size
228
  *
229
  * @since 2.8.3
230
  */
231
-
232
- public function alm_image_sizes(){
233
  add_image_size( 'alm-thumbnail', 150, 150, true); // Custom ALM thumbnail size
234
- }
235
-
236
-
237
-
238
  /*
239
  * alm_enqueue_scripts
240
  * Enqueue our scripts and create our localize variables
241
  *
242
  * @since 2.0.0
243
  */
244
-
245
  public function alm_enqueue_scripts(){
246
- $options = get_option( 'alm_settings' );
247
-
248
- // Load JS
249
- //wp_register_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.js', __FILE__ ), array('jquery'), ALM_VERSION, true );
250
- wp_register_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.min.js', __FILE__ ), array('jquery'), ALM_VERSION, true );
251
-
252
-
253
- // Load CSS
254
- if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
255
-
 
 
 
 
 
 
 
 
 
 
 
 
256
  //$file = plugins_url('/core/css/ajax-load-more.css', __FILE__ );
257
  $file = plugins_url('/core/css/ajax-load-more.min.css', __FILE__ );
258
  ALM_ENQUEUE::alm_enqueue_css('ajax-load-more', $file);
259
-
260
- }
261
-
262
  // Prevent loading of unnessasry posts - move user to top of page
263
  $scrolltop = 'false';
264
  if(!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1'){ // if unset or false
@@ -266,7 +276,7 @@ if( !class_exists('AjaxLoadMore') ):
266
  }else{ // if checked
267
  $scrolltop = 'true';
268
  }
269
-
270
  wp_localize_script(
271
  'ajax-load-more', 'alm_localize',
272
  array(
@@ -277,77 +287,77 @@ if( !class_exists('AjaxLoadMore') ):
277
  'ajax_object' => array('is_single' => true, 'is_singular' => true )
278
  )
279
  );
280
-
281
  }
282
-
283
-
284
-
285
  /*
286
  * alm_shortcode
287
  * The AjaxLoadMore shortcode
288
  *
289
  * @since 2.0.0
290
  */
291
-
292
- public function alm_shortcode($atts) {
293
- return ALM_SHORTCODE::alm_render_shortcode($atts);
294
  }
295
-
296
-
297
-
298
  /*
299
  * alm_query_posts
300
  * Ajax Load More Query
301
  *
302
  * @since 2.0.0
303
  */
304
-
305
  public function alm_query_posts() {
306
-
307
- $nonce = $_GET['nonce'];
308
- $options = get_option( 'alm_settings' );
309
- if(!is_user_logged_in()){ // Skip nonce verification if user is logged in
310
- $options = get_option( 'alm_settings' );
311
  // check alm_settings for _alm_nonce_security
312
- if(isset($options['_alm_nonce_security']) & $options['_alm_nonce_security'] == '1'){
313
  if (! wp_verify_nonce( $nonce, 'ajax_load_more_nonce' )) // Check our nonce, if they don't match then bounce!
314
- die('Error, could not verify WP nonce.');
315
  }
316
- }
317
-
318
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
319
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
320
  $canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
321
-
322
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
323
-
324
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
325
-
326
- $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
327
  $type = alm_get_repeater_type($repeater);
328
- $theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';
329
-
330
  $postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
331
  $post_format = (isset($_GET['post_format'])) ? $_GET['post_format'] : '';
332
-
333
  $category = (isset($_GET['category'])) ? $_GET['category'] : '';
334
  $category__not_in = (isset($_GET['category__not_in'])) ? $_GET['category__not_in'] : '';
335
  $tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
336
  $tag__not_in = (isset($_GET['tag__not_in'])) ? $_GET['tag__not_in'] : '';
337
-
338
  // Taxonomy
339
  $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
340
  $taxonomy_terms = (isset($_GET['taxonomy_terms'])) ? $_GET['taxonomy_terms'] : '';
341
  $taxonomy_operator = $_GET['taxonomy_operator'];
342
- if(empty($taxonomy_operator)) $taxonomy_operator = 'IN';
343
  $taxonomy_relation = (isset($_GET['taxonomy_relation'])) ? $_GET['taxonomy_relation'] : 'AND';
344
- if($taxonomy_relation == '') $taxonomy_relation = 'AND';
345
-
346
  // Date
347
  $year = (isset($_GET['year'])) ? $_GET['year'] : '';
348
  $month = (isset($_GET['month'])) ? $_GET['month'] : '';
349
  $day = (isset($_GET['day'])) ? $_GET['day'] : '';
350
-
351
  // Custom Fields
352
  $meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';
353
  $meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';
@@ -356,27 +366,29 @@ if( !class_exists('AjaxLoadMore') ):
356
  if($meta_compare === 'lessthan') $meta_compare = '<'; // do_shortcode fix (shortcode was rendering as HTML)
357
  if($meta_compare === 'lessthanequalto') $meta_compare = '<='; // do_shortcode fix (shortcode was rendering as HTML)
358
  $meta_relation = $_GET['meta_relation'];
359
- if($meta_relation == '') $meta_relation = 'AND';
360
  $meta_type = $_GET['meta_type'];
361
- if($meta_type == '') $meta_type = 'CHAR';
362
-
363
- $s = (isset($_GET['search'])) ? $_GET['search'] : '';
364
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
365
-
366
- // Author
367
- $author = (isset($_GET['author'])) ? $_GET['author'] : '';
368
-
369
  // Ordering
370
  $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
371
  $orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'date';
372
-
373
- // Include, Exclude, Offset, Status
 
 
374
  $post__in = (isset($_GET['post__in'])) ? $_GET['post__in'] : '';
375
- $post__not_in = (isset($_GET['post__not_in'])) ? $_GET['post__not_in'] : '';
376
- $exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
377
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
378
  $post_status = $_GET['post_status'];
379
- if($post_status == '') $post_status = 'publish';
380
  if($post_status != 'publish' && $post_status != 'inherit'){
381
  // If not 'publish', OR 'inherit' confirm user has rights to view these old posts.
382
  if (current_user_can( 'edit_theme_options' )){
@@ -384,30 +396,30 @@ if( !class_exists('AjaxLoadMore') ):
384
  } else {
385
  $post_status = 'publish';
386
  }
387
- }
388
-
389
-
390
  // Page Parameters
391
- $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
392
- $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
393
-
394
-
395
  // Preload Add-on
396
- $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
397
- $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
398
- if(has_action('alm_preload_installed') && $preloaded === 'true'){
399
- // If preload - offset the ajax posts by posts_per_page + preload_amount val
400
- $old_offset = $preloaded_amount;
401
- $offset = $offset + $preloaded_amount;
402
  }
403
-
404
-
405
  // CTA Add-on
406
  $cta = false;
407
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
408
  if($ctaData){
409
  $cta = true;
410
- $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1';
411
  $cta_position_array = explode(":", $cta_position);
412
  $cta_pos = (string)$cta_position_array[0];
413
  $cta_val = (string)$cta_position_array[1];
@@ -417,118 +429,119 @@ if( !class_exists('AjaxLoadMore') ):
417
  $cta_repeater = (isset($ctaData['cta_repeater'])) ? $ctaData['cta_repeater'] : 'null';
418
  $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? $ctaData['cta_theme_repeater'] : 'null';
419
  }
420
-
421
-
422
  // Previous Post Add-on
423
  $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
424
  $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
425
-
426
-
427
  // Paging Add-on
428
  $paging = (isset($_GET['paging'])) ? $_GET['paging'] : false;
429
-
430
-
431
  // SEO Add-on
432
- $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
433
-
434
-
435
- // Language (Is this required?)
436
  $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
437
-
438
- // Set up initial query arguments
439
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
440
  $args = array(
441
  'post_type' => $postType,
442
  'posts_per_page' => $posts_per_page,
443
  'offset' => $offset + ($posts_per_page*$page),
444
  'order' => $order,
445
- 'orderby' => $orderby,
446
  'post_status' => $post_status,
447
- 'ignore_sticky_posts' => false,
448
  'paged' => $paged,
449
  );
450
-
 
451
  // Paging
452
  // If !paging, turn off pagination information to improve wp_query performance
453
- if(!$paging){
454
- $args['no_found_rows'] = true;
455
  }
456
-
457
  // Post Format & Taxonomy
458
  // - Both use tax_query, so we combine these queries
459
- if(!empty($post_format) || !empty($taxonomy)){
460
-
461
  $tax_query_total = count(explode(":", $taxonomy)); // Total $taxonomy objects
462
  $taxonomy = explode(":", $taxonomy); // convert to array
463
  $taxonomy_terms = explode(":", $taxonomy_terms); // convert to array
464
- $taxonomy_operator = explode(":", $taxonomy_operator); // convert to array
465
-
466
  if(empty($taxonomy)){
467
-
468
  // Post Format only
469
  $args['tax_query'] = array(
470
  alm_get_post_format($post_format),
471
- );
472
-
473
  }else{
474
-
475
- // Post Formats
476
  $args['tax_query'] = array(
477
  'relation' => $taxonomy_relation,
478
  alm_get_post_format( $post_format )
479
- );
480
-
481
- // Loop Taxonomies
482
  for($tax_i = 0; $tax_i < $tax_query_total; $tax_i++){
483
  $args['tax_query'][] = alm_get_taxonomy_query($taxonomy[$tax_i], $taxonomy_terms[$tax_i], $taxonomy_operator[$tax_i]);
484
  }
485
  }
486
-
487
  }
488
-
489
  // Category
490
  if(!empty($category)){
491
  $args['category_name'] = $category;
492
  }
493
-
494
  // Category Not In
495
  if(!empty($category__not_in)){
496
  $exclude_cats = explode(",",$category__not_in);
497
  $args['category__not_in'] = $exclude_cats;
498
  }
499
-
500
  // Tag
501
  if(!empty($tag)){
502
  $args['tag'] = $tag;
503
  }
504
-
505
  // Tag Not In
506
  if(!empty($tag__not_in)){
507
  $exclude_tags = explode(",",$tag__not_in);
508
  $args['tag__not_in'] = $exclude_tags;
509
  }
510
-
511
  // Date (not using date_query as there was issue with year/month archives)
512
  if(!empty($year)){
513
  $args['year'] = $year;
514
- }
515
  if(!empty($month)){
516
  $args['monthnum'] = $month;
517
- }
518
  if(!empty($day)){
519
  $args['day'] = $day;
520
- }
521
-
522
  // Meta Query
523
  if(!empty($meta_key) && !empty($meta_value) || !empty($meta_key) && $meta_compare !== "IN"){
524
-
525
- // Parse multiple meta query
526
  $meta_query_total = count(explode(":", $meta_key)); // Total meta_query objects
527
  $meta_keys = explode(":", $meta_key); // convert to array
528
  $meta_value = explode(":", $meta_value); // convert to array
529
  $meta_compare = explode(":", $meta_compare); // convert to array
530
  $meta_type = explode(":", $meta_type); // convert to array
531
-
532
  if($meta_query_total == 1){
533
  $args['meta_query'] = array(
534
  alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
@@ -537,49 +550,49 @@ if( !class_exists('AjaxLoadMore') ):
537
  if($meta_query_total == 2){
538
  $args['meta_query'] = array(
539
  'relation' => $meta_relation,
540
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
541
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
542
  );
543
  }
544
  if($meta_query_total == 3){
545
  $args['meta_query'] = array(
546
  'relation' => $meta_relation,
547
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
548
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
549
- alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
550
  );
551
  }
552
  if($meta_query_total == 4){
553
  $args['meta_query'] = array(
554
  'relation' => $meta_relation,
555
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
556
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
557
- alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
558
- alm_get_meta_query($meta_keys[3], $meta_value[3], $meta_compare[3], $meta_type[3]),
559
  );
560
  }
561
-
562
  }
563
-
564
  // Meta_key
565
  if(!empty($meta_key)){ // ordering by meta value
566
  if (strpos($orderby, 'meta_value') !== false) { // Only order by meta_key, if $orderby is set to meta_value{_num}
567
  $meta_key_single = explode(":", $meta_key);
568
  $args['meta_key'] = $meta_key_single[0];
569
  }
570
- }
571
-
572
  // Author
573
  if(!empty($author)){
574
  $args['author'] = $author;
575
- }
576
-
577
  // Include posts
578
  if(!empty($post__in)){
579
  $post__in = explode(",",$post__in);
580
  $args['post__in'] = $post__in;
581
- }
582
-
583
  // Exclude posts
584
  if(!empty($post__not_in)){
585
  $post__not_in = explode(",",$post__not_in);
@@ -589,42 +602,65 @@ if( !class_exists('AjaxLoadMore') ):
589
  $exclude = explode(",",$exclude);
590
  $args['post__not_in'] = $exclude;
591
  }
592
-
593
  // Search Term
594
  if(!empty($s)){
595
  $args['s'] = $s;
596
  }
597
-
598
- // Custom Args
599
  if(!empty($custom_args)){
600
  $custom_args_array = explode(";",$custom_args); // Split the $custom_args at ','
601
- foreach($custom_args_array as $argument){ // Loop each $argument
602
-
603
- $argument = preg_replace('/\s+/', '', $argument); // Remove all whitespace
604
- $argument = explode(":",$argument); // Split the $argument at ':'
605
  $argument_arr = explode(",", $argument[1]); // explode $argument[1] at ','
606
  if(sizeof($argument_arr) > 1){
607
  $args[$argument[0]] = $argument_arr;
608
  }else{
609
- $args[$argument[0]] = $argument[1];
610
- }
611
  }
612
- }
613
-
614
  // Language
615
  if(!empty($lang)){
616
  $args['lang'] = $lang;
617
  }
618
-
619
- // Set current page number for determining item number
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
620
  if($page == 0){
621
  $alm_page_count = 1;
622
- }else{
623
  $alm_page_count = $page + 1;
624
- }
625
-
626
-
627
-
628
  /*
629
  * alm_prev_post_args
630
  *
@@ -632,13 +668,13 @@ if( !class_exists('AjaxLoadMore') ):
632
  * Hijack $args and and return previous post only $args
633
  *
634
  * @return $args;
635
- */
636
  if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
637
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
638
- }
639
-
640
-
641
-
642
  /*
643
  * alm_modify_query_args
644
  *
@@ -647,20 +683,20 @@ if( !class_exists('AjaxLoadMore') ):
647
  * @return $args;
648
  */
649
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
650
-
651
-
652
-
653
  /*
654
  * alm_query_args_[id]
655
  *
656
  * ALM Core Filter Hook
657
  *
658
  * @return $args;
659
- */
660
- $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
661
-
662
-
663
-
664
  /*
665
  * WP_Query
666
  *
@@ -668,12 +704,12 @@ if( !class_exists('AjaxLoadMore') ):
668
  *
669
  * @return $alm_query;
670
  */
671
-
672
  $alm_query = new WP_Query( $args );
673
-
674
-
675
  // If preloaded, update our loop count and total posts
676
- if(has_action('alm_preload_installed') && $preloaded === 'true'){
677
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
678
  if($old_offset > 0)
679
  $alm_loop_count = $old_offset;
@@ -683,9 +719,9 @@ if( !class_exists('AjaxLoadMore') ):
683
  $alm_total_posts = $alm_query->found_posts - $offset;
684
  $alm_loop_count = 0;
685
  }
686
-
687
-
688
-
689
  /*
690
  * alm_cache_create_dir
691
  *
@@ -694,70 +730,70 @@ if( !class_exists('AjaxLoadMore') ):
694
  *
695
  * @return null
696
  */
697
- if(!empty($cache_id) && has_action('alm_cache_create_dir')){
698
- apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
699
  $page_cache = ''; // set our page cache variable
700
- }
701
-
702
-
703
- if($queryType === 'standard'){
704
-
705
  // Run the loop
706
-
707
- if ($alm_query->have_posts()) {
708
-
709
  $alm_found_posts = $alm_total_posts;
710
- $alm_post_count = $alm_query->post_count;
711
- $alm_current = 0;
712
  $alm_has_cta = false;
713
-
714
- $cta_array = Array();
715
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
716
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $cta_repeat);
717
- }
718
-
719
  ob_start();
720
-
721
- // ALM Loop
722
-
723
- while ($alm_query->have_posts()): $alm_query->the_post();
724
-
725
- $alm_loop_count++;
726
- $alm_current++;
727
- $alm_page = $alm_page_count; // Get page number
728
- $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
729
-
730
-
731
  // Call to Action [Before]
732
- if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
733
- do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
734
  $alm_has_cta = true;
735
- }
736
-
737
-
738
  // Repeater Template
739
  if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater
740
  do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
741
  }else{
742
  include(alm_get_current_repeater( $repeater, $type )); // Repeater
743
  }
744
- // End Repeater Template
745
-
746
-
747
  // Call to Action [After]
748
- if($cta && has_action('alm_cta_inc') && $cta_pos === 'after' && in_array($alm_current, $cta_array)){
749
- do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
750
  $alm_has_cta = true;
751
- }
752
-
753
-
754
  endwhile; wp_reset_query();
755
-
756
- // End ALM Loop
757
-
758
  $data = ob_get_clean();
759
-
760
-
761
  /*
762
  * alm_cache_file
763
  *
@@ -766,12 +802,12 @@ if( !class_exists('AjaxLoadMore') ):
766
  *
767
  * @return null
768
  */
769
- if(!empty($cache_id) && has_action('alm_cache_installed')){
770
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
771
- }
772
-
773
-
774
-
775
  /*
776
  * alm_debug
777
  *
@@ -780,20 +816,20 @@ if( !class_exists('AjaxLoadMore') ):
780
  * @return $alm_query/false;
781
  */
782
  $debug = (apply_filters('alm_debug', false)) ? $alm_query : false;
783
-
784
-
785
- $return = array(
786
  'html' => $data,
787
  'meta' => array(
788
  'postcount' => $alm_post_count,
789
  'totalposts' => $alm_found_posts,
790
  'debug' => $debug
791
  )
792
- );
793
  wp_send_json($return);
794
-
795
  } else {
796
-
797
  $return = array(
798
  'html' => null,
799
  'meta' => array(
@@ -801,40 +837,40 @@ if( !class_exists('AjaxLoadMore') ):
801
  'totalposts' => 0,
802
  'debug' => null
803
  )
804
- );
805
  wp_send_json($return);
806
-
807
  }
808
-
809
  }
810
- elseif($queryType === 'totalposts'){ // Paging add-on
811
-
812
- echo $alm_total_posts;
813
-
814
  }
815
-
816
  wp_die();
817
  }
818
-
819
  }
820
-
821
-
822
  /*
823
  * AjaxLoadMore
824
  * The main function responsible for returning the one true AjaxLoadMore Instance to functions everywhere.
825
  *
826
  * @since 2.0.0
827
  */
828
-
829
  function AjaxLoadMore(){
830
  global $ajax_load_more;
831
-
832
  if( !isset($ajax_load_more))
833
  $ajax_load_more = new AjaxLoadMore();
834
-
835
  return $ajax_load_more;
836
- }
837
  AjaxLoadMore(); // initialize
838
-
839
 
840
  endif; // class_exists check
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
+ Version: 2.14.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
+ */
14
 
15
+ define('ALM_VERSION', '2.14.1');
16
+ define('ALM_RELEASE', 'March 24, 2017');
17
+ define('ALM_STORE_URL', 'https://connekthq.com');
 
18
 
19
 
20
 
21
  /*
22
  * alm_install
23
+ *
24
  * Activation hook
25
  * Create table for storing repeater
26
  *
27
  * @since 2.0.0
28
  */
29
 
30
+ function alm_install($network_wide) {
31
+
32
  global $wpdb;
33
+ add_option( "alm_version", ALM_VERSION ); // Add to WP Option tbl
34
+
35
+ if ( is_multisite() && $network_wide ) {
36
+
37
  // Get all blogs in the network and activate plugin on each one
38
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
39
  foreach ( $blog_ids as $blog_id ) {
44
  } else {
45
  alm_create_table();
46
  }
47
+
48
  }
49
  register_activation_hook( __FILE__, 'alm_install' );
50
  add_action( 'wpmu_new_blog', 'alm_install' );
53
 
54
  /*
55
  * alm_create_table
56
+ *
57
  * Create new table and repeater template
58
  *
59
  * @since 2.0.0
60
  */
61
  function alm_create_table(){
62
+
63
+ global $wpdb;
64
  $table_name = $wpdb->prefix . "alm";
65
  $blog_id = $wpdb->blogid;
66
+
67
+ $defaultRepeater = '<li <?php if (!has_post_thumbnail()) { ?> class="no-img"<?php } ?>><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(150,150));}?><h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3><p class="entry-meta"><?php the_time("F d, Y"); ?></p><?php the_excerpt(); ?></li>';
68
+
69
  /* MULTISITE */
70
  /* if this is a multisite blog and it's not id = 1, create default template */
71
+ if($blog_id > 1){
72
+
73
  $dir = ALM_PATH. 'core/repeater/'. $blog_id;
74
  if( !is_dir($dir) ){
75
  mkdir($dir);
76
  }
77
+
78
  $file = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
79
  if( !file_exists($file) ){
80
  $tmp = fopen($file, 'w');
81
  $w = fwrite($tmp, $defaultRepeater);
82
  fclose($tmp);
83
  }
84
+
85
+ }
86
+
87
+ //Create table, if it doesn't already exist.
88
+ if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
89
+
90
  $sql = "CREATE TABLE $table_name (
91
  id mediumint(9) NOT NULL AUTO_INCREMENT,
92
  name text NOT NULL,
94
  repeaterType text NOT NULL,
95
  pluginVersion text NOT NULL,
96
  UNIQUE KEY id (id)
97
+ );";
98
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
99
  dbDelta( $sql );
100
+
101
  //Insert the default data in created table
102
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'repeaterType' => 'default', 'pluginVersion' => ALM_VERSION));
103
+
104
+ }
105
+
106
  }
107
 
108
 
109
  if( !class_exists('AjaxLoadMore') ):
110
 
111
+ class AjaxLoadMore {
112
+
113
+ function __construct(){
114
+
115
  $this->alm_define_constants();
116
  $this->alm_includes();
117
+
118
  add_action( 'wp_ajax_alm_query_posts', array(&$this, 'alm_query_posts') );
119
  add_action( 'wp_ajax_nopriv_alm_query_posts', array(&$this, 'alm_query_posts') );
120
  add_action( 'wp_ajax_alm_query_total', array(&$this, 'alm_query_total') );
121
+ add_action( 'wp_ajax_nopriv_alm_query_total', array(&$this, 'alm_query_total') );
122
+ add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
123
+ add_action( 'after_setup_theme', array(&$this, 'alm_image_sizes') );
124
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links') );
125
+ add_filter( 'plugin_row_meta', array(&$this, 'alm_plugin_meta_links'), 10, 2 );
126
+ add_shortcode( 'ajax_load_more', array(&$this, 'alm_shortcode') );
127
+ add_filter( 'widget_text', 'do_shortcode' ); // Allow shortcodes in widget areas
128
+ load_plugin_textdomain( 'ajax-load-more', false, dirname(plugin_basename( __FILE__ )).'/lang/'); //load text domain
129
+
130
  }
131
+
132
+
133
+
134
  /*
135
  * alm_define_constants
136
  * Define plugin constants
137
  *
138
  * @since 2.10.1
139
  */
140
+
141
  public function alm_define_constants(){
142
+
143
  define('ALM_PATH', plugin_dir_path(__FILE__));
144
  define('ALM_URL', plugins_url('', __FILE__));
145
+ define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
146
+ define('ALM_NAME', '_ajax_load_more');
147
+ define('ALM_TITLE', 'Ajax Load More');
148
+
149
  if (!defined('ALM_CACHE_ITEM_NAME')) define('ALM_CACHE_ITEM_NAME', '4878');
150
  if (!defined('ALM_CTA_ITEM_NAME')) define('ALM_CTA_ITEM_NAME', '14456');
151
  if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
158
  if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105');
159
  if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
160
  if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
161
+
162
  }
163
+
164
+
165
  /*
166
  * alm_includes
167
  * Load these files before the theme loads
168
  *
169
  * @since 2.0.0
170
  */
171
+
172
  public function alm_includes(){
173
+
174
  include_once( ALM_PATH . 'core/functions.php'); // Functions
175
  include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Shortcode
176
  include_once( ALM_PATH . 'core/classes/class.alm-enqueue.php'); // Enqueue
177
+
178
  if( is_admin() ){
179
  include_once('admin/editor/editor.php');
180
  include_once('admin/admin.php');
181
  include_once('admin/admin-functions.php');
182
  }
183
+
184
+ }
185
+
186
+
187
+
188
  /*
189
  * alm_action_links
190
  * Add plugin action links to WP plugin screen
191
  *
192
  * @since 2.2.3
193
+ */
194
+
195
  public function alm_action_links( $links ) {
196
  $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more') .'">'.__('Settings', 'ajax-load-more').'</a>';
197
  return $links;
198
  }
199
+
200
+
201
+
202
  /*
203
  * alm_plugin_meta_links
204
  * Add plugin meta links to WP plugin screen
205
  *
206
  * @since 2.7.2.1
207
+ */
208
+
209
  public function alm_plugin_meta_links( $links, $file ) {
210
  if ( strpos( $file, 'ajax-load-more.php' ) !== false ) {
211
  $new_links = array(
212
  '<a href="admin.php?page=ajax-load-more-shortcode-builder">Shortcode Builder</a>',
213
  '<a href="admin.php?page=ajax-load-more-add-ons">Add-ons</a>',
214
  );
215
+
216
  $links = array_merge( $links, $new_links );
217
  }
218
+
219
+ return $links;
220
  }
221
+
222
+
223
+
224
  /*
225
  * alm_image_sizes
226
  * Add default image size
227
  *
228
  * @since 2.8.3
229
  */
230
+
231
+ public function alm_image_sizes(){
232
  add_image_size( 'alm-thumbnail', 150, 150, true); // Custom ALM thumbnail size
233
+ }
234
+
235
+
236
+
237
  /*
238
  * alm_enqueue_scripts
239
  * Enqueue our scripts and create our localize variables
240
  *
241
  * @since 2.0.0
242
  */
243
+
244
  public function alm_enqueue_scripts(){
245
+
246
+ // Get ALM Options
247
+ $options = get_option( 'alm_settings' );
248
+
249
+
250
+ /*
251
+ * alm_js_dependencies
252
+ *
253
+ * ALM Core Filter
254
+ *
255
+ * @return bool
256
+ */
257
+ $dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
258
+
259
+
260
+ // Load JS
261
+ //wp_register_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.js', __FILE__ ), $dependencies, ALM_VERSION, true );
262
+ wp_register_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.min.js', __FILE__ ), $dependencies, ALM_VERSION, true );
263
+
264
+
265
+ // Load CSS
266
+ if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
267
  //$file = plugins_url('/core/css/ajax-load-more.css', __FILE__ );
268
  $file = plugins_url('/core/css/ajax-load-more.min.css', __FILE__ );
269
  ALM_ENQUEUE::alm_enqueue_css('ajax-load-more', $file);
270
+ }
271
+
 
272
  // Prevent loading of unnessasry posts - move user to top of page
273
  $scrolltop = 'false';
274
  if(!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1'){ // if unset or false
276
  }else{ // if checked
277
  $scrolltop = 'true';
278
  }
279
+
280
  wp_localize_script(
281
  'ajax-load-more', 'alm_localize',
282
  array(
287
  'ajax_object' => array('is_single' => true, 'is_singular' => true )
288
  )
289
  );
290
+
291
  }
292
+
293
+
294
+
295
  /*
296
  * alm_shortcode
297
  * The AjaxLoadMore shortcode
298
  *
299
  * @since 2.0.0
300
  */
301
+
302
+ public function alm_shortcode($atts) {
303
+ return ALM_SHORTCODE::alm_render_shortcode($atts);
304
  }
305
+
306
+
307
+
308
  /*
309
  * alm_query_posts
310
  * Ajax Load More Query
311
  *
312
  * @since 2.0.0
313
  */
314
+
315
  public function alm_query_posts() {
316
+
317
+ $nonce = $_GET['nonce'];
318
+ $options = get_option( 'alm_settings' );
319
+ if(!is_user_logged_in()){ // Skip nonce verification if user is logged in
320
+ $options = get_option( 'alm_settings' );
321
  // check alm_settings for _alm_nonce_security
322
+ if(isset($options['_alm_nonce_security']) & $options['_alm_nonce_security'] == '1'){
323
  if (! wp_verify_nonce( $nonce, 'ajax_load_more_nonce' )) // Check our nonce, if they don't match then bounce!
324
+ die('Error, could not verify WP nonce.');
325
  }
326
+ }
327
+
328
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
329
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
330
  $canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
331
+
332
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
333
+
334
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
335
+
336
+ $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
337
  $type = alm_get_repeater_type($repeater);
338
+ $theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';
339
+
340
  $postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
341
  $post_format = (isset($_GET['post_format'])) ? $_GET['post_format'] : '';
342
+
343
  $category = (isset($_GET['category'])) ? $_GET['category'] : '';
344
  $category__not_in = (isset($_GET['category__not_in'])) ? $_GET['category__not_in'] : '';
345
  $tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
346
  $tag__not_in = (isset($_GET['tag__not_in'])) ? $_GET['tag__not_in'] : '';
347
+
348
  // Taxonomy
349
  $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
350
  $taxonomy_terms = (isset($_GET['taxonomy_terms'])) ? $_GET['taxonomy_terms'] : '';
351
  $taxonomy_operator = $_GET['taxonomy_operator'];
352
+ if(empty($taxonomy_operator)) $taxonomy_operator = 'IN';
353
  $taxonomy_relation = (isset($_GET['taxonomy_relation'])) ? $_GET['taxonomy_relation'] : 'AND';
354
+ if($taxonomy_relation == '') $taxonomy_relation = 'AND';
355
+
356
  // Date
357
  $year = (isset($_GET['year'])) ? $_GET['year'] : '';
358
  $month = (isset($_GET['month'])) ? $_GET['month'] : '';
359
  $day = (isset($_GET['day'])) ? $_GET['day'] : '';
360
+
361
  // Custom Fields
362
  $meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';
363
  $meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';
366
  if($meta_compare === 'lessthan') $meta_compare = '<'; // do_shortcode fix (shortcode was rendering as HTML)
367
  if($meta_compare === 'lessthanequalto') $meta_compare = '<='; // do_shortcode fix (shortcode was rendering as HTML)
368
  $meta_relation = $_GET['meta_relation'];
369
+ if($meta_relation == '') $meta_relation = 'AND';
370
  $meta_type = $_GET['meta_type'];
371
+ if($meta_type == '') $meta_type = 'CHAR';
372
+
373
+ $s = (isset($_GET['search'])) ? $_GET['search'] : '';
374
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
375
+
376
+ // Author
377
+ $author = (isset($_GET['author'])) ? $_GET['author'] : '';
378
+
379
  // Ordering
380
  $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
381
  $orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'date';
382
+
383
+ // Sticky, Include, Exclude, Offset, Status
384
+ $sticky = (isset($_GET['sticky_posts'])) ? $_GET['sticky_posts'] : '';
385
+ $sticky = ($sticky === 'true') ? true : false;
386
  $post__in = (isset($_GET['post__in'])) ? $_GET['post__in'] : '';
387
+ $post__not_in = (isset($_GET['post__not_in'])) ? $_GET['post__not_in'] : '';
388
+ $exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
389
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
390
  $post_status = $_GET['post_status'];
391
+ if($post_status == '') $post_status = 'publish';
392
  if($post_status != 'publish' && $post_status != 'inherit'){
393
  // If not 'publish', OR 'inherit' confirm user has rights to view these old posts.
394
  if (current_user_can( 'edit_theme_options' )){
396
  } else {
397
  $post_status = 'publish';
398
  }
399
+ }
400
+
401
+
402
  // Page Parameters
403
+ $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
404
+ $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
405
+
406
+
407
  // Preload Add-on
408
+ $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
409
+ $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
410
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
411
+ // If preload - offset the ajax posts by posts_per_page + preload_amount val
412
+ $old_offset = $preloaded_amount;
413
+ $offset = $offset + $preloaded_amount;
414
  }
415
+
416
+
417
  // CTA Add-on
418
  $cta = false;
419
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
420
  if($ctaData){
421
  $cta = true;
422
+ $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1';
423
  $cta_position_array = explode(":", $cta_position);
424
  $cta_pos = (string)$cta_position_array[0];
425
  $cta_val = (string)$cta_position_array[1];
429
  $cta_repeater = (isset($ctaData['cta_repeater'])) ? $ctaData['cta_repeater'] : 'null';
430
  $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? $ctaData['cta_theme_repeater'] : 'null';
431
  }
432
+
433
+
434
  // Previous Post Add-on
435
  $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
436
  $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
437
+
438
+
439
  // Paging Add-on
440
  $paging = (isset($_GET['paging'])) ? $_GET['paging'] : false;
441
+
442
+
443
  // SEO Add-on
444
+ $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
445
+
446
+
447
+ // Language (Is this required?)
448
  $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
449
+
450
+ // Set up initial query arguments
451
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
452
  $args = array(
453
  'post_type' => $postType,
454
  'posts_per_page' => $posts_per_page,
455
  'offset' => $offset + ($posts_per_page*$page),
456
  'order' => $order,
457
+ 'orderby' => $orderby,
458
  'post_status' => $post_status,
459
+ 'ignore_sticky_posts' => true,
460
  'paged' => $paged,
461
  );
462
+
463
+
464
  // Paging
465
  // If !paging, turn off pagination information to improve wp_query performance
466
+ if(!$paging){
467
+ $args['no_found_rows'] = true;
468
  }
469
+
470
  // Post Format & Taxonomy
471
  // - Both use tax_query, so we combine these queries
472
+ if(!empty($post_format) || !empty($taxonomy)){
473
+
474
  $tax_query_total = count(explode(":", $taxonomy)); // Total $taxonomy objects
475
  $taxonomy = explode(":", $taxonomy); // convert to array
476
  $taxonomy_terms = explode(":", $taxonomy_terms); // convert to array
477
+ $taxonomy_operator = explode(":", $taxonomy_operator); // convert to array
478
+
479
  if(empty($taxonomy)){
480
+
481
  // Post Format only
482
  $args['tax_query'] = array(
483
  alm_get_post_format($post_format),
484
+ );
485
+
486
  }else{
487
+
488
+ // Post Formats
489
  $args['tax_query'] = array(
490
  'relation' => $taxonomy_relation,
491
  alm_get_post_format( $post_format )
492
+ );
493
+
494
+ // Loop Taxonomies
495
  for($tax_i = 0; $tax_i < $tax_query_total; $tax_i++){
496
  $args['tax_query'][] = alm_get_taxonomy_query($taxonomy[$tax_i], $taxonomy_terms[$tax_i], $taxonomy_operator[$tax_i]);
497
  }
498
  }
499
+
500
  }
501
+
502
  // Category
503
  if(!empty($category)){
504
  $args['category_name'] = $category;
505
  }
506
+
507
  // Category Not In
508
  if(!empty($category__not_in)){
509
  $exclude_cats = explode(",",$category__not_in);
510
  $args['category__not_in'] = $exclude_cats;
511
  }
512
+
513
  // Tag
514
  if(!empty($tag)){
515
  $args['tag'] = $tag;
516
  }
517
+
518
  // Tag Not In
519
  if(!empty($tag__not_in)){
520
  $exclude_tags = explode(",",$tag__not_in);
521
  $args['tag__not_in'] = $exclude_tags;
522
  }
523
+
524
  // Date (not using date_query as there was issue with year/month archives)
525
  if(!empty($year)){
526
  $args['year'] = $year;
527
+ }
528
  if(!empty($month)){
529
  $args['monthnum'] = $month;
530
+ }
531
  if(!empty($day)){
532
  $args['day'] = $day;
533
+ }
534
+
535
  // Meta Query
536
  if(!empty($meta_key) && !empty($meta_value) || !empty($meta_key) && $meta_compare !== "IN"){
537
+
538
+ // Parse multiple meta query
539
  $meta_query_total = count(explode(":", $meta_key)); // Total meta_query objects
540
  $meta_keys = explode(":", $meta_key); // convert to array
541
  $meta_value = explode(":", $meta_value); // convert to array
542
  $meta_compare = explode(":", $meta_compare); // convert to array
543
  $meta_type = explode(":", $meta_type); // convert to array
544
+
545
  if($meta_query_total == 1){
546
  $args['meta_query'] = array(
547
  alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
550
  if($meta_query_total == 2){
551
  $args['meta_query'] = array(
552
  'relation' => $meta_relation,
553
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
554
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
555
  );
556
  }
557
  if($meta_query_total == 3){
558
  $args['meta_query'] = array(
559
  'relation' => $meta_relation,
560
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
561
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
562
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
563
  );
564
  }
565
  if($meta_query_total == 4){
566
  $args['meta_query'] = array(
567
  'relation' => $meta_relation,
568
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
569
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
570
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
571
+ alm_get_meta_query($meta_keys[3], $meta_value[3], $meta_compare[3], $meta_type[3]),
572
  );
573
  }
574
+
575
  }
576
+
577
  // Meta_key
578
  if(!empty($meta_key)){ // ordering by meta value
579
  if (strpos($orderby, 'meta_value') !== false) { // Only order by meta_key, if $orderby is set to meta_value{_num}
580
  $meta_key_single = explode(":", $meta_key);
581
  $args['meta_key'] = $meta_key_single[0];
582
  }
583
+ }
584
+
585
  // Author
586
  if(!empty($author)){
587
  $args['author'] = $author;
588
+ }
589
+
590
  // Include posts
591
  if(!empty($post__in)){
592
  $post__in = explode(",",$post__in);
593
  $args['post__in'] = $post__in;
594
+ }
595
+
596
  // Exclude posts
597
  if(!empty($post__not_in)){
598
  $post__not_in = explode(",",$post__not_in);
602
  $exclude = explode(",",$exclude);
603
  $args['post__not_in'] = $exclude;
604
  }
605
+
606
  // Search Term
607
  if(!empty($s)){
608
  $args['s'] = $s;
609
  }
610
+
611
+ // Custom Args
612
  if(!empty($custom_args)){
613
  $custom_args_array = explode(";",$custom_args); // Split the $custom_args at ','
614
+ foreach($custom_args_array as $argument){ // Loop each $argument
615
+
616
+ $argument = preg_replace('/\s+/', '', $argument); // Remove all whitespace
617
+ $argument = explode(":",$argument); // Split the $argument at ':'
618
  $argument_arr = explode(",", $argument[1]); // explode $argument[1] at ','
619
  if(sizeof($argument_arr) > 1){
620
  $args[$argument[0]] = $argument_arr;
621
  }else{
622
+ $args[$argument[0]] = $argument[1];
623
+ }
624
  }
625
+ }
626
+
627
  // Language
628
  if(!empty($lang)){
629
  $args['lang'] = $lang;
630
  }
631
+
632
+ // Sticky Posts
633
+ if($sticky){
634
+ $sticky_posts = get_option( 'sticky_posts' ); // Get all sticky post ids
635
+
636
+ $sticky_query_args = $args;
637
+ $sticky_query_args['post__not_in'] = $sticky_posts;
638
+ $sticky_query_args['posts_per_page'] = -1;
639
+ $sticky_query_args['fields'] = 'ids';
640
+
641
+ $sticky_query = new WP_Query($sticky_query_args); // Query all non sticky posts
642
+
643
+ // If has sticky and regular posts
644
+ if($sticky_posts && $sticky_query->posts){
645
+ $standard_posts = $sticky_query->posts;
646
+ if($standard_posts){
647
+ $sticky_ids = array_merge($sticky_posts, $standard_posts); // merge regular posts with sticky
648
+ $args['post__in'] = $sticky_ids;
649
+ $args['orderby'] = 'post__in'; // set orderby to order by post__in.
650
+ }
651
+ }
652
+ }
653
+
654
+
655
+ // Set current page number for determining item number
656
  if($page == 0){
657
  $alm_page_count = 1;
658
+ }else{
659
  $alm_page_count = $page + 1;
660
+ }
661
+
662
+
663
+
664
  /*
665
  * alm_prev_post_args
666
  *
668
  * Hijack $args and and return previous post only $args
669
  *
670
  * @return $args;
671
+ */
672
  if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
673
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
674
+ }
675
+
676
+
677
+
678
  /*
679
  * alm_modify_query_args
680
  *
683
  * @return $args;
684
  */
685
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
686
+
687
+
688
+
689
  /*
690
  * alm_query_args_[id]
691
  *
692
  * ALM Core Filter Hook
693
  *
694
  * @return $args;
695
+ */
696
+ $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
697
+
698
+
699
+
700
  /*
701
  * WP_Query
702
  *
704
  *
705
  * @return $alm_query;
706
  */
707
+
708
  $alm_query = new WP_Query( $args );
709
+
710
+
711
  // If preloaded, update our loop count and total posts
712
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
713
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
714
  if($old_offset > 0)
715
  $alm_loop_count = $old_offset;
719
  $alm_total_posts = $alm_query->found_posts - $offset;
720
  $alm_loop_count = 0;
721
  }
722
+
723
+
724
+
725
  /*
726
  * alm_cache_create_dir
727
  *
730
  *
731
  * @return null
732
  */
733
+ if(!empty($cache_id) && has_action('alm_cache_create_dir')){
734
+ apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
735
  $page_cache = ''; // set our page cache variable
736
+ }
737
+
738
+
739
+ if($queryType === 'standard'){
740
+
741
  // Run the loop
742
+
743
+ if ($alm_query->have_posts()) {
744
+
745
  $alm_found_posts = $alm_total_posts;
746
+ $alm_post_count = $alm_query->post_count;
747
+ $alm_current = 0;
748
  $alm_has_cta = false;
749
+
750
+ $cta_array = Array();
751
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
752
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $cta_repeat);
753
+ }
754
+
755
  ob_start();
756
+
757
+ // ALM Loop
758
+
759
+ while ($alm_query->have_posts()): $alm_query->the_post();
760
+
761
+ $alm_loop_count++;
762
+ $alm_current++;
763
+ $alm_page = $alm_page_count; // Get page number
764
+ $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
765
+
766
+
767
  // Call to Action [Before]
768
+ if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
769
+ do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
770
  $alm_has_cta = true;
771
+ }
772
+
773
+
774
  // Repeater Template
775
  if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater
776
  do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
777
  }else{
778
  include(alm_get_current_repeater( $repeater, $type )); // Repeater
779
  }
780
+ // End Repeater Template
781
+
782
+
783
  // Call to Action [After]
784
+ if($cta && has_action('alm_cta_inc') && $cta_pos === 'after' && in_array($alm_current, $cta_array)){
785
+ do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
786
  $alm_has_cta = true;
787
+ }
788
+
789
+
790
  endwhile; wp_reset_query();
791
+
792
+ // End ALM Loop
793
+
794
  $data = ob_get_clean();
795
+
796
+
797
  /*
798
  * alm_cache_file
799
  *
802
  *
803
  * @return null
804
  */
805
+ if(!empty($cache_id) && has_action('alm_cache_installed')){
806
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
807
+ }
808
+
809
+
810
+
811
  /*
812
  * alm_debug
813
  *
816
  * @return $alm_query/false;
817
  */
818
  $debug = (apply_filters('alm_debug', false)) ? $alm_query : false;
819
+
820
+
821
+ $return = array(
822
  'html' => $data,
823
  'meta' => array(
824
  'postcount' => $alm_post_count,
825
  'totalposts' => $alm_found_posts,
826
  'debug' => $debug
827
  )
828
+ );
829
  wp_send_json($return);
830
+
831
  } else {
832
+
833
  $return = array(
834
  'html' => null,
835
  'meta' => array(
837
  'totalposts' => 0,
838
  'debug' => null
839
  )
840
+ );
841
  wp_send_json($return);
842
+
843
  }
844
+
845
  }
846
+ elseif($queryType === 'totalposts'){ // Paging add-on
847
+
848
+ echo $alm_total_posts;
849
+
850
  }
851
+
852
  wp_die();
853
  }
854
+
855
  }
856
+
857
+
858
  /*
859
  * AjaxLoadMore
860
  * The main function responsible for returning the one true AjaxLoadMore Instance to functions everywhere.
861
  *
862
  * @since 2.0.0
863
  */
864
+
865
  function AjaxLoadMore(){
866
  global $ajax_load_more;
867
+
868
  if( !isset($ajax_load_more))
869
  $ajax_load_more = new AjaxLoadMore();
870
+
871
  return $ajax_load_more;
872
+ }
873
  AjaxLoadMore(); // initialize
874
+
875
 
876
  endif; // class_exists check
core/classes/class.alm-enqueue.php CHANGED
@@ -13,11 +13,11 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  }
14
 
15
  if( !class_exists('ALM_ENQUEUE') ):
16
-
17
- class ALM_ENQUEUE {
18
-
19
-
20
-
21
  /**
22
  * alm_enqueue_css
23
  *
@@ -29,10 +29,10 @@ if( !class_exists('ALM_ENQUEUE') ):
29
  public static function alm_enqueue_css($name, $file){
30
  $css = '';
31
  $css_path = '';
32
- $dir = 'alm';
33
  $file_css = $name.'.css';
34
-
35
- // - Check theme for local ajax-load-more.css, if found, load that file
36
  if(is_child_theme()){
37
  $css = get_stylesheet_directory_uri().'/'. $dir .'/' .$file_css;
38
  $css_path = get_stylesheet_directory().'/'. $dir .'/' .$file_css;
@@ -46,17 +46,17 @@ if( !class_exists('ALM_ENQUEUE') ):
46
  $css = get_template_directory_uri().'/'. $dir .'/' .$file_css;
47
  $css_path = get_template_directory().'/'. $dir .'/' .$file_css;
48
  }
49
-
50
  if($css_path !== ''){ // If $css_path has been
51
- if(file_exists($css_path)){
52
- $file = $css;
53
- }
54
  }
55
-
56
- // Enqueue $file
57
  wp_enqueue_style( $name, $file );
58
  }
59
-
60
  }
61
-
62
- endif;
13
  }
14
 
15
  if( !class_exists('ALM_ENQUEUE') ):
16
+
17
+ class ALM_ENQUEUE {
18
+
19
+
20
+
21
  /**
22
  * alm_enqueue_css
23
  *
29
  public static function alm_enqueue_css($name, $file){
30
  $css = '';
31
  $css_path = '';
32
+ $dir = 'alm';
33
  $file_css = $name.'.css';
34
+
35
+ // - Check theme for local ajax-load-more.css, if found, load that file
36
  if(is_child_theme()){
37
  $css = get_stylesheet_directory_uri().'/'. $dir .'/' .$file_css;
38
  $css_path = get_stylesheet_directory().'/'. $dir .'/' .$file_css;
46
  $css = get_template_directory_uri().'/'. $dir .'/' .$file_css;
47
  $css_path = get_template_directory().'/'. $dir .'/' .$file_css;
48
  }
49
+
50
  if($css_path !== ''){ // If $css_path has been
51
+ if(file_exists($css_path)){
52
+ $file = $css;
53
+ }
54
  }
55
+
56
+ // Enqueue $file
57
  wp_enqueue_style( $name, $file );
58
  }
59
+
60
  }
61
+
62
+ endif;
core/classes/class.alm-shortcode.php CHANGED
@@ -13,35 +13,35 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  }
14
 
15
  if( !class_exists('ALM_SHORTCODE') ):
16
-
17
  class ALM_SHORTCODE {
18
-
19
- static $counter = 0;
20
-
21
  /**
22
  * alm_render_shortcode
23
- *
24
  * Parse & Render ALM Shortcode.
25
  *
26
  * @since 2.10.1
27
  * @return $ajaxloadmore
28
  */
29
-
30
  public static function alm_render_shortcode($atts){
31
-
32
  global $post;
33
-
34
- $options = get_option( 'alm_settings' );
35
- self::$counter++;
36
-
37
  // Define page slug
38
- $slug = alm_get_page_slug($post);
39
-
40
  // Custom CSS for Layouts - Only run this once.
41
  if(has_action('alm_layouts_custom_css')){
42
- do_action('alm_layouts_custom_css', self::$counter);
43
  }
44
-
45
  extract(shortcode_atts(array(
46
  'restapi' => false,
47
  'restapi_base' => '/wp-json',
@@ -65,8 +65,8 @@ if( !class_exists('ALM_SHORTCODE') ):
65
  'previous_post' => false,
66
  'previous_post_id' => 'null',
67
  'previous_post_taxonomy' => '',
68
- 'cache' => 'false',
69
- 'cache_id' => '',
70
  'paging' => 'false',
71
  'paging_controls' => 'false',
72
  'paging_show_at_most' => '7',
@@ -80,16 +80,18 @@ if( !class_exists('ALM_SHORTCODE') ):
80
  'cta_position' => 'before:1',
81
  'cta_repeater' => 'null',
82
  'cta_theme_repeater' => 'null',
 
83
  'post_type' => 'post',
 
84
  'post_format' => '',
85
- 'category' => '',
86
- 'category__not_in' => '',
87
  'tag' => '',
88
  'tag__not_in' => '',
89
  'taxonomy' => '',
90
  'taxonomy_terms' => '',
91
- 'taxonomy_operator' => '',
92
- 'taxonomy_relation' => '',
93
  'meta_key' => '',
94
  'meta_value' => '',
95
  'meta_compare' => '',
@@ -99,9 +101,9 @@ if( !class_exists('ALM_SHORTCODE') ):
99
  'month' => '',
100
  'day' => '',
101
  'author' => '',
102
- 'search' => '',
103
- 'custom_args' => '',
104
- 'post_status' => '',
105
  'order' => 'DESC',
106
  'orderby' => 'date',
107
  'post__in' => '',
@@ -120,154 +122,166 @@ if( !class_exists('ALM_SHORTCODE') ):
120
  'transition_container' => 'true',
121
  'images_loaded' => 'false',
122
  'button_label' => apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')),
123
- 'button_loading_label' => '',
124
- 'container_type' => '',
125
- 'css_classes' => '',
126
- 'id' => '',
127
- 'primary' => false
128
- ), $atts));
129
-
130
-
131
- // Enqueue core Ajax Load More JS
132
- wp_enqueue_script( 'ajax-load-more' );
133
-
134
- // Enqueue add-on JS
135
  if(has_action('alm_seo_installed') && $seo === 'true'){
136
  wp_enqueue_script( 'ajax-load-more-seo' );
137
- }
138
  if(has_action('alm_paging_installed') && $paging === 'true'){
139
  wp_enqueue_script( 'ajax-load-more-paging' );
140
- }
141
  if(has_action('alm_prev_post_installed') && $previous_post === 'true'){
142
- wp_enqueue_script( 'ajax-load-more-previous-post' );
143
- }
144
  if(has_action('alm_nextpage_installed') && $nextpage === 'true'){
145
- wp_enqueue_script( 'ajax-load-more-nextpage' );
146
  }
147
-
 
 
 
 
 
 
 
 
 
 
 
 
148
  if($previous_post === 'true'){
149
- $previous_post === true;
150
  }
151
-
152
- if($seo === "true" || $previous_post){
153
  $transition_container = "true";
154
  }
155
-
156
  if($restapi === 'true'){
157
- $restapi = true;
158
  $preloaded = false;
159
  }
160
-
161
  // Get container elements (ul | div)
162
-
163
  $container_element = 'ul';
164
  if($options['_alm_container_type'] == '2' || $previous_post){
165
  $container_element = 'div';
166
  }
167
-
168
- // override shortcode param
169
- if($container_type){
170
  $container_element = $container_type;
171
  }
172
-
173
  // Previous Post
174
  if($previous_post){
175
  $posts_per_page = 1;
176
  $container_element = 'div';
177
  }
178
-
179
  // Comments
180
  if($comments === 'true'){
181
  $container_element = $comments_style;
182
- }
183
-
184
  // Get extra classnames
185
  $classname = '';
186
  if(isset($options['_alm_classname'])){
187
  $classname = ' '.$options['_alm_classname'];
188
  }
189
-
190
  // Get button color
191
  $btn_color = '';
192
  if(isset($options['_alm_btn_color'])){
193
  $btn_color = ' '.$options['_alm_btn_color'];
194
  }
195
-
196
  // Get paging color
197
  $paging_color = '';
198
  if(isset($options['_alm_paging_color']) && has_action('alm_paging_installed')){
199
  $paging_color = ' paging-'.$options['_alm_paging_color'];
200
  }
201
-
202
  // Get Layouts activated
203
  $alm_layouts = '';
204
  if(has_action('alm_layouts_installed')){
205
  $alm_layouts = ' alm-layouts';
206
  }
207
-
208
  // Get btn classnames
209
  $button_classname = '';
210
  if(isset($options['_alm_btn_classname'])){
211
  $button_classname = $options['_alm_btn_classname'];
212
  }
213
-
214
- // Language support
215
- $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
216
  if (function_exists('pll_current_language')) // Polylang - https://wordpress.org/plugins/polylang/
217
- $lang = pll_current_language();
218
  if (function_exists('qtrans_getLanguage')) // qTranslate - https://wordpress.org/plugins/qtranslate/
219
- $lang = qtrans_getLanguage();
220
-
221
  $wp_posts_per_page = get_option( 'posts_per_page' ); // Posts per page - settings -> reading
222
-
223
  /* If $wp_posts_per_page > than shortcode value then $posts_per_page to $wp_posts_per_page */
224
  if(has_action('alm_seo_installed') && $wp_posts_per_page > $posts_per_page && $seo === 'true')
225
- $posts_per_page = $wp_posts_per_page;
226
-
227
-
228
  // Paging
229
- $paging_container_class = '';
230
  if($paging === 'true'){
231
  $paging_container_class = ' alm-paging-wrap';
232
-
233
  // If Preloaded & Paging, pause loading by default.
234
  // Added in 2.14.0
235
  if($preloaded === 'true'){
236
  $pause = 'true';
237
- $pause_override = 'false';
238
- }
239
-
240
- }
241
-
242
- // Start ALM object
243
- $ajaxloadmore = '';
244
-
245
  $ajaxloadmore .= apply_filters('alm_before_container', ''); // ALM Core Filter Hook
246
-
247
- $canonicalURL = alm_get_canonical_url(); // Build canonical URL
248
-
249
- // ALM Wrapper
250
  $div_id = 'ajax-load-more';
251
  if(self::$counter > 1){
252
  $div_id = 'ajax-load-more-'.self::$counter; // Update ID to include counter value
253
  }
254
-
255
- // Unique ID
256
  if(!empty($id)){
257
  $the_id = 'data-id="'.$id.'"';
258
  }else{
259
  $the_id = '';
260
  }
261
-
262
  // Is Search
263
  $is_search = '';
264
  if(is_search()){
265
  $is_search = 'data-search="true"'; // set attr for use with SEO
266
  }
267
-
268
  $ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '.$the_id.' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" '. $is_search .'>';
269
-
270
-
271
  // Previous Post Add-on
272
  // - Set other add-on params to false
273
  if($previous_post){
@@ -277,18 +291,19 @@ if( !class_exists('ALM_SHORTCODE') ):
277
  $cache = false;
278
  $comments = false;
279
  }
280
-
281
-
282
  // Comments Add-on
283
  // - Set other add-on params to false
284
  if($comments){
285
  $previous_post = false;
286
  $seo = false;
287
- $paging = false;
288
  $cache = false;
289
- }
290
-
291
-
 
292
  // Nextpage Add-on
293
  // - Set other add-on params to false
294
  if($nextpage){
@@ -297,32 +312,32 @@ if( !class_exists('ALM_SHORTCODE') ):
297
  $cache = false;
298
  $comments = false;
299
  $pause = 'true';
300
- }
301
-
302
-
303
- // ********************************
304
  // Preloaded Add-on
305
  // - Get preloaded posts and append to ajax load more object
306
- if(has_action('alm_preload_installed') && $preloaded === 'true'){
307
-
308
  $preloaded_output = '';
309
  $preload_offset = $offset;
310
-
311
  // If SEO, set $preloaded_amount to $posts_per_page
312
  if(has_action('alm_seo_installed') && $seo === 'true'){
313
- $preloaded_amount = $posts_per_page;
314
  }
315
-
316
  // Paging Add-on
317
  // - Set $preloaded_amount to $posts_per_page
318
  if($paging === 'true'){
319
- $preloaded_amount = $posts_per_page;
320
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
321
  if($paged > 1){
322
  $preload_offset = $preloaded_amount * ($paged - 1);
323
  }
324
- }
325
-
326
  // CTA Add-on
327
  // - Parse $cta_position
328
  if($cta){
@@ -332,8 +347,8 @@ if( !class_exists('ALM_SHORTCODE') ):
332
  if($cta_pos != 'after'){
333
  $cta_pos = 'before';
334
  }
335
- }
336
-
337
  $preloaded_arr = array( // Create preload data array
338
  'comments' => $comments,
339
  'comments_per_page' => $comments_per_page,
@@ -343,6 +358,7 @@ if( !class_exists('ALM_SHORTCODE') ):
343
  'comments_callback' => $comments_callback,
344
  'comments_post_id' => $comments_post_id,
345
  'post_type' => $post_type,
 
346
  'post_format' => $post_format,
347
  'category' => $category,
348
  'category__not_in' => $category__not_in,
@@ -363,23 +379,23 @@ if( !class_exists('ALM_SHORTCODE') ):
363
  'author' => $author,
364
  'post__in' => $post__in,
365
  'post__not_in' => $post__not_in,
366
- 'search' => $search,
367
  'custom_args' => $custom_args,
368
  'post_status' => $post_status,
369
  'order' => $order,
370
  'orderby' => $orderby,
371
  'exclude' => $exclude,
372
- 'offset' => $preload_offset,
373
- 'posts_per_page' => $preloaded_amount,
374
- 'lang' => $lang,
375
- 'css_classes' => $css_classes,
376
- );
377
-
378
- $type = alm_get_repeater_type($repeater);
379
-
380
  if(!$comments){
381
-
382
-
383
  /*
384
  * alm_preload_args
385
  *
@@ -387,10 +403,10 @@ if( !class_exists('ALM_SHORTCODE') ):
387
  *
388
  * @return $args;
389
  */
390
- $args = apply_filters('alm_preload_args', $preloaded_arr); // Create preloaded $args
391
-
392
-
393
-
394
  /*
395
  * alm_modify_query_args
396
  *
@@ -399,66 +415,66 @@ if( !class_exists('ALM_SHORTCODE') ):
399
  * @return $args;
400
  */
401
  $args = apply_filters('alm_modify_query_args', $args, $slug);
402
-
403
-
404
-
405
  /*
406
  * alm_query_args_[id]
407
  *
408
  * ALM Core Filter Hook
409
  *
410
  * @return $args;
411
- */
412
- $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
413
-
414
-
415
  $alm_preload_query = new WP_Query($args);
416
  $alm_total_posts = $alm_preload_query->found_posts - $offset;
417
  $output = '';
418
- $noscript = '';
419
-
420
  if ($alm_preload_query->have_posts()) :
421
  $alm_loop_count = 0; // Count var
422
  $alm_page = 0; // Set page to 0
423
  $alm_found_posts = $alm_total_posts;
424
  $alm_current = 0;
425
  while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
426
-
427
- $alm_loop_count++;
428
  $alm_current++;
429
  $alm_item = $alm_loop_count; // Get current item in loop
430
-
431
  // Call to Action [Before]
432
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'before'){
433
  if($alm_current == $cta_val){
434
  $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
435
  }
436
- }
437
-
438
  $output .= apply_filters('alm_preload_inc', $repeater, $type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
439
-
440
  // Call to Action [After]
441
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'after'){
442
  if($alm_current == $cta_val){
443
  $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
444
  }
445
- }
446
-
447
  endwhile; wp_reset_query();
448
-
449
  if(has_action('alm_seo_installed') && $seo === 'true'){ // If SEO, add noscript paging
450
  // Create noscript paging for SEO if preload and seo are enabled
451
  $noscript = alm_paging_no_script($alm_preload_query);
452
  }
453
-
454
  endif;
455
-
456
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
457
-
458
  if($seo === "true" && $paging === 'false'){
459
  if(is_search()){
460
  // If search, append slug (?s=term) to data-url
461
- $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.''. $slug .'">';
462
  }else{
463
  $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
464
  }
@@ -466,172 +482,173 @@ if( !class_exists('ALM_SHORTCODE') ):
466
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
467
  $preloaded_output .= '<div class="alm-reveal">';
468
  }
469
-
470
  $preloaded_output .= $output;
471
-
472
  if($seo === "false" && $paging === 'true'){
473
  $preloaded_output .= '</div>';
474
  }
475
  if($seo === "true" && $paging === 'false' || $seo === "true" && $paging === 'true'){
476
- $preloaded_output .= '</div>';
477
  }
478
-
479
- $preloaded_output .= '</'.$container_element.'>';
480
-
481
  if(has_action('alm_seo_installed')){ // If SEO, add noscript paging
482
  $preloaded_output .= $noscript;
483
  }
484
- }
485
-
486
  // Preloaded Comments
487
- else {
488
-
489
- if(has_action('alm_comments_installed') && $comments){
490
- $preloaded_comments = apply_filters('alm_comments_preloaded', $preloaded_arr); //[located in comments add-on]
491
  $preloaded_output .= '<'.$comments_style.' class="alm-listing alm-preloaded commentlist alm-comments-preloaded '. $classname .' '. $css_classes .'">';
492
  if($seo === "true") $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
493
-
494
  $preloaded_output .= $preloaded_comments;
495
-
496
  if($seo === "true") $preloaded_output .= '</div>';
497
  $preloaded_output .= '</'.$container_element.'>';
498
  }
499
-
500
- }
501
-
502
  $ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
503
  }
504
  // End Preload Posts
505
- // ********************************
506
-
507
-
508
  $listing_class = 'alm-listing';
509
-
510
- // If comments
511
  if($comments === 'true'){
512
  $listing_class = 'commentlist alm-comments';
513
  }
514
-
515
- $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class .' '. $classname . ' '. $css_classes .'"'; // Build ALM container
516
-
517
-
518
- // Cache Add-on
519
- if(has_action('alm_cache_installed') && $cache === 'true'){
520
  $cache_return = apply_filters(
521
- 'alm_cache_shortcode',
522
- $cache,
523
- $cache_id,
524
  $options
525
- );
526
- $ajaxloadmore .= $cache_return;
527
- }
528
-
529
- // CTA Add-on
530
- if(has_action('alm_cta_installed') && $cta === 'true'){
531
  $cta_return = apply_filters(
532
- 'alm_cta_shortcode',
533
- $cta,
534
- $cta_position,
535
- $cta_repeater,
536
  $cta_theme_repeater
537
- );
538
- $ajaxloadmore .= $cta_return;
539
  }
540
-
541
- // Comments Add-on
542
- if(has_action('alm_comments_installed') && $comments === 'true'){
543
  $comments_return = apply_filters(
544
- 'alm_comments_shortcode',
545
- $comments,
546
- $comments_per_page,
547
- $comments_type,
548
  $comments_style,
549
- $comments_template,
550
  $comments_callback,
551
  $comments_post_id
552
- );
553
- $ajaxloadmore .= $comments_return;
554
  }
555
-
556
- // REST API Add-on
557
- if(has_action('alm_rest_api_installed') && $restapi === true){
558
  $restapi_return = apply_filters(
559
- 'alm_rest_api_shortcode',
560
  'true',
561
  $restapi_base,
562
  $restapi_namespace,
563
  $restapi_endpoint,
564
  $restapi_template_id,
565
  $restapi_debug
566
- );
567
- $ajaxloadmore .= $restapi_return;
568
  }
569
-
570
-
571
  // Paging Add-on
572
- if(has_action('alm_paging_installed') && $paging === 'true'){
573
  $paging_return = apply_filters(
574
- 'alm_paging_shortcode',
575
- $paging,
576
- $paging_controls,
577
- $paging_show_at_most,
578
- $paging_classes,
579
  $options
580
- );
581
- $ajaxloadmore .= $paging_return;
582
- }
583
-
584
-
585
  // Preloaded Add-on
586
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
587
- $ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
588
  $ajaxloadmore .= ' data-preloaded-amount="'.$preloaded_amount.'"';
589
- }
590
-
591
-
592
  // SEO Add-on
593
- if(has_action('alm_seo_installed') && $seo === 'true'){
594
  $seo_return = apply_filters(
595
- 'alm_seo_shortcode',
596
- $seo,
597
- $preloaded,
598
  $options
599
- );
600
- $ajaxloadmore .= $seo_return;
601
- }
602
-
603
-
604
- // Previous Post Post Add-on
605
- if(has_action('alm_prev_post_installed') && $previous_post){
606
  $prev_post_return = apply_filters(
607
- 'alm_prev_post_shortcode',
608
- $previous_post_id,
609
  $previous_post_taxonomy,
610
  $options
611
- );
612
- $ajaxloadmore .= $prev_post_return;
613
  }
614
-
615
-
616
- // Nextpage Post Add-on
617
- if(has_action('alm_nextpage_installed') && $nextpage){
618
  $nextpage_return = apply_filters(
619
- 'alm_nextpage_shortcode',
620
- $nextpage_urls,
621
- $nextpage_pageviews,
622
- $nextpage_post_id,
623
- $nextpage_scroll,
624
  $options
625
- );
626
- $ajaxloadmore .= $nextpage_return;
627
  }
628
-
629
-
630
- $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
631
  if($theme_repeater != 'null'){
632
- $ajaxloadmore .= ' data-theme-repeater="'.$theme_repeater.'"';
633
- }
634
  $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
 
635
  $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
636
  $ajaxloadmore .= ' data-category="'.$category.'"';
637
  $ajaxloadmore .= ' data-category-not-in="'.$category__not_in.'"';
@@ -658,8 +675,8 @@ if( !class_exists('ALM_SHORTCODE') ):
658
  $ajaxloadmore .= ' data-post-status="'.$post_status.'"';
659
  $ajaxloadmore .= ' data-order="'.$order.'"';
660
  $ajaxloadmore .= ' data-orderby="'.$orderby.'"';
661
- $ajaxloadmore .= ' data-offset="'.$offset.'"';
662
- $ajaxloadmore .= ' data-posts-per-page="'.$posts_per_page.'"';
663
  $ajaxloadmore .= ' data-lang="'.$lang.'"';
664
  $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
665
  $ajaxloadmore .= ' data-scroll-distance="'.$scroll_distance.'"';
@@ -668,79 +685,79 @@ if( !class_exists('ALM_SHORTCODE') ):
668
  $ajaxloadmore .= ' data-pause="'.$pause.'"';
669
  $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
670
  if(!empty($button_loading_label)){
671
- $ajaxloadmore .= ' data-button-loading-label="'.$button_loading_label.'"';
672
  }
673
  $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
674
  $ajaxloadmore .= ' data-destroy-after="'.$destroy_after.'"';
675
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
676
- if($transition_speed !== '250')
677
  $ajaxloadmore .= ' data-transition-speed="'.$transition_speed.'"';
678
- if($transition_container === 'false')
679
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
680
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
681
-
682
- if($primary !== false)
683
  $ajaxloadmore .= ' data-primary="true"';
684
-
685
  $ajaxloadmore .= '>';
686
-
687
-
688
- // Previous Post Add-on
689
  // - Get first post, append data to ajax load more object
690
- if(has_action('alm_prev_post_installed') && $previous_post){
691
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
692
- $repeater_type = $repeater_type[0]; // (default | repeater | template_)
693
  if($theme_repeater != 'null' && has_filter('alm_get_theme_repeater')){
694
  $repeater_type = null;
695
- }
696
- // Get current permalink - (including querystring)
697
- $previous_post_permanlink = ($_SERVER["QUERY_STRING"]) ? get_permalink($previous_post_id) .'?'. $_SERVER["QUERY_STRING"] : get_permalink($previous_post_id);
698
-
699
- // Get previous post include, build output from the next post filter
700
  $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set the post id .alm-reveal div
701
-
702
-
703
  /*
704
  * alm_prev_post_inc
705
  *
706
  * Previous Post Add-on hook
707
  *
708
  * @return $args;
709
- */
710
  $previous_post_output .= apply_filters('alm_prev_post_inc', $repeater, $repeater_type, $theme_repeater, $previous_post_id, $post_type);
711
-
712
  $previous_post_output .= '</div>';
713
  $ajaxloadmore .= $previous_post_output; // Add $previous_post_output data to $ajaxloadmore
714
-
715
  }
716
- // End Previous Post Add-on
717
-
718
-
719
  // Next Page Add-on
720
- if(has_action('alm_nextpage_installed') && $nextpage){
721
-
722
  $nextpage_start = alm_get_startpage();
723
-
724
  $nextpage_is_paged = false;
725
  if($nextpage_start > 1){
726
  $nextpage_is_paged = true;
727
  }
728
-
729
  $alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging);
730
  $ajaxloadmore .= $alm_nextpage_output;
731
-
732
  }
733
  // End Next Page Add-on
734
-
735
  $ajaxloadmore .= '</'.$container_element.'>';
736
-
737
  $ajaxloadmore .= apply_filters('alm_before_button', ''); // ALM Core Filter Hook
738
-
739
- $ajaxloadmore .= '</div>';
740
-
741
- $ajaxloadmore .= apply_filters('alm_after_container', ''); // ALM Core Filter Hook
742
-
743
-
744
  // REST API Add-on - add template to page
745
  if(has_action('alm_rest_api_installed') && $restapi){
746
  if($theme_repeater != 'null' && has_action('alm_get_rest_theme_repeater')){
@@ -749,11 +766,11 @@ if( !class_exists('ALM_SHORTCODE') ):
749
  $rest_type = alm_get_repeater_type($repeater);
750
  do_action('alm_get_rest_api_template', $repeater, $rest_type);
751
  }
752
- }
753
-
754
  return $ajaxloadmore; // End ALM object
755
  }
756
-
757
  }
758
 
759
  endif;
13
  }
14
 
15
  if( !class_exists('ALM_SHORTCODE') ):
16
+
17
  class ALM_SHORTCODE {
18
+
19
+ static $counter = 0;
20
+
21
  /**
22
  * alm_render_shortcode
23
+ *
24
  * Parse & Render ALM Shortcode.
25
  *
26
  * @since 2.10.1
27
  * @return $ajaxloadmore
28
  */
29
+
30
  public static function alm_render_shortcode($atts){
31
+
32
  global $post;
33
+
34
+ $options = get_option( 'alm_settings' );
35
+ self::$counter++;
36
+
37
  // Define page slug
38
+ $slug = alm_get_page_slug($post);
39
+
40
  // Custom CSS for Layouts - Only run this once.
41
  if(has_action('alm_layouts_custom_css')){
42
+ do_action('alm_layouts_custom_css', self::$counter);
43
  }
44
+
45
  extract(shortcode_atts(array(
46
  'restapi' => false,
47
  'restapi_base' => '/wp-json',
65
  'previous_post' => false,
66
  'previous_post_id' => 'null',
67
  'previous_post_taxonomy' => '',
68
+ 'cache' => 'false',
69
+ 'cache_id' => '',
70
  'paging' => 'false',
71
  'paging_controls' => 'false',
72
  'paging_show_at_most' => '7',
80
  'cta_position' => 'before:1',
81
  'cta_repeater' => 'null',
82
  'cta_theme_repeater' => 'null',
83
+ 'masonry' => '',
84
  'post_type' => 'post',
85
+ 'sticky_posts' => false,
86
  'post_format' => '',
87
+ 'category' => '',
88
+ 'category__not_in' => '',
89
  'tag' => '',
90
  'tag__not_in' => '',
91
  'taxonomy' => '',
92
  'taxonomy_terms' => '',
93
+ 'taxonomy_operator' => '',
94
+ 'taxonomy_relation' => '',
95
  'meta_key' => '',
96
  'meta_value' => '',
97
  'meta_compare' => '',
101
  'month' => '',
102
  'day' => '',
103
  'author' => '',
104
+ 'search' => '',
105
+ 'custom_args' => '',
106
+ 'post_status' => '',
107
  'order' => 'DESC',
108
  'orderby' => 'date',
109
  'post__in' => '',
122
  'transition_container' => 'true',
123
  'images_loaded' => 'false',
124
  'button_label' => apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')),
125
+ 'button_loading_label' => '',
126
+ 'container_type' => '',
127
+ 'css_classes' => '',
128
+ 'id' => '',
129
+ 'primary' => false
130
+ ), $atts));
131
+
132
+
133
+ // Enqueue core Ajax Load More JS
134
+ wp_enqueue_script( 'ajax-load-more' );
135
+
136
+ // Enqueue add-on JS
137
  if(has_action('alm_seo_installed') && $seo === 'true'){
138
  wp_enqueue_script( 'ajax-load-more-seo' );
139
+ }
140
  if(has_action('alm_paging_installed') && $paging === 'true'){
141
  wp_enqueue_script( 'ajax-load-more-paging' );
142
+ }
143
  if(has_action('alm_prev_post_installed') && $previous_post === 'true'){
144
+ wp_enqueue_script( 'ajax-load-more-previous-post' );
145
+ }
146
  if(has_action('alm_nextpage_installed') && $nextpage === 'true'){
147
+ wp_enqueue_script( 'ajax-load-more-nextpage' );
148
  }
149
+
150
+
151
+
152
+ /*
153
+ * alm_enqueue_external_scripts
154
+ *
155
+ * ALM Core Action
156
+ * Load JavaScript located in external add-ons and extensions
157
+ *
158
+ */
159
+ do_action('alm_enqueue_external_scripts', $atts);
160
+
161
+
162
  if($previous_post === 'true'){
163
+ $previous_post === true;
164
  }
165
+
166
+ if($seo === "true" || $previous_post){
167
  $transition_container = "true";
168
  }
169
+
170
  if($restapi === 'true'){
171
+ $restapi = true;
172
  $preloaded = false;
173
  }
174
+
175
  // Get container elements (ul | div)
176
+
177
  $container_element = 'ul';
178
  if($options['_alm_container_type'] == '2' || $previous_post){
179
  $container_element = 'div';
180
  }
181
+
182
+ // override shortcode param
183
+ if($container_type){
184
  $container_element = $container_type;
185
  }
186
+
187
  // Previous Post
188
  if($previous_post){
189
  $posts_per_page = 1;
190
  $container_element = 'div';
191
  }
192
+
193
  // Comments
194
  if($comments === 'true'){
195
  $container_element = $comments_style;
196
+ }
197
+
198
  // Get extra classnames
199
  $classname = '';
200
  if(isset($options['_alm_classname'])){
201
  $classname = ' '.$options['_alm_classname'];
202
  }
203
+
204
  // Get button color
205
  $btn_color = '';
206
  if(isset($options['_alm_btn_color'])){
207
  $btn_color = ' '.$options['_alm_btn_color'];
208
  }
209
+
210
  // Get paging color
211
  $paging_color = '';
212
  if(isset($options['_alm_paging_color']) && has_action('alm_paging_installed')){
213
  $paging_color = ' paging-'.$options['_alm_paging_color'];
214
  }
215
+
216
  // Get Layouts activated
217
  $alm_layouts = '';
218
  if(has_action('alm_layouts_installed')){
219
  $alm_layouts = ' alm-layouts';
220
  }
221
+
222
  // Get btn classnames
223
  $button_classname = '';
224
  if(isset($options['_alm_btn_classname'])){
225
  $button_classname = $options['_alm_btn_classname'];
226
  }
227
+
228
+ // Language support
229
+ $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
230
  if (function_exists('pll_current_language')) // Polylang - https://wordpress.org/plugins/polylang/
231
+ $lang = pll_current_language();
232
  if (function_exists('qtrans_getLanguage')) // qTranslate - https://wordpress.org/plugins/qtranslate/
233
+ $lang = qtrans_getLanguage();
234
+
235
  $wp_posts_per_page = get_option( 'posts_per_page' ); // Posts per page - settings -> reading
236
+
237
  /* If $wp_posts_per_page > than shortcode value then $posts_per_page to $wp_posts_per_page */
238
  if(has_action('alm_seo_installed') && $wp_posts_per_page > $posts_per_page && $seo === 'true')
239
+ $posts_per_page = $wp_posts_per_page;
240
+
241
+
242
  // Paging
243
+ $paging_container_class = '';
244
  if($paging === 'true'){
245
  $paging_container_class = ' alm-paging-wrap';
246
+
247
  // If Preloaded & Paging, pause loading by default.
248
  // Added in 2.14.0
249
  if($preloaded === 'true'){
250
  $pause = 'true';
251
+ $pause_override = 'false';
252
+ }
253
+
254
+ }
255
+
256
+ // Start ALM object
257
+ $ajaxloadmore = '';
258
+
259
  $ajaxloadmore .= apply_filters('alm_before_container', ''); // ALM Core Filter Hook
260
+
261
+ $canonicalURL = alm_get_canonical_url(); // Build canonical URL
262
+
263
+ // ALM Wrapper
264
  $div_id = 'ajax-load-more';
265
  if(self::$counter > 1){
266
  $div_id = 'ajax-load-more-'.self::$counter; // Update ID to include counter value
267
  }
268
+
269
+ // Unique ID
270
  if(!empty($id)){
271
  $the_id = 'data-id="'.$id.'"';
272
  }else{
273
  $the_id = '';
274
  }
275
+
276
  // Is Search
277
  $is_search = '';
278
  if(is_search()){
279
  $is_search = 'data-search="true"'; // set attr for use with SEO
280
  }
281
+
282
  $ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '.$the_id.' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" '. $is_search .'>';
283
+
284
+
285
  // Previous Post Add-on
286
  // - Set other add-on params to false
287
  if($previous_post){
291
  $cache = false;
292
  $comments = false;
293
  }
294
+
295
+
296
  // Comments Add-on
297
  // - Set other add-on params to false
298
  if($comments){
299
  $previous_post = false;
300
  $seo = false;
301
+ //$paging = false;
302
  $cache = false;
303
+ $posts_per_page = $comments_per_page;
304
+ }
305
+
306
+
307
  // Nextpage Add-on
308
  // - Set other add-on params to false
309
  if($nextpage){
312
  $cache = false;
313
  $comments = false;
314
  $pause = 'true';
315
+ }
316
+
317
+
318
+ // ********************************
319
  // Preloaded Add-on
320
  // - Get preloaded posts and append to ajax load more object
321
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
322
+
323
  $preloaded_output = '';
324
  $preload_offset = $offset;
325
+
326
  // If SEO, set $preloaded_amount to $posts_per_page
327
  if(has_action('alm_seo_installed') && $seo === 'true'){
328
+ $preloaded_amount = $posts_per_page;
329
  }
330
+
331
  // Paging Add-on
332
  // - Set $preloaded_amount to $posts_per_page
333
  if($paging === 'true'){
334
+ $preloaded_amount = $posts_per_page;
335
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
336
  if($paged > 1){
337
  $preload_offset = $preloaded_amount * ($paged - 1);
338
  }
339
+ }
340
+
341
  // CTA Add-on
342
  // - Parse $cta_position
343
  if($cta){
347
  if($cta_pos != 'after'){
348
  $cta_pos = 'before';
349
  }
350
+ }
351
+
352
  $preloaded_arr = array( // Create preload data array
353
  'comments' => $comments,
354
  'comments_per_page' => $comments_per_page,
358
  'comments_callback' => $comments_callback,
359
  'comments_post_id' => $comments_post_id,
360
  'post_type' => $post_type,
361
+ 'sticky_posts' => $sticky_posts,
362
  'post_format' => $post_format,
363
  'category' => $category,
364
  'category__not_in' => $category__not_in,
379
  'author' => $author,
380
  'post__in' => $post__in,
381
  'post__not_in' => $post__not_in,
382
+ 'search' => $search,
383
  'custom_args' => $custom_args,
384
  'post_status' => $post_status,
385
  'order' => $order,
386
  'orderby' => $orderby,
387
  'exclude' => $exclude,
388
+ 'offset' => $preload_offset,
389
+ 'posts_per_page' => $preloaded_amount,
390
+ 'lang' => $lang,
391
+ 'css_classes' => $css_classes,
392
+ );
393
+
394
+ $type = alm_get_repeater_type($repeater);
395
+
396
  if(!$comments){
397
+
398
+
399
  /*
400
  * alm_preload_args
401
  *
403
  *
404
  * @return $args;
405
  */
406
+ $args = apply_filters('alm_preload_args', $preloaded_arr); // Create preloaded $args
407
+
408
+
409
+
410
  /*
411
  * alm_modify_query_args
412
  *
415
  * @return $args;
416
  */
417
  $args = apply_filters('alm_modify_query_args', $args, $slug);
418
+
419
+
420
+
421
  /*
422
  * alm_query_args_[id]
423
  *
424
  * ALM Core Filter Hook
425
  *
426
  * @return $args;
427
+ */
428
+ $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
429
+
430
+
431
  $alm_preload_query = new WP_Query($args);
432
  $alm_total_posts = $alm_preload_query->found_posts - $offset;
433
  $output = '';
434
+ $noscript = '';
435
+
436
  if ($alm_preload_query->have_posts()) :
437
  $alm_loop_count = 0; // Count var
438
  $alm_page = 0; // Set page to 0
439
  $alm_found_posts = $alm_total_posts;
440
  $alm_current = 0;
441
  while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
442
+
443
+ $alm_loop_count++;
444
  $alm_current++;
445
  $alm_item = $alm_loop_count; // Get current item in loop
446
+
447
  // Call to Action [Before]
448
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'before'){
449
  if($alm_current == $cta_val){
450
  $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
451
  }
452
+ }
453
+
454
  $output .= apply_filters('alm_preload_inc', $repeater, $type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
455
+
456
  // Call to Action [After]
457
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'after'){
458
  if($alm_current == $cta_val){
459
  $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
460
  }
461
+ }
462
+
463
  endwhile; wp_reset_query();
464
+
465
  if(has_action('alm_seo_installed') && $seo === 'true'){ // If SEO, add noscript paging
466
  // Create noscript paging for SEO if preload and seo are enabled
467
  $noscript = alm_paging_no_script($alm_preload_query);
468
  }
469
+
470
  endif;
471
+
472
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
473
+
474
  if($seo === "true" && $paging === 'false'){
475
  if(is_search()){
476
  // If search, append slug (?s=term) to data-url
477
+ $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.''. $slug .'">';
478
  }else{
479
  $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
480
  }
482
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
483
  $preloaded_output .= '<div class="alm-reveal">';
484
  }
485
+
486
  $preloaded_output .= $output;
487
+
488
  if($seo === "false" && $paging === 'true'){
489
  $preloaded_output .= '</div>';
490
  }
491
  if($seo === "true" && $paging === 'false' || $seo === "true" && $paging === 'true'){
492
+ $preloaded_output .= '</div>';
493
  }
494
+
495
+ $preloaded_output .= '</'.$container_element.'>';
496
+
497
  if(has_action('alm_seo_installed')){ // If SEO, add noscript paging
498
  $preloaded_output .= $noscript;
499
  }
500
+ }
501
+
502
  // Preloaded Comments
503
+ else {
504
+
505
+ if(has_action('alm_comments_installed') && $comments){
506
+ $preloaded_comments = apply_filters('alm_comments_preloaded', $preloaded_arr); //[located in comments add-on]
507
  $preloaded_output .= '<'.$comments_style.' class="alm-listing alm-preloaded commentlist alm-comments-preloaded '. $classname .' '. $css_classes .'">';
508
  if($seo === "true") $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
509
+
510
  $preloaded_output .= $preloaded_comments;
511
+
512
  if($seo === "true") $preloaded_output .= '</div>';
513
  $preloaded_output .= '</'.$container_element.'>';
514
  }
515
+
516
+ }
517
+
518
  $ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
519
  }
520
  // End Preload Posts
521
+ // ********************************
522
+
523
+
524
  $listing_class = 'alm-listing';
525
+
526
+ // If comments
527
  if($comments === 'true'){
528
  $listing_class = 'commentlist alm-comments';
529
  }
530
+
531
+ $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class .' '. $classname . ' '. $css_classes .'"'; // Build ALM container
532
+
533
+
534
+ // Cache Add-on
535
+ if(has_action('alm_cache_installed') && $cache === 'true'){
536
  $cache_return = apply_filters(
537
+ 'alm_cache_shortcode',
538
+ $cache,
539
+ $cache_id,
540
  $options
541
+ );
542
+ $ajaxloadmore .= $cache_return;
543
+ }
544
+
545
+ // CTA Add-on
546
+ if(has_action('alm_cta_installed') && $cta === 'true'){
547
  $cta_return = apply_filters(
548
+ 'alm_cta_shortcode',
549
+ $cta,
550
+ $cta_position,
551
+ $cta_repeater,
552
  $cta_theme_repeater
553
+ );
554
+ $ajaxloadmore .= $cta_return;
555
  }
556
+
557
+ // Comments Add-on
558
+ if(has_action('alm_comments_installed') && $comments === 'true'){
559
  $comments_return = apply_filters(
560
+ 'alm_comments_shortcode',
561
+ $comments,
562
+ $comments_per_page,
563
+ $comments_type,
564
  $comments_style,
565
+ $comments_template,
566
  $comments_callback,
567
  $comments_post_id
568
+ );
569
+ $ajaxloadmore .= $comments_return;
570
  }
571
+
572
+ // REST API Add-on
573
+ if(has_action('alm_rest_api_installed') && $restapi === true){
574
  $restapi_return = apply_filters(
575
+ 'alm_rest_api_shortcode',
576
  'true',
577
  $restapi_base,
578
  $restapi_namespace,
579
  $restapi_endpoint,
580
  $restapi_template_id,
581
  $restapi_debug
582
+ );
583
+ $ajaxloadmore .= $restapi_return;
584
  }
585
+
586
+
587
  // Paging Add-on
588
+ if(has_action('alm_paging_installed') && $paging === 'true'){
589
  $paging_return = apply_filters(
590
+ 'alm_paging_shortcode',
591
+ $paging,
592
+ $paging_controls,
593
+ $paging_show_at_most,
594
+ $paging_classes,
595
  $options
596
+ );
597
+ $ajaxloadmore .= $paging_return;
598
+ }
599
+
600
+
601
  // Preloaded Add-on
602
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
603
+ $ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
604
  $ajaxloadmore .= ' data-preloaded-amount="'.$preloaded_amount.'"';
605
+ }
606
+
607
+
608
  // SEO Add-on
609
+ if(has_action('alm_seo_installed') && $seo === 'true'){
610
  $seo_return = apply_filters(
611
+ 'alm_seo_shortcode',
612
+ $seo,
613
+ $preloaded,
614
  $options
615
+ );
616
+ $ajaxloadmore .= $seo_return;
617
+ }
618
+
619
+
620
+ // Previous Post Post Add-on
621
+ if(has_action('alm_prev_post_installed') && $previous_post){
622
  $prev_post_return = apply_filters(
623
+ 'alm_prev_post_shortcode',
624
+ $previous_post_id,
625
  $previous_post_taxonomy,
626
  $options
627
+ );
628
+ $ajaxloadmore .= $prev_post_return;
629
  }
630
+
631
+
632
+ // Nextpage Post Add-on
633
+ if(has_action('alm_nextpage_installed') && $nextpage){
634
  $nextpage_return = apply_filters(
635
+ 'alm_nextpage_shortcode',
636
+ $nextpage_urls,
637
+ $nextpage_pageviews,
638
+ $nextpage_post_id,
639
+ $nextpage_scroll,
640
  $options
641
+ );
642
+ $ajaxloadmore .= $nextpage_return;
643
  }
644
+
645
+
646
+ $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
647
  if($theme_repeater != 'null'){
648
+ $ajaxloadmore .= ' data-theme-repeater="'.$theme_repeater.'"';
649
+ }
650
  $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
651
+ $ajaxloadmore .= ' data-sticky-posts="'.$sticky_posts.'"';
652
  $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
653
  $ajaxloadmore .= ' data-category="'.$category.'"';
654
  $ajaxloadmore .= ' data-category-not-in="'.$category__not_in.'"';
675
  $ajaxloadmore .= ' data-post-status="'.$post_status.'"';
676
  $ajaxloadmore .= ' data-order="'.$order.'"';
677
  $ajaxloadmore .= ' data-orderby="'.$orderby.'"';
678
+ $ajaxloadmore .= ' data-offset="'.$offset.'"';
679
+ $ajaxloadmore .= ' data-posts-per-page="'.$posts_per_page.'"';
680
  $ajaxloadmore .= ' data-lang="'.$lang.'"';
681
  $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
682
  $ajaxloadmore .= ' data-scroll-distance="'.$scroll_distance.'"';
685
  $ajaxloadmore .= ' data-pause="'.$pause.'"';
686
  $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
687
  if(!empty($button_loading_label)){
688
+ $ajaxloadmore .= ' data-button-loading-label="'.$button_loading_label.'"';
689
  }
690
  $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
691
  $ajaxloadmore .= ' data-destroy-after="'.$destroy_after.'"';
692
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
693
+ if($transition_speed !== '250')
694
  $ajaxloadmore .= ' data-transition-speed="'.$transition_speed.'"';
695
+ if($transition_container === 'false')
696
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
697
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
698
+
699
+ if($primary !== false)
700
  $ajaxloadmore .= ' data-primary="true"';
701
+
702
  $ajaxloadmore .= '>';
703
+
704
+
705
+ // Previous Post Add-on
706
  // - Get first post, append data to ajax load more object
707
+ if(has_action('alm_prev_post_installed') && $previous_post){
708
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
709
+ $repeater_type = $repeater_type[0]; // (default | repeater | template_)
710
  if($theme_repeater != 'null' && has_filter('alm_get_theme_repeater')){
711
  $repeater_type = null;
712
+ }
713
+ // Get current permalink - (including querystring)
714
+ $previous_post_permanlink = ($_SERVER["QUERY_STRING"]) ? get_permalink($previous_post_id) .'?'. $_SERVER["QUERY_STRING"] : get_permalink($previous_post_id);
715
+
716
+ // Get previous post include, build output from the next post filter
717
  $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set the post id .alm-reveal div
718
+
719
+
720
  /*
721
  * alm_prev_post_inc
722
  *
723
  * Previous Post Add-on hook
724
  *
725
  * @return $args;
726
+ */
727
  $previous_post_output .= apply_filters('alm_prev_post_inc', $repeater, $repeater_type, $theme_repeater, $previous_post_id, $post_type);
728
+
729
  $previous_post_output .= '</div>';
730
  $ajaxloadmore .= $previous_post_output; // Add $previous_post_output data to $ajaxloadmore
731
+
732
  }
733
+ // End Previous Post Add-on
734
+
735
+
736
  // Next Page Add-on
737
+ if(has_action('alm_nextpage_installed') && $nextpage){
738
+
739
  $nextpage_start = alm_get_startpage();
740
+
741
  $nextpage_is_paged = false;
742
  if($nextpage_start > 1){
743
  $nextpage_is_paged = true;
744
  }
745
+
746
  $alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging);
747
  $ajaxloadmore .= $alm_nextpage_output;
748
+
749
  }
750
  // End Next Page Add-on
751
+
752
  $ajaxloadmore .= '</'.$container_element.'>';
753
+
754
  $ajaxloadmore .= apply_filters('alm_before_button', ''); // ALM Core Filter Hook
755
+
756
+ $ajaxloadmore .= '</div>';
757
+
758
+ $ajaxloadmore .= apply_filters('alm_after_container', ''); // ALM Core Filter Hook
759
+
760
+
761
  // REST API Add-on - add template to page
762
  if(has_action('alm_rest_api_installed') && $restapi){
763
  if($theme_repeater != 'null' && has_action('alm_get_rest_theme_repeater')){
766
  $rest_type = alm_get_repeater_type($repeater);
767
  do_action('alm_get_rest_api_template', $repeater, $rest_type);
768
  }
769
+ }
770
+
771
  return $ajaxloadmore; // End ALM object
772
  }
773
+
774
  }
775
 
776
  endif;
core/functions.php CHANGED
@@ -10,47 +10,47 @@
10
  */
11
 
12
  function alm_get_current_repeater($repeater, $type) {
13
-
14
  $template = $repeater;
15
  $include = '';
16
-
17
  // If is Custom Repeaters (Custom Repeaters v1)
18
- if( $type == 'repeater' && has_action('alm_repeater_installed' )){
19
- $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
20
-
21
- if(!file_exists($include)){ //confirm file exists
22
  alm_get_default_repeater();
23
- }
24
-
25
  }
26
  // If is Unlimited Repeaters (Custom Repeaters v2)
27
  elseif( $type == 'template_' && has_action('alm_unlimited_installed' )){
28
  global $wpdb;
29
  $blog_id = $wpdb->blogid;
30
-
31
- if($blog_id > 1){
32
  $include = ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'.$template .'.php';
33
  }else{
34
- $include = ALM_UNLIMITED_PATH. 'repeaters/'.$template .'.php';
35
- }
36
-
37
- if(!file_exists($include)){ //confirm file exists
38
- $include = alm_get_default_repeater();
39
  }
40
  }
41
  // Default repeater
42
- else{
43
  $include = alm_get_default_repeater();
44
- }
45
-
46
  // Security check
47
  // check if $template contains relative path. So, set include to default
48
  if ( false !== strpos( $template, './' ) ) {
49
  $include = alm_get_default_repeater();
50
  }
51
-
52
  return $include;
53
-
54
  }
55
 
56
 
@@ -64,14 +64,14 @@ function alm_get_current_repeater($repeater, $type) {
64
  */
65
 
66
  function alm_get_default_repeater() {
67
-
68
  global $wpdb;
69
  $file = null;
70
- $template_dir = 'alm_templates';
71
-
72
  // Allow user to load template from theme directory
73
  // Since 2.8.5
74
-
75
  // load repeater template from current theme folder
76
  if(is_child_theme()){
77
  $template_theme_file = get_stylesheet_directory().'/'. $template_dir .'/default.php';
@@ -87,18 +87,18 @@ function alm_get_default_repeater() {
87
  if(file_exists($template_theme_file)){
88
  $file = $template_theme_file;
89
  }
90
-
91
  // Since 2.0
92
  // otherwise use pre-defined plug-in templates
93
- if($file == null){
94
  $blog_id = $wpdb->blogid;
95
- if($blog_id > 1){
96
  $file = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php'; // File
97
  }else{
98
- $file = ALM_PATH. 'core/repeater/default.php';
99
  }
100
  }
101
-
102
  return $file;
103
  }
104
 
@@ -107,7 +107,7 @@ function alm_get_default_repeater() {
107
  /*
108
  * alm_get_taxonomy
109
  * Query by custom taxonomy values
110
- *
111
  * @return $args = array();
112
  * @since 2.5.0
113
  *
@@ -120,7 +120,7 @@ function alm_get_taxonomy($taxonomy, $taxonomy_terms, $taxonomy_operator){
120
  'taxonomy' => $taxonomy,
121
  'field' => 'slug',
122
  'terms' => $the_terms,
123
- 'operator' => $taxonomy_operator,
124
  );
125
  return $args;
126
  }
@@ -131,7 +131,7 @@ function alm_get_taxonomy($taxonomy, $taxonomy_terms, $taxonomy_operator){
131
  /*
132
  * alm_get_post_format
133
  * Query by post format
134
- *
135
  * @return $args = array();
136
  * @since 2.5.0
137
  * @updated 2.8.5
@@ -140,13 +140,13 @@ function alm_get_post_format($post_format){
140
  if(!empty($post_format)){
141
  $format = "post-format-$post_format";
142
  //If query is for standard then we need to filter by NOT IN
143
- if($format == 'post-format-standard'){
144
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
145
  $terms = array();
146
  foreach ($post_formats[0] as $format) {
147
  $terms[] = 'post-format-'.$format;
148
  }
149
- }
150
  $return = array(
151
  'taxonomy' => 'post_format',
152
  'terms' => $terms,
@@ -158,9 +158,9 @@ function alm_get_post_format($post_format){
158
  'taxonomy' => 'post_format',
159
  'field' => 'slug',
160
  'terms' => array($format),
161
- );
162
  }
163
- return $return;
164
  }
165
  }
166
 
@@ -169,20 +169,20 @@ function alm_get_post_format($post_format){
169
  /*
170
  * alm_get_taxonomy_query
171
  * Query for custom taxonomy
172
- *
173
  * @return $args = array();
174
  * @since 2.8.5
175
  */
176
  function alm_get_taxonomy_query($taxonomy, $taxonomy_terms, $taxonomy_operator){
177
- if(!empty($taxonomy) && !empty($taxonomy_terms)){
178
- $taxonomy_term_values = alm_parse_tax_terms($taxonomy_terms);
179
  $return = array(
180
- 'taxonomy' => $taxonomy,
181
- 'field' => 'slug',
182
- 'terms' => $taxonomy_term_values,
183
  'operator' => $taxonomy_operator
184
- );
185
- return $return;
186
  }
187
  }
188
 
@@ -191,16 +191,16 @@ function alm_get_taxonomy_query($taxonomy, $taxonomy_terms, $taxonomy_operator){
191
  /*
192
  * alm_parse_tax_terms
193
  * Parse the taxonomy terms for multiple vals
194
- *
195
  * @helper function @alm_get_taxonomy_query()
196
  * @return array;
197
  * @since 2.8.5
198
  */
199
  function alm_parse_tax_terms($taxonomy_terms){
200
  // Remove all whitespace for $taxonomy_terms because it needs to be an exact match
201
- $taxonomy_terms = preg_replace('/\s+/', ' ', $taxonomy_terms); // Trim whitespace
202
  $taxonomy_terms = str_replace(', ', ',', $taxonomy_terms); // Replace [term, term] with [term,term]
203
- $taxonomy_terms = explode(",", $taxonomy_terms);
204
  return $taxonomy_terms;
205
  }
206
 
@@ -209,14 +209,14 @@ function alm_parse_tax_terms($taxonomy_terms){
209
  /*
210
  * alm_get_tax_query
211
  * Query by custom taxonomy values
212
- *
213
  * @return $args = array();
214
  * @since 2.5.0
215
 
216
  * @deprecated in 2.8.5
217
  */
218
  function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_operator){
219
-
220
  // Taxonomy [ONLY]
221
  if(!empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator) && empty($post_format)){
222
  $the_terms = explode(",", $taxonomy_terms);
@@ -224,23 +224,23 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
224
  'taxonomy' => $taxonomy,
225
  'field' => 'slug',
226
  'terms' => $the_terms,
227
- 'operator' => $taxonomy_operator,
228
  );
229
  return $args;
230
  }
231
-
232
  // Post Format [ONLY]
233
  if(!empty($post_format) && empty($taxonomy)){
234
  $format = "post-format-$post_format";
235
-
236
  //If query is for standard then we need to filter by NOT IN
237
- if($format == 'post-format-standard'){
238
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
239
  $terms = array();
240
  foreach ($post_formats[0] as $format) {
241
  $terms[] = 'post-format-'.$format;
242
  }
243
- }
244
  $args = array(
245
  'taxonomy' => 'post_format',
246
  'terms' => $terms,
@@ -252,11 +252,11 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
252
  'taxonomy' => 'post_format',
253
  'field' => 'slug',
254
  'terms' => array($format),
255
- );
256
  }
257
  return $args;
258
  }
259
-
260
  // Taxonomy && Post Format [COMBINED]
261
  if(!empty($post_format) && !empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator)){
262
  $the_terms = explode(",", $taxonomy_terms);
@@ -265,16 +265,16 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
265
  'field' => 'slug',
266
  'terms' => $the_terms,
267
  'operator' => $taxonomy_operator,
268
- );
269
  $format = "post-format-$post_format";
270
  //If query is for standard then we need to filter by NOT IN
271
- if($format == 'post-format-standard'){
272
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
273
  $terms = array();
274
  foreach ($post_formats[0] as $format) {
275
  $terms[] = 'post-format-'.$format;
276
  }
277
- }
278
  $format_args = array(
279
  'taxonomy' => 'post_format',
280
  'terms' => $terms,
@@ -286,10 +286,10 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
286
  'taxonomy' => 'post_format',
287
  'field' => 'slug',
288
  'terms' => array($format),
289
- );
290
  }
291
  $args[] = $format_args; // Combined format and tax $args
292
- return $args;
293
  }
294
  }
295
 
@@ -298,30 +298,30 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
298
  /*
299
  * alm_get_meta_query
300
  * Query by custom field values
301
- *
302
  * @return $args = array();
303
  * @since 2.5.0
304
  */
305
  function alm_get_meta_query($meta_key, $meta_value, $meta_compare, $meta_type){
306
- if(!empty($meta_key)){
307
- $meta_values = alm_parse_meta_value($meta_value, $meta_compare);
308
- if(!empty($meta_values)){
309
  $return = array(
310
  'key' => $meta_key,
311
  'value' => $meta_values,
312
  'compare' => $meta_compare,
313
  'type' => $meta_type
314
- );
315
  }else{
316
  // If $meta_values is empty, don't query for 'value'
317
  $return = array(
318
  'key' => $meta_key,
319
  'compare' => $meta_compare,
320
  'type' => $meta_type
321
- );
322
- }
323
- return $return;
324
- }
325
  }
326
 
327
 
@@ -329,7 +329,7 @@ function alm_get_meta_query($meta_key, $meta_value, $meta_compare, $meta_type){
329
  /*
330
  * alm_parse_meta_value
331
  * Parse the meta value for multiple vals
332
- *
333
  * @helper function @alm_get_meta_query()
334
  * @return array;
335
  * @since 2.6.4
@@ -338,12 +338,12 @@ function alm_parse_meta_value($meta_value, $meta_compare){
338
  // See the docs (http://codex.wordpress.org/Class_Reference/WP_Meta_Query)
339
  if($meta_compare === 'IN' || $meta_compare === 'NOT IN' || $meta_compare === 'BETWEEN' || $meta_compare === 'NOT BETWEEN'){
340
  // Remove all whitespace for meta_value because it needs to be an exact match
341
- $mv_trimmed = preg_replace('/\s+/', ' ', $meta_value); // Trim whitespace
342
  $meta_values = str_replace(', ', ',', $mv_trimmed); // Replace [term, term] with [term,term]
343
- $meta_values = explode(",", $meta_values);
344
- }else{
345
  $meta_values = $meta_value;
346
- }
347
  return $meta_values;
348
  }
349
 
@@ -352,13 +352,13 @@ function alm_parse_meta_value($meta_value, $meta_compare){
352
  /*
353
  * alm_get_repeater_type
354
  * Get type of repeater
355
- *
356
  * @return $type;
357
  * @since 2.9
358
  */
359
  function alm_get_repeater_type($repeater){
360
  $type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater value at number to determine type
361
- $type = $type[0]; // default | repeater | template_
362
  return $type;
363
  }
364
 
@@ -367,20 +367,20 @@ function alm_get_repeater_type($repeater){
367
  /*
368
  * alm_get_canonical_url
369
  * Get current page base URL
370
- *
371
  * @return $canonicalURL;
372
  * @since 2.12
373
  */
374
  function alm_get_canonical_url(){
375
-
376
  $canonicalURL = '';
377
-
378
  // Date
379
  if(is_date()){
380
  // Is archive page
381
  $archive_year = get_the_date('Y');
382
  $archive_month = get_the_date('m');
383
- $archive_day = get_the_date('d');
384
  if(is_year()){
385
  $canonicalURL = get_year_link( $archive_year );
386
  }
@@ -389,18 +389,18 @@ function alm_get_canonical_url(){
389
  }
390
  if(is_day()){
391
  $canonicalURL = get_month_link( $archive_year, $archive_month, $archive_day );
392
- }
393
  }
394
  // Frontpage
395
- elseif(is_front_page()){
396
  if(function_exists('pll_home_url')){ // Polylang support
397
  $canonicalURL = pll_home_url();
398
  }else{
399
  $canonicalURL = get_home_url().'/';
400
- }
401
  }
402
  // Home (Blog Default)
403
- elseif(is_home()){
404
  $canonicalURL = get_permalink(get_option('page_for_posts'));
405
  }
406
  // Category
@@ -412,12 +412,12 @@ function alm_get_canonical_url(){
412
  elseif(is_tag()){
413
  $cur_tag_id = get_query_var('tag_id');
414
  $canonicalURL = get_tag_link($cur_tag_id);
415
- }
416
  // Author
417
  elseif(is_author()){
418
  $author_id = get_the_author_meta('ID');
419
  $canonicalURL = get_author_posts_url($author_id);
420
- }
421
  // Taxonomy
422
  elseif(is_tax()){
423
  $tax_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy' ));
@@ -427,16 +427,16 @@ function alm_get_canonical_url(){
427
  // Post Type
428
  elseif(is_post_type_archive()){
429
  $post_type_archive = get_post_type();
430
- $canonicalURL = get_post_type_archive_link($post_type_archive);
431
- }
432
  // Search
433
  elseif(is_search()){
434
- $canonicalURL = get_home_url().'/';
435
- }
436
- else{
437
  $canonicalURL = get_permalink();
438
- }
439
-
440
  return $canonicalURL;
441
  }
442
 
@@ -445,12 +445,12 @@ function alm_get_canonical_url(){
445
  /*
446
  * alm_get_page_slug
447
  * Get current page slug
448
- *
449
  * @return slug;
450
  * @since 2.13.0
451
  */
452
  function alm_get_page_slug($post){
453
-
454
  if(!is_archive()){
455
  // If not an archive page, set the post slug
456
  if(is_front_page() || is_home()){
@@ -468,7 +468,7 @@ function alm_get_page_slug($post){
468
  $slug = $post->post_name;
469
  }
470
  }
471
- }else{
472
  // Tax
473
  if(is_tax()){
474
  $queried_object = get_queried_object();
@@ -483,11 +483,11 @@ function alm_get_page_slug($post){
483
  // Tag
484
  elseif(is_tag()){
485
  $slug = get_query_var('tag');
486
- }
487
  // Author
488
  elseif(is_author()){
489
  $slug = get_the_author_meta('ID');
490
- }
491
  // Post Tupe Archive
492
  elseif(is_post_type_archive()){
493
  $slug = get_post_type();
@@ -496,7 +496,7 @@ function alm_get_page_slug($post){
496
  // Is archive page
497
  $archive_year = get_the_date('Y');
498
  $archive_month = get_the_date('m');
499
- $archive_day = get_the_date('d');
500
  if(is_year()){
501
  $slug = $archive_year;
502
  }
@@ -505,13 +505,13 @@ function alm_get_page_slug($post){
505
  }
506
  if(is_day()){
507
  $slug = $archive_year.'-'.$archive_month.'-'.$archive_day;
508
- }
509
  }
510
  else{
511
  $slug = '';
512
  }
513
  }
514
-
515
  return $slug;
516
  }
517
 
@@ -530,7 +530,7 @@ function alm_get_startpage(){
530
  $start_page = get_query_var('page');
531
  } else {
532
  $start_page = 1;
533
- }
534
  return $start_page;
535
  }
536
 
@@ -539,13 +539,13 @@ function alm_get_startpage(){
539
  /*
540
  * alm_paging_no_script
541
  * Create paging navigation
542
- *
543
  * @return html;
544
  * @since 2.8.3
545
  */
546
  function alm_paging_no_script($alm_preload_query){
547
  $numposts = $alm_preload_query->found_posts;
548
- $max_page = $alm_preload_query->max_num_pages;
549
  if(empty($paged) || $paged == 0) {
550
  $paged = 1;
551
  }
@@ -590,6 +590,6 @@ function alm_paging_no_script($alm_preload_query){
590
  }
591
  $content .= '</div>';
592
  $content .= '</noscript>';
593
- }
594
  return $content;
595
  }
10
  */
11
 
12
  function alm_get_current_repeater($repeater, $type) {
13
+
14
  $template = $repeater;
15
  $include = '';
16
+
17
  // If is Custom Repeaters (Custom Repeaters v1)
18
+ if( $type == 'repeater' && has_action('alm_repeater_installed' )){
19
+ $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
20
+
21
+ if(!file_exists($include)){ //confirm file exists
22
  alm_get_default_repeater();
23
+ }
24
+
25
  }
26
  // If is Unlimited Repeaters (Custom Repeaters v2)
27
  elseif( $type == 'template_' && has_action('alm_unlimited_installed' )){
28
  global $wpdb;
29
  $blog_id = $wpdb->blogid;
30
+
31
+ if($blog_id > 1){
32
  $include = ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'.$template .'.php';
33
  }else{
34
+ $include = ALM_UNLIMITED_PATH. 'repeaters/'.$template .'.php';
35
+ }
36
+
37
+ if(!file_exists($include)){ //confirm file exists
38
+ $include = alm_get_default_repeater();
39
  }
40
  }
41
  // Default repeater
42
+ else{
43
  $include = alm_get_default_repeater();
44
+ }
45
+
46
  // Security check
47
  // check if $template contains relative path. So, set include to default
48
  if ( false !== strpos( $template, './' ) ) {
49
  $include = alm_get_default_repeater();
50
  }
51
+
52
  return $include;
53
+
54
  }
55
 
56
 
64
  */
65
 
66
  function alm_get_default_repeater() {
67
+
68
  global $wpdb;
69
  $file = null;
70
+ $template_dir = 'alm_templates';
71
+
72
  // Allow user to load template from theme directory
73
  // Since 2.8.5
74
+
75
  // load repeater template from current theme folder
76
  if(is_child_theme()){
77
  $template_theme_file = get_stylesheet_directory().'/'. $template_dir .'/default.php';
87
  if(file_exists($template_theme_file)){
88
  $file = $template_theme_file;
89
  }
90
+
91
  // Since 2.0
92
  // otherwise use pre-defined plug-in templates
93
+ if($file == null){
94
  $blog_id = $wpdb->blogid;
95
+ if($blog_id > 1){
96
  $file = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php'; // File
97
  }else{
98
+ $file = ALM_PATH. 'core/repeater/default.php';
99
  }
100
  }
101
+
102
  return $file;
103
  }
104
 
107
  /*
108
  * alm_get_taxonomy
109
  * Query by custom taxonomy values
110
+ *
111
  * @return $args = array();
112
  * @since 2.5.0
113
  *
120
  'taxonomy' => $taxonomy,
121
  'field' => 'slug',
122
  'terms' => $the_terms,
123
+ 'operator' => $taxonomy_operator,
124
  );
125
  return $args;
126
  }
131
  /*
132
  * alm_get_post_format
133
  * Query by post format
134
+ *
135
  * @return $args = array();
136
  * @since 2.5.0
137
  * @updated 2.8.5
140
  if(!empty($post_format)){
141
  $format = "post-format-$post_format";
142
  //If query is for standard then we need to filter by NOT IN
143
+ if($format == 'post-format-standard'){
144
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
145
  $terms = array();
146
  foreach ($post_formats[0] as $format) {
147
  $terms[] = 'post-format-'.$format;
148
  }
149
+ }
150
  $return = array(
151
  'taxonomy' => 'post_format',
152
  'terms' => $terms,
158
  'taxonomy' => 'post_format',
159
  'field' => 'slug',
160
  'terms' => array($format),
161
+ );
162
  }
163
+ return $return;
164
  }
165
  }
166
 
169
  /*
170
  * alm_get_taxonomy_query
171
  * Query for custom taxonomy
172
+ *
173
  * @return $args = array();
174
  * @since 2.8.5
175
  */
176
  function alm_get_taxonomy_query($taxonomy, $taxonomy_terms, $taxonomy_operator){
177
+ if(!empty($taxonomy) && !empty($taxonomy_terms)){
178
+ $taxonomy_term_values = alm_parse_tax_terms($taxonomy_terms);
179
  $return = array(
180
+ 'taxonomy' => $taxonomy,
181
+ 'field' => 'slug',
182
+ 'terms' => $taxonomy_term_values,
183
  'operator' => $taxonomy_operator
184
+ );
185
+ return $return;
186
  }
187
  }
188
 
191
  /*
192
  * alm_parse_tax_terms
193
  * Parse the taxonomy terms for multiple vals
194
+ *
195
  * @helper function @alm_get_taxonomy_query()
196
  * @return array;
197
  * @since 2.8.5
198
  */
199
  function alm_parse_tax_terms($taxonomy_terms){
200
  // Remove all whitespace for $taxonomy_terms because it needs to be an exact match
201
+ $taxonomy_terms = preg_replace('/\s+/', ' ', $taxonomy_terms); // Trim whitespace
202
  $taxonomy_terms = str_replace(', ', ',', $taxonomy_terms); // Replace [term, term] with [term,term]
203
+ $taxonomy_terms = explode(",", $taxonomy_terms);
204
  return $taxonomy_terms;
205
  }
206
 
209
  /*
210
  * alm_get_tax_query
211
  * Query by custom taxonomy values
212
+ *
213
  * @return $args = array();
214
  * @since 2.5.0
215
 
216
  * @deprecated in 2.8.5
217
  */
218
  function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_operator){
219
+
220
  // Taxonomy [ONLY]
221
  if(!empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator) && empty($post_format)){
222
  $the_terms = explode(",", $taxonomy_terms);
224
  'taxonomy' => $taxonomy,
225
  'field' => 'slug',
226
  'terms' => $the_terms,
227
+ 'operator' => $taxonomy_operator,
228
  );
229
  return $args;
230
  }
231
+
232
  // Post Format [ONLY]
233
  if(!empty($post_format) && empty($taxonomy)){
234
  $format = "post-format-$post_format";
235
+
236
  //If query is for standard then we need to filter by NOT IN
237
+ if($format == 'post-format-standard'){
238
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
239
  $terms = array();
240
  foreach ($post_formats[0] as $format) {
241
  $terms[] = 'post-format-'.$format;
242
  }
243
+ }
244
  $args = array(
245
  'taxonomy' => 'post_format',
246
  'terms' => $terms,
252
  'taxonomy' => 'post_format',
253
  'field' => 'slug',
254
  'terms' => array($format),
255
+ );
256
  }
257
  return $args;
258
  }
259
+
260
  // Taxonomy && Post Format [COMBINED]
261
  if(!empty($post_format) && !empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator)){
262
  $the_terms = explode(",", $taxonomy_terms);
265
  'field' => 'slug',
266
  'terms' => $the_terms,
267
  'operator' => $taxonomy_operator,
268
+ );
269
  $format = "post-format-$post_format";
270
  //If query is for standard then we need to filter by NOT IN
271
+ if($format == 'post-format-standard'){
272
  if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
273
  $terms = array();
274
  foreach ($post_formats[0] as $format) {
275
  $terms[] = 'post-format-'.$format;
276
  }
277
+ }
278
  $format_args = array(
279
  'taxonomy' => 'post_format',
280
  'terms' => $terms,
286
  'taxonomy' => 'post_format',
287
  'field' => 'slug',
288
  'terms' => array($format),
289
+ );
290
  }
291
  $args[] = $format_args; // Combined format and tax $args
292
+ return $args;
293
  }
294
  }
295
 
298
  /*
299
  * alm_get_meta_query
300
  * Query by custom field values
301
+ *
302
  * @return $args = array();
303
  * @since 2.5.0
304
  */
305
  function alm_get_meta_query($meta_key, $meta_value, $meta_compare, $meta_type){
306
+ if(!empty($meta_key)){
307
+ $meta_values = alm_parse_meta_value($meta_value, $meta_compare);
308
+ if(!empty($meta_values)){
309
  $return = array(
310
  'key' => $meta_key,
311
  'value' => $meta_values,
312
  'compare' => $meta_compare,
313
  'type' => $meta_type
314
+ );
315
  }else{
316
  // If $meta_values is empty, don't query for 'value'
317
  $return = array(
318
  'key' => $meta_key,
319
  'compare' => $meta_compare,
320
  'type' => $meta_type
321
+ );
322
+ }
323
+ return $return;
324
+ }
325
  }
326
 
327
 
329
  /*
330
  * alm_parse_meta_value
331
  * Parse the meta value for multiple vals
332
+ *
333
  * @helper function @alm_get_meta_query()
334
  * @return array;
335
  * @since 2.6.4
338
  // See the docs (http://codex.wordpress.org/Class_Reference/WP_Meta_Query)
339
  if($meta_compare === 'IN' || $meta_compare === 'NOT IN' || $meta_compare === 'BETWEEN' || $meta_compare === 'NOT BETWEEN'){
340
  // Remove all whitespace for meta_value because it needs to be an exact match
341
+ $mv_trimmed = preg_replace('/\s+/', ' ', $meta_value); // Trim whitespace
342
  $meta_values = str_replace(', ', ',', $mv_trimmed); // Replace [term, term] with [term,term]
343
+ $meta_values = explode(",", $meta_values);
344
+ }else{
345
  $meta_values = $meta_value;
346
+ }
347
  return $meta_values;
348
  }
349
 
352
  /*
353
  * alm_get_repeater_type
354
  * Get type of repeater
355
+ *
356
  * @return $type;
357
  * @since 2.9
358
  */
359
  function alm_get_repeater_type($repeater){
360
  $type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater value at number to determine type
361
+ $type = $type[0]; // default | repeater | template_
362
  return $type;
363
  }
364
 
367
  /*
368
  * alm_get_canonical_url
369
  * Get current page base URL
370
+ *
371
  * @return $canonicalURL;
372
  * @since 2.12
373
  */
374
  function alm_get_canonical_url(){
375
+
376
  $canonicalURL = '';
377
+
378
  // Date
379
  if(is_date()){
380
  // Is archive page
381
  $archive_year = get_the_date('Y');
382
  $archive_month = get_the_date('m');
383
+ $archive_day = get_the_date('d');
384
  if(is_year()){
385
  $canonicalURL = get_year_link( $archive_year );
386
  }
389
  }
390
  if(is_day()){
391
  $canonicalURL = get_month_link( $archive_year, $archive_month, $archive_day );
392
+ }
393
  }
394
  // Frontpage
395
+ elseif(is_front_page()){
396
  if(function_exists('pll_home_url')){ // Polylang support
397
  $canonicalURL = pll_home_url();
398
  }else{
399
  $canonicalURL = get_home_url().'/';
400
+ }
401
  }
402
  // Home (Blog Default)
403
+ elseif(is_home()){
404
  $canonicalURL = get_permalink(get_option('page_for_posts'));
405
  }
406
  // Category
412
  elseif(is_tag()){
413
  $cur_tag_id = get_query_var('tag_id');
414
  $canonicalURL = get_tag_link($cur_tag_id);
415
+ }
416
  // Author
417
  elseif(is_author()){
418
  $author_id = get_the_author_meta('ID');
419
  $canonicalURL = get_author_posts_url($author_id);
420
+ }
421
  // Taxonomy
422
  elseif(is_tax()){
423
  $tax_term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy' ));
427
  // Post Type
428
  elseif(is_post_type_archive()){
429
  $post_type_archive = get_post_type();
430
+ $canonicalURL = get_post_type_archive_link($post_type_archive);
431
+ }
432
  // Search
433
  elseif(is_search()){
434
+ $canonicalURL = get_home_url().'/';
435
+ }
436
+ else{
437
  $canonicalURL = get_permalink();
438
+ }
439
+
440
  return $canonicalURL;
441
  }
442
 
445
  /*
446
  * alm_get_page_slug
447
  * Get current page slug
448
+ *
449
  * @return slug;
450
  * @since 2.13.0
451
  */
452
  function alm_get_page_slug($post){
453
+
454
  if(!is_archive()){
455
  // If not an archive page, set the post slug
456
  if(is_front_page() || is_home()){
468
  $slug = $post->post_name;
469
  }
470
  }
471
+ }else{
472
  // Tax
473
  if(is_tax()){
474
  $queried_object = get_queried_object();
483
  // Tag
484
  elseif(is_tag()){
485
  $slug = get_query_var('tag');
486
+ }
487
  // Author
488
  elseif(is_author()){
489
  $slug = get_the_author_meta('ID');
490
+ }
491
  // Post Tupe Archive
492
  elseif(is_post_type_archive()){
493
  $slug = get_post_type();
496
  // Is archive page
497
  $archive_year = get_the_date('Y');
498
  $archive_month = get_the_date('m');
499
+ $archive_day = get_the_date('d');
500
  if(is_year()){
501
  $slug = $archive_year;
502
  }
505
  }
506
  if(is_day()){
507
  $slug = $archive_year.'-'.$archive_month.'-'.$archive_day;
508
+ }
509
  }
510
  else{
511
  $slug = '';
512
  }
513
  }
514
+
515
  return $slug;
516
  }
517
 
530
  $start_page = get_query_var('page');
531
  } else {
532
  $start_page = 1;
533
+ }
534
  return $start_page;
535
  }
536
 
539
  /*
540
  * alm_paging_no_script
541
  * Create paging navigation
542
+ *
543
  * @return html;
544
  * @since 2.8.3
545
  */
546
  function alm_paging_no_script($alm_preload_query){
547
  $numposts = $alm_preload_query->found_posts;
548
+ $max_page = $alm_preload_query->max_num_pages;
549
  if(empty($paged) || $paged == 0) {
550
  $paged = 1;
551
  }
590
  }
591
  $content .= '</div>';
592
  $content .= '</noscript>';
593
+ }
594
  return $content;
595
  }
core/js/ajax-load-more.js CHANGED
@@ -3,7 +3,7 @@
3
  * http://wordpress.org/plugins/ajax-load-more/
4
  * https://connekthq.com/plugins/ajax-load-more/
5
  *
6
- * Copyright 2016 Connekt Media - https://connekthq.com
7
  * Free to use under the GPLv2 license.
8
  * http://www.gnu.org/licenses/gpl-2.0.html
9
  *
@@ -394,6 +394,9 @@
394
  alm.post_type = alm.content.attr('data-post-type');
395
  alm.post_type = alm.post_type.split(",");
396
 
 
 
 
397
 
398
  /* Append 'load More' button to .ajax-load-more-wrap */
399
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
@@ -530,7 +533,7 @@
530
  offset : alm.offset,
531
  slug : alm.slug,
532
  canonical_url : alm.canonical_url,
533
- post_type : alm.post_type,
534
  post_format : alm.content.attr('data-post-format'),
535
  category : alm.content.attr('data-category'),
536
  category__not_in : alm.content.attr('data-category-not-in'),
@@ -619,6 +622,7 @@
619
  cta : alm.cta_array,
620
  comments : alm.comments_array,
621
  post_type : alm.post_type,
 
622
  post_format : alm.content.attr('data-post-format'),
623
  category : alm.content.attr('data-category'),
624
  category__not_in : alm.content.attr('data-category-not-in'),
3
  * http://wordpress.org/plugins/ajax-load-more/
4
  * https://connekthq.com/plugins/ajax-load-more/
5
  *
6
+ * Copyright 2017 Connekt Media - https://connekthq.com
7
  * Free to use under the GPLv2 license.
8
  * http://www.gnu.org/licenses/gpl-2.0.html
9
  *
394
  alm.post_type = alm.content.attr('data-post-type');
395
  alm.post_type = alm.post_type.split(",");
396
 
397
+ /* Sticky Posts */
398
+ alm.sticky_posts = alm.content.attr('data-sticky-posts');
399
+
400
 
401
  /* Append 'load More' button to .ajax-load-more-wrap */
402
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
533
  offset : alm.offset,
534
  slug : alm.slug,
535
  canonical_url : alm.canonical_url,
536
+ post_type : alm.post_type,
537
  post_format : alm.content.attr('data-post-format'),
538
  category : alm.content.attr('data-category'),
539
  category__not_in : alm.content.attr('data-category-not-in'),
622
  cta : alm.cta_array,
623
  comments : alm.comments_array,
624
  post_type : alm.post_type,
625
+ sticky_posts : alm.sticky_posts,
626
  post_format : alm.content.attr('data-post-format'),
627
  category : alm.content.attr('data-category'),
628
  category__not_in : alm.content.attr('data-category-not-in'),
core/js/ajax-load-more.min.js CHANGED
@@ -42,7 +42,7 @@ if(alm.content.attr('data-button-label')===undefined){alm.button_label='Older Po
42
  alm.button_loading_label=alm.content.attr('data-button-loading-label');if(alm.button_loading_label===undefined){alm.button_loading_label=false;}
43
  if(alm.content.attr('data-button-class')===undefined){alm.button_class='';}else{alm.button_class=' '+alm.content.attr('data-button-class');}
44
  if(alm.content.attr('data-scroll')===undefined){alm.scroll=true;}else if(alm.content.attr('data-scroll')==='false'){alm.scroll=false;}else{alm.scroll=true;}
45
- alm.post_type=alm.content.attr('data-post-type');alm.post_type=alm.post_type.split(",");alm.container.append('<div class="'+alm.prefix+'btn-wrap"/>');alm.btnWrap=$('.'+alm.prefix+'btn-wrap',alm.container);if(alm.paging){alm.content.parent().addClass('loading');}else{$('.'+alm.prefix+'btn-wrap',alm.container).append('<button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button>');alm.button=$('.alm-load-more-btn',alm.container);}
46
  alm.AjaxLoadMore.loadPosts=function(){if(!alm.disable_ajax){if(!alm.paging){alm.button.addClass('loading');if(alm.button_loading_label!==false){alm.button.text(alm.button_loading_label);}}
47
  alm.loading=true;if(alm.cache==='true'&&!alm.cache_logged_in){var cache_page;if(alm.init&&alm.seo&&alm.isPaged){var firstpage='1';cache_page=alm.cache_path+'/page-'+firstpage+'-'+alm.start_page+'.html';}else{cache_page=alm.cache_path+'/page-'+(alm.page+1)+'.html';}
48
  $.get(cache_page,function(data){alm.AjaxLoadMore.success(data,true);}).fail(function(){alm.AjaxLoadMore.ajax('standard');});}else{alm.AjaxLoadMore.ajax('standard');}}};alm.AjaxLoadMore.ajax=function(queryType){var action='alm_query_posts';if(alm.nextpage){action='alm_nextpage_query';alm.nextpage_array={'nextpage':'true','urls':alm.nextpage_urls,'scroll':alm.nextpage_scroll,'pageviews':alm.nextpage_pageviews,'post_id':alm.nextpage_post_id,'startpage':alm.nextpage_startpage};}
@@ -52,7 +52,7 @@ if(alm.cta==='true'){alm.cta_array={'cta':'true','cta_position':alm.cta_position
52
  if(alm.restapi){var alm_template=wp.template(alm.restapi_template_id),rest_url=alm.restapi_base_url+'/'+alm.restapi_namespace+'/'+alm.restapi_endpoint,rest_data={posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,slug:alm.slug,canonical_url:alm.canonical_url,post_type:alm.post_type,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),lang:alm.lang,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,id:el.attr('data-id')};$.ajax({type:"GET",url:rest_url,data:rest_data,dataType:"JSON",beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(results){var data,html=results.html,meta=results.meta,postcount=meta.postcount,totalposts=meta.totalposts;$.each(html,function(e){var result=html[e];if(alm.restapi_debug==='true'){console.log(result);}
53
  data+=alm_template(result);});var obj={'html':data,'meta':{'postcount':postcount,'totalposts':totalposts},}
54
  alm.AjaxLoadMore.success(obj,false);}});}
55
- else{$.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:action,query_type:queryType,nonce:alm_localize.alm_nonce,cache_id:alm.cache_id,repeater:alm.repeater,theme_repeater:alm.theme_repeater,nextpage:alm.nextpage_array,cta:alm.cta_array,comments:alm.comments_array,post_type:alm.post_type,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),exclude:alm.content.attr('data-exclude'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,paging:alm.paging,previous_post:alm.previous_post,previous_post_id:alm.previous_post_id,previous_post_taxonomy:alm.previous_post_taxonomy,lang:alm.lang,slug:alm.slug,canonical_url:alm.canonical_url,id:el.attr('data-id')},beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(data){if(queryType==='standard'){alm.AjaxLoadMore.success(data,false);}
56
  else if(queryType==='totalpages'&&alm.paging&&alm.nextpage){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}
57
  else if(queryType==='totalposts'&&alm.paging){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);}});}};if(alm.paging){if(alm.nextpage){alm.AjaxLoadMore.ajax('totalpages');}else{alm.AjaxLoadMore.ajax('totalposts');}}
58
  alm.AjaxLoadMore.success=function(data,is_cache){if(alm.previous_post){alm.AjaxLoadMore.getPreviousPost();}
42
  alm.button_loading_label=alm.content.attr('data-button-loading-label');if(alm.button_loading_label===undefined){alm.button_loading_label=false;}
43
  if(alm.content.attr('data-button-class')===undefined){alm.button_class='';}else{alm.button_class=' '+alm.content.attr('data-button-class');}
44
  if(alm.content.attr('data-scroll')===undefined){alm.scroll=true;}else if(alm.content.attr('data-scroll')==='false'){alm.scroll=false;}else{alm.scroll=true;}
45
+ alm.post_type=alm.content.attr('data-post-type');alm.post_type=alm.post_type.split(",");alm.sticky_posts=alm.content.attr('data-sticky-posts');alm.container.append('<div class="'+alm.prefix+'btn-wrap"/>');alm.btnWrap=$('.'+alm.prefix+'btn-wrap',alm.container);if(alm.paging){alm.content.parent().addClass('loading');}else{$('.'+alm.prefix+'btn-wrap',alm.container).append('<button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button>');alm.button=$('.alm-load-more-btn',alm.container);}
46
  alm.AjaxLoadMore.loadPosts=function(){if(!alm.disable_ajax){if(!alm.paging){alm.button.addClass('loading');if(alm.button_loading_label!==false){alm.button.text(alm.button_loading_label);}}
47
  alm.loading=true;if(alm.cache==='true'&&!alm.cache_logged_in){var cache_page;if(alm.init&&alm.seo&&alm.isPaged){var firstpage='1';cache_page=alm.cache_path+'/page-'+firstpage+'-'+alm.start_page+'.html';}else{cache_page=alm.cache_path+'/page-'+(alm.page+1)+'.html';}
48
  $.get(cache_page,function(data){alm.AjaxLoadMore.success(data,true);}).fail(function(){alm.AjaxLoadMore.ajax('standard');});}else{alm.AjaxLoadMore.ajax('standard');}}};alm.AjaxLoadMore.ajax=function(queryType){var action='alm_query_posts';if(alm.nextpage){action='alm_nextpage_query';alm.nextpage_array={'nextpage':'true','urls':alm.nextpage_urls,'scroll':alm.nextpage_scroll,'pageviews':alm.nextpage_pageviews,'post_id':alm.nextpage_post_id,'startpage':alm.nextpage_startpage};}
52
  if(alm.restapi){var alm_template=wp.template(alm.restapi_template_id),rest_url=alm.restapi_base_url+'/'+alm.restapi_namespace+'/'+alm.restapi_endpoint,rest_data={posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,slug:alm.slug,canonical_url:alm.canonical_url,post_type:alm.post_type,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),lang:alm.lang,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,id:el.attr('data-id')};$.ajax({type:"GET",url:rest_url,data:rest_data,dataType:"JSON",beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(results){var data,html=results.html,meta=results.meta,postcount=meta.postcount,totalposts=meta.totalposts;$.each(html,function(e){var result=html[e];if(alm.restapi_debug==='true'){console.log(result);}
53
  data+=alm_template(result);});var obj={'html':data,'meta':{'postcount':postcount,'totalposts':totalposts},}
54
  alm.AjaxLoadMore.success(obj,false);}});}
55
+ else{$.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:action,query_type:queryType,nonce:alm_localize.alm_nonce,cache_id:alm.cache_id,repeater:alm.repeater,theme_repeater:alm.theme_repeater,nextpage:alm.nextpage_array,cta:alm.cta_array,comments:alm.comments_array,post_type:alm.post_type,sticky_posts:alm.sticky_posts,post_format:alm.content.attr('data-post-format'),category:alm.content.attr('data-category'),category__not_in:alm.content.attr('data-category-not-in'),tag:alm.content.attr('data-tag'),tag__not_in:alm.content.attr('data-tag-not-in'),taxonomy:alm.content.attr('data-taxonomy'),taxonomy_terms:alm.content.attr('data-taxonomy-terms'),taxonomy_operator:alm.content.attr('data-taxonomy-operator'),taxonomy_relation:alm.content.attr('data-taxonomy-relation'),meta_key:alm.content.attr('data-meta-key'),meta_value:alm.content.attr('data-meta-value'),meta_compare:alm.content.attr('data-meta-compare'),meta_relation:alm.content.attr('data-meta-relation'),meta_type:alm.content.attr('data-meta-type'),author:alm.content.attr('data-author'),year:alm.content.attr('data-year'),month:alm.content.attr('data-month'),day:alm.content.attr('data-day'),post_status:alm.content.attr('data-post-status'),order:alm.content.attr('data-order'),orderby:alm.content.attr('data-orderby'),post__in:alm.content.attr('data-post-in'),post__not_in:alm.content.attr('data-post-not-in'),exclude:alm.content.attr('data-exclude'),search:alm.content.attr('data-search'),custom_args:alm.content.attr('data-custom-args'),posts_per_page:alm.posts_per_page,page:alm.page,offset:alm.offset,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,seo_start_page:alm.start_page,paging:alm.paging,previous_post:alm.previous_post,previous_post_id:alm.previous_post_id,previous_post_taxonomy:alm.previous_post_taxonomy,lang:alm.lang,slug:alm.slug,canonical_url:alm.canonical_url,id:el.attr('data-id')},beforeSend:function(){if(alm.page!=1&&!alm.paging){alm.button.addClass('loading');}},success:function(data){if(queryType==='standard'){alm.AjaxLoadMore.success(data,false);}
56
  else if(queryType==='totalpages'&&alm.paging&&alm.nextpage){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}
57
  else if(queryType==='totalposts'&&alm.paging){if($.isFunction($.fn.almBuildPagination)){$.fn.almBuildPagination(data,alm);}}},error:function(jqXHR,textStatus,errorThrown){alm.AjaxLoadMore.error(jqXHR,textStatus,errorThrown);}});}};if(alm.paging){if(alm.nextpage){alm.AjaxLoadMore.ajax('totalpages');}else{alm.AjaxLoadMore.ajax('totalposts');}}
58
  alm.AjaxLoadMore.success=function(data,is_cache){if(alm.previous_post){alm.AjaxLoadMore.getPreviousPost();}
core/repeater/default.php CHANGED
@@ -1,9 +1,12 @@
1
  <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
2
- <?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(150,150));
3
- }?>
4
- <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
5
- <p class="entry-meta">
6
- <?php the_time("F d, Y"); ?>
7
- </p>
8
- <?php the_excerpt(); ?>
9
- </li>
 
 
 
1
  <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
2
+ <?php
3
+ if ( has_post_thumbnail() ) {
4
+ the_post_thumbnail(array(150,150));
5
+ }
6
+ ?>
7
+ <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
8
+ <p class="entry-meta">
9
+ <?php the_time("F d, Y"); ?>
10
+ </p>
11
+ <?php the_excerpt(); ?>
12
+ </li>
index.php DELETED
@@ -1 +0,0 @@
1
- <?php // Silence is golden
 
lang/ajax-load-more.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
- "POT-Creation-Date: 2017-02-14 10:47-0500\n"
5
- "PO-Revision-Date: 2017-02-14 10:47-0500\n"
6
  "Last-Translator: Darren Cooney <dcooney@ecentricarts.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
@@ -15,204 +15,204 @@ msgstr ""
15
  "X-Poedit-KeywordsList: __;_e\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
- #: ../admin/admin.php:94 ../admin/admin.php:153 ../admin/admin.php:720
19
- #: ../admin/admin.php:764 ../admin/admin.php:814
20
  msgid "You don't belong here."
21
  msgstr ""
22
 
23
- #: ../admin/admin.php:183 ../admin/editor/editor-build.php:72
24
- #: ../admin/views/licenses.php:66 ../admin/views/licenses.php:131
25
- #: ../admin/views/licenses.php:196 ../admin/views/licenses.php:262
26
- #: ../admin/views/licenses.php:329 ../admin/views/licenses.php:395
27
- #: ../admin/views/licenses.php:462 ../admin/views/licenses.php:527
28
- #: ../admin/views/licenses.php:591 ../admin/views/licenses.php:657
29
- #: ../admin/views/licenses.php:723 ../admin/views/licenses.php:791
30
  msgid "Active"
31
  msgstr ""
32
 
33
- #: ../admin/admin.php:184 ../admin/editor/editor-build.php:73
34
- #: ../admin/views/licenses.php:70 ../admin/views/licenses.php:135
35
- #: ../admin/views/licenses.php:200 ../admin/views/licenses.php:266
36
- #: ../admin/views/licenses.php:333 ../admin/views/licenses.php:399
37
- #: ../admin/views/licenses.php:466 ../admin/views/licenses.php:531
38
- #: ../admin/views/licenses.php:595 ../admin/views/licenses.php:661
39
- #: ../admin/views/licenses.php:727 ../admin/views/licenses.php:795
40
  msgid "Inactive"
41
  msgstr ""
42
 
43
- #: ../admin/admin.php:185 ../admin/editor/editor-build.php:74
44
  msgid "Applying layout"
45
  msgstr ""
46
 
47
- #: ../admin/admin.php:186 ../admin/editor/editor-build.php:75
48
- #: ../admin/views/repeater-templates.php:246
49
  msgid "Template Updated"
50
  msgstr ""
51
 
52
- #: ../admin/admin.php:188 ../admin/editor/editor-build.php:77
53
  msgid "Select Author(s)"
54
  msgstr ""
55
 
56
- #: ../admin/admin.php:189 ../admin/editor/editor-build.php:78
57
  msgid "Select Categories"
58
  msgstr ""
59
 
60
- #: ../admin/admin.php:190 ../admin/editor/editor-build.php:79
61
  msgid "Select Tags"
62
  msgstr ""
63
 
64
- #: ../admin/admin.php:191 ../admin/editor/editor-build.php:44
65
  #: ../admin/editor/editor-build.php:80
66
  msgid "Jump to Option"
67
  msgstr ""
68
 
69
- #: ../admin/admin.php:192 ../admin/editor/editor-build.php:81
70
  msgid "Jump to Template"
71
  msgstr ""
72
 
73
- #: ../admin/admin.php:302
74
  msgid ""
75
  "[Ajax Load More] Error opening default repeater template - Please check your "
76
  "file path and ensure your server is configured to allow Ajax Load More to "
77
  "read and write files within the /ajax-load-more/core/repeater directory"
78
  msgstr ""
79
 
80
- #: ../admin/admin.php:306
81
  msgid ""
82
  "[Ajax Load More] Error updating default repeater template - Please check "
83
  "your file path and ensure your server is configured to allow Ajax Load More "
84
  "to read and write files within the /ajax-load-more/core/repeater directory."
85
  msgstr ""
86
 
87
- #: ../admin/admin.php:678
88
  msgid "[Ajax Load More] Unable to open repeater template - "
89
  msgstr ""
90
 
91
- #: ../admin/admin.php:682
92
  msgid "[Ajax Load More] Error saving repeater template - "
93
  msgstr ""
94
 
95
- #: ../admin/admin.php:715
96
  msgid "Error Writing File"
97
  msgstr ""
98
 
99
- #: ../admin/admin.php:918 ../admin/shortcode-builder/shortcode-builder.php:848
100
  msgid "Container Type"
101
  msgstr ""
102
 
103
- #: ../admin/admin.php:926 ../admin/shortcode-builder/shortcode-builder.php:878
104
  msgid "Container Classes"
105
  msgstr ""
106
 
107
- #: ../admin/admin.php:934
108
  msgid "Disable CSS"
109
  msgstr ""
110
 
111
- #: ../admin/admin.php:942
112
  msgid "Button/Loading Style"
113
  msgstr ""
114
 
115
- #: ../admin/admin.php:950
116
  msgid "Button Classes"
117
  msgstr ""
118
 
119
- #: ../admin/admin.php:958
120
  msgid "Ajax Security"
121
  msgstr ""
122
 
123
- #: ../admin/admin.php:966
124
  msgid "Top of Page"
125
  msgstr ""
126
 
127
- #: ../admin/admin.php:974
128
  msgid "Dynamic Content"
129
  msgstr ""
130
 
131
- #: ../admin/admin.php:982
132
  msgid "Editor Button"
133
  msgstr ""
134
 
135
- #: ../admin/admin.php:990
136
  msgid "Error Notices"
137
  msgstr ""
138
 
139
- #: ../admin/admin.php:1061
140
  msgid ""
141
  "Customize the user experience of Ajax Load More by updating the fields below."
142
  msgstr ""
143
 
144
- #: ../admin/admin.php:1074
145
  msgid "The following settings affect the WordPress admin area only."
146
  msgstr ""
147
 
148
- #: ../admin/admin.php:1105
149
  msgid "I want to use my own CSS styles."
150
  msgstr ""
151
 
152
- #: ../admin/admin.php:1105
153
  msgid "View Ajax Load More CSS"
154
  msgstr ""
155
 
156
- #: ../admin/admin.php:1125
157
  msgid "Hide shortcode button in WYSIWYG editor."
158
  msgstr ""
159
 
160
- #: ../admin/admin.php:1146
161
  msgid ""
162
  "Display error messaging regarding repeater template updates in the browser "
163
  "console."
164
  msgstr ""
165
 
166
- #: ../admin/admin.php:1167
167
  msgid ""
168
  "Disable dynamic population of categories, tags and authors in the Shortcode "
169
  "Builder.<span style=\"display:block\">Recommended if you have an "
170
  "extraordinary number of categories, tags and/or authors."
171
  msgstr ""
172
 
173
- #: ../admin/admin.php:1188 ../admin/admin.php:1191
174
  msgid "Ajax Posts Here"
175
  msgstr ""
176
 
177
- #: ../admin/admin.php:1193
178
  msgid "You can modify the container type when building a shortcode."
179
  msgstr ""
180
 
181
- #: ../admin/admin.php:1210
182
  msgid ""
183
  "Add classes to Ajax Load More container - classes are applied globally and "
184
  "will appear with every instance of Ajax Load More. <span style=\"display:"
185
  "block\">You can also add classes when building a shortcode.</span>"
186
  msgstr ""
187
 
188
- #: ../admin/admin.php:1272
189
  msgid ""
190
  "Select an Ajax loading style - you can choose between a <strong>button</"
191
  "strong> or <strong>infinite scroll</strong>"
192
  msgstr ""
193
 
194
- #: ../admin/admin.php:1293
195
  msgid "Preview"
196
  msgstr ""
197
 
198
- #: ../admin/admin.php:1293
199
  #: ../admin/shortcode-builder/shortcode-builder.php:903
200
- #: ../core/classes/class.alm-shortcode.php:122
201
  msgid "Older Posts"
202
  msgstr ""
203
 
204
- #: ../admin/admin.php:1312
205
  msgid "Add classes to your <strong>Load More</strong> button"
206
  msgstr ""
207
 
208
- #: ../admin/admin.php:1355
209
  msgid ""
210
  "On initial page load, move the user's browser window to the top of the "
211
  "screen.<span style=\"display:block\">This <u>may</u> help prevent the "
212
  "loading of unnecessary posts.</span>"
213
  msgstr ""
214
 
215
- #: ../admin/admin.php:1376
216
  msgid ""
217
  "Enable <a href=\"https://codex.wordpress.org/WordPress_Nonces\" target="
218
  "\"_blank\">WP nonce</a> verification to help protect URLs against certain "
@@ -228,7 +228,7 @@ msgstr ""
228
  msgid "Insert Shortcode"
229
  msgstr ""
230
 
231
- #: ../admin/editor/editor-build.php:59 ../admin/views/shortcode-builder.php:25
232
  msgid "Copy"
233
  msgstr ""
234
 
@@ -290,61 +290,41 @@ msgstr ""
290
  msgid "More Info"
291
  msgstr ""
292
 
293
- #: ../admin/includes/cta/mailinglist.php:3
294
- msgid "Join our mailing list"
295
- msgstr ""
296
-
297
- #: ../admin/includes/cta/mailinglist.php:4
298
- msgid "Get product updates delivered directly to your inbox."
299
- msgstr ""
300
-
301
- #: ../admin/includes/cta/mailinglist.php:10
302
- msgid "Email Address"
303
- msgstr ""
304
-
305
- #: ../admin/includes/cta/mailinglist.php:11
306
- msgid "Enter email address"
307
- msgstr ""
308
-
309
- #: ../admin/includes/cta/mailinglist.php:12
310
- msgid "Subscribe"
311
- msgstr ""
312
-
313
  #: ../admin/includes/cta/resources.php:2
314
  msgid "Resources"
315
  msgstr ""
316
 
317
- #: ../admin/includes/cta/resources.php:4
318
  msgid "Ajax Load More Demo Site"
319
  msgstr ""
320
 
321
- #: ../admin/includes/cta/resources.php:5
322
  msgid "Documentation"
323
  msgstr ""
324
 
325
- #: ../admin/includes/cta/resources.php:6
326
  msgid "Plugin Support and Issues"
327
  msgstr ""
328
 
329
- #: ../admin/includes/cta/resources.php:7
330
  msgid "Reviews"
331
  msgstr ""
332
 
333
- #: ../admin/includes/cta/resources.php:8
334
  #, fuzzy
335
  msgid "Twitter"
336
  msgstr "Partager sur Twitter"
337
 
338
- #: ../admin/includes/cta/resources.php:9
339
  #, fuzzy
340
  msgid "Facebook"
341
  msgstr "Partager sur Facebook"
342
 
343
- #: ../admin/includes/cta/resources.php:10
344
  msgid "Github"
345
  msgstr ""
346
 
347
- #: ../admin/includes/cta/resources.php:12
348
  msgid "WordPress Repository"
349
  msgstr ""
350
 
@@ -354,7 +334,7 @@ msgstr ""
354
 
355
  #: ../admin/includes/cta/reviews.php:2
356
  msgid ""
357
- "Good <em>or</em> bad - all reviews will help the plugin push forward and "
358
  "grow."
359
  msgstr ""
360
 
@@ -367,21 +347,24 @@ msgid "Share Ajax Load More"
367
  msgstr ""
368
 
369
  #: ../admin/includes/cta/sharing.php:2
370
- msgid "Use the links below to share with your friends on Twitter and Facebook."
 
 
 
371
  msgstr ""
372
 
373
  #: ../admin/includes/cta/writeable.php:2
374
  msgid "Read/Write Access"
375
  msgstr ""
376
 
377
- #: ../admin/includes/cta/writeable.php:10
378
  msgid ""
379
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>Ajax Load "
380
  "More</strong></p><p class=\"desc\">Yay! Read/Write access is enabled within "
381
  "the /ajax-load-more/ directory."
382
  msgstr ""
383
 
384
- #: ../admin/includes/cta/writeable.php:12
385
  msgid ""
386
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>Ajax "
387
  "Load More</strong></p>Access Denied! You must enable read and write access "
@@ -390,21 +373,21 @@ msgid ""
390
  "or site administrator for more information."
391
  msgstr ""
392
 
393
- #: ../admin/includes/cta/writeable.php:14
394
  msgid ""
395
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>Ajax "
396
  "Load More</strong></p><p class=\"desc\">Unable to locate configuration file. "
397
  "Directory access may not be granted."
398
  msgstr ""
399
 
400
- #: ../admin/includes/cta/writeable.php:25
401
  msgid ""
402
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>ALM - "
403
  "Custom Repeaters</strong></p><p class=\"desc\">Nice! Read/Write access is "
404
  "enabled within the /ajax-load-more-repeaters/repeaters/ directory."
405
  msgstr ""
406
 
407
- #: ../admin/includes/cta/writeable.php:27
408
  msgid ""
409
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
410
  "Custom Repeaters</strong></p><p class=\"desc\">Access Denied! You must "
@@ -414,21 +397,21 @@ msgid ""
414
  "more information."
415
  msgstr ""
416
 
417
- #: ../admin/includes/cta/writeable.php:29
418
  msgid ""
419
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
420
  "Custom Repeaters</strong></p><p class=\"desc\">Unable to locate "
421
  "configuration file. Directory access may not be granted."
422
  msgstr ""
423
 
424
- #: ../admin/includes/cta/writeable.php:41
425
  msgid ""
426
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>ALM - "
427
  "Custom Repeaters v2</strong></p><p class=\"desc\">Oh Ya! Read/Write access "
428
  "is enabled within the /ajax-load-more-repeaters-v2/repeaters/ directory."
429
  msgstr ""
430
 
431
- #: ../admin/includes/cta/writeable.php:43
432
  msgid ""
433
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
434
  "- Custom Repeaters v2</strong></p><p class=\"desc\">Access Denied! You must "
@@ -438,7 +421,7 @@ msgid ""
438
  "more information."
439
  msgstr ""
440
 
441
- #: ../admin/includes/cta/writeable.php:45
442
  msgid ""
443
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
444
  "Unlimited</strong></p><p class=\"desc\">Unable to locate configuration file. "
@@ -495,7 +478,7 @@ msgid "Taxonomy Operator:"
495
  msgstr ""
496
 
497
  #: ../admin/shortcode-builder/includes/tax-query-options.php:36
498
- #: ../admin/shortcode-builder/shortcode-builder.php:1395
499
  msgid "Relation:"
500
  msgstr ""
501
 
@@ -520,8 +503,8 @@ msgid "Add-ons"
520
  msgstr ""
521
 
522
  #: ../admin/shortcode-builder/shortcode-builder.php:21
523
- #: ../admin/views/add-ons.php:21 ../admin/views/licenses.php:45
524
- #: ../admin/views/settings.php:53
525
  msgid "Cache"
526
  msgstr ""
527
 
@@ -580,7 +563,7 @@ msgid "Generate Cache ID"
580
  msgstr ""
581
 
582
  #: ../admin/shortcode-builder/shortcode-builder.php:64
583
- #: ../admin/views/add-ons.php:48 ../admin/views/licenses.php:110
584
  msgid "Call to Actions"
585
  msgstr ""
586
 
@@ -639,7 +622,7 @@ msgid ""
639
  msgstr ""
640
 
641
  #: ../admin/shortcode-builder/shortcode-builder.php:159
642
- #: ../admin/views/add-ons.php:75 ../admin/views/licenses.php:175
643
  msgid "Comments"
644
  msgstr ""
645
 
@@ -758,7 +741,7 @@ msgid ""
758
  msgstr ""
759
 
760
  #: ../admin/shortcode-builder/shortcode-builder.php:310
761
- #: ../admin/views/add-ons.php:154 ../admin/views/licenses.php:374
762
  #, fuzzy
763
  msgid "Next Page"
764
  msgstr "Imprimer cette page"
@@ -845,8 +828,8 @@ msgid ""
845
  msgstr ""
846
 
847
  #: ../admin/shortcode-builder/shortcode-builder.php:428
848
- #: ../admin/views/add-ons.php:180 ../admin/views/licenses.php:441
849
- #: ../admin/views/settings.php:57
850
  msgid "Paging"
851
  msgstr ""
852
 
@@ -880,7 +863,7 @@ msgid ""
880
  msgstr ""
881
 
882
  #: ../admin/shortcode-builder/shortcode-builder.php:504
883
- #: ../admin/views/add-ons.php:207 ../admin/views/licenses.php:506
884
  msgid "Preloaded"
885
  msgstr ""
886
 
@@ -897,8 +880,8 @@ msgid "Enter the number of posts to preload."
897
  msgstr ""
898
 
899
  #: ../admin/shortcode-builder/shortcode-builder.php:545
900
- #: ../admin/views/add-ons.php:233 ../admin/views/licenses.php:570
901
- #: ../admin/views/settings.php:59
902
  msgid "Previous Post"
903
  msgstr ""
904
 
@@ -907,7 +890,7 @@ msgid "Enable the infinite scrolling of single posts."
907
  msgstr ""
908
 
909
  #: ../admin/shortcode-builder/shortcode-builder.php:582
910
- #: ../admin/shortcode-builder/shortcode-builder.php:1335
911
  msgid "Taxonomy"
912
  msgstr ""
913
 
@@ -922,12 +905,12 @@ msgid "Query previous posts from the same taxonomy."
922
  msgstr ""
923
 
924
  #: ../admin/shortcode-builder/shortcode-builder.php:597
925
- #: ../admin/shortcode-builder/shortcode-builder.php:1216
926
  msgid "Category"
927
  msgstr ""
928
 
929
  #: ../admin/shortcode-builder/shortcode-builder.php:598
930
- #: ../admin/shortcode-builder/shortcode-builder.php:1276
931
  msgid "Tag"
932
  msgstr ""
933
 
@@ -941,8 +924,7 @@ msgid ""
941
  msgstr ""
942
 
943
  #: ../admin/shortcode-builder/shortcode-builder.php:638
944
- #: ../admin/views/add-ons.php:259 ../admin/views/licenses.php:636
945
- #: ../admin/views/settings.php:61
946
  msgid "REST API"
947
  msgstr ""
948
 
@@ -1003,9 +985,9 @@ msgid ""
1003
  msgstr ""
1004
 
1005
  #: ../admin/shortcode-builder/shortcode-builder.php:708
1006
- #: ../admin/shortcode-builder/shortcode-builder.php:1221
1007
- #: ../admin/shortcode-builder/shortcode-builder.php:1280
1008
- #: ../admin/shortcode-builder/shortcode-builder.php:1480
1009
  msgid "View Example"
1010
  msgstr ""
1011
 
@@ -1265,201 +1247,223 @@ msgstr ""
1265
  msgid "Post Type"
1266
  msgstr ""
1267
 
1268
- #: ../admin/shortcode-builder/shortcode-builder.php:1162
1269
- msgid "Select Post Types to query."
1270
  msgstr ""
1271
 
1272
- #: ../admin/shortcode-builder/shortcode-builder.php:1187
1273
- msgid "Post Format"
1274
  msgstr ""
1275
 
1276
  #: ../admin/shortcode-builder/shortcode-builder.php:1190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1277
  msgid ""
1278
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
1279
  "\">Post Format</a> to query."
1280
  msgstr ""
1281
 
1282
- #: ../admin/shortcode-builder/shortcode-builder.php:1193
1283
  msgid "Select Post Format"
1284
  msgstr ""
1285
 
1286
- #: ../admin/shortcode-builder/shortcode-builder.php:1194
1287
  msgid "Standard"
1288
  msgstr ""
1289
 
1290
- #: ../admin/shortcode-builder/shortcode-builder.php:1220
1291
  msgid ""
1292
  "A comma separated list of categories to include by slug. (design, research "
1293
  "etc...)"
1294
  msgstr ""
1295
 
1296
- #: ../admin/shortcode-builder/shortcode-builder.php:1243
1297
- #: ../admin/shortcode-builder/shortcode-builder.php:1301
1298
- #: ../admin/shortcode-builder/shortcode-builder.php:1479
1299
  msgid "Exclude"
1300
  msgstr ""
1301
 
1302
- #: ../admin/shortcode-builder/shortcode-builder.php:1244
1303
  msgid ""
1304
  "A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)"
1305
  msgstr ""
1306
 
1307
- #: ../admin/shortcode-builder/shortcode-builder.php:1279
1308
- #: ../admin/shortcode-builder/shortcode-builder.php:1468
1309
  msgid "Include"
1310
  msgstr ""
1311
 
1312
- #: ../admin/shortcode-builder/shortcode-builder.php:1280
1313
  msgid ""
1314
  "A comma separated list of tags to include by slug. (toronto, canada etc...)"
1315
  msgstr ""
1316
 
1317
- #: ../admin/shortcode-builder/shortcode-builder.php:1302
1318
  msgid "A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)"
1319
  msgstr ""
1320
 
1321
- #: ../admin/shortcode-builder/shortcode-builder.php:1338
1322
  msgid "Select a taxonomy then select the terms and an operator."
1323
  msgstr ""
1324
 
1325
- #: ../admin/shortcode-builder/shortcode-builder.php:1343
1326
- #: ../admin/shortcode-builder/shortcode-builder.php:1409
1327
  msgid "Add Another"
1328
  msgstr ""
1329
 
1330
- #: ../admin/shortcode-builder/shortcode-builder.php:1353
1331
  msgid "Date"
1332
  msgstr ""
1333
 
1334
- #: ../admin/shortcode-builder/shortcode-builder.php:1356
1335
  msgid ""
1336
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
1337
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">View Example</a>"
1338
  msgstr ""
1339
 
1340
- #: ../admin/shortcode-builder/shortcode-builder.php:1362
1341
  msgid "Year:"
1342
  msgstr ""
1343
 
1344
- #: ../admin/shortcode-builder/shortcode-builder.php:1366
1345
  msgid "Month:"
1346
  msgstr ""
1347
 
1348
- #: ../admin/shortcode-builder/shortcode-builder.php:1370
1349
  msgid "Day:"
1350
  msgstr ""
1351
 
1352
- #: ../admin/shortcode-builder/shortcode-builder.php:1381
1353
  msgid "Custom Fields (Meta_Query)"
1354
  msgstr ""
1355
 
1356
- #: ../admin/shortcode-builder/shortcode-builder.php:1384
1357
  msgid ""
1358
  "Query for <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
1359
  "\" target=\"_blank\">custom field</a> by entering a custom field key, value "
1360
  "and operator."
1361
  msgstr ""
1362
 
1363
- #: ../admin/shortcode-builder/shortcode-builder.php:1395
1364
  msgid ""
1365
  "The logical relationship between each custom field when there is more than "
1366
  "one."
1367
  msgstr ""
1368
 
1369
- #: ../admin/shortcode-builder/shortcode-builder.php:1425
1370
  msgid "Author"
1371
  msgstr ""
1372
 
1373
- #: ../admin/shortcode-builder/shortcode-builder.php:1428
1374
  msgid "Select an Author to query(by ID)."
1375
  msgstr ""
1376
 
1377
- #: ../admin/shortcode-builder/shortcode-builder.php:1449
1378
  msgid "Search Term"
1379
  msgstr ""
1380
 
1381
- #: ../admin/shortcode-builder/shortcode-builder.php:1452
1382
  msgid "Enter a search term to query."
1383
  msgstr ""
1384
 
1385
- #: ../admin/shortcode-builder/shortcode-builder.php:1456
1386
  msgid "Enter search term"
1387
  msgstr ""
1388
 
1389
- #: ../admin/shortcode-builder/shortcode-builder.php:1465
1390
  msgid "Post Parameters"
1391
  msgstr ""
1392
 
1393
- #: ../admin/shortcode-builder/shortcode-builder.php:1469
1394
  msgid "A comma separated list of post ID's to query."
1395
  msgstr ""
1396
 
1397
- #: ../admin/shortcode-builder/shortcode-builder.php:1473
1398
  msgid "225, 340, 818, etc..."
1399
  msgstr ""
1400
 
1401
- #: ../admin/shortcode-builder/shortcode-builder.php:1480
1402
  msgid "A comma separated list of post ID's to exclude from query."
1403
  msgstr ""
1404
 
1405
- #: ../admin/shortcode-builder/shortcode-builder.php:1490
1406
  msgid "Post Status"
1407
  msgstr ""
1408
 
1409
- #: ../admin/shortcode-builder/shortcode-builder.php:1490
1410
  msgid ""
1411
  "Post Status parameters are only available for logged in (admin) users. Non "
1412
  "logged in users will only have access to view content in a 'publish' or "
1413
  "'inherit' state. "
1414
  msgstr ""
1415
 
1416
- #: ../admin/shortcode-builder/shortcode-builder.php:1491
1417
  msgid "Select status of the post."
1418
  msgstr ""
1419
 
1420
- #: ../admin/shortcode-builder/shortcode-builder.php:1496
1421
  msgid "Published"
1422
  msgstr ""
1423
 
1424
- #: ../admin/shortcode-builder/shortcode-builder.php:1513
1425
  msgid "Ordering"
1426
  msgstr ""
1427
 
1428
- #: ../admin/shortcode-builder/shortcode-builder.php:1516
1429
  msgid "Sort posts by Order and Orderby parameters."
1430
  msgstr ""
1431
 
1432
- #: ../admin/shortcode-builder/shortcode-builder.php:1520
1433
  msgid "Order"
1434
  msgstr ""
1435
 
1436
- #: ../admin/shortcode-builder/shortcode-builder.php:1527
1437
  msgid "Order By"
1438
  msgstr ""
1439
 
1440
- #: ../admin/shortcode-builder/shortcode-builder.php:1547
1441
  msgid "Offset"
1442
  msgstr ""
1443
 
1444
- #: ../admin/shortcode-builder/shortcode-builder.php:1550
1445
  msgid "Offset the initial query by <em>'n'</em> number of posts"
1446
  msgstr ""
1447
 
1448
- #: ../admin/shortcode-builder/shortcode-builder.php:1563
1449
  msgid "Custom Arguments"
1450
  msgstr ""
1451
 
1452
- #: ../admin/shortcode-builder/shortcode-builder.php:1566
1453
  msgid "A semicolon separated list of custom value:pair arguments."
1454
  msgstr ""
1455
 
1456
- #: ../admin/shortcode-builder/shortcode-builder.php:1566
1457
  msgid ""
1458
  "Custom Arguments can be used to query by parameters not available in the "
1459
  "Shortcode Builder."
1460
  msgstr ""
1461
 
1462
- #: ../admin/shortcode-builder/shortcode-builder.php:1570
1463
  msgid "event_display:upcoming"
1464
  msgstr ""
1465
 
@@ -1500,7 +1504,7 @@ msgid ""
1500
  "infinite scroll functionality."
1501
  msgstr ""
1502
 
1503
- #: ../admin/views/add-ons.php:100 ../admin/views/licenses.php:241
1504
  msgid "Custom Repeaters"
1505
  msgstr ""
1506
 
@@ -1514,8 +1518,8 @@ msgid ""
1514
  "absolutely zero restrictions."
1515
  msgstr ""
1516
 
1517
- #: ../admin/views/add-ons.php:128 ../admin/views/licenses.php:308
1518
- #: ../admin/views/settings.php:55
1519
  msgid "Layouts"
1520
  msgstr ""
1521
 
@@ -1569,46 +1573,36 @@ msgid ""
1569
  "browser URL to the current post."
1570
  msgstr ""
1571
 
1572
- #: ../admin/views/add-ons.php:260
1573
- msgid "Infinite scroll with the WP REST API and Ajax Load More plugins."
1574
- msgstr ""
1575
-
1576
- #: ../admin/views/add-ons.php:261
1577
- msgid ""
1578
- "The REST API add-on will enable compatibility between Ajax Load More and the "
1579
- "WP REST API plugins.</p>"
1580
- msgstr ""
1581
-
1582
- #: ../admin/views/add-ons.php:287 ../admin/views/licenses.php:702
1583
  msgid "Search Engine Optimization"
1584
  msgstr ""
1585
 
1586
- #: ../admin/views/add-ons.php:288
1587
  msgid "Generate unique paging URLs with every Ajax Load More query."
1588
  msgstr ""
1589
 
1590
- #: ../admin/views/add-ons.php:289
1591
  msgid ""
1592
  "The SEO add-on will optimize your ajax loaded content for search engines by "
1593
  "generating unique URLs with every query.</p>"
1594
  msgstr ""
1595
 
1596
- #: ../admin/views/add-ons.php:313 ../admin/views/licenses.php:770
1597
- #: ../admin/views/settings.php:65
1598
  msgid "Theme Repeaters"
1599
  msgstr ""
1600
 
1601
- #: ../admin/views/add-ons.php:314
1602
  msgid "Manage repeater templates within your current theme directory."
1603
  msgstr ""
1604
 
1605
- #: ../admin/views/add-ons.php:315
1606
  msgid ""
1607
  "The Theme Repeater add-on will allow you load, edit and maintain templates "
1608
  "from your current theme directory.</p>"
1609
  msgstr ""
1610
 
1611
- #: ../admin/views/add-ons.php:334
1612
  msgid ""
1613
  "All add-ons are installed as stand alone plugins and with a valid license "
1614
  "key will receive plugin update notifications directly within the <a href="
@@ -1671,7 +1665,7 @@ msgstr ""
1671
  msgid "Shortcode for use on tag archive pages."
1672
  msgstr ""
1673
 
1674
- #: ../admin/views/examples.php:77
1675
  msgid "View All Examples"
1676
  msgstr ""
1677
 
@@ -1704,99 +1698,98 @@ msgid ""
1704
  "href=\"plugins.php\">WP Plugins dashboard</a>."
1705
  msgstr ""
1706
 
 
 
 
 
 
 
 
 
 
1707
  #: ../admin/views/licenses.php:54 ../admin/views/licenses.php:119
1708
  #: ../admin/views/licenses.php:184 ../admin/views/licenses.php:250
1709
  #: ../admin/views/licenses.php:317 ../admin/views/licenses.php:383
1710
  #: ../admin/views/licenses.php:450 ../admin/views/licenses.php:515
1711
  #: ../admin/views/licenses.php:579 ../admin/views/licenses.php:645
1712
- #: ../admin/views/licenses.php:711 ../admin/views/licenses.php:779
1713
- msgid "Don't have a license?"
1714
- msgstr ""
1715
-
1716
- #: ../admin/views/licenses.php:55 ../admin/views/licenses.php:120
1717
- #: ../admin/views/licenses.php:185 ../admin/views/licenses.php:251
1718
- #: ../admin/views/licenses.php:318 ../admin/views/licenses.php:384
1719
- #: ../admin/views/licenses.php:451 ../admin/views/licenses.php:516
1720
- #: ../admin/views/licenses.php:580 ../admin/views/licenses.php:646
1721
- #: ../admin/views/licenses.php:712 ../admin/views/licenses.php:780
1722
  msgid ""
1723
  "A valid license is required to activate and receive plugin updates directly "
1724
  "in your WordPress dashboard"
1725
  msgstr ""
1726
 
1727
- #: ../admin/views/licenses.php:55 ../admin/views/licenses.php:120
1728
- #: ../admin/views/licenses.php:185 ../admin/views/licenses.php:251
1729
- #: ../admin/views/licenses.php:318 ../admin/views/licenses.php:384
1730
- #: ../admin/views/licenses.php:451 ../admin/views/licenses.php:516
1731
- #: ../admin/views/licenses.php:580 ../admin/views/licenses.php:646
1732
- #: ../admin/views/licenses.php:712 ../admin/views/licenses.php:780
1733
  msgid "Purchase Now"
1734
  msgstr ""
1735
 
1736
- #: ../admin/views/licenses.php:61 ../admin/views/licenses.php:63
1737
- #: ../admin/views/licenses.php:126 ../admin/views/licenses.php:128
1738
- #: ../admin/views/licenses.php:191 ../admin/views/licenses.php:193
1739
- #: ../admin/views/licenses.php:257 ../admin/views/licenses.php:259
1740
- #: ../admin/views/licenses.php:324 ../admin/views/licenses.php:326
1741
- #: ../admin/views/licenses.php:390 ../admin/views/licenses.php:392
1742
- #: ../admin/views/licenses.php:457 ../admin/views/licenses.php:459
1743
- #: ../admin/views/licenses.php:522 ../admin/views/licenses.php:524
1744
- #: ../admin/views/licenses.php:586 ../admin/views/licenses.php:588
1745
- #: ../admin/views/licenses.php:652 ../admin/views/licenses.php:654
1746
- #: ../admin/views/licenses.php:718 ../admin/views/licenses.php:720
1747
- #: ../admin/views/licenses.php:786 ../admin/views/licenses.php:788
1748
  msgid "Enter License Key"
1749
  msgstr ""
1750
 
1751
- #: ../admin/views/licenses.php:83 ../admin/views/licenses.php:148
1752
- #: ../admin/views/licenses.php:213 ../admin/views/licenses.php:279
1753
- #: ../admin/views/licenses.php:346 ../admin/views/licenses.php:412
1754
- #: ../admin/views/licenses.php:479 ../admin/views/licenses.php:543
1755
- #: ../admin/views/licenses.php:608 ../admin/views/licenses.php:674
1756
- #: ../admin/views/licenses.php:740 ../admin/views/licenses.php:809
1757
  msgid "Activate License"
1758
  msgstr ""
1759
 
1760
- #: ../admin/views/licenses.php:87 ../admin/views/licenses.php:152
1761
- #: ../admin/views/licenses.php:217 ../admin/views/licenses.php:283
1762
- #: ../admin/views/licenses.php:350 ../admin/views/licenses.php:416
1763
- #: ../admin/views/licenses.php:483 ../admin/views/licenses.php:547
1764
- #: ../admin/views/licenses.php:612 ../admin/views/licenses.php:678
1765
- #: ../admin/views/licenses.php:744 ../admin/views/licenses.php:813
1766
  msgid "Deactivate License"
1767
  msgstr ""
1768
 
1769
- #: ../admin/views/licenses.php:831
1770
  msgid "You do not have any Ajax Load More add-ons installed"
1771
  msgstr ""
1772
 
1773
- #: ../admin/views/licenses.php:831
1774
  msgid "Browse Add-ons"
1775
  msgstr ""
1776
 
1777
- #: ../admin/views/licenses.php:842
1778
  msgid "About Licenses"
1779
  msgstr ""
1780
 
1781
- #: ../admin/views/licenses.php:845
1782
  msgid "Add-on licenses will enable updates directly in your WP dashboard."
1783
  msgstr ""
1784
 
1785
- #: ../admin/views/licenses.php:846
1786
  msgid ""
1787
  "License keys are found in the purchase receipt email that was sent "
1788
  "immediately after your successful purchase and in the <a target=\"_blank\" "
1789
  "href=\"https://connekthq.com/account/\">Account</a> section on our website"
1790
  msgstr ""
1791
 
1792
- #: ../admin/views/licenses.php:847
1793
  msgid ""
1794
  "If you cannot locate your key please open a support ticket by filling out "
1795
  "the <a href=\"https://connekthq.com/contact/\">form</a> on our website and "
1796
  "reference the email address used when you completed the purchase."
1797
  msgstr ""
1798
 
1799
- #: ../admin/views/licenses.php:853
1800
  msgid "Legacy Users"
1801
  msgstr ""
1802
 
@@ -1816,11 +1809,11 @@ msgstr ""
1816
  msgid "Enter the HTML and PHP code for the default template"
1817
  msgstr ""
1818
 
1819
- #: ../admin/views/repeater-templates.php:79
1820
  msgid "Save Template"
1821
  msgstr ""
1822
 
1823
- #: ../admin/views/repeater-templates.php:83
1824
  msgid ""
1825
  "It appears you are loading the <a href=\"https://connekthq.com/plugins/ajax-"
1826
  "load-more/docs/repeater-templates/#default-template\" target=\"_blank"
@@ -1829,27 +1822,27 @@ msgid ""
1829
  "your server."
1830
  msgstr ""
1831
 
1832
- #: ../admin/views/repeater-templates.php:154
1833
  msgid "Saving template..."
1834
  msgstr ""
1835
 
1836
- #: ../admin/views/repeater-templates.php:187
1837
  msgid "Something went wrong and the data could not be saved."
1838
  msgstr ""
1839
 
1840
- #: ../admin/views/repeater-templates.php:225
1841
  msgid "Updating template..."
1842
  msgstr ""
1843
 
1844
- #: ../admin/views/repeater-templates.php:286
1845
  msgid "Repeater Template Help"
1846
  msgstr ""
1847
 
1848
- #: ../admin/views/repeater-templates.php:288
1849
  msgid "What is a repeater template?"
1850
  msgstr ""
1851
 
1852
- #: ../admin/views/repeater-templates.php:289
1853
  msgid ""
1854
  "A <a href=\"https://connekthq.com/plugins/ajax-load-more/docs/repeater-"
1855
  "templates/\" target=\"_blank\">repeater template</a> is a snippet of code "
@@ -1857,55 +1850,46 @@ msgid ""
1857
  "org/The_Loop\" target=\"_blank\">WordPress loop</a>"
1858
  msgstr ""
1859
 
1860
- #: ../admin/views/repeater-templates.php:291
1861
  msgid "More About Templating"
1862
  msgstr ""
1863
 
1864
- #: ../admin/views/settings.php:5
1865
  msgid "A powerful plugin to add infinite scroll functionality to your website."
1866
  msgstr ""
1867
 
1868
- #: ../admin/views/settings.php:10
1869
- msgid "Ajax Load More settings have been saved."
1870
  msgstr ""
1871
 
1872
  #: ../admin/views/settings.php:22
1873
- msgid "A small favor to ask"
1874
- msgstr ""
1875
-
1876
- #: ../admin/views/settings.php:24
1877
  msgid ""
1878
- "If you're an Ajax Load More user, please consider helping <a href=\"https://"
1879
- "twitter.com/KaptonKaos\" target=\"_blank\">me</a> spread the word by sharing "
1880
- "with your networks and/or leaving a review on <a href=\"https://wordpress."
1881
- "org/support/view/plugin-reviews/ajax-load-more\" target=\"_blank\">wordpress."
1882
- "org</a> forums."
1883
  msgstr ""
1884
 
1885
- #: ../admin/views/settings.php:34
1886
  msgid "Don't show me this again!"
1887
  msgstr ""
1888
 
1889
- #: ../admin/views/settings.php:45 ../admin/views/settings.php:48
1890
  msgid "Jump to Setting"
1891
  msgstr ""
1892
 
1893
- #: ../admin/views/settings.php:49
1894
  msgid "Global Settings"
1895
  msgstr ""
1896
 
1897
- #: ../admin/views/settings.php:50
1898
  msgid "Admin"
1899
  msgstr ""
1900
 
1901
- #: ../admin/views/settings.php:63
1902
  msgid "SEO"
1903
  msgstr ""
1904
 
1905
- #: ../admin/views/settings.php:94
1906
- msgid "Sorry, settings could not be saved."
1907
- msgstr ""
1908
-
1909
  #: ../admin/views/shortcode-builder.php:5
1910
  msgid "Shortcode Builder"
1911
  msgstr ""
@@ -1920,21 +1904,21 @@ msgstr ""
1920
  msgid "Back to Top"
1921
  msgstr ""
1922
 
1923
- #: ../admin/views/shortcode-builder.php:21
1924
  msgid "Shortcode Output"
1925
  msgstr ""
1926
 
1927
- #: ../admin/views/shortcode-builder.php:22
1928
  msgid ""
1929
  "Place the following shortcode into the content editor or widget area of your "
1930
  "theme."
1931
  msgstr ""
1932
 
1933
- #: ../admin/views/shortcode-builder.php:27
1934
  msgid "Reset Shortcode Builder"
1935
  msgstr ""
1936
 
1937
- #: ../ajax-load-more.php:238
1938
  msgid "Settings"
1939
  msgstr ""
1940
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
+ "POT-Creation-Date: 2017-03-24 16:54-0500\n"
5
+ "PO-Revision-Date: 2017-03-24 16:54-0500\n"
6
  "Last-Translator: Darren Cooney <dcooney@ecentricarts.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
+ #: ../admin/admin.php:94 ../admin/admin.php:153 ../admin/admin.php:721
19
+ #: ../admin/admin.php:765 ../admin/admin.php:815
20
  msgid "You don't belong here."
21
  msgstr ""
22
 
23
+ #: ../admin/admin.php:182 ../admin/editor/editor-build.php:72
24
+ #: ../admin/views/licenses.php:65 ../admin/views/licenses.php:130
25
+ #: ../admin/views/licenses.php:195 ../admin/views/licenses.php:261
26
+ #: ../admin/views/licenses.php:328 ../admin/views/licenses.php:394
27
+ #: ../admin/views/licenses.php:461 ../admin/views/licenses.php:526
28
+ #: ../admin/views/licenses.php:590 ../admin/views/licenses.php:656
29
+ #: ../admin/views/licenses.php:724
30
  msgid "Active"
31
  msgstr ""
32
 
33
+ #: ../admin/admin.php:183 ../admin/editor/editor-build.php:73
34
+ #: ../admin/views/licenses.php:69 ../admin/views/licenses.php:134
35
+ #: ../admin/views/licenses.php:199 ../admin/views/licenses.php:265
36
+ #: ../admin/views/licenses.php:332 ../admin/views/licenses.php:398
37
+ #: ../admin/views/licenses.php:465 ../admin/views/licenses.php:530
38
+ #: ../admin/views/licenses.php:594 ../admin/views/licenses.php:660
39
+ #: ../admin/views/licenses.php:728
40
  msgid "Inactive"
41
  msgstr ""
42
 
43
+ #: ../admin/admin.php:184 ../admin/editor/editor-build.php:74
44
  msgid "Applying layout"
45
  msgstr ""
46
 
47
+ #: ../admin/admin.php:185 ../admin/editor/editor-build.php:75
48
+ #: ../admin/views/repeater-templates.php:250
49
  msgid "Template Updated"
50
  msgstr ""
51
 
52
+ #: ../admin/admin.php:187 ../admin/editor/editor-build.php:77
53
  msgid "Select Author(s)"
54
  msgstr ""
55
 
56
+ #: ../admin/admin.php:188 ../admin/editor/editor-build.php:78
57
  msgid "Select Categories"
58
  msgstr ""
59
 
60
+ #: ../admin/admin.php:189 ../admin/editor/editor-build.php:79
61
  msgid "Select Tags"
62
  msgstr ""
63
 
64
+ #: ../admin/admin.php:190 ../admin/editor/editor-build.php:44
65
  #: ../admin/editor/editor-build.php:80
66
  msgid "Jump to Option"
67
  msgstr ""
68
 
69
+ #: ../admin/admin.php:191 ../admin/editor/editor-build.php:81
70
  msgid "Jump to Template"
71
  msgstr ""
72
 
73
+ #: ../admin/admin.php:301
74
  msgid ""
75
  "[Ajax Load More] Error opening default repeater template - Please check your "
76
  "file path and ensure your server is configured to allow Ajax Load More to "
77
  "read and write files within the /ajax-load-more/core/repeater directory"
78
  msgstr ""
79
 
80
+ #: ../admin/admin.php:305
81
  msgid ""
82
  "[Ajax Load More] Error updating default repeater template - Please check "
83
  "your file path and ensure your server is configured to allow Ajax Load More "
84
  "to read and write files within the /ajax-load-more/core/repeater directory."
85
  msgstr ""
86
 
87
+ #: ../admin/admin.php:679
88
  msgid "[Ajax Load More] Unable to open repeater template - "
89
  msgstr ""
90
 
91
+ #: ../admin/admin.php:683
92
  msgid "[Ajax Load More] Error saving repeater template - "
93
  msgstr ""
94
 
95
+ #: ../admin/admin.php:716
96
  msgid "Error Writing File"
97
  msgstr ""
98
 
99
+ #: ../admin/admin.php:919 ../admin/shortcode-builder/shortcode-builder.php:848
100
  msgid "Container Type"
101
  msgstr ""
102
 
103
+ #: ../admin/admin.php:927 ../admin/shortcode-builder/shortcode-builder.php:878
104
  msgid "Container Classes"
105
  msgstr ""
106
 
107
+ #: ../admin/admin.php:935
108
  msgid "Disable CSS"
109
  msgstr ""
110
 
111
+ #: ../admin/admin.php:943
112
  msgid "Button/Loading Style"
113
  msgstr ""
114
 
115
+ #: ../admin/admin.php:951
116
  msgid "Button Classes"
117
  msgstr ""
118
 
119
+ #: ../admin/admin.php:959
120
  msgid "Ajax Security"
121
  msgstr ""
122
 
123
+ #: ../admin/admin.php:967
124
  msgid "Top of Page"
125
  msgstr ""
126
 
127
+ #: ../admin/admin.php:975
128
  msgid "Dynamic Content"
129
  msgstr ""
130
 
131
+ #: ../admin/admin.php:983
132
  msgid "Editor Button"
133
  msgstr ""
134
 
135
+ #: ../admin/admin.php:991
136
  msgid "Error Notices"
137
  msgstr ""
138
 
139
+ #: ../admin/admin.php:1062
140
  msgid ""
141
  "Customize the user experience of Ajax Load More by updating the fields below."
142
  msgstr ""
143
 
144
+ #: ../admin/admin.php:1075
145
  msgid "The following settings affect the WordPress admin area only."
146
  msgstr ""
147
 
148
+ #: ../admin/admin.php:1106
149
  msgid "I want to use my own CSS styles."
150
  msgstr ""
151
 
152
+ #: ../admin/admin.php:1106
153
  msgid "View Ajax Load More CSS"
154
  msgstr ""
155
 
156
+ #: ../admin/admin.php:1126
157
  msgid "Hide shortcode button in WYSIWYG editor."
158
  msgstr ""
159
 
160
+ #: ../admin/admin.php:1147
161
  msgid ""
162
  "Display error messaging regarding repeater template updates in the browser "
163
  "console."
164
  msgstr ""
165
 
166
+ #: ../admin/admin.php:1168
167
  msgid ""
168
  "Disable dynamic population of categories, tags and authors in the Shortcode "
169
  "Builder.<span style=\"display:block\">Recommended if you have an "
170
  "extraordinary number of categories, tags and/or authors."
171
  msgstr ""
172
 
173
+ #: ../admin/admin.php:1189 ../admin/admin.php:1192
174
  msgid "Ajax Posts Here"
175
  msgstr ""
176
 
177
+ #: ../admin/admin.php:1194
178
  msgid "You can modify the container type when building a shortcode."
179
  msgstr ""
180
 
181
+ #: ../admin/admin.php:1211
182
  msgid ""
183
  "Add classes to Ajax Load More container - classes are applied globally and "
184
  "will appear with every instance of Ajax Load More. <span style=\"display:"
185
  "block\">You can also add classes when building a shortcode.</span>"
186
  msgstr ""
187
 
188
+ #: ../admin/admin.php:1273
189
  msgid ""
190
  "Select an Ajax loading style - you can choose between a <strong>button</"
191
  "strong> or <strong>infinite scroll</strong>"
192
  msgstr ""
193
 
194
+ #: ../admin/admin.php:1294
195
  msgid "Preview"
196
  msgstr ""
197
 
198
+ #: ../admin/admin.php:1294
199
  #: ../admin/shortcode-builder/shortcode-builder.php:903
200
+ #: ../core/classes/class.alm-shortcode.php:124
201
  msgid "Older Posts"
202
  msgstr ""
203
 
204
+ #: ../admin/admin.php:1313
205
  msgid "Add classes to your <strong>Load More</strong> button"
206
  msgstr ""
207
 
208
+ #: ../admin/admin.php:1356
209
  msgid ""
210
  "On initial page load, move the user's browser window to the top of the "
211
  "screen.<span style=\"display:block\">This <u>may</u> help prevent the "
212
  "loading of unnecessary posts.</span>"
213
  msgstr ""
214
 
215
+ #: ../admin/admin.php:1377
216
  msgid ""
217
  "Enable <a href=\"https://codex.wordpress.org/WordPress_Nonces\" target="
218
  "\"_blank\">WP nonce</a> verification to help protect URLs against certain "
228
  msgid "Insert Shortcode"
229
  msgstr ""
230
 
231
+ #: ../admin/editor/editor-build.php:59 ../admin/views/shortcode-builder.php:28
232
  msgid "Copy"
233
  msgstr ""
234
 
290
  msgid "More Info"
291
  msgstr ""
292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  #: ../admin/includes/cta/resources.php:2
294
  msgid "Resources"
295
  msgstr ""
296
 
297
+ #: ../admin/includes/cta/resources.php:5
298
  msgid "Ajax Load More Demo Site"
299
  msgstr ""
300
 
301
+ #: ../admin/includes/cta/resources.php:6
302
  msgid "Documentation"
303
  msgstr ""
304
 
305
+ #: ../admin/includes/cta/resources.php:7
306
  msgid "Plugin Support and Issues"
307
  msgstr ""
308
 
309
+ #: ../admin/includes/cta/resources.php:8
310
  msgid "Reviews"
311
  msgstr ""
312
 
313
+ #: ../admin/includes/cta/resources.php:9
314
  #, fuzzy
315
  msgid "Twitter"
316
  msgstr "Partager sur Twitter"
317
 
318
+ #: ../admin/includes/cta/resources.php:10
319
  #, fuzzy
320
  msgid "Facebook"
321
  msgstr "Partager sur Facebook"
322
 
323
+ #: ../admin/includes/cta/resources.php:11
324
  msgid "Github"
325
  msgstr ""
326
 
327
+ #: ../admin/includes/cta/resources.php:14
328
  msgid "WordPress Repository"
329
  msgstr ""
330
 
334
 
335
  #: ../admin/includes/cta/reviews.php:2
336
  msgid ""
337
+ "Good <em>or</em> bad - all reviews will help Ajax Load More push forward and "
338
  "grow."
339
  msgstr ""
340
 
347
  msgstr ""
348
 
349
  #: ../admin/includes/cta/sharing.php:2
350
+ msgid ""
351
+ "Help <a href=\"https://twitter.com/KaptonKaos\" target=\"_blank\">me</a> "
352
+ "spread the word by sharing with your friends and colleagues on Twitter and "
353
+ "Facebook."
354
  msgstr ""
355
 
356
  #: ../admin/includes/cta/writeable.php:2
357
  msgid "Read/Write Access"
358
  msgstr ""
359
 
360
+ #: ../admin/includes/cta/writeable.php:11
361
  msgid ""
362
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>Ajax Load "
363
  "More</strong></p><p class=\"desc\">Yay! Read/Write access is enabled within "
364
  "the /ajax-load-more/ directory."
365
  msgstr ""
366
 
367
+ #: ../admin/includes/cta/writeable.php:13
368
  msgid ""
369
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>Ajax "
370
  "Load More</strong></p>Access Denied! You must enable read and write access "
373
  "or site administrator for more information."
374
  msgstr ""
375
 
376
+ #: ../admin/includes/cta/writeable.php:15
377
  msgid ""
378
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>Ajax "
379
  "Load More</strong></p><p class=\"desc\">Unable to locate configuration file. "
380
  "Directory access may not be granted."
381
  msgstr ""
382
 
383
+ #: ../admin/includes/cta/writeable.php:26
384
  msgid ""
385
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>ALM - "
386
  "Custom Repeaters</strong></p><p class=\"desc\">Nice! Read/Write access is "
387
  "enabled within the /ajax-load-more-repeaters/repeaters/ directory."
388
  msgstr ""
389
 
390
+ #: ../admin/includes/cta/writeable.php:28
391
  msgid ""
392
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
393
  "Custom Repeaters</strong></p><p class=\"desc\">Access Denied! You must "
397
  "more information."
398
  msgstr ""
399
 
400
+ #: ../admin/includes/cta/writeable.php:30
401
  msgid ""
402
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
403
  "Custom Repeaters</strong></p><p class=\"desc\">Unable to locate "
404
  "configuration file. Directory access may not be granted."
405
  msgstr ""
406
 
407
+ #: ../admin/includes/cta/writeable.php:42
408
  msgid ""
409
  "<p class=\"writeable-title\"><i class=\"fa fa-check\"></i><strong>ALM - "
410
  "Custom Repeaters v2</strong></p><p class=\"desc\">Oh Ya! Read/Write access "
411
  "is enabled within the /ajax-load-more-repeaters-v2/repeaters/ directory."
412
  msgstr ""
413
 
414
+ #: ../admin/includes/cta/writeable.php:44
415
  msgid ""
416
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
417
  "- Custom Repeaters v2</strong></p><p class=\"desc\">Access Denied! You must "
421
  "more information."
422
  msgstr ""
423
 
424
+ #: ../admin/includes/cta/writeable.php:46
425
  msgid ""
426
  "<p class=\"writeable-title\"><i class=\"fa fa-exclamation\"></i><strong>ALM "
427
  "Unlimited</strong></p><p class=\"desc\">Unable to locate configuration file. "
478
  msgstr ""
479
 
480
  #: ../admin/shortcode-builder/includes/tax-query-options.php:36
481
+ #: ../admin/shortcode-builder/shortcode-builder.php:1428
482
  msgid "Relation:"
483
  msgstr ""
484
 
503
  msgstr ""
504
 
505
  #: ../admin/shortcode-builder/shortcode-builder.php:21
506
+ #: ../admin/views/add-ons.php:21 ../admin/views/licenses.php:44
507
+ #: ../admin/views/settings.php:52
508
  msgid "Cache"
509
  msgstr ""
510
 
563
  msgstr ""
564
 
565
  #: ../admin/shortcode-builder/shortcode-builder.php:64
566
+ #: ../admin/views/add-ons.php:48 ../admin/views/licenses.php:109
567
  msgid "Call to Actions"
568
  msgstr ""
569
 
622
  msgstr ""
623
 
624
  #: ../admin/shortcode-builder/shortcode-builder.php:159
625
+ #: ../admin/views/add-ons.php:75 ../admin/views/licenses.php:174
626
  msgid "Comments"
627
  msgstr ""
628
 
741
  msgstr ""
742
 
743
  #: ../admin/shortcode-builder/shortcode-builder.php:310
744
+ #: ../admin/views/add-ons.php:154 ../admin/views/licenses.php:373
745
  #, fuzzy
746
  msgid "Next Page"
747
  msgstr "Imprimer cette page"
828
  msgstr ""
829
 
830
  #: ../admin/shortcode-builder/shortcode-builder.php:428
831
+ #: ../admin/views/add-ons.php:180 ../admin/views/licenses.php:440
832
+ #: ../admin/views/settings.php:56
833
  msgid "Paging"
834
  msgstr ""
835
 
863
  msgstr ""
864
 
865
  #: ../admin/shortcode-builder/shortcode-builder.php:504
866
+ #: ../admin/views/add-ons.php:207 ../admin/views/licenses.php:505
867
  msgid "Preloaded"
868
  msgstr ""
869
 
880
  msgstr ""
881
 
882
  #: ../admin/shortcode-builder/shortcode-builder.php:545
883
+ #: ../admin/views/add-ons.php:233 ../admin/views/licenses.php:569
884
+ #: ../admin/views/settings.php:58
885
  msgid "Previous Post"
886
  msgstr ""
887
 
890
  msgstr ""
891
 
892
  #: ../admin/shortcode-builder/shortcode-builder.php:582
893
+ #: ../admin/shortcode-builder/shortcode-builder.php:1368
894
  msgid "Taxonomy"
895
  msgstr ""
896
 
905
  msgstr ""
906
 
907
  #: ../admin/shortcode-builder/shortcode-builder.php:597
908
+ #: ../admin/shortcode-builder/shortcode-builder.php:1249
909
  msgid "Category"
910
  msgstr ""
911
 
912
  #: ../admin/shortcode-builder/shortcode-builder.php:598
913
+ #: ../admin/shortcode-builder/shortcode-builder.php:1309
914
  msgid "Tag"
915
  msgstr ""
916
 
924
  msgstr ""
925
 
926
  #: ../admin/shortcode-builder/shortcode-builder.php:638
927
+ #: ../admin/views/settings.php:60
 
928
  msgid "REST API"
929
  msgstr ""
930
 
985
  msgstr ""
986
 
987
  #: ../admin/shortcode-builder/shortcode-builder.php:708
988
+ #: ../admin/shortcode-builder/shortcode-builder.php:1254
989
+ #: ../admin/shortcode-builder/shortcode-builder.php:1313
990
+ #: ../admin/shortcode-builder/shortcode-builder.php:1513
991
  msgid "View Example"
992
  msgstr ""
993
 
1247
  msgid "Post Type"
1248
  msgstr ""
1249
 
1250
+ #: ../admin/shortcode-builder/shortcode-builder.php:1164
1251
+ msgid "Select the Post Types to include in this Ajax Load More query."
1252
  msgstr ""
1253
 
1254
+ #: ../admin/shortcode-builder/shortcode-builder.php:1178
1255
+ msgid "Any"
1256
  msgstr ""
1257
 
1258
  #: ../admin/shortcode-builder/shortcode-builder.php:1190
1259
+ msgid "Sticky Posts"
1260
+ msgstr ""
1261
+
1262
+ #: ../admin/shortcode-builder/shortcode-builder.php:1190
1263
+ msgid "Sticky posts are only available for Posts."
1264
+ msgstr ""
1265
+
1266
+ #: ../admin/shortcode-builder/shortcode-builder.php:1191
1267
+ msgid ""
1268
+ "Preserve the ordering of sticky posts by having them appear first in the "
1269
+ "Ajax listing."
1270
+ msgstr ""
1271
+
1272
+ #: ../admin/shortcode-builder/shortcode-builder.php:1198
1273
+ msgid "Enable Sticky Posts"
1274
+ msgstr ""
1275
+
1276
+ #: ../admin/shortcode-builder/shortcode-builder.php:1220
1277
+ msgid "Post Format"
1278
+ msgstr ""
1279
+
1280
+ #: ../admin/shortcode-builder/shortcode-builder.php:1223
1281
  msgid ""
1282
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
1283
  "\">Post Format</a> to query."
1284
  msgstr ""
1285
 
1286
+ #: ../admin/shortcode-builder/shortcode-builder.php:1226
1287
  msgid "Select Post Format"
1288
  msgstr ""
1289
 
1290
+ #: ../admin/shortcode-builder/shortcode-builder.php:1227
1291
  msgid "Standard"
1292
  msgstr ""
1293
 
1294
+ #: ../admin/shortcode-builder/shortcode-builder.php:1253
1295
  msgid ""
1296
  "A comma separated list of categories to include by slug. (design, research "
1297
  "etc...)"
1298
  msgstr ""
1299
 
1300
+ #: ../admin/shortcode-builder/shortcode-builder.php:1276
1301
+ #: ../admin/shortcode-builder/shortcode-builder.php:1334
1302
+ #: ../admin/shortcode-builder/shortcode-builder.php:1512
1303
  msgid "Exclude"
1304
  msgstr ""
1305
 
1306
+ #: ../admin/shortcode-builder/shortcode-builder.php:1277
1307
  msgid ""
1308
  "A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)"
1309
  msgstr ""
1310
 
1311
+ #: ../admin/shortcode-builder/shortcode-builder.php:1312
1312
+ #: ../admin/shortcode-builder/shortcode-builder.php:1501
1313
  msgid "Include"
1314
  msgstr ""
1315
 
1316
+ #: ../admin/shortcode-builder/shortcode-builder.php:1313
1317
  msgid ""
1318
  "A comma separated list of tags to include by slug. (toronto, canada etc...)"
1319
  msgstr ""
1320
 
1321
+ #: ../admin/shortcode-builder/shortcode-builder.php:1335
1322
  msgid "A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)"
1323
  msgstr ""
1324
 
1325
+ #: ../admin/shortcode-builder/shortcode-builder.php:1371
1326
  msgid "Select a taxonomy then select the terms and an operator."
1327
  msgstr ""
1328
 
1329
+ #: ../admin/shortcode-builder/shortcode-builder.php:1376
1330
+ #: ../admin/shortcode-builder/shortcode-builder.php:1442
1331
  msgid "Add Another"
1332
  msgstr ""
1333
 
1334
+ #: ../admin/shortcode-builder/shortcode-builder.php:1386
1335
  msgid "Date"
1336
  msgstr ""
1337
 
1338
+ #: ../admin/shortcode-builder/shortcode-builder.php:1389
1339
  msgid ""
1340
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
1341
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">View Example</a>"
1342
  msgstr ""
1343
 
1344
+ #: ../admin/shortcode-builder/shortcode-builder.php:1395
1345
  msgid "Year:"
1346
  msgstr ""
1347
 
1348
+ #: ../admin/shortcode-builder/shortcode-builder.php:1399
1349
  msgid "Month:"
1350
  msgstr ""
1351
 
1352
+ #: ../admin/shortcode-builder/shortcode-builder.php:1403
1353
  msgid "Day:"
1354
  msgstr ""
1355
 
1356
+ #: ../admin/shortcode-builder/shortcode-builder.php:1414
1357
  msgid "Custom Fields (Meta_Query)"
1358
  msgstr ""
1359
 
1360
+ #: ../admin/shortcode-builder/shortcode-builder.php:1417
1361
  msgid ""
1362
  "Query for <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
1363
  "\" target=\"_blank\">custom field</a> by entering a custom field key, value "
1364
  "and operator."
1365
  msgstr ""
1366
 
1367
+ #: ../admin/shortcode-builder/shortcode-builder.php:1428
1368
  msgid ""
1369
  "The logical relationship between each custom field when there is more than "
1370
  "one."
1371
  msgstr ""
1372
 
1373
+ #: ../admin/shortcode-builder/shortcode-builder.php:1458
1374
  msgid "Author"
1375
  msgstr ""
1376
 
1377
+ #: ../admin/shortcode-builder/shortcode-builder.php:1461
1378
  msgid "Select an Author to query(by ID)."
1379
  msgstr ""
1380
 
1381
+ #: ../admin/shortcode-builder/shortcode-builder.php:1482
1382
  msgid "Search Term"
1383
  msgstr ""
1384
 
1385
+ #: ../admin/shortcode-builder/shortcode-builder.php:1485
1386
  msgid "Enter a search term to query."
1387
  msgstr ""
1388
 
1389
+ #: ../admin/shortcode-builder/shortcode-builder.php:1489
1390
  msgid "Enter search term"
1391
  msgstr ""
1392
 
1393
+ #: ../admin/shortcode-builder/shortcode-builder.php:1498
1394
  msgid "Post Parameters"
1395
  msgstr ""
1396
 
1397
+ #: ../admin/shortcode-builder/shortcode-builder.php:1502
1398
  msgid "A comma separated list of post ID's to query."
1399
  msgstr ""
1400
 
1401
+ #: ../admin/shortcode-builder/shortcode-builder.php:1506
1402
  msgid "225, 340, 818, etc..."
1403
  msgstr ""
1404
 
1405
+ #: ../admin/shortcode-builder/shortcode-builder.php:1513
1406
  msgid "A comma separated list of post ID's to exclude from query."
1407
  msgstr ""
1408
 
1409
+ #: ../admin/shortcode-builder/shortcode-builder.php:1523
1410
  msgid "Post Status"
1411
  msgstr ""
1412
 
1413
+ #: ../admin/shortcode-builder/shortcode-builder.php:1523
1414
  msgid ""
1415
  "Post Status parameters are only available for logged in (admin) users. Non "
1416
  "logged in users will only have access to view content in a 'publish' or "
1417
  "'inherit' state. "
1418
  msgstr ""
1419
 
1420
+ #: ../admin/shortcode-builder/shortcode-builder.php:1524
1421
  msgid "Select status of the post."
1422
  msgstr ""
1423
 
1424
+ #: ../admin/shortcode-builder/shortcode-builder.php:1529
1425
  msgid "Published"
1426
  msgstr ""
1427
 
1428
+ #: ../admin/shortcode-builder/shortcode-builder.php:1546
1429
  msgid "Ordering"
1430
  msgstr ""
1431
 
1432
+ #: ../admin/shortcode-builder/shortcode-builder.php:1549
1433
  msgid "Sort posts by Order and Orderby parameters."
1434
  msgstr ""
1435
 
1436
+ #: ../admin/shortcode-builder/shortcode-builder.php:1553
1437
  msgid "Order"
1438
  msgstr ""
1439
 
1440
+ #: ../admin/shortcode-builder/shortcode-builder.php:1560
1441
  msgid "Order By"
1442
  msgstr ""
1443
 
1444
+ #: ../admin/shortcode-builder/shortcode-builder.php:1580
1445
  msgid "Offset"
1446
  msgstr ""
1447
 
1448
+ #: ../admin/shortcode-builder/shortcode-builder.php:1583
1449
  msgid "Offset the initial query by <em>'n'</em> number of posts"
1450
  msgstr ""
1451
 
1452
+ #: ../admin/shortcode-builder/shortcode-builder.php:1596
1453
  msgid "Custom Arguments"
1454
  msgstr ""
1455
 
1456
+ #: ../admin/shortcode-builder/shortcode-builder.php:1599
1457
  msgid "A semicolon separated list of custom value:pair arguments."
1458
  msgstr ""
1459
 
1460
+ #: ../admin/shortcode-builder/shortcode-builder.php:1599
1461
  msgid ""
1462
  "Custom Arguments can be used to query by parameters not available in the "
1463
  "Shortcode Builder."
1464
  msgstr ""
1465
 
1466
+ #: ../admin/shortcode-builder/shortcode-builder.php:1603
1467
  msgid "event_display:upcoming"
1468
  msgstr ""
1469
 
1504
  "infinite scroll functionality."
1505
  msgstr ""
1506
 
1507
+ #: ../admin/views/add-ons.php:100 ../admin/views/licenses.php:240
1508
  msgid "Custom Repeaters"
1509
  msgstr ""
1510
 
1518
  "absolutely zero restrictions."
1519
  msgstr ""
1520
 
1521
+ #: ../admin/views/add-ons.php:128 ../admin/views/licenses.php:307
1522
+ #: ../admin/views/settings.php:54
1523
  msgid "Layouts"
1524
  msgstr ""
1525
 
1573
  "browser URL to the current post."
1574
  msgstr ""
1575
 
1576
+ #: ../admin/views/add-ons.php:259 ../admin/views/licenses.php:635
 
 
 
 
 
 
 
 
 
 
1577
  msgid "Search Engine Optimization"
1578
  msgstr ""
1579
 
1580
+ #: ../admin/views/add-ons.php:260
1581
  msgid "Generate unique paging URLs with every Ajax Load More query."
1582
  msgstr ""
1583
 
1584
+ #: ../admin/views/add-ons.php:261
1585
  msgid ""
1586
  "The SEO add-on will optimize your ajax loaded content for search engines by "
1587
  "generating unique URLs with every query.</p>"
1588
  msgstr ""
1589
 
1590
+ #: ../admin/views/add-ons.php:285 ../admin/views/licenses.php:703
1591
+ #: ../admin/views/settings.php:64
1592
  msgid "Theme Repeaters"
1593
  msgstr ""
1594
 
1595
+ #: ../admin/views/add-ons.php:286
1596
  msgid "Manage repeater templates within your current theme directory."
1597
  msgstr ""
1598
 
1599
+ #: ../admin/views/add-ons.php:287
1600
  msgid ""
1601
  "The Theme Repeater add-on will allow you load, edit and maintain templates "
1602
  "from your current theme directory.</p>"
1603
  msgstr ""
1604
 
1605
+ #: ../admin/views/add-ons.php:306
1606
  msgid ""
1607
  "All add-ons are installed as stand alone plugins and with a valid license "
1608
  "key will receive plugin update notifications directly within the <a href="
1665
  msgid "Shortcode for use on tag archive pages."
1666
  msgstr ""
1667
 
1668
+ #: ../admin/views/examples.php:78
1669
  msgid "View All Examples"
1670
  msgstr ""
1671
 
1698
  "href=\"plugins.php\">WP Plugins dashboard</a>."
1699
  msgstr ""
1700
 
1701
+ #: ../admin/views/licenses.php:53 ../admin/views/licenses.php:118
1702
+ #: ../admin/views/licenses.php:183 ../admin/views/licenses.php:249
1703
+ #: ../admin/views/licenses.php:316 ../admin/views/licenses.php:382
1704
+ #: ../admin/views/licenses.php:449 ../admin/views/licenses.php:514
1705
+ #: ../admin/views/licenses.php:578 ../admin/views/licenses.php:644
1706
+ #: ../admin/views/licenses.php:712
1707
+ msgid "Don't have a license?"
1708
+ msgstr ""
1709
+
1710
  #: ../admin/views/licenses.php:54 ../admin/views/licenses.php:119
1711
  #: ../admin/views/licenses.php:184 ../admin/views/licenses.php:250
1712
  #: ../admin/views/licenses.php:317 ../admin/views/licenses.php:383
1713
  #: ../admin/views/licenses.php:450 ../admin/views/licenses.php:515
1714
  #: ../admin/views/licenses.php:579 ../admin/views/licenses.php:645
1715
+ #: ../admin/views/licenses.php:713
 
 
 
 
 
 
 
 
 
1716
  msgid ""
1717
  "A valid license is required to activate and receive plugin updates directly "
1718
  "in your WordPress dashboard"
1719
  msgstr ""
1720
 
1721
+ #: ../admin/views/licenses.php:54 ../admin/views/licenses.php:119
1722
+ #: ../admin/views/licenses.php:184 ../admin/views/licenses.php:250
1723
+ #: ../admin/views/licenses.php:317 ../admin/views/licenses.php:383
1724
+ #: ../admin/views/licenses.php:450 ../admin/views/licenses.php:515
1725
+ #: ../admin/views/licenses.php:579 ../admin/views/licenses.php:645
1726
+ #: ../admin/views/licenses.php:713
1727
  msgid "Purchase Now"
1728
  msgstr ""
1729
 
1730
+ #: ../admin/views/licenses.php:60 ../admin/views/licenses.php:62
1731
+ #: ../admin/views/licenses.php:125 ../admin/views/licenses.php:127
1732
+ #: ../admin/views/licenses.php:190 ../admin/views/licenses.php:192
1733
+ #: ../admin/views/licenses.php:256 ../admin/views/licenses.php:258
1734
+ #: ../admin/views/licenses.php:323 ../admin/views/licenses.php:325
1735
+ #: ../admin/views/licenses.php:389 ../admin/views/licenses.php:391
1736
+ #: ../admin/views/licenses.php:456 ../admin/views/licenses.php:458
1737
+ #: ../admin/views/licenses.php:521 ../admin/views/licenses.php:523
1738
+ #: ../admin/views/licenses.php:585 ../admin/views/licenses.php:587
1739
+ #: ../admin/views/licenses.php:651 ../admin/views/licenses.php:653
1740
+ #: ../admin/views/licenses.php:719 ../admin/views/licenses.php:721
 
1741
  msgid "Enter License Key"
1742
  msgstr ""
1743
 
1744
+ #: ../admin/views/licenses.php:82 ../admin/views/licenses.php:147
1745
+ #: ../admin/views/licenses.php:212 ../admin/views/licenses.php:278
1746
+ #: ../admin/views/licenses.php:345 ../admin/views/licenses.php:411
1747
+ #: ../admin/views/licenses.php:478 ../admin/views/licenses.php:542
1748
+ #: ../admin/views/licenses.php:607 ../admin/views/licenses.php:673
1749
+ #: ../admin/views/licenses.php:742
1750
  msgid "Activate License"
1751
  msgstr ""
1752
 
1753
+ #: ../admin/views/licenses.php:86 ../admin/views/licenses.php:151
1754
+ #: ../admin/views/licenses.php:216 ../admin/views/licenses.php:282
1755
+ #: ../admin/views/licenses.php:349 ../admin/views/licenses.php:415
1756
+ #: ../admin/views/licenses.php:482 ../admin/views/licenses.php:546
1757
+ #: ../admin/views/licenses.php:611 ../admin/views/licenses.php:677
1758
+ #: ../admin/views/licenses.php:746
1759
  msgid "Deactivate License"
1760
  msgstr ""
1761
 
1762
+ #: ../admin/views/licenses.php:764
1763
  msgid "You do not have any Ajax Load More add-ons installed"
1764
  msgstr ""
1765
 
1766
+ #: ../admin/views/licenses.php:764
1767
  msgid "Browse Add-ons"
1768
  msgstr ""
1769
 
1770
+ #: ../admin/views/licenses.php:775
1771
  msgid "About Licenses"
1772
  msgstr ""
1773
 
1774
+ #: ../admin/views/licenses.php:778
1775
  msgid "Add-on licenses will enable updates directly in your WP dashboard."
1776
  msgstr ""
1777
 
1778
+ #: ../admin/views/licenses.php:779
1779
  msgid ""
1780
  "License keys are found in the purchase receipt email that was sent "
1781
  "immediately after your successful purchase and in the <a target=\"_blank\" "
1782
  "href=\"https://connekthq.com/account/\">Account</a> section on our website"
1783
  msgstr ""
1784
 
1785
+ #: ../admin/views/licenses.php:780
1786
  msgid ""
1787
  "If you cannot locate your key please open a support ticket by filling out "
1788
  "the <a href=\"https://connekthq.com/contact/\">form</a> on our website and "
1789
  "reference the email address used when you completed the purchase."
1790
  msgstr ""
1791
 
1792
+ #: ../admin/views/licenses.php:786
1793
  msgid "Legacy Users"
1794
  msgstr ""
1795
 
1809
  msgid "Enter the HTML and PHP code for the default template"
1810
  msgstr ""
1811
 
1812
+ #: ../admin/views/repeater-templates.php:80
1813
  msgid "Save Template"
1814
  msgstr ""
1815
 
1816
+ #: ../admin/views/repeater-templates.php:86
1817
  msgid ""
1818
  "It appears you are loading the <a href=\"https://connekthq.com/plugins/ajax-"
1819
  "load-more/docs/repeater-templates/#default-template\" target=\"_blank"
1822
  "your server."
1823
  msgstr ""
1824
 
1825
+ #: ../admin/views/repeater-templates.php:158
1826
  msgid "Saving template..."
1827
  msgstr ""
1828
 
1829
+ #: ../admin/views/repeater-templates.php:191
1830
  msgid "Something went wrong and the data could not be saved."
1831
  msgstr ""
1832
 
1833
+ #: ../admin/views/repeater-templates.php:229
1834
  msgid "Updating template..."
1835
  msgstr ""
1836
 
1837
+ #: ../admin/views/repeater-templates.php:292
1838
  msgid "Repeater Template Help"
1839
  msgstr ""
1840
 
1841
+ #: ../admin/views/repeater-templates.php:294
1842
  msgid "What is a repeater template?"
1843
  msgstr ""
1844
 
1845
+ #: ../admin/views/repeater-templates.php:295
1846
  msgid ""
1847
  "A <a href=\"https://connekthq.com/plugins/ajax-load-more/docs/repeater-"
1848
  "templates/\" target=\"_blank\">repeater template</a> is a snippet of code "
1850
  "org/The_Loop\" target=\"_blank\">WordPress loop</a>"
1851
  msgstr ""
1852
 
1853
+ #: ../admin/views/repeater-templates.php:297
1854
  msgid "More About Templating"
1855
  msgstr ""
1856
 
1857
+ #: ../admin/views/settings.php:6
1858
  msgid "A powerful plugin to add infinite scroll functionality to your website."
1859
  msgstr ""
1860
 
1861
+ #: ../admin/views/settings.php:20
1862
+ msgid "Thanks for using Ajax Load More"
1863
  msgstr ""
1864
 
1865
  #: ../admin/views/settings.php:22
 
 
 
 
1866
  msgid ""
1867
+ "Please consider helping <a href=\"https://twitter.com/KaptonKaos\" target="
1868
+ "\"_blank\">me</a> spread the word by sharing with your networks and/or "
1869
+ "leaving a review on <a href=\"https://wordpress.org/support/view/plugin-"
1870
+ "reviews/ajax-load-more\" target=\"_blank\">wordpress.org</a> forums."
 
1871
  msgstr ""
1872
 
1873
+ #: ../admin/views/settings.php:33
1874
  msgid "Don't show me this again!"
1875
  msgstr ""
1876
 
1877
+ #: ../admin/views/settings.php:44 ../admin/views/settings.php:47
1878
  msgid "Jump to Setting"
1879
  msgstr ""
1880
 
1881
+ #: ../admin/views/settings.php:48
1882
  msgid "Global Settings"
1883
  msgstr ""
1884
 
1885
+ #: ../admin/views/settings.php:49
1886
  msgid "Admin"
1887
  msgstr ""
1888
 
1889
+ #: ../admin/views/settings.php:62
1890
  msgid "SEO"
1891
  msgstr ""
1892
 
 
 
 
 
1893
  #: ../admin/views/shortcode-builder.php:5
1894
  msgid "Shortcode Builder"
1895
  msgstr ""
1904
  msgid "Back to Top"
1905
  msgstr ""
1906
 
1907
+ #: ../admin/views/shortcode-builder.php:23
1908
  msgid "Shortcode Output"
1909
  msgstr ""
1910
 
1911
+ #: ../admin/views/shortcode-builder.php:25
1912
  msgid ""
1913
  "Place the following shortcode into the content editor or widget area of your "
1914
  "theme."
1915
  msgstr ""
1916
 
1917
+ #: ../admin/views/shortcode-builder.php:30
1918
  msgid "Reset Shortcode Builder"
1919
  msgstr ""
1920
 
1921
+ #: ../ajax-load-more.php:196
1922
  msgid "Settings"
1923
  msgstr ""
1924