WordPress Infinite Scroll – Ajax Load More - Version 2.5.1

Version Description

  • FIX - Dynamic population of category, tag and author content within Shortcode Builder - now this actually works as requested and no database queries happen if this setting is true.
  • FIX - Small issue with new destory_after parameter in core js.
  • UPDATE - Updated language .pot file.
  • UPDATE - Small admin interface tweaks.
Download this release

Release Info

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

Code changes from version 2.4.1 to 2.5.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://connekthq.com/donate/
4
  Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
  Tested up to: 4.1
7
- Stable tag: 2.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -19,10 +19,10 @@ Build complex WordPress queries using our shortcode builder then add the shortco
19
 
20
  = Features =
21
 
 
22
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder.(see Shortcode Parameters).
23
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!!
24
  * **Customizable Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website (see screenshots).
25
- * **Multiple Instances** - One, two, three or ten - you can now include multiple instances of Ajax Load More on a single page.
26
  * **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings (see screenshots).
27
 
28
  Check out the **[demo site](http://connekthq.com/plugins/ajax-load-more/)** for more information!
@@ -36,8 +36,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
36
  * **repeater** - Choose a repeater template (Add-on available). Default = ‘default’
37
  * **post_type** - Comma separated list of post types. Default = ‘post’
38
  * **post_format** - Query by post format. Default = null
39
- * **category** - Query by category slug. Default = null
40
- * **tag** - Query by tag name. Default = null
 
 
41
  * **taxonomy** - Query by custom taxonomy name. Default = null
42
  * **taxonomy_terms** - Comma separated list of custom taxonomy terms(slug). Default = null
43
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
@@ -47,10 +49,9 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
47
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
48
  * **meta_key** - Custom field key(name). Default = null
49
  * **meta_value** - Custom field value. Default = null
50
- * **meta_compare** - Operator to compare meta_key and meta_value against (=/!=/>/>=/</<= etc.). Default = ‘=’
51
  * **author** - Query by author id. Default = null
52
  * **search** - Query search term (‘s’). Default = null
53
- * **post_status** - Display posts by their current status (publish, future, draft, pending, private, trash). Default = ‘publish’
54
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
55
  * **orderby** - Order posts by date, title, name, menu order, random, author, post ID or comment count. Default = ‘date’
56
  * **exclude** - Comma separated list of post ID’s to exclude from query. Default = null
@@ -59,15 +60,18 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
59
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
60
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '5'
61
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
62
- * **transition** - Choose a posts reveal transition (slide/fade). Default = 'slide'
 
63
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
64
- * **seo** - Enable address bar URL rewrites as users page through content - <a href="seo/">add-on only</a> (true/false). Default = ‘false’
 
 
65
 
66
  ***
67
 
68
  = Example Shortcode =
69
- `[ajax_load_more post_type="post, portfolio" repeater="default" posts_per_page="5" transition="fade" button_label="Older Posts"]`
70
-
71
 
72
  ***
73
 
@@ -77,6 +81,7 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
77
  * **[Mansory](http://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS
78
  * **[Multiple Instances](http://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page
79
  * **[Pause Loading](http://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user
 
80
  * **[Search Results](http://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms
81
  * **[SEO Paging](http://connekthq.com/plugins/ajax-load-more/examples/seo-paging/)** - Generate unique paging URLs with each Ajax Load More query
82
 
@@ -93,6 +98,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
93
  > The **[Custom Repeaters](http://connekthq.com/plugins/ajax-load-more/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 />
94
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/custom-repeaters)
95
  >
 
 
 
 
96
  > #### Search Engine Optimization
97
  > The **[SEO](http://connekthq.com/plugins/ajax-load-more/seo/)** 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 />
98
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/seo/)
@@ -161,7 +170,7 @@ Your server must be able to read/write/create files. Ajax Load More creates the
161
 
162
  Yes, Ajax Load more uses admin-ajax and nonces in order to protect URLs and forms from being misused.
163
 
164
- = Can I make modifications to the plugin code? =
165
 
166
  Sure, but please be aware that if modifications are made it may affect future updates of the plugin.
167
 
@@ -211,20 +220,31 @@ How to install Ajax Load More.
211
  1. Settings screen
212
  2. Available Repeater Templates
213
  3. Custom Repeaters Add-On
214
- 4. Shortcode Builder (Admin screen)
215
- 5. Shortcode Builder (Page Edit screen)
216
- 6. Content Editor shortcode icon
217
  7. Shortcode and implementation examples
218
 
219
  == Changelog ==
220
 
221
 
222
- = 2.4.1 =
223
- * Adding query by Post Status(http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters).
224
- * Adding 'load more' button class field to Ajax Load More settings page.
225
- * Fix for querying by custom taxonomy and category/tags/etc.
226
- * Fix for $alm_found_posts - now subtracting 'offset' value to get actual returned result total.
227
- * Fix for SEO add-on and pause="true". If SEO is true and page is greater 1, pause will be automatically set to false.
 
 
 
 
 
 
 
 
 
 
 
228
 
229
  = 2.4.0 =
230
  * Adding date query parameters - users can now query by day, month and year.
4
  Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
  Tested up to: 4.1
7
+ Stable tag: 2.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
19
 
20
  = Features =
21
 
22
+ * **Multiple Instances** - One, two, three or ten - you can now include multiple instances of Ajax Load More on a single page.
23
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder.(see Shortcode Parameters).
24
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!!
25
  * **Customizable Repeater Templates** - Edit and extend the functionality of Ajax Load More by creating your own repeater template to match the look and feel of your website (see screenshots).
 
26
  * **Setting Panel** - Customize your version of Ajax Load More by updating various plugin settings (see screenshots).
27
 
28
  Check out the **[demo site](http://connekthq.com/plugins/ajax-load-more/)** for more information!
36
  * **repeater** - Choose a repeater template (Add-on available). Default = ‘default’
37
  * **post_type** - Comma separated list of post types. Default = ‘post’
38
  * **post_format** - Query by post format. Default = null
39
+ * **category** - A comma separated list of categories to include by slug. Default = null
40
+ * **category__not_in** - A comma separated list of categories to exclude by ID. Default = null
41
+ * **tag** - A comma separated list of tags to include by slug. Default = null
42
+ * **tag__not_in** - A comma separated list of tags to exclude by ID. Default = null
43
  * **taxonomy** - Query by custom taxonomy name. Default = null
44
  * **taxonomy_terms** - Comma separated list of custom taxonomy terms(slug). Default = null
45
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
49
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
50
  * **meta_key** - Custom field key(name). Default = null
51
  * **meta_value** - Custom field value. Default = null
52
+ * **meta_compare** - Operator to compare meta_key and meta_value against (IN/NOT IN/=/!=/>/>=/</<= etc.). Default = ‘IN’
53
  * **author** - Query by author id. Default = null
54
  * **search** - Query search term (‘s’). Default = null
 
55
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
56
  * **orderby** - Order posts by date, title, name, menu order, random, author, post ID or comment count. Default = ‘date’
57
  * **exclude** - Comma separated list of post ID’s to exclude from query. Default = null
60
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
61
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '5'
62
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
63
+ * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
64
+ * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
65
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
66
+ * **seo** - Enable address bar URL rewrites as users page through content - <a href="http://connekthq.com/plugins/ajax-load-more/search-engine-optimization/">add-on only</a> (true/false). Default = ‘false’
67
+ * **preloaded** - Should Ajax Load More preload posts? - <a href="http://connekthq.com/plugins/ajax-load-more/preloaded/">add-on only</a> (true/false). Default = ‘false’
68
+ * **preloaded_amount** - The amount of posts to preload. - <a href="http://connekthq.com/plugins/ajax-load-more/preloaded/">add-on only</a> Default = ‘5’
69
 
70
  ***
71
 
72
  = Example Shortcode =
73
+
74
+ [ajax_load_more post_type="post, portfolio" repeater="default" posts_per_page="5" transition="fade" button_label="Older Posts"]
75
 
76
  ***
77
 
81
  * **[Mansory](http://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS
82
  * **[Multiple Instances](http://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page
83
  * **[Pause Loading](http://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user
84
+ * **[Preloaded posts](http://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Easily preload an initial set of posts before completing any Ajax requests to the server
85
  * **[Search Results](http://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms
86
  * **[SEO Paging](http://connekthq.com/plugins/ajax-load-more/examples/seo-paging/)** - Generate unique paging URLs with each Ajax Load More query
87
 
98
  > The **[Custom Repeaters](http://connekthq.com/plugins/ajax-load-more/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 />
99
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/custom-repeaters)
100
  >
101
+ > #### Preloaded
102
+ > The **[Preloaded](http://connekthq.com/plugins/ajax-load-more/preloaded)** add-on will allow you to quickly and easily preload an initial set of posts before completing any Ajax requests to the server.<br />
103
+ > [Get More Information](http://connekthq.com/plugins/ajax-load-more/preloaded)
104
+ >
105
  > #### Search Engine Optimization
106
  > The **[SEO](http://connekthq.com/plugins/ajax-load-more/seo/)** 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 />
107
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/seo/)
170
 
171
  Yes, Ajax Load more uses admin-ajax and nonces in order to protect URLs and forms from being misused.
172
 
173
+ = Can I make modifications to the plugin code? =
174
 
175
  Sure, but please be aware that if modifications are made it may affect future updates of the plugin.
176
 
220
  1. Settings screen
221
  2. Available Repeater Templates
222
  3. Custom Repeaters Add-On
223
+ 4. Shortcode Builder
224
+ 5. Content Editor shortcode icon
225
+ 6. Edit Page Shortcode Builder
226
  7. Shortcode and implementation examples
227
 
228
  == Changelog ==
229
 
230
 
231
+ = 2.5.1 =
232
+ * FIX - Dynamic population of category, tag and author content within Shortcode Builder - now this actually works as requested and no database queries happen if this setting is true.
233
+ * FIX - Small issue with new destory_after parameter in core js.
234
+ * UPDATE - Updated language .pot file.
235
+ * UPDATE - Small admin interface tweaks.
236
+
237
+ = 2.5.0 =
238
+ * NEW - Adding query by multiple categories and tags.
239
+ * NEW - Adding required functionality for new Preloaded add-on - preload posts before any ajax queries kick in.
240
+ * NEW - Adding 'destroy_after' parameter to completely remove Ajax Load More functionality after 'n' number of pages.
241
+ * NEW - Adding setting to disable dynamic population of category, tag and author content within shortcode builder.
242
+ * NEW - Adding functionality to exclude categories('category__not_in').
243
+ * NEW - Adding functionality to exclude tags('tag__not_in').
244
+ * NEW - Adding option to copy repeater content and update templates from database directly on the Repeater Template settings page.
245
+ * NEW - Query by multiple meta query values e.g "cat, dog, fish".
246
+ * FIX - Issue with simultaneous query by category and custom taxonomy.
247
+ * Fix - Issue for SEO add-on when pause = "true". ALM will now set pause to false if page > 1 when using the SEO add-on.
248
 
249
  = 2.4.0 =
250
  * Adding date query parameters - users can now query by day, month and year.
admin/admin.php CHANGED
@@ -157,6 +157,8 @@ function alm_enqueue_admin_scripts(){
157
 
158
  //Load Admin CSS
159
  wp_enqueue_style( 'alm-admin-css', ALM_ADMIN_URL. 'css/admin.css');
 
 
160
  wp_enqueue_style( 'alm-core-css', ALM_URL. '/core/css/ajax-load-more.css');
161
  wp_enqueue_style( 'alm-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css');
162
 
@@ -182,6 +184,8 @@ function alm_enqueue_admin_scripts(){
182
  //Load JS
183
  wp_enqueue_script( 'jquery-form' );
184
  wp_enqueue_script( 'alm-select2', ALM_ADMIN_URL. 'js/libs/select2.min.js', array( 'jquery' ));
 
 
185
  wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ));
186
  }
187
 
@@ -194,61 +198,12 @@ function alm_enqueue_admin_scripts(){
194
  * @since 2.0.0
195
  */
196
 
197
- function alm_settings_page(){ ?>
198
- <div class="admin ajax-load-more settings" id="alm-settings">
199
- <div class="wrap">
200
- <div class="header-wrap">
201
- <h2><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span></h2>
202
- <p><?php _e('A WordPress plugin for lazy loading posts with Ajax', ALM_NAME); ?></p>
203
- </div>
204
- <?php if( isset($_GET['settings-updated']) ) { ?>
205
- <div id="message" class="updated inline">
206
- <p><strong><?php _e('Ajax Load More settings have been saved.') ?></strong></p>
207
- </div>
208
- <?php } ?>
209
- <div class="cnkt-main">
210
- <div class="group">
211
- <form action="options.php" method="post" id="alm_OptionsForm">
212
- <?php
213
- settings_fields( 'alm-setting-group' );
214
- do_settings_sections( 'ajax-load-more' );
215
- //get the older values, wont work the first time
216
- $options = get_option( '_alm_settings' ); ?>
217
- <div class="row no-brd alm-save-settings">
218
- <?php submit_button('Save Settings'); ?>
219
- <div class="loading"></div>
220
- </div>
221
- </form>
222
- <script type="text/javascript">
223
- jQuery(document).ready(function() {
224
- jQuery('#alm_OptionsForm').submit(function() {
225
- jQuery('.alm-save-settings .loading').fadeIn();
226
- jQuery(this).ajaxSubmit({
227
- success: function(){
228
- jQuery('.alm-save-settings .loading').fadeOut(250, function(){
229
- window.location.reload();
230
- });
231
- },
232
- error: function(){
233
- alert("<?php _e('Sorry, settings could not be saved.', ALM_NAME); ?>");
234
- }
235
- });
236
- return false;
237
- });
238
- });
239
- </script>
240
- </div>
241
- </div>
242
- <div class="cnkt-sidebar">
243
- <?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/resources.php'); ?>
244
- <?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/about.php'); ?>
245
- </div>
246
- </div>
247
- </div>
248
- <?php
249
  }
250
 
251
 
 
252
  /*
253
  * alm_repeater_page
254
  * Custom Repeaters
@@ -256,275 +211,56 @@ function alm_settings_page(){ ?>
256
  * @since 2.0.0
257
  */
258
 
259
- function alm_repeater_page(){ ?>
260
- <div class="admin ajax-load-more" id="alm-repeaters">
261
- <div class="wrap">
262
- <div class="header-wrap">
263
- <h2><?php _e('Ajax Load More: Repeater Templates', ALM_NAME); ?></h2>
264
- <p><?php _e('The library of available templates to use within your theme', ALM_NAME); ?></p>
265
- </div>
266
- <div class="cnkt-main form-table repeaters">
267
-
268
- <!-- Repeaters -->
269
- <div class="group">
270
- <?php
271
- if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
272
- <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
273
- <?php } ?>
274
-
275
- <!-- Default -->
276
- <div class="row default-repeater">
277
- <?php
278
- $filename = ALM_PATH. 'core/repeater/default.php';
279
- $handle = fopen ($filename, "r");
280
- $contents = '';
281
- if(filesize ($filename) != 0){
282
- $contents = fread ($handle, filesize ($filename));
283
- }
284
- fclose ($handle);
285
- ?>
286
- <h3 class="heading"><?php _e('Default Template', ALM_NAME); ?></h3>
287
- <div class="expand-wrap">
288
- <div class="wrap repeater-wrap" data-name="default" data-type="default">
289
- <label class="template-title" for="template-default"><?php _e('Enter the HTML and PHP code for the default template', ALM_NAME); ?></label>
290
- <!-- <span class="option-update" data-editor-id="template-default">Update from database</span> -->
291
- <textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
292
- <script>
293
- var editorDefault = CodeMirror.fromTextArea(document.getElementById("template-default"), {
294
- mode: "application/x-httpd-php",
295
- lineNumbers: true,
296
- lineWrapping: true,
297
- indentUnit: 0,
298
- matchBrackets: true,
299
- //theme: 'pastel-on-dark',
300
- viewportMargin: Infinity,
301
- extraKeys: {"Ctrl-Space": "autocomplete"},
302
- });
303
- </script>
304
- <input type="submit" value="<?php _e('Save Template', ALM_NAME); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
305
- <div class="saved-response">&nbsp;</div>
306
- </div>
307
- </div>
308
- </div>
309
- <?php
310
-
311
- // Custom Repeaters - /cta/extend.php
312
- // Removed in 2.2.8
313
- if (!has_action('alm_get_custom_repeaters')) {}
314
-
315
- // Custom Repeaters v2 - /cta/extend.php
316
- if (!has_action('alm_get_unlimited_repeaters')) {
317
-
318
- if (!has_action('alm_get_custom_repeaters')) { // If Custom Repeaters v1 is NOT installed
319
- echo '<div class="row no-brd">';
320
- include( ALM_PATH . 'admin/includes/cta/extend.php');
321
- echo '</div>';
322
- }
323
-
324
- }
325
- ?>
326
- <!-- End Default -->
327
- <?php
328
- if (has_action('alm_custom_repeaters'))
329
- do_action('alm_custom_repeaters');
330
- ?>
331
- <?php
332
- if (has_action('alm_unlimited_repeaters'))
333
- do_action('alm_unlimited_repeaters');
334
- ?>
335
-
336
- <script>
337
- jQuery(document).ready(function($) {
338
- "use strict";
339
- var _alm_admin = {};
340
-
341
- /*
342
- * _alm_admin.saveRepeater
343
- * Save Custom Repeater Value
344
- *
345
- * @since 2.0.0
346
- */
347
-
348
- _alm_admin.saveRepeater = function(btn, editorId) {
349
- var container = btn.parent('.repeater-wrap'),
350
- el = $('textarea._alm_repeater', container),
351
- btn = btn,
352
- value = '',
353
- repeater = container.data('name'), // Get templete name
354
- type = container.data('type'), // Get template type (default/repeater/unlimited)
355
- alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
356
- responseText = $(".saved-response", container);
357
-
358
- if(type === undefined) // Fix for custom repeaters v1
359
- type = 'undefined';
360
-
361
- //Get value from CodeMirror textarea
362
- var id = editorId.replace('template-', ''); // Editor ID
363
-
364
- if(id === 'default'){ // Default Template
365
- value = editorDefault.getValue();
366
- }else{ // Repeater Templates
367
- var eid = window['editor_'+id]; // Set editor ID
368
- value = eid.getValue();
369
- }
370
-
371
- // if value is null, then set repeater to non breaking space
372
- if(value === '' || value === 'undefined'){
373
- value = '&nbsp;';
374
- }
375
-
376
- //If template is not already saving, then proceed
377
- if (!btn.hasClass('saving')) {
378
- btn.addClass('saving');
379
- responseText.addClass('loading').html('<?php _e('Saving template...', ALM_NAME) ?>');
380
- responseText.animate({'opacity' : 1});
381
-
382
- $.ajax({
383
- type: 'POST',
384
- url: alm_admin_localize.ajax_admin_url,
385
- data: {
386
- action: 'alm_save_repeater',
387
- value: value,
388
- repeater: repeater,
389
- type: type,
390
- alias: alias,
391
- nonce: alm_admin_localize.alm_admin_nonce,
392
- },
393
- success: function(response) {
394
-
395
- setTimeout(function() {
396
- responseText.delay(500).html(response).removeClass('loading');
397
- }, 250);
398
-
399
- setTimeout(function() {
400
- responseText.animate({'opacity': 0}, function(){
401
- responseText.html('&nbsp;');
402
- btn.removeClass('saving');
403
- });
404
-
405
- }, 6000);
406
-
407
- },
408
- error: function(xhr, status, error) {
409
- responseText.html('<?php _e('Something went wrong and the data could not be saved.', ALM_NAME) ?>').removeClass('loading');
410
- btn.removeClass('saving');
411
- }
412
- });
413
-
414
- }
415
- }
416
-
417
- $(document).on('click', 'input.save-repeater' ,function(){
418
- var btn = $(this),
419
- editorId = btn.data('editor-id');
420
- _alm_admin.saveRepeater(btn, editorId);
421
- });
422
-
423
-
424
-
425
- /*
426
- * _alm_admin.updateRepeater
427
- * Update Repeater Value
428
- *
429
- * COMING SOON
430
- * @since 2.4
431
- */
432
-
433
- _alm_admin.updateRepeater = function(btn, editorId) {
434
- var container = btn.parent('.repeater-wrap'),
435
- el = $('textarea._alm_repeater', container),
436
- btn = btn,
437
- repeater = container.data('name'), // Get templete name
438
- type = container.data('type'), // Get template type (default/repeater/unlimited)
439
- responseText = $(".saved-response", container);
440
-
441
- //Get value from CodeMirror textarea
442
- var id = editorId.replace('template-', ''); // Editor ID
443
-
444
- //If template is not already saving, then proceed
445
- if (!btn.hasClass('updating')) {
446
- btn.addClass('updating');
447
- responseText.addClass('loading').html('<?php _e('Updating template...', ALM_NAME) ?>');
448
- responseText.animate({'opacity' : 1});
449
-
450
- $.ajax({
451
- type: 'POST',
452
- url: alm_admin_localize.ajax_admin_url,
453
- data: {
454
- action: 'alm_update_repeater',
455
- repeater: repeater,
456
- type: type,
457
- nonce: alm_admin_localize.alm_admin_nonce,
458
- },
459
- success: function(response) {
460
- if(id === 'default'){ // Default Template
461
- editorDefault.setValue(response);
462
- }else{ // Repeater Templates
463
- var eid = window['editor_'+id]; // Set editor ID
464
- eid.setValue(response);
465
- }
466
-
467
- setTimeout(function() {
468
- responseText.animate({'opacity': 0}, function(){
469
- responseText.html('&nbsp;').removeClass('loading');
470
- btn.removeClass('updating');
471
- });
472
-
473
- }, 100);
474
- },
475
- error: function(xhr, status, error) {
476
- responseText.html('<?php _e('Something went wrong and the data could not be updated.', ALM_NAME) ?>').removeClass('loading');
477
- btn.removeClass('updating');
478
- }
479
- });
480
-
481
- }
482
- }
483
-
484
-
485
-
486
- $(document).on('click', '.option-update' ,function(){
487
- var btn = $(this),
488
- editorId = btn.data('editor-id');
489
- _alm_admin.updateRepeater(btn, editorId);
490
- });
491
-
492
- });
493
- </script>
494
- </div>
495
- <!-- End Repeaters -->
496
- </div>
497
- <div class="cnkt-sidebar">
498
- <?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
499
- <div class="cta">
500
- <h3><?php _e('Templating Help', ALM_NAME); ?></h3>
501
- <div class="item">
502
- <p><strong><?php _e('What is a repeater template?', ALM_NAME); ?></strong></p>
503
- <p><?php _e('A repeater template 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>.</p>', ALM_NAME); ?></p>
504
- </div>
505
- <div class="item">
506
- <p><strong><?php _e('Can I include PHP in the repeater template?', ALM_NAME); ?></strong></p>
507
- <p><?php _e('Yes, PHP and core WordPress functions such as, <code>the_title()</code> and <code>the_permalink()</code> are required.</p>', ALM_NAME); ?></p>
508
- </div>
509
- <div class="item">
510
- <p><strong><?php _e('Tips and Tricks', ALM_NAME); ?></strong></p>
511
- <ul>
512
- <li><?php _e('Always open and close your templates with an HTML element. In some rare cases data may not be displayed if not wrapped in HTML.<br/>e.g. <code>&lt;li> &lt;/li></code> or <code>&lt;div> &lt;/div></code>', ALM_NAME); ?><br/> </li>
513
- </ul>
514
- </div>
515
- </div>
516
- </div>
517
- </div>
518
- </div>
519
 
520
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  }
522
 
523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  /*
525
  * alm_save_repeater
526
  * Repeater Save function
527
  *
 
528
  * @since 2.0.0
529
  */
530
 
@@ -532,7 +268,7 @@ function alm_save_repeater(){
532
  $nonce = $_POST["nonce"];
533
  // Check our nonce, if they don't match then bounce!
534
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
535
- die('Get Bounced!');
536
 
537
  // Get _POST Vars
538
  $c = Trim(stripslashes($_POST["value"])); // Repeater Value
@@ -602,26 +338,26 @@ function alm_save_repeater(){
602
 
603
  /*
604
  * alm_update_repeater
605
- * Update repeater from database function
606
  *
607
  * - User story: User deletes plugin, the installs again and the version has not change - their default repeater will be in the default state and unable to be updated.
608
  *
609
- * COMING SOON
610
- * @since 2.4
611
  */
612
 
613
  function alm_update_repeater(){
614
  $nonce = $_POST["nonce"];
615
  // Check our nonce, if they don't match then bounce!
616
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
617
- die('Get Bounced!');
618
 
619
  // Get _POST Vars
620
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
621
- $t = Trim(stripslashes($_POST["type"])); // Repeater name
 
622
 
623
  // Get value from database
624
- //Save to database
625
  global $wpdb;
626
  $table_name = $wpdb->prefix . "alm";
627
 
@@ -630,62 +366,18 @@ function alm_update_repeater(){
630
 
631
  $the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '$n'");
632
 
633
-
634
-
635
- echo $the_repeater;
636
 
637
  die();
638
  }
639
 
640
 
641
 
642
- /*
643
- * alm_shortcode_builder_page
644
- * Shortcode Builder
645
- *
646
- * @since 2.0.0
647
- */
648
-
649
- function alm_shortcode_builder_page(){ ?>
650
- <div class="admin ajax-load-more shortcode-builder" id="alm-builder">
651
- <div class="wrap">
652
- <div class="header-wrap">
653
- <h2><?php _e('Ajax Load More: Shortcode Builder', ALM_NAME); ?></h2>
654
- <p><?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', ALM_NAME); ?></p>
655
- </div>
656
- <div class="cnkt-main">
657
- <div class="group">
658
- <?php include( plugin_dir_path( __FILE__ ) . 'shortcode-builder/shortcode-builder.php'); ?>
659
- <div class="row no-brd">
660
- <p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
661
- </div>
662
- </div>
663
- </div>
664
- <div class="cnkt-sidebar">
665
- <div class="table-of-contents">
666
- <div class="cta">
667
- <select class="toc"></select>
668
- </div>
669
- <div class="cta">
670
- <h3><?php _e('Shortcode Output', ALM_NAME); ?></h3>
671
- <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', ALM_NAME); ?></p>
672
- <div class="output-wrap">
673
- <div id="shortcode_output"></div>
674
- <span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
675
- </div>
676
- </div>
677
- </div>
678
- </div>
679
- </div>
680
- </div>
681
- <?php
682
- }
683
-
684
-
685
  /*
686
  * alm_get_tax_terms
687
  * Get taxonomy terms for shortcode builder
688
  *
 
689
  * @since 2.1.0
690
  */
691
 
@@ -719,187 +411,6 @@ function alm_get_tax_terms(){
719
  }
720
 
721
 
722
- /*
723
- * alm_example_page
724
- * Examples Page
725
- *
726
- * @since 2.0.0
727
- */
728
-
729
- function alm_example_page(){ ?>
730
- <div class="admin ajax-load-more" id="alm-examples">
731
- <div class="wrap">
732
- <div class="header-wrap">
733
- <h2><?php _e('Ajax Load More: Examples', ALM_NAME); ?></h2>
734
- <p><?php _e('A collection of everyday shortcode usages and implementation examples', ALM_NAME); ?></p>
735
- </div>
736
- <div class="cnkt-main forceColors">
737
- <div class="group">
738
- <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
739
-
740
- <div class="row gist" id="example-archive">
741
- <h3 class="heading"><?php _e('Archive.php', ALM_NAME); ?></h3>
742
- <div class="expand-wrap">
743
- <p><?php _e('Shortcode for use on generic archive page.', ALM_NAME); ?></p>
744
- <div class="inner">
745
- <script src="https://gist.github.com/dcooney/ebe912c7772e669f1370.js"></script>
746
- </div>
747
- </div>
748
- </div>
749
-
750
- <div class="row gist" id="example-author">
751
- <h3 class="heading"><?php _e('Author.php', ALM_NAME); ?></h3>
752
- <div class="expand-wrap">
753
- <p><?php _e('Shortcode for use on author archive pages.', ALM_NAME); ?></p>
754
- <div class="inner">
755
- <script src="https://gist.github.com/dcooney/4d07ff95f7274f38fd3a.js"></script>
756
- </div>
757
- </div>
758
- </div>
759
- <div class="row gist" id="example-category">
760
- <h3 class="heading"><?php _e('Category.php', ALM_NAME); ?></h3>
761
- <div class="expand-wrap">
762
- <p><?php _e('Shortcode for use on category archive pages.', ALM_NAME); ?></p>
763
- <div class="inner">
764
- <script src="https://gist.github.com/dcooney/ae4caec3f9061dd47627.js"></script>
765
- </div>
766
- </div>
767
- </div>
768
- <div class="row gist" id="example-date">
769
- <h3 class="heading"><?php _e('Date Archives', ALM_NAME); ?></h3>
770
- <div class="expand-wrap">
771
- <p><?php _e('Shortcode for use for archiving by date.', ALM_NAME); ?></p>
772
- <div class="inner">
773
- <script src="https://gist.github.com/dcooney/6f74bebdd40cad9e3ee7.js"></script>
774
- </div>
775
- </div>
776
- </div>
777
- <div class="row gist" id="example-exclude">
778
- <h3 class="heading"><?php _e('Excluding Posts', ALM_NAME); ?></h3>
779
- <div class="expand-wrap">
780
- <p><?php _e('Shortcode for excluding an array of posts.', ALM_NAME); ?></p>
781
- <script src="https://gist.github.com/dcooney/9b037efbd166b4dba5ae.js"></script>
782
- </div>
783
- </div>
784
-
785
- <div class="row gist" id="example-tag">
786
- <h3 class="heading"><?php _e('Tag.php', ALM_NAME); ?></h3>
787
- <div class="expand-wrap">
788
- <p><?php _e('Shortcode for use on tag archive pages.', ALM_NAME); ?></p>
789
- <div class="inner">
790
- <script src="https://gist.github.com/dcooney/fc4276bebbdd05af64d1.js"></script>
791
- </div>
792
- </div>
793
- </div>
794
-
795
- <div class="row no-brd">
796
- <p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
797
- </div>
798
- </div>
799
-
800
- </div>
801
- <div class="cnkt-sidebar">
802
-
803
- <div class="cta">
804
- <h3><?php _e('Did you know?', ALM_NAME); ?></h3>
805
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
806
- <?php _e('<p class="addon-intro">You can generate shortcodes while editing pages!</p><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 in an overlay window.', ALM_NAME); ?></p>
807
- </div>
808
-
809
- <?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/resources.php'); ?>
810
-
811
- </div>
812
-
813
-
814
- </div>
815
- </div>
816
- <?php
817
- }
818
-
819
-
820
-
821
- /*
822
- * alm_add_ons_page
823
- * Ajax Load More Add-ons
824
- *
825
- * @since 2.0.0
826
- */
827
-
828
- function alm_add_ons_page(){ ?>
829
- <div class="admin ajax-load-more" id="alm-add-ons">
830
- <div class="wrap">
831
- <div class="header-wrap">
832
- <h2><?php _e('Ajax Load More: Add-ons', ALM_NAME); ?></h2>
833
- <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More.', ALM_NAME); ?></p>
834
- </div>
835
- <div class="cnkt-main">
836
-
837
- <!-- Custom Repeaters -->
838
- <div class="group">
839
- <div class="row no-brd">
840
- <div class="expand-wrap">
841
- <div class="section-title">
842
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg">
843
- </div>
844
- <div class="wrap">
845
- <h2 class="addon-title"><?php _e('Custom Repeaters', ALM_NAME); ?></h2>
846
- <p class="addon-intro"><?php _e('Extend Ajax Load More with unlimited repeater templates.', ALM_NAME); ?></p>
847
- <p><?php _e('Create, delete and modify <a href="?page=ajax-load-more-repeaters">repeater templates</a> as you need them with absolutely zero restrictions.</p>', ALM_NAME); ?>
848
- </div>
849
- </div>
850
- </div>
851
- <?php
852
- $cr_url = 'http://connekthq.com/plugins/ajax-load-more/custom-repeaters/';
853
- if (has_action('alm_unlimited_installed')){
854
- echo '<a class="btn installed" href="'. $cr_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
855
- }else{
856
- echo '<a class="btn" href="'. $cr_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
857
- }
858
- ?>
859
- </div>
860
- <!-- End Custom Repeaters -->
861
-
862
- <!-- SEO -->
863
- <div class="group">
864
- <div class="row no-brd">
865
- <div class="expand-wrap">
866
- <div class="section-title">
867
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg">
868
- </div>
869
- <div class="wrap">
870
- <h2 class="addon-title"><?php _e('Search Engine Optimization', ALM_NAME); ?></h2>
871
- <p class="addon-intro"><?php _e('Generate unique paging URLs with every Ajax Load More query.', ALM_NAME); ?></p>
872
- <p><?php _e('The SEO add-on will optimize your ajax loaded content for search engines and site visitors by generating unique paging URLs with every query.</p>', ALM_NAME); ?>
873
- </div>
874
- </div>
875
- </div>
876
- <?php
877
- $seo_url = 'http://connekthq.com/plugins/ajax-load-more/seo/';
878
- if (has_action('alm_seo_installed')){
879
- echo '<a class="btn installed" href="'. $seo_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
880
- }else{
881
- echo '<a class="btn" href="'. $seo_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
882
- }
883
- ?>
884
- </div>
885
- <!-- End SEO -->
886
-
887
- </div>
888
-
889
- <div class="cnkt-sidebar">
890
- <div class="cta">
891
- <h3><?php _e('Add-on Updates', ALM_NAME); ?></h3>
892
- <p><?php _e('All add-ons are installed as stand alone plugins and will receive plugin update notifications.', ALM_NAME); ?></p>
893
- </div>
894
- <?php include( plugin_dir_path( __FILE__ ) . 'includes/cta/writeable.php'); ?>
895
- </div>
896
-
897
- </div>
898
- </div>
899
- <?php
900
- }
901
-
902
-
903
  /*
904
  * admin_init
905
  * Initiate the plugin, create our setting variables.
@@ -923,7 +434,8 @@ function alm_admin_init(){
923
  'ajax-load-more'
924
  );
925
 
926
- add_settings_field(
 
927
  '_alm_container_type',
928
  __('Container Type', ALM_NAME ),
929
  'alm_container_type_callback',
@@ -931,7 +443,7 @@ function alm_admin_init(){
931
  'alm_general_settings'
932
  );
933
 
934
- add_settings_field(
935
  '_alm_classname',
936
  __('Container Classes', ALM_NAME ),
937
  'alm_class_callback',
@@ -939,7 +451,7 @@ function alm_admin_init(){
939
  'alm_general_settings'
940
  );
941
 
942
- add_settings_field(
943
  '_alm_hide_btn',
944
  __('Editor Button', ALM_NAME ),
945
  'alm_hide_btn_callback',
@@ -947,7 +459,15 @@ function alm_admin_init(){
947
  'alm_general_settings'
948
  );
949
 
950
- add_settings_field(
 
 
 
 
 
 
 
 
951
  '_alm_disable_css',
952
  __('Disable CSS', ALM_NAME ),
953
  'alm_disable_css_callback',
@@ -955,15 +475,15 @@ function alm_admin_init(){
955
  'alm_general_settings'
956
  );
957
 
958
- add_settings_field(
959
  '_alm_btn_color',
960
  __('Button Color', ALM_NAME ),
961
  'alm_btn_color_callback',
962
  'ajax-load-more',
963
  'alm_general_settings'
964
- );
965
 
966
- add_settings_field(
967
  '_alm_btn_classname',
968
  __('Button Classes', ALM_NAME ),
969
  'alm_btn_class_callback',
@@ -971,8 +491,7 @@ function alm_admin_init(){
971
  'alm_general_settings'
972
  );
973
 
974
-
975
-
976
  if(has_action('alm_seo_installed')){
977
 
978
  add_settings_section(
@@ -1044,11 +563,11 @@ function alm_disable_css_callback(){
1044
  if(!isset($options['_alm_disable_css']))
1045
  $options['_alm_disable_css'] = '0';
1046
 
1047
- echo '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />
1048
- <label><input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' /> '.__('I want to use my own CSS styles', ALM_NAME).'</label>';
1049
- echo '<p class="desc"><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', ALM_NAME).'</a></p>';
1050
- ?>
1051
- <?php
1052
  }
1053
 
1054
 
@@ -1064,8 +583,31 @@ function alm_hide_btn_callback(){
1064
  if(!isset($options['_alm_hide_btn']))
1065
  $options['_alm_hide_btn'] = '0';
1066
 
1067
- echo '<input type="hidden" name="alm_settings[_alm_hide_btn]" value="0" />
1068
- <label><input type="checkbox" name="alm_settings[_alm_hide_btn]" value="1"'. (($options['_alm_hide_btn']) ? ' checked="checked"' : '') .' /> '.__('Hide shortcode button in WYSIWYG editor', ALM_NAME).'</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1069
  }
1070
 
1071
 
@@ -1079,7 +621,10 @@ function alm_hide_btn_callback(){
1079
  function alm_class_callback(){
1080
  $options = get_option( 'alm_settings' );
1081
 
1082
- echo '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container', ALM_NAME).'</label><br/><input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
 
 
 
1083
  }
1084
 
1085
 
@@ -1152,7 +697,7 @@ function alm_btn_color_callback() {
1152
  if($color == 'white')
1153
  $selected5 = 'selected="selected"';
1154
 
1155
- $html = '<label for="alm_settings_btn_color">'.__('Choose your load more button color', ALM_NAME).'</label><br/>';
1156
  $html .= '<select id="alm_settings_btn_color" name="alm_settings[_alm_btn_color]">';
1157
  $html .= '<option value="default" ' . $selected0 .'>Default (Orange)</option>';
1158
  $html .= '<option value="blue" ' . $selected1 .'>Blue</option>';
@@ -1163,9 +708,30 @@ function alm_btn_color_callback() {
1163
  $html .= '<option value="white" ' . $selected6 .'>White</option>';
1164
  $html .= '</select>';
1165
 
1166
- $html .= '<div class="clear"></div><div class="ajax-load-more-wrap '.$color.'"><span>'.__('Preview', ALM_NAME) .'</span><button class="alm-load-more-btn loading" disabled="disabled">Show More</button></div>';
1167
  echo $html;
1168
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1169
  <script>
1170
  //Button preview
1171
  var colorArray = "default grey purple green red blue white";
@@ -1179,44 +745,24 @@ function alm_btn_color_callback() {
1179
  });
1180
 
1181
  // Check if Disable CSS === true
1182
- if(jQuery('input#alm_disable_css_input').is(":checked")){
1183
- //alert("true");
1184
- jQuery('input#alm_disable_css_input').parent().parent().parent('tr').next('tr').hide();
1185
  }
1186
  jQuery('input#alm_disable_css_input').change(function() {
1187
  var el = jQuery(this);
1188
  if(el.is(":checked")) {
1189
- el.parent().parent().parent('tr').next('tr').hide();
1190
- el.parent().parent().parent('tr').next('tr').next('tr').hide();
1191
  }else{
1192
- el.parent().parent().parent('tr').next('tr').show();
1193
- el.parent().parent().parent('tr').next('tr').next('tr').show();
1194
  }
1195
  });
1196
 
1197
  </script>
1198
- <?php
1199
  }
1200
 
1201
 
1202
 
1203
- /*
1204
- * alm_btn_class_callback
1205
- * Add classes to the Ajax Load More button
1206
- *
1207
- * @since 2.4.1
1208
- */
1209
-
1210
- function alm_btn_class_callback(){
1211
- $options = get_option( 'alm_settings' );
1212
-
1213
- if(!isset($options['_alm_btn_classname']))
1214
- $options['_alm_btn_classname'] = '';
1215
-
1216
- echo '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to the <em>Load More</em> button', ALM_NAME).'</label><br/><input type="text" id="alm_settings[_alm_btn_classname]" name="alm_settings[_alm_btn_classname]" value="'.$options['_alm_btn_classname'].'" placeholder="button rounded etc..." /> ';
1217
- }
1218
-
1219
-
1220
 
1221
  /*
1222
  * alm_seo_settings_callback
157
 
158
  //Load Admin CSS
159
  wp_enqueue_style( 'alm-admin-css', ALM_ADMIN_URL. 'css/admin.css');
160
+ wp_enqueue_style( 'alm-select2-css', ALM_ADMIN_URL. 'css/select2.css');
161
+ //wp_enqueue_style( 'alm-chosen-css', ALM_ADMIN_URL. 'css/chosen.css');
162
  wp_enqueue_style( 'alm-core-css', ALM_URL. '/core/css/ajax-load-more.css');
163
  wp_enqueue_style( 'alm-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css');
164
 
184
  //Load JS
185
  wp_enqueue_script( 'jquery-form' );
186
  wp_enqueue_script( 'alm-select2', ALM_ADMIN_URL. 'js/libs/select2.min.js', array( 'jquery' ));
187
+ wp_enqueue_script( 'alm-drops', ALM_ADMIN_URL. 'js/libs/jquery.drops.js', array( 'jquery' ));
188
+ wp_enqueue_script( 'alm-admin', ALM_ADMIN_URL. 'js/admin.js', array( 'jquery' ));
189
  wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ));
190
  }
191
 
198
  * @since 2.0.0
199
  */
200
 
201
+ function alm_settings_page(){
202
+ include_once( ALM_PATH . 'admin/views/settings.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
 
205
 
206
+
207
  /*
208
  * alm_repeater_page
209
  * Custom Repeaters
211
  * @since 2.0.0
212
  */
213
 
214
+ function alm_repeater_page(){
215
+ include_once( ALM_PATH . 'admin/views/repeater-templates.php');
216
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
 
218
+
219
+
220
+ /*
221
+ * alm_shortcode_builder_page
222
+ * Shortcode Builder
223
+ *
224
+ * @since 2.0.0
225
+ */
226
+
227
+ function alm_shortcode_builder_page(){
228
+ include_once( ALM_PATH . 'admin/views/shortcode-builder.php');
229
+ }
230
+
231
+
232
+
233
+ /*
234
+ * alm_example_page
235
+ * Examples Page
236
+ *
237
+ * @since 2.0.0
238
+ */
239
+
240
+ function alm_example_page(){
241
+ include_once( ALM_PATH . 'admin/views/examples.php');
242
  }
243
 
244
 
245
+
246
+ /*
247
+ * alm_add_ons_page
248
+ * Ajax Load More Add-ons
249
+ *
250
+ * @since 2.0.0
251
+ */
252
+
253
+ function alm_add_ons_page(){
254
+ include_once( ALM_PATH . 'admin/views/add-ons.php');
255
+ }
256
+
257
+
258
+
259
  /*
260
  * alm_save_repeater
261
  * Repeater Save function
262
  *
263
+ * @return response
264
  * @since 2.0.0
265
  */
266
 
268
  $nonce = $_POST["nonce"];
269
  // Check our nonce, if they don't match then bounce!
270
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
271
+ die('Error - unable to verify nonce, please try again.');
272
 
273
  // Get _POST Vars
274
  $c = Trim(stripslashes($_POST["value"])); // Repeater Value
338
 
339
  /*
340
  * alm_update_repeater
341
+ * Update repeater template from database
342
  *
343
  * - User story: User deletes plugin, the installs again and the version has not change - their default repeater will be in the default state and unable to be updated.
344
  *
345
+ * @return DB value
346
+ * @since 2.5.0
347
  */
348
 
349
  function alm_update_repeater(){
350
  $nonce = $_POST["nonce"];
351
  // Check our nonce, if they don't match then bounce!
352
  if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
353
+ die('Error - unable to verify nonce, please try again.');
354
 
355
  // Get _POST Vars
356
  $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
357
+ $t = Trim(stripslashes($_POST["type"])); // Repeater type (default | unlimited)
358
+
359
 
360
  // Get value from database
 
361
  global $wpdb;
362
  $table_name = $wpdb->prefix . "alm";
363
 
366
 
367
  $the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '$n'");
368
 
369
+ echo $the_repeater; // Return repeater value
 
 
370
 
371
  die();
372
  }
373
 
374
 
375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  /*
377
  * alm_get_tax_terms
378
  * Get taxonomy terms for shortcode builder
379
  *
380
+ * @return Taxonomy Terms
381
  * @since 2.1.0
382
  */
383
 
411
  }
412
 
413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  /*
415
  * admin_init
416
  * Initiate the plugin, create our setting variables.
434
  'ajax-load-more'
435
  );
436
 
437
+
438
+ add_settings_field( // Container type
439
  '_alm_container_type',
440
  __('Container Type', ALM_NAME ),
441
  'alm_container_type_callback',
443
  'alm_general_settings'
444
  );
445
 
446
+ add_settings_field( // Classnames
447
  '_alm_classname',
448
  __('Container Classes', ALM_NAME ),
449
  'alm_class_callback',
451
  'alm_general_settings'
452
  );
453
 
454
+ add_settings_field( // Hide btn
455
  '_alm_hide_btn',
456
  __('Editor Button', ALM_NAME ),
457
  'alm_hide_btn_callback',
459
  'alm_general_settings'
460
  );
461
 
462
+ add_settings_field( // Load dynamic queries
463
+ '_alm_disable_dynamic',
464
+ __('Dynamic Content', ALM_NAME ),
465
+ 'alm_disable_dynamic_callback',
466
+ 'ajax-load-more',
467
+ 'alm_general_settings'
468
+ );
469
+
470
+ add_settings_field( // Disbale CSS
471
  '_alm_disable_css',
472
  __('Disable CSS', ALM_NAME ),
473
  'alm_disable_css_callback',
475
  'alm_general_settings'
476
  );
477
 
478
+ add_settings_field( // Btn color
479
  '_alm_btn_color',
480
  __('Button Color', ALM_NAME ),
481
  'alm_btn_color_callback',
482
  'ajax-load-more',
483
  'alm_general_settings'
484
+ );
485
 
486
+ add_settings_field( // Button classes
487
  '_alm_btn_classname',
488
  __('Button Classes', ALM_NAME ),
489
  'alm_btn_class_callback',
491
  'alm_general_settings'
492
  );
493
 
494
+ //
 
495
  if(has_action('alm_seo_installed')){
496
 
497
  add_settings_section(
563
  if(!isset($options['_alm_disable_css']))
564
  $options['_alm_disable_css'] = '0';
565
 
566
+ $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
567
+ $html .= '<input type="checkbox" id="alm_disable_css_input" name="alm_settings[_alm_disable_css]" value="1"'. (($options['_alm_disable_css']) ? ' checked="checked"' : '') .' />';
568
+ $html .= '<label for="alm_disable_css_input">'.__('I want to use my own CSS styles', ALM_NAME).'<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', ALM_NAME).'</a></span></label>';
569
+
570
+ echo $html;
571
  }
572
 
573
 
583
  if(!isset($options['_alm_hide_btn']))
584
  $options['_alm_hide_btn'] = '0';
585
 
586
+ $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"' : '') .' />';
587
+ $html .= '<label for="alm_hide_btn">'.__('Hide shortcode button in WYSIWYG editor', ALM_NAME).'</label>';
588
+
589
+ echo $html;
590
+ }
591
+
592
+
593
+
594
+ /*
595
+ * alm_disable_dynamic_callback
596
+ * Disable the dynamic population of categories, tags and authors
597
+ *
598
+ * @since 3.0.0
599
+ */
600
+
601
+ function alm_disable_dynamic_callback(){
602
+ $options = get_option( 'alm_settings' );
603
+ if(!isset($options['_alm_disable_dynamic']))
604
+ $options['_alm_disable_dynamic'] = '0';
605
+
606
+ $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
607
+ $html .= '<input type="checkbox" name="alm_settings[_alm_disable_dynamic]" id="_alm_disable_dynamic" value="1"'. (($options['_alm_disable_dynamic']) ? ' checked="checked"' : '') .' />';
608
+ $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.', ALM_NAME).'</label>';
609
+
610
+ echo $html;
611
  }
612
 
613
 
621
  function alm_class_callback(){
622
  $options = get_option( 'alm_settings' );
623
 
624
+ $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container', ALM_NAME).'</label><br/>';
625
+ $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
626
+
627
+ echo $html;
628
  }
629
 
630
 
697
  if($color == 'white')
698
  $selected5 = 'selected="selected"';
699
 
700
+ $html = '<label for="alm_settings_btn_color">'.__('Choose your <strong>Load More</strong> button color', ALM_NAME).'</label><br/>';
701
  $html .= '<select id="alm_settings_btn_color" name="alm_settings[_alm_btn_color]">';
702
  $html .= '<option value="default" ' . $selected0 .'>Default (Orange)</option>';
703
  $html .= '<option value="blue" ' . $selected1 .'>Blue</option>';
708
  $html .= '<option value="white" ' . $selected6 .'>White</option>';
709
  $html .= '</select>';
710
 
711
+ $html .= '<div class="clear"></div><div class="ajax-load-more-wrap '.$color.'"><span>'.__('Preview', ALM_NAME) .'</span><button class="alm-load-more-btn loading" disabled="disabled">Load More</button></div>';
712
  echo $html;
713
+ }
714
+
715
+
716
+
717
+ /*
718
+ * alm_btn_class_callback
719
+ * Add classes to the Ajax Load More button
720
+ *
721
+ * @since 2.4.1
722
+ */
723
+
724
+ function alm_btn_class_callback(){
725
+ $options = get_option( 'alm_settings' );
726
+
727
+ if(!isset($options['_alm_btn_classname']))
728
+ $options['_alm_btn_classname'] = '';
729
+
730
+ $html = '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to your <strong>Load More</strong> button', ALM_NAME).'</label>';
731
+ $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..." /> ';
732
+
733
+ echo $html;
734
+ ?>
735
  <script>
736
  //Button preview
737
  var colorArray = "default grey purple green red blue white";
745
  });
746
 
747
  // Check if Disable CSS === true
748
+ if(jQuery('input#alm_disable_css_input').is(":checked")){
749
+ jQuery('select#alm_settings_btn_color').parent().parent().hide(); // Hide button color
 
750
  }
751
  jQuery('input#alm_disable_css_input').change(function() {
752
  var el = jQuery(this);
753
  if(el.is(":checked")) {
754
+ el.parent().parent('tr').next('tr').hide(); // Hide button color
 
755
  }else{
756
+ el.parent().parent('tr').next('tr').show(); // show button color
 
757
  }
758
  });
759
 
760
  </script>
761
+ <?php
762
  }
763
 
764
 
765
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
766
 
767
  /*
768
  * alm_seo_settings_callback
admin/css/admin.css CHANGED
@@ -1,5 +1,6 @@
1
  @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,600);
2
 
 
3
  /*
4
  * Admin - Popup Generator
5
  *
@@ -32,6 +33,9 @@
32
  padding: 15px 10px 140px !important;
33
  }
34
 
 
 
 
35
  .ajax-load-more code{
36
  background: #fcf3d0;
37
  }
@@ -79,6 +83,14 @@
79
  margin-top: -10px;
80
  opacity: 0.7;
81
  }
 
 
 
 
 
 
 
 
82
 
83
  /* Expand Collapse Headings */
84
  .ajax-load-more h3.heading{
@@ -94,7 +106,8 @@
94
  background: #f7f7f7;
95
  border-bottom: 1px solid #efefef;
96
  }
97
- .ajax-load-more h3.heading:hover:after{
 
98
  color: #f05452;
99
  }
100
  .ajax-load-more h3.heading:hover{
@@ -119,6 +132,13 @@
119
  border-bottom-color: transparent;
120
  }
121
 
 
 
 
 
 
 
 
122
  /* Expand/Collapse all rows */
123
  .ajax-load-more .toggle-all{
124
  position: absolute;
@@ -229,6 +249,37 @@
229
  margin: 0;
230
  padding: 0 0 0 10px;
231
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
 
233
 
234
  .ajax-load-more label,
@@ -396,15 +447,26 @@
396
  }
397
 
398
  /* Jump Menu */
399
- .jump-menu{
400
- position: absolute;
401
- top: 5px;
402
- right: 10px;
403
- z-index: 2;
404
  }
405
- .admin.ajax-load-more .jump-menu{
406
- display: none;
 
 
 
 
 
 
 
 
407
  }
 
 
 
 
408
 
409
  /* Table of Contents */
410
  .table-of-contents{}
@@ -440,12 +502,16 @@
440
  #alm-examples.ajax-load-more .expand-wrap{
441
  padding: 10px 10px 0;
442
  }
 
 
 
 
 
 
443
 
444
  .ajax-load-more .section-title {
445
  float: left;
446
- padding-right: 15px;
447
- padding-top: 18px;
448
- padding-left: 15px;
449
  width: 45%;
450
  }
451
  .ajax-load-more .section-title p{
@@ -453,6 +519,10 @@
453
  padding-left: 21px !important;
454
  color: #999;
455
  }
 
 
 
 
456
 
457
  .ajax-load-more .repeaters .section-title,
458
  .ajax-load-more .repeaters .row .wrap{
@@ -475,6 +545,10 @@
475
  line-height: normal !important;
476
  }
477
 
 
 
 
 
478
 
479
 
480
  .ajax-load-more .row .wrap{
@@ -577,6 +651,7 @@
577
  font-size: 13px;
578
  color: #fff;
579
  cursor: pointer;
 
580
  }
581
 
582
  .admin.ajax-load-more #shortcode_output{
@@ -660,6 +735,7 @@
660
  vertical-align: top;
661
  padding: 0 0 10px;
662
  max-width: 90%;
 
663
  }
664
  .form-table input[type=radio],
665
  .form-table input[type=checkbox]{
@@ -673,6 +749,7 @@
673
  .form-table label span{
674
  font-size: 13px;
675
  color: #999;
 
676
  }
677
 
678
  .admin.ajax-load-more .form-table textarea{
@@ -838,11 +915,17 @@ p.loading{
838
  position: static;
839
  }
840
  .saved-response.loading,
841
- p.loading{
 
842
  background: url(../img/loader.gif) no-repeat left center;
843
  padding-left: 24px;
844
  }
845
 
 
 
 
 
 
846
  input.save-repeater{
847
  margin-bottom: 10px !important;
848
  }
@@ -974,7 +1057,7 @@ table.highlight{
974
 
975
  /* Add-on Callout! */
976
  .call-out{
977
- background: #4DD5B0;
978
  padding: 13px 100px 13px 12px;
979
  border-radius: 3px;
980
  margin: 0;
@@ -1014,7 +1097,7 @@ table.highlight{
1014
  a.btn{
1015
  padding: 6px 10px;
1016
  display: inline-block;
1017
- background: #4DD5B0;
1018
  border: 1px solid #5da592;
1019
  border-radius: 3px;
1020
  position: static;
@@ -1325,7 +1408,10 @@ box-shadow: 0 0 0 3px #efefef;
1325
  }
1326
  .repeaters .alm-delete a:hover{
1327
  background-color: #c94141;
1328
- color: #fff;
 
 
 
1329
  }
1330
  .repeaters .alm-delete a:focus{
1331
  -webkit-box-shadow: none;
@@ -1333,9 +1419,9 @@ box-shadow: 0 0 0 3px #efefef;
1333
  box-shadow: none;
1334
  }
1335
  .repeaters .alm-delete a:active{
1336
- -webkit-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1337
- -moz-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1338
- box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1339
  background-color: #b93636;
1340
  }
1341
 
@@ -1379,9 +1465,9 @@ box-shadow: 0 0 0 3px #efefef;
1379
  background: #ff5a58;
1380
  border-color: #ff5a58;
1381
  color: #fff;
1382
- -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1383
- -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1384
- box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1385
  text-shadow: none;
1386
  }
1387
  .alm-add-template a:focus{
@@ -1428,12 +1514,16 @@ box-shadow: 0 0 0 3px #efefef;
1428
  */
1429
 
1430
  .shortcode-builder input[type=checkbox],
1431
- .shortcode-builder input[type=radio] {
 
 
1432
  display:none;
1433
  }
1434
 
1435
- .shortcode-builder input[type=checkbox] + label,
1436
- .shortcode-builder input[type=radio] + label{
 
 
1437
  background: #fff url(../img/bkg-chkbox_off.png) no-repeat left top;
1438
  height: auto;
1439
  min-height: 20px;
@@ -1441,26 +1531,203 @@ box-shadow: 0 0 0 3px #efefef;
1441
  display:inline-block;
1442
  padding: 1px 0 0 26px;
1443
  margin: 0 0 5px;
1444
- font-size: 13px;
 
 
1445
  }
1446
- .shortcode-builder input[type=radio] + label{
 
1447
  background: #fff url(../img/bkg-radio_off.png) no-repeat left top;
1448
  }
1449
 
1450
- .shortcode-builder input[type=checkbox]:checked + label{
 
1451
  background-image: url(../img/bkg-chkbox_on.png);
1452
  }
1453
- .shortcode-builder input[type=radio]:checked + label{
 
1454
  background-image: url(../img/bkg-radio_on.png);
1455
  }
1456
 
1457
  .shortcode-builder input[type=checkbox] + label:hover,
1458
- .shortcode-builder input[type=radio] + label:hover{
 
 
1459
  color: #000;
1460
  }
 
1461
 
1462
-
1463
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1464
  /*
1465
  * Admin screen media queries
1466
  *
@@ -1468,17 +1735,16 @@ box-shadow: 0 0 0 3px #efefef;
1468
  */
1469
 
1470
  @media screen and (max-width: 1200px){
1471
- .ajax-load-more input[type=text],
1472
- .select2-container{
 
 
1473
  width: 95%;
1474
  }
1475
- }
1476
-
1477
-
1478
- @media screen and (max-width: 960px){
1479
-
1480
-
1481
 
 
 
 
1482
  }
1483
 
1484
  @media screen and (max-width: 900px){
@@ -1507,9 +1773,11 @@ box-shadow: 0 0 0 3px #efefef;
1507
  float: none;
1508
  padding: 10px;
1509
  }
1510
- .ajax-load-more input[type=text],
1511
- .select2-container{
1512
- width: 100%;
 
 
1513
  }
1514
  .ajax-load-more .row .wrap .inner.half {
1515
  display: block;
@@ -1527,273 +1795,13 @@ box-shadow: 0 0 0 3px #efefef;
1527
  #alm-add-ons .section-title{
1528
  width: 100%;
1529
  }
 
 
 
 
1530
 
1531
  }
1532
 
1533
 
1534
 
1535
- /*
1536
- * Select2 - form replacement - http://ivaynberg.github.io/select2/
1537
- *
1538
- * @since 1.0
1539
- */
1540
-
1541
- .select2-container {
1542
- position: relative;
1543
- display: inline-block;
1544
- zoom: 1;
1545
- *display: inline;
1546
- vertical-align: middle;
1547
- min-width: 60%;
1548
- }
1549
- .inner.half .select2-container{
1550
- min-width: 90%;
1551
- width: 90%;
1552
- }
1553
- .select2-container a.select2-choice {
1554
- display: block;
1555
- height: 40px;
1556
- padding: 0 10px;
1557
- overflow: hidden;
1558
- position: relative;
1559
- border: 1px solid #ccc;
1560
- white-space: nowrap;
1561
- line-height: 40px;
1562
- color: #333;
1563
- text-decoration: none;
1564
- background: #fff;
1565
- background: #f7f7f7;
1566
- border-radius:2px;
1567
- -webkit-background-clip: padding-box;
1568
- -moz-background-clip: padding;
1569
- background-clip: padding-box;
1570
- -webkit-touch-callout: none;
1571
- -webkit-user-select: none;
1572
- -khtml-user-select: none;
1573
- -moz-user-select: none;
1574
- -ms-user-select: none;
1575
- user-select: none;
1576
- font-size: 14px;
1577
- }
1578
-
1579
- .select2-dropdown-open.select2-container-active .select2-choice {
1580
- -webkit-border-radius: 4px 4px 0 0;
1581
- -moz-border-radius: 4px 4px 0 0;
1582
- border-radius: 4px 4px 0 0;
1583
- }
1584
-
1585
- .select2-container.select2-drop-above .select2-choice {
1586
- background: #fff;
1587
- -webkit-border-radius: 0 0 4px 4px;
1588
- -moz-border-radius: 0px 0px 4px 4px;
1589
- border-radius: 0 0 4px 4px;
1590
- }
1591
-
1592
- .select2-container .select2-choice span {
1593
- margin-right: 30px;
1594
- margin-left: 2px;
1595
- display: block;
1596
- overflow: hidden;
1597
- white-space: nowrap;
1598
- color: #666;
1599
- -ms-text-overflow: ellipsis;
1600
- -o-text-overflow: ellipsis;
1601
- text-overflow: ellipsis;
1602
- }
1603
-
1604
- .select2-container .select2-choice abbr:hover {
1605
- background-position: right -11px;
1606
- cursor: pointer;
1607
- }
1608
-
1609
- .select2-drop-mask {
1610
- position: absolute;
1611
- left: 0;
1612
- top: 0;
1613
- z-index: 8;
1614
- background-color: #fff;
1615
- opacity: 0;
1616
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
1617
- /* works in IE 8 */
1618
- filter: "alpha(opacity=0)";
1619
- /* expected to work in IE 8 */
1620
- filter: alpha(opacity = 0);
1621
- /* IE 4-7 */
1622
- }
1623
-
1624
- .select2-drop {
1625
- overflow: hidden;
1626
- width: 100%;
1627
- margin-top: -1px;
1628
- position: absolute;
1629
- z-index: 9;
1630
- top: 100%;
1631
- background: #fff;
1632
- color: #000;
1633
- border: 1px solid #ccc;
1634
- border-top: 0;
1635
- border-radius: 0 0 2px 2px;
1636
- box-shadow: 0 2px 1px rgba(0, 0, 0, 0.1);
1637
- font-size: 14px;
1638
- }
1639
-
1640
- .select2-drop.select2-drop-above {
1641
- margin-top: 1px;
1642
- border-top: 1px solid #ccc;
1643
- border-bottom: 0;
1644
- border-radius: 2px 2px 0 0;
1645
- box-shadow: 0 -2px -1px rgba(0, 0, 0, 0.1);
1646
- }
1647
-
1648
- .select2-container .select2-choice div {
1649
- display: block;
1650
- width: 30px;
1651
- height: 100%;
1652
- position: absolute;
1653
- right: 0;
1654
- top: 0;
1655
- }
1656
-
1657
- .select2-container .select2-choice div b {
1658
- display: block;
1659
- width: 100%;
1660
- height: 100%;
1661
- background: #fff url(../img/bkg-select.png) no-repeat center center;
1662
- }
1663
-
1664
- .select2-dropdown-open.select2-container-active div b {
1665
- display: block;
1666
- width: 100%;
1667
- height: 100%;
1668
- background-color: #fff;
1669
- }
1670
-
1671
- .select2-search {
1672
- display: none;
1673
- }
1674
-
1675
- /* results UL */
1676
- .select2-results {
1677
- max-height: 200px;
1678
- padding: 0 0 0 0;
1679
- margin: 0 0 0 0;
1680
- position: relative;
1681
- overflow-x: hidden;
1682
- overflow-y: auto;
1683
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
1684
- }
1685
-
1686
- .select2-results li {
1687
- list-style: none;
1688
- display: block;
1689
- background-image: none;
1690
- padding: 0;
1691
- margin: 0;
1692
- border-top: 1px solid #efefef;
1693
- color: #666;
1694
- width: auto;
1695
- }
1696
-
1697
- .select2-results li.select2-result-with-children > .select2-result-label {
1698
- font-weight: bold;
1699
- }
1700
-
1701
- .select2-results .select2-result-label {
1702
- margin: 0;
1703
- cursor: pointer;
1704
- min-height: 1em;
1705
- padding: 10px 7px;
1706
- border-left: 4px solid transparent;
1707
- -webkit-touch-callout: none;
1708
- -webkit-user-select: none;
1709
- -khtml-user-select: none;
1710
- -moz-user-select: none;
1711
- -ms-user-select: none;
1712
- user-select: none;
1713
- }
1714
-
1715
- .select2-results .select2-highlighted .select2-result-label{ /* Hover */
1716
- background: #f7f7f7;
1717
- color: #ca5252;
1718
- border-color: #efefef;
1719
- }
1720
-
1721
- .select2-results .select2-highlighted:active {
1722
- background: #fff;
1723
- }
1724
-
1725
- .select2-results li em {
1726
- background: #feffde;
1727
- font-style: normal;
1728
- }
1729
-
1730
- .select2-results .select2-highlighted em {
1731
- background: transparent;
1732
- }
1733
-
1734
- .select2-results .select2-highlighted ul {
1735
- background: white;
1736
- color: #000;
1737
- }
1738
-
1739
- .select2-results .select2-no-results,
1740
- .select2-results .select2-searching,
1741
- .select2-results .select2-selection-limit {
1742
- background: #f4f4f4;
1743
- display: list-item;
1744
- }
1745
-
1746
- /*
1747
- disabled look for disabled choices in the results dropdown
1748
- */
1749
- .select2-results .select2-disabled.select2-highlighted {
1750
- color: #666;
1751
- background: #f4f4f4;
1752
- display: list-item;
1753
- cursor: default;
1754
- }
1755
-
1756
- .select2-results .select2-disabled {
1757
- background: #f4f4f4;
1758
- display: list-item;
1759
- cursor: default;
1760
- }
1761
-
1762
- .select2-results .select2-selected {
1763
- display: none;
1764
- }
1765
-
1766
- .select2-more-results {
1767
- background: #f4f4f4;
1768
- display: list-item;
1769
- }
1770
-
1771
- /* disabled styles */
1772
- .select2-container.select2-container-disabled .select2-choice {
1773
- background-color: #f4f4f4;
1774
- background-image: none;
1775
- border: 1px solid #ddd;
1776
- cursor: default;
1777
- }
1778
-
1779
- .select2-container.select2-container-disabled .select2-choice div {
1780
- background-color: #f4f4f4;
1781
- background-image: none;
1782
- border-left: 0;
1783
- }
1784
-
1785
- .select2-container.select2-container-disabled .select2-choice abbr {
1786
- display: none;
1787
- }
1788
-
1789
- .select2-offscreen {
1790
- border: 0;
1791
- clip: rect(0 0 0 0);
1792
- height: 1px;
1793
- margin: -1px;
1794
- overflow: hidden;
1795
- padding: 0;
1796
- position: absolute;
1797
- width: 1px;
1798
- }
1799
 
1
  @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,600);
2
 
3
+
4
  /*
5
  * Admin - Popup Generator
6
  *
33
  padding: 15px 10px 140px !important;
34
  }
35
 
36
+ #alm-settings h3 + p{
37
+ color: #999;
38
+ }
39
  .ajax-load-more code{
40
  background: #fcf3d0;
41
  }
83
  margin-top: -10px;
84
  opacity: 0.7;
85
  }
86
+ .ajax-load-more p.small.reset-shortcode-builder{
87
+ text-align: right;
88
+ margin: 10px 0 0;
89
+ display: none;
90
+ }
91
+ .ajax-load-more p.small.reset-shortcode-builder a{
92
+ text-decoration: none;
93
+ }
94
 
95
  /* Expand Collapse Headings */
96
  .ajax-load-more h3.heading{
106
  background: #f7f7f7;
107
  border-bottom: 1px solid #efefef;
108
  }
109
+ .ajax-load-more h3.heading:hover:after,
110
+ .ajax-load-more .add-on h3.heading:hover:after{
111
  color: #f05452;
112
  }
113
  .ajax-load-more h3.heading:hover{
132
  border-bottom-color: transparent;
133
  }
134
 
135
+ .ajax-load-more .add-on h3.heading:after{
136
+ color: #999;
137
+ }
138
+ .ajax-load-more .add-on h3.heading{
139
+ background-color: #fefeed;
140
+ }
141
+
142
  /* Expand/Collapse all rows */
143
  .ajax-load-more .toggle-all{
144
  position: absolute;
249
  margin: 0;
250
  padding: 0 0 0 10px;
251
  }
252
+
253
+ .ajax-load-more p.warning-callout{
254
+ background-color: #cbecf7;
255
+ color: #333;
256
+ font-size: 13px;
257
+ margin: 0;
258
+ display: block;
259
+ padding: 10px;
260
+ border-radius: 3px;
261
+ margin: 10px;
262
+ width: auto;
263
+ line-height: 1.75;
264
+ }
265
+ .ajax-load-more p.warning-callout strong{
266
+ display: inline-block;
267
+ font-weight: normal;
268
+ font-family: Consolas, monaco, monospace;
269
+ background-color: #edfbff;
270
+ color:#525c5f;
271
+ padding: 0 6px;
272
+ border-radius: 2px;
273
+ }
274
+ .ajax-load-more p.warning-callout.notify{
275
+ background-color: #ad4141;
276
+ color: #fff;
277
+ }
278
+
279
+ .ajax-load-more p.warning-callout.notify strong{
280
+ background-color: #cb5858;
281
+ color: #fff;
282
+ }
283
 
284
 
285
  .ajax-load-more label,
447
  }
448
 
449
  /* Jump Menu */
450
+
451
+ .pop-up-jump{
452
+ display: block;
453
+ width: 100%;
 
454
  }
455
+ .pop-up-jump .jump-menu-wrap{
456
+ position: relative;
457
+ float: right;
458
+ width: 30%;
459
+ }
460
+ .pop-up-jump .intro-wrap{
461
+ position: relative;
462
+ float: left;
463
+ width: 65%;
464
+ padding-right: 5%;
465
  }
466
+
467
+ .admin.ajax-load-more .jump-menu{
468
+ display: none;
469
+ }
470
 
471
  /* Table of Contents */
472
  .table-of-contents{}
502
  #alm-examples.ajax-load-more .expand-wrap{
503
  padding: 10px 10px 0;
504
  }
505
+ .ajax-load-more .expand-wrap hr{
506
+ border: 0;
507
+ height: 0;
508
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
509
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
510
+ }
511
 
512
  .ajax-load-more .section-title {
513
  float: left;
514
+ padding: 21px 15px 10px;
 
 
515
  width: 45%;
516
  }
517
  .ajax-load-more .section-title p{
519
  padding-left: 21px !important;
520
  color: #999;
521
  }
522
+ .ajax-load-more .section-title h4{
523
+ padding-left: 21px !important;
524
+ margin: 0 0 10px;
525
+ }
526
 
527
  .ajax-load-more .repeaters .section-title,
528
  .ajax-load-more .repeaters .row .wrap{
545
  line-height: normal !important;
546
  }
547
 
548
+ .preload_amount{
549
+ display: none;
550
+ }
551
+
552
 
553
 
554
  .ajax-load-more .row .wrap{
651
  font-size: 13px;
652
  color: #fff;
653
  cursor: pointer;
654
+ word-wrap: break-word;
655
  }
656
 
657
  .admin.ajax-load-more #shortcode_output{
735
  vertical-align: top;
736
  padding: 0 0 10px;
737
  max-width: 90%;
738
+ cursor: pointer !important;
739
  }
740
  .form-table input[type=radio],
741
  .form-table input[type=checkbox]{
749
  .form-table label span{
750
  font-size: 13px;
751
  color: #999;
752
+ padding-top: 4px;
753
  }
754
 
755
  .admin.ajax-load-more .form-table textarea{
915
  position: static;
916
  }
917
  .saved-response.loading,
918
+ p.loading,
919
+ .alm-dropdown ul li a.updating{
920
  background: url(../img/loader.gif) no-repeat left center;
921
  padding-left: 24px;
922
  }
923
 
924
+ .alm-dropdown ul li a.updating{
925
+ background-position: 1px center;
926
+ padding-left: 25px;
927
+ }
928
+
929
  input.save-repeater{
930
  margin-bottom: 10px !important;
931
  }
1057
 
1058
  /* Add-on Callout! */
1059
  .call-out{
1060
+ background: #73d3b9;
1061
  padding: 13px 100px 13px 12px;
1062
  border-radius: 3px;
1063
  margin: 0;
1097
  a.btn{
1098
  padding: 6px 10px;
1099
  display: inline-block;
1100
+ background: #73d3b9;
1101
  border: 1px solid #5da592;
1102
  border-radius: 3px;
1103
  position: static;
1408
  }
1409
  .repeaters .alm-delete a:hover{
1410
  background-color: #c94141;
1411
+ color: #fff;
1412
+ -webkit-box-shadow: 0 0 3px #ccc;
1413
+ -moz-box-shadow: 0 0 3px #ccc;
1414
+ box-shadow: 0 0 3px #ccc;
1415
  }
1416
  .repeaters .alm-delete a:focus{
1417
  -webkit-box-shadow: none;
1419
  box-shadow: none;
1420
  }
1421
  .repeaters .alm-delete a:active{
1422
+ -webkit-box-shadow: inset 0 1px 1px #ccc !important;
1423
+ -moz-box-shadow: inset 0 1px 1px #ccc !important;
1424
+ box-shadow: inset 0 1px 1px #ccc !important;
1425
  background-color: #b93636;
1426
  }
1427
 
1465
  background: #ff5a58;
1466
  border-color: #ff5a58;
1467
  color: #fff;
1468
+ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1469
+ -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1470
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
1471
  text-shadow: none;
1472
  }
1473
  .alm-add-template a:focus{
1514
  */
1515
 
1516
  .shortcode-builder input[type=checkbox],
1517
+ .shortcode-builder input[type=radio],
1518
+ .ajax-load-more .form-table input[type=checkbox],
1519
+ .ajax-load-more .form-table input[type=radio]{
1520
  display:none;
1521
  }
1522
 
1523
+ .shortcode-builder input[type=checkbox] + label,
1524
+ .ajax-load-more .form-table input[type=checkbox] + label,
1525
+ .shortcode-builder input[type=radio] + label,
1526
+ .ajax-load-more .form-table input[type=radio] + label{
1527
  background: #fff url(../img/bkg-chkbox_off.png) no-repeat left top;
1528
  height: auto;
1529
  min-height: 20px;
1531
  display:inline-block;
1532
  padding: 1px 0 0 26px;
1533
  margin: 0 0 5px;
1534
+ font-size: 14px;
1535
+ line-height: 1.4;
1536
+ cursor: pointer !important;
1537
  }
1538
+ .shortcode-builder input[type=radio] + label,
1539
+ .ajax-load-more .form-table input[type=radio] + label{
1540
  background: #fff url(../img/bkg-radio_off.png) no-repeat left top;
1541
  }
1542
 
1543
+ .shortcode-builder input[type=checkbox]:checked + label,
1544
+ .ajax-load-more .form-table input[type=checkbox]:checked + label{
1545
  background-image: url(../img/bkg-chkbox_on.png);
1546
  }
1547
+ .shortcode-builder input[type=radio]:checked + label,
1548
+ .ajax-load-more .form-table input[type=radio]:checked + label{
1549
  background-image: url(../img/bkg-radio_on.png);
1550
  }
1551
 
1552
  .shortcode-builder input[type=checkbox] + label:hover,
1553
+ .ajax-load-more .form-table input[type=checkbox] + label:hover,
1554
+ .shortcode-builder input[type=radio] + label:hover,
1555
+ .ajax-load-more .form-table input[type=radio] + label:hover{
1556
  color: #000;
1557
  }
1558
+
1559
 
1560
+ /*
1561
+ * Repeater Template options dropdown
1562
+ *
1563
+ * @since 2.4.1
1564
+ */
1565
+
1566
+ .ajax-load-more .row.template{
1567
+ position: relative;
1568
+ }
1569
+ .ajax-load-more .row.template:hover .alm-repeater-options{
1570
+ opacity: 1;
1571
+ }
1572
+
1573
+ .alm-repeater-options{
1574
+ position: absolute;
1575
+ top: -38px;
1576
+ right: 6px;
1577
+ z-index:99;
1578
+ }
1579
+ .alm-repeater-options a.target{
1580
+ color: #999;
1581
+ text-decoration: none !important;
1582
+ padding: 5px 9px;
1583
+ border: 1px solid #e7e7e7;
1584
+ -webkit-border-radius: 3px;
1585
+ -moz-border-radius: 3px;
1586
+ border-radius: 3px;
1587
+ font-size: 13px;
1588
+ display: block;
1589
+ -webkit-box-shadow: 0 0 0 1px #fff;
1590
+ -moz-box-shadow: 0 0 0 1px #fff;
1591
+ box-shadow: 0 0 0 1px #fff;
1592
+ }
1593
+ .alm-repeater-options a i.fa-cog{
1594
+ color: #999;
1595
+ font-size: 16px;
1596
+ position: relative;
1597
+ top:1px;
1598
+ left: -2px;
1599
+ }
1600
+ .alm-repeater-options a.target:hover,
1601
+ .alm-repeater-options a.target:active{
1602
+ border-color: #c9c9c9;
1603
+ color: #666;
1604
+ background-color: #fff;
1605
+ -webkit-box-shadow: 0 0 3px #ccc;
1606
+ -moz-box-shadow: 0 0 3px #ccc;
1607
+ box-shadow: 0 0 3px #ccc;
1608
+ }
1609
+ .alm-repeater-options a.target:hover i.fa-cog{
1610
+ color: #444;
1611
+ }
1612
+
1613
+ /* Active state */
1614
+ .alm-repeater-options a.target:active,
1615
+ .alm-repeater-options.active a.target{
1616
+ background-color: #fff;
1617
+ border-color: #c9c9c9;
1618
+ -webkit-box-shadow: inset 0 1px 1px #ccc !important;
1619
+ -moz-box-shadow: inset 0 1px 1px #ccc !important;
1620
+ box-shadow: inset 0 1px 1px #ccc !important;
1621
+ }
1622
+ .alm-repeater-options.active a.target,
1623
+ .alm-repeater-options.active a.target i.fa-cog{
1624
+ color: #444;
1625
+ }
1626
+
1627
+ /* Dropwbown */
1628
+ .alm-dropdown{
1629
+ display: none;
1630
+ position: absolute;
1631
+ top: 108%;
1632
+ right: -2px;
1633
+ z-index: 9;
1634
+ }
1635
+ .alm-dropdown .alm-drop-inner{
1636
+ display: block;
1637
+ position: relative;
1638
+ background: #fff;
1639
+ -webkit-border-radius: 3px;
1640
+ -moz-border-radius: 3px;
1641
+ border-radius: 3px;
1642
+ border: 1px solid #ccc;
1643
+ box-shadow: 0 0 4px #ccc;
1644
+ padding: 8px;
1645
+ width: 230px;
1646
+ }
1647
+ .alm-drop-inner:after,
1648
+ .alm-drop-inner:before {
1649
+ bottom:100%;
1650
+ right: 36px;
1651
+ border:solid transparent;
1652
+ content:" ";
1653
+ height:0;
1654
+ width:0;
1655
+ position:absolute;
1656
+ pointer-events:none;
1657
+ }
1658
+
1659
+ .alm-drop-inner:after {
1660
+ border-color:rgba(247,247,247,0);
1661
+ border-bottom-color:#fff;
1662
+ border-width:7px;
1663
+ margin-left:-7px;
1664
+ }
1665
+
1666
+ .alm-drop-inner:before {
1667
+ border-color:rgba(204,204,204,0);
1668
+ border-bottom-color:#ccc;
1669
+ border-width:8px;
1670
+ right: 35px;
1671
+ }
1672
+
1673
+ .alm-dropdown.active{
1674
+ display: block;
1675
+ }
1676
+ .alm-dropdown ul{
1677
+ padding:0;
1678
+ margin:0;
1679
+ }
1680
+ .alm-dropdown ul li{
1681
+ margin:0;
1682
+ padding:0;
1683
+ list-style: none;
1684
+ clear: both;
1685
+ font-size: 11px;
1686
+ margin: 0;
1687
+ padding: 0;
1688
+ line-height: 1.2;
1689
+ border-top: 1px solid #efefef;
1690
+ }
1691
+ .alm-dropdown ul li:first-child{
1692
+ border: none;
1693
+ }
1694
+ .alm-dropdown ul li a{
1695
+ padding: 11px 5px 11px 24px;
1696
+ display: block;
1697
+ text-decoration: none;
1698
+ background-position: 1px center;
1699
+ color: #666;
1700
+ -webkit-box-shadow: none !important;
1701
+ -moz-box-shadow: none !important;
1702
+ box-shadow: none !important;
1703
+ position: relative;
1704
+ }
1705
+ .alm-dropdown ul li a i{
1706
+ margin: 0;
1707
+ color: #999 !important;
1708
+ position: absolute;
1709
+ left: 0px;
1710
+ top: 11px;
1711
+ font-size: 14px;
1712
+ width: 19px;
1713
+ padding-left: 3px;
1714
+ display: inline-block;
1715
+ }
1716
+ .alm-dropdown ul li.copy a i{
1717
+ left: -1px;
1718
+ }
1719
+ .alm-dropdown ul li.option-update a i{
1720
+ top: 12px;
1721
+ }
1722
+
1723
+ .alm-dropdown ul li a:hover{
1724
+ color: #111;
1725
+ }
1726
+ .alm-dropdown ul li a:hover i{
1727
+ color: #ec4745 !important;
1728
+ }
1729
+
1730
+
1731
  /*
1732
  * Admin screen media queries
1733
  *
1735
  */
1736
 
1737
  @media screen and (max-width: 1200px){
1738
+ .ajax-load-more input[type=text],
1739
+ .ajax-load-more input[type=number],
1740
+ .select2-container,
1741
+ #alm-builder .select2-container-multi{
1742
  width: 95%;
1743
  }
 
 
 
 
 
 
1744
 
1745
+ #alm-builder .select2-container-multi{
1746
+ width: 95% !important;
1747
+ }
1748
  }
1749
 
1750
  @media screen and (max-width: 900px){
1773
  float: none;
1774
  padding: 10px;
1775
  }
1776
+ .ajax-load-more input[type=text],
1777
+ .ajax-load-more input[type=number],
1778
+ .select2-container,
1779
+ #alm-builder .select2-container-multi{
1780
+ width: 100% !important;;
1781
  }
1782
  .ajax-load-more .row .wrap .inner.half {
1783
  display: block;
1795
  #alm-add-ons .section-title{
1796
  width: 100%;
1797
  }
1798
+
1799
+ .alm-repeater-options{
1800
+ display: none !important;
1801
+ }
1802
 
1803
  }
1804
 
1805
 
1806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1807
 
admin/css/select2.css ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*
3
+ * Select2 - form replacement - http://ivaynberg.github.io/select2/
4
+ *
5
+ * @since 1.0
6
+ */
7
+
8
+ .select2-container {
9
+ position: relative;
10
+ display: inline-block;
11
+ zoom: 1;
12
+ *display: inline;
13
+ vertical-align: middle;
14
+ min-width: 60%;
15
+ }
16
+ .inner.half .select2-container{
17
+ min-width: 90%;
18
+ width: 90%;
19
+ }
20
+ #alm-builder .select2-container li{
21
+ padding-right: 0;
22
+ }
23
+ .select2-container a.select2-choice {
24
+ display: block;
25
+ height: 40px;
26
+ padding: 0 10px;
27
+ overflow: hidden;
28
+ position: relative;
29
+ border: 1px solid #ccc;
30
+ white-space: nowrap;
31
+ line-height: 40px;
32
+ color: #333;
33
+ text-decoration: none;
34
+ background: #fff;
35
+ background: #f7f7f7;
36
+ border-radius:2px;
37
+ -webkit-background-clip: padding-box;
38
+ -moz-background-clip: padding;
39
+ background-clip: padding-box;
40
+ -webkit-touch-callout: none;
41
+ -webkit-user-select: none;
42
+ -khtml-user-select: none;
43
+ -moz-user-select: none;
44
+ -ms-user-select: none;
45
+ user-select: none;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .select2-dropdown-open.select2-container-active .select2-choice {
50
+ -webkit-border-radius: 4px 4px 0 0;
51
+ -moz-border-radius: 4px 4px 0 0;
52
+ border-radius: 4px 4px 0 0;
53
+ }
54
+
55
+ .select2-container.select2-drop-above .select2-choice {
56
+ background: #fff;
57
+ -webkit-border-radius: 0 0 4px 4px;
58
+ -moz-border-radius: 0px 0px 4px 4px;
59
+ border-radius: 0 0 4px 4px;
60
+ }
61
+
62
+ .select2-container .select2-choice span {
63
+ margin-right: 30px;
64
+ margin-left: 2px;
65
+ display: block;
66
+ overflow: hidden;
67
+ white-space: nowrap;
68
+ color: #666;
69
+ -ms-text-overflow: ellipsis;
70
+ -o-text-overflow: ellipsis;
71
+ text-overflow: ellipsis;
72
+ }
73
+
74
+ .select2-container .select2-choice abbr:hover {
75
+ background-position: right -11px;
76
+ cursor: pointer;
77
+ }
78
+
79
+ .select2-drop-mask {
80
+ position: absolute;
81
+ left: 0;
82
+ top: 0;
83
+ z-index: 8;
84
+ background-color: #fff;
85
+ opacity: 0;
86
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
87
+ /* works in IE 8 */
88
+ filter: "alpha(opacity=0)";
89
+ /* expected to work in IE 8 */
90
+ filter: alpha(opacity = 0);
91
+ /* IE 4-7 */
92
+ }
93
+
94
+ .select2-drop {
95
+ overflow: hidden;
96
+ width: 100%;
97
+ margin-top: -1px;
98
+ position: absolute;
99
+ z-index: 9;
100
+ top: 100%;
101
+ background: #fff;
102
+ color: #000;
103
+ border: 1px solid #ccc;
104
+ border-top: 0;
105
+ border-radius: 0 0 2px 2px;
106
+ box-shadow: 0 2px 1px rgba(0, 0, 0, 0.1);
107
+ font-size: 14px;
108
+ }
109
+
110
+ .select2-drop.select2-drop-above {
111
+ margin-top: 1px;
112
+ border-top: 1px solid #ccc;
113
+ border-bottom: 0;
114
+ border-radius: 2px 2px 0 0;
115
+ box-shadow: 0 -2px -1px rgba(0, 0, 0, 0.1);
116
+ }
117
+
118
+ .select2-container .select2-choice div {
119
+ display: block;
120
+ width: 30px;
121
+ height: 100%;
122
+ position: absolute;
123
+ right: 0;
124
+ top: 0;
125
+ }
126
+
127
+ .select2-container .select2-choice div b {
128
+ display: block;
129
+ width: 100%;
130
+ height: 100%;
131
+ background: #fff url("../img/bkg-select.png") no-repeat center center;
132
+ }
133
+
134
+ .select2-dropdown-open.select2-container-active div b {
135
+ display: block;
136
+ width: 100%;
137
+ height: 100%;
138
+ background-color: #fff;
139
+ }
140
+
141
+ /* Search */
142
+ .select2-search {
143
+ /* display: none; */
144
+ padding: 2px;
145
+ display: block;
146
+ background-color: #fff;
147
+ }
148
+ .select2-search .select2-input{
149
+ width: 99%;
150
+ height: 26px !important;
151
+ border-color: #efefef !important;
152
+ -webkit-box-shadow: none !important;
153
+ -moz-box-shadow: none !important;
154
+ box-shadow: none !important;
155
+ background: url("../img/select2.png") no-repeat scroll 100% -22px !important;
156
+ }
157
+
158
+ /* Multi select box */
159
+ #alm-builder .select2-container-multi{
160
+ width: 60%;
161
+ }
162
+ #alm-builder .select2-results li{
163
+ width: 100%;
164
+ }
165
+
166
+ #alm-builder .select2-container-multi .select2-input{
167
+ cursor: pointer;
168
+ margin: 0 !important;
169
+ }
170
+
171
+ #alm-builder ul.select2-choices{
172
+ width: 100%;
173
+ overflow: hidden;
174
+ }
175
+ #alm-builder ul.select2-choices li.select2-search-field,
176
+ #alm-builder ul.select2-choices li.select2-search-field input{
177
+ width: 100% !important;
178
+ display: block;
179
+ }
180
+ /* Selected Choice */
181
+ #alm-builder ul.select2-choices li.select2-search-choice{
182
+ display: inline-block;
183
+ font-size: 12px;
184
+ line-height: 13px;
185
+ margin: 0 5px 5px 0;
186
+ padding: 5px 10px 5px 24px;
187
+ border-radius: 3px;
188
+ background: #fff;
189
+ border: 1px solid #ccc;
190
+ width: auto;
191
+ position: relative;
192
+ }
193
+ #alm-builder ul.select2-choices .select2-input{
194
+ background: #f7f7f7 url("../img/bkg-select.png") no-repeat right center;
195
+ }
196
+ #alm-builder ul.select2-choices li.select2-search-choice a{
197
+ position: absolute;
198
+ left: 5px;
199
+ top: 5px;
200
+ width: 13px;
201
+ height: 13px;
202
+ background: #999 url("../img/ico-close.png") no-repeat center center;
203
+ color: #fff;
204
+ display: block;
205
+ border-radius: 2px;
206
+ }
207
+
208
+ #alm-builder ul.select2-choices li.select2-search-choice a:hover{
209
+ background-color: #ff0000;
210
+ }
211
+
212
+
213
+ /* results UL */
214
+ .select2-results {
215
+ max-height: 200px;
216
+ padding: 0 0 0 0;
217
+ margin: 0 0 0 0;
218
+ position: relative;
219
+ overflow-x: hidden;
220
+ overflow-y: auto;
221
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
222
+ }
223
+
224
+ .select2-results li {
225
+ list-style: none;
226
+ display: block;
227
+ background-image: none;
228
+ padding: 0;
229
+ margin: 0;
230
+ border-top: 1px solid #efefef;
231
+ color: #666;
232
+ width: auto;
233
+ font-size: 13px;
234
+ }
235
+
236
+ .select2-results li.select2-result-with-children > .select2-result-label {
237
+ font-weight: bold;
238
+ }
239
+
240
+ .select2-results .select2-result-label {
241
+ margin: 0;
242
+ cursor: pointer;
243
+ min-height: 1em;
244
+ padding: 10px 7px;
245
+ border-left: 4px solid transparent;
246
+ -webkit-touch-callout: none;
247
+ -webkit-user-select: none;
248
+ -khtml-user-select: none;
249
+ -moz-user-select: none;
250
+ -ms-user-select: none;
251
+ user-select: none;
252
+ }
253
+
254
+ .select2-results .select2-highlighted .select2-result-label{ /* Hover */
255
+ background: #f7f7f7;
256
+ color: #ca5252;
257
+ border-color: #efefef;
258
+ }
259
+
260
+ .select2-results .select2-highlighted:active {
261
+ background: #fff;
262
+ }
263
+
264
+ .select2-results li em {
265
+ background: #feffde;
266
+ font-style: normal;
267
+ }
268
+
269
+ .select2-results .select2-highlighted em {
270
+ background: transparent;
271
+ }
272
+
273
+ .select2-results .select2-highlighted ul {
274
+ background: white;
275
+ color: #000;
276
+ }
277
+
278
+ .select2-results .select2-no-results,
279
+ .select2-results .select2-searching,
280
+ .select2-results .select2-selection-limit {
281
+ background: #f4f4f4;
282
+ display: list-item;
283
+ }
284
+
285
+ .select2-results .select2-no-results{
286
+ min-height: 1em;
287
+ padding: 10px 7px;
288
+ font-size: 13px;
289
+ }
290
+
291
+ /*
292
+ disabled look for disabled choices in the results dropdown
293
+ */
294
+ .select2-results .select2-disabled.select2-highlighted {
295
+ color: #666;
296
+ background: #f4f4f4;
297
+ display: list-item;
298
+ cursor: default;
299
+ }
300
+
301
+ .select2-results .select2-disabled {
302
+ background: #f4f4f4;
303
+ display: list-item;
304
+ cursor: default;
305
+ }
306
+
307
+ .select2-results .select2-selected {
308
+ display: none;
309
+ }
310
+
311
+ .select2-more-results {
312
+ background: #f4f4f4;
313
+ display: list-item;
314
+ }
315
+
316
+ /* disabled styles */
317
+ .select2-container.select2-container-disabled .select2-choice {
318
+ background-color: #f4f4f4;
319
+ background-image: none;
320
+ border: 1px solid #ddd;
321
+ cursor: default;
322
+ }
323
+
324
+ .select2-container.select2-container-disabled .select2-choice div {
325
+ background-color: #f4f4f4;
326
+ background-image: none;
327
+ border-left: 0;
328
+ }
329
+
330
+ .select2-container.select2-container-disabled .select2-choice abbr {
331
+ display: none;
332
+ }
333
+
334
+ .select2-offscreen {
335
+ border: 0;
336
+ clip: rect(0 0 0 0);
337
+ height: 1px;
338
+ margin: -1px;
339
+ overflow: hidden;
340
+ padding: 0;
341
+ position: absolute;
342
+ width: 1px;
343
+ }
admin/editor-build.php DELETED
@@ -1,52 +0,0 @@
1
- <!DOCTYPE html>
2
- <html xmlns="http://www.w3.org/1999/xhtml">
3
- <head>
4
- <title>Ajax Load More: Shortcode Builder</title>
5
- <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
6
- <link rel="stylesheet" src="<?php echo includes_url($path); ?>js/tinymce/themes/advanced/skins/wp_theme/dialog.css"></link>
7
- <link rel="stylesheet" href="<?php echo ALM_ADMIN_URL; ?>css/admin.css" />
8
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
9
- <script type="text/javascript" src="<?php echo includes_url('/js/tinymce/tiny_mce_popup.js'); ?>"></script>
10
- <script type="text/javascript">
11
- // ****** Build Button Shortcode ****** //
12
- var AjaxLoadMoreModal = {
13
- local_ed : 'ed',
14
- init : function(ed) {
15
- AjaxLoadMoreModal.local_ed = ed;
16
- tinyMCEPopup.resizeToInnerSize();
17
- },
18
- insert : function insertButton(ed) {
19
- // Try and remove existing style / blockquote
20
- tinyMCEPopup.execCommand('mceRemoveNode', false, null);
21
-
22
- // setup the output of our shortcode to show in the wp editor
23
- output = $('#shortcode_output').text();
24
-
25
- tinyMCEPopup.execCommand('mceInsertContent', false, output);
26
- // Return
27
- tinyMCEPopup.close();
28
- }
29
- };
30
- tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
31
- </script>
32
- <?php $is_modal = true; ?>
33
- </head>
34
- <body>
35
- <div id="alm-container" class="ajax-load-more shortcode-builder">
36
- <select class="jump-menu">
37
- <option value="null" selected="selected">-- <?php _e('Jump to Option', ALM_NAME); ?> --</option>
38
- </select>
39
- <p class="intro"><?php _e('Create your own Ajax Load More shortcode by adjusting the values below:', ALM_NAME); ?></p>
40
- <?php include (ALM_PATH . '/admin/shortcode-builder/shortcode-builder.php'); ?>
41
- <div class="output-wrap">
42
- <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', ALM_NAME); ?></a>
43
- <div class="shortcode-display">
44
- <div id="shortcode_output"></div>
45
- <span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
46
- </div>
47
- </div
48
- </div>
49
- <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/select2.min.js"></script>
50
- <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>shortcode-builder/js/shortcode-builder.js"></script>
51
- </body>
52
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/editor/editor-build.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Ajax Load More: Shortcode Builder</title>
5
+ <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
6
+ <link rel="stylesheet" src="<?php echo includes_url($path); ?>js/tinymce/themes/advanced/skins/wp_theme/dialog.css"></link>
7
+ <link rel="stylesheet" href="<?php echo ALM_ADMIN_URL; ?>css/admin.css" />
8
+ <link rel="stylesheet" href="<?php echo ALM_ADMIN_URL; ?>css/select2.css" />
9
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.js"></script>
10
+ <script type="text/javascript" src="<?php echo includes_url('/js/tinymce/tiny_mce_popup.js'); ?>"></script>
11
+ <script type="text/javascript">
12
+ // ****** Build Button Shortcode ****** //
13
+ var AjaxLoadMoreModal = {
14
+ local_ed : 'ed',
15
+ init : function(ed) {
16
+ AjaxLoadMoreModal.local_ed = ed;
17
+ tinyMCEPopup.resizeToInnerSize();
18
+ },
19
+ insert : function insertButton(ed) {
20
+ // Try and remove existing style / blockquote
21
+ tinyMCEPopup.execCommand('mceRemoveNode', false, null);
22
+
23
+ // setup the output of our shortcode to show in the wp editor
24
+ output = $('#shortcode_output').text();
25
+
26
+ tinyMCEPopup.execCommand('mceInsertContent', false, output);
27
+ // Return
28
+ tinyMCEPopup.close();
29
+ }
30
+ };
31
+ tinyMCEPopup.onInit.add(AjaxLoadMoreModal.init, AjaxLoadMoreModal);
32
+ </script>
33
+ <?php $is_modal = true; ?>
34
+ </head>
35
+ <body id="alm-builder">
36
+ <div id="alm-container" class="ajax-load-more shortcode-builder">
37
+ <div class="pop-up-jump">
38
+ <div class="jump-menu-wrap">
39
+ <select class="jump-menu">
40
+ <option value="null" selected="selected">-- <?php _e('Jump to Option', ALM_NAME); ?> --</option>
41
+ </select>
42
+ </div>
43
+ <div class="intro-wrap">
44
+ <p class="intro"><?php _e('Create your own Ajax Load More shortcode by adjusting the parameters below:', ALM_NAME); ?></p>
45
+ </div>
46
+ </div>
47
+ <div class="clear"></div>
48
+ <?php include (ALM_PATH . '/admin/shortcode-builder/shortcode-builder.php'); ?>
49
+
50
+ <div class="output-wrap">
51
+ <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', ALM_NAME); ?></a>
52
+ <div class="shortcode-display">
53
+ <div id="shortcode_output"></div>
54
+ <span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
55
+ </div>
56
+ </div
57
+ </div>
58
+ <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/libs/select2.min.js"></script>
59
+ <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>shortcode-builder/js/shortcode-builder.js"></script>
60
+ <script type="text/javascript" src="<?php echo ALM_ADMIN_URL; ?>js/admin.js"></script>
61
+ </body>
62
+ </html>
admin/{editor.php → editor/editor.php} RENAMED
File without changes
admin/{js → editor/js}/editor-btn.js RENAMED
@@ -23,7 +23,7 @@
23
  title: 'Insert Ajax load More',
24
  cmd: 'mcebutton',
25
  classes: 'widget btn ajax-load-more-btn',
26
- image: url + '/../img/add.png'
27
  });
28
 
29
  }
23
  title: 'Insert Ajax load More',
24
  cmd: 'mcebutton',
25
  classes: 'widget btn ajax-load-more-btn',
26
+ image: url + '/../../img/add.png'
27
  });
28
 
29
  }
admin/img/add-ons/preloaded-add-ons.jpg ADDED
Binary file
admin/img/ico-close.png ADDED
Binary file
admin/img/select2.png ADDED
Binary file
admin/includes/components/repeater-options.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="btn alm-repeater-options">
2
+ <a href="javascript:void(0);" class="target"><i class="fa fa-cog"></i> <?php _e('Options', ALM_NAME); ?></a>
3
+ <div class="alm-dropdown">
4
+ <div class="alm-drop-inner">
5
+ <ul>
6
+ <li class="option-update"><a href="javascript:void(0);"><i class="fa fa-download"></i> <?php _e('Update Template from Database', ALM_NAME); ?></a></li>
7
+ <li class="copy"><a href="javascript:void(0);"><i class="fa fa-files-o"></i> <?php _e('Copy Template Data', ALM_NAME); ?></a></li>
8
+ </ul>
9
+ </div>
10
+ </div>
11
+ </div>
admin/js/admin.js ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var _alm = _alm || {};
2
+
3
+ jQuery(document).ready(function($) {
4
+ "use strict";
5
+
6
+ /*
7
+ * _alm.copyToClipboard
8
+ * Copy shortcode to clipboard
9
+ *
10
+ * @since 2.0.0
11
+ */
12
+
13
+ _alm.copyToClipboard = function(text) {
14
+ window.prompt ("Copy link to your clipboard: Press Ctrl + C then hit Enter to copy.", text);
15
+ }
16
+
17
+ // Copy link on shortcode builder
18
+ $('.output-wrap .copy').click(function(){
19
+ var c = $('#shortcode_output').html();
20
+ _alm.copyToClipboard(c);
21
+ });
22
+
23
+ // Copy link on repeater templates
24
+ $('.alm-dropdown .copy a').click(function(){
25
+ var container = $(this).closest('.repeater-wrap'), // find closet wrap
26
+ el = container.data('name'); // get template name
27
+
28
+ if(el === 'default') el = 'template-default';
29
+ var c = $('#'+el).val(); // Get textarea val()
30
+ _alm.copyToClipboard(c);
31
+ });
32
+
33
+
34
+
35
+ /*
36
+ * Expand/Collapse shortcode headings
37
+ *
38
+ * @since 2.0.0
39
+ */
40
+
41
+ $(document).on('click', 'h3.heading', function(){
42
+ var el = $(this);
43
+ if($(el).hasClass('open')){
44
+ $(el).next('.expand-wrap').slideDown(100, 'alm_easeInOutQuad', function(){
45
+ $(el).removeClass('open');
46
+ });
47
+ }else{
48
+ $(el).next('.expand-wrap').slideUp(100, 'alm_easeInOutQuad', function(){
49
+ $(el).addClass('open');
50
+ });
51
+ }
52
+ });
53
+
54
+ $(document).on('click', '.toggle-all', function(){
55
+ var el = $(this);
56
+ if($(el).hasClass('closed')){
57
+ $(el).removeClass('closed');
58
+ $('h3.heading').removeClass('open');
59
+ $('.expand-wrap').slideDown(100, 'alm_easeInOutQuad');
60
+ }else{
61
+ $(el).addClass('closed');
62
+ $('h3.heading').addClass('open');
63
+ $('.expand-wrap').slideUp(100, 'alm_easeInOutQuad');
64
+ }
65
+ });
66
+
67
+
68
+ });
admin/js/libs/jquery.drops.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var drops = drops || {};
2
+ jQuery(document).ready(function($) {
3
+ "use strict";
4
+
5
+ drops.dropdown = function(e) {
6
+ var el = e.parent();
7
+ var dropdown = $('.alm-dropdown', el);
8
+ var text = $('input[type="text"]', el);
9
+
10
+ if($(el).hasClass('active')){//If is currently active, hide it
11
+ el.removeClass('active');
12
+ $('.alm-dropdown', el).removeClass('active');
13
+ return false;
14
+ }
15
+ else if($('.alm-dropdown').hasClass('active')){
16
+ $('.alm-dropdown').each(function(i){
17
+ $(this).removeClass('active');
18
+ $(this).parent().removeClass('active');
19
+ });
20
+ }
21
+
22
+ $('.alm-dropdown').removeClass('active');//remove active states from currently open dropdowns
23
+ el.addClass('active');
24
+ $('.alm-dropdown', el).addClass('active');
25
+ text.focus(); //Focus on input boxes
26
+
27
+ $(window).unbind('click').bind('click', drops.closeDropDown); // Bind click event to site container
28
+ dropdown.click(function(e){
29
+ e.stopPropagation();
30
+ });
31
+ };
32
+ drops.closeDropDown = function() {
33
+ $('.alm-dropdown').each(function(i) {
34
+ $(this).removeClass('active');
35
+ $(this).parent().removeClass('active');
36
+ });
37
+ };
38
+
39
+ //Dropdown links
40
+ $('.alm-dropdown').each(function(i){
41
+ var el = $(this).parent('.btn');
42
+ $('> a', el).click(function(e){
43
+ var e = $(this);
44
+ drops.dropdown(e);
45
+ return false;
46
+ });
47
+ });
48
+ });
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -1,13 +1,46 @@
1
  jQuery(document).ready(function($) {
2
- "use strict";
3
-
4
- $(".row select, .cnkt-main select").select2();
5
 
6
  var _alm = {},
7
  output_div = $('#shortcode_output'),
8
- output = '[ajax_load_more]';
 
 
 
9
 
10
- output_div.text(output); //Init the shortcode output
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
 
13
  /*
@@ -21,13 +54,33 @@ jQuery(document).ready(function($) {
21
  output = '[ajax_load_more';
22
 
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  // ---------------------------
25
  // - SEO
26
  // ---------------------------
27
 
28
  var seo = $('.seo input[name=seo]:checked').val();
29
- if(seo !== 'false' && seo != undefined)
30
- output += ' seo="'+seo+'"';
 
 
 
 
31
 
32
  // ---------------------------
33
  // - Repeater
@@ -66,8 +119,36 @@ jQuery(document).ready(function($) {
66
  if(post_format != '' && post_format != undefined)
67
  output += ' post_format="'+post_format+'"';
68
 
69
-
70
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  // ---------------------------
72
  // - Taxonomy Query
73
  // ---------------------------
@@ -105,22 +186,7 @@ jQuery(document).ready(function($) {
105
  }else{
106
  $('#taxonomy-extended').slideUp(200, 'alm_easeInOutQuad');
107
  }
108
-
109
- // ---------------------------
110
- // - Categories
111
- // ---------------------------
112
-
113
- var cat = $('.categories select').val();
114
- if(cat !== '' && cat !== undefined)
115
- output += ' category="'+cat+'"';
116
-
117
- // ---------------------------
118
- // - Tags
119
- // ---------------------------
120
-
121
- var tag = $('.tags select').val();
122
- if(tag !== '' && tag !== undefined)
123
- output += ' tag="'+tag+'"';
124
 
125
  // ---------------------------
126
  // - Date
@@ -140,11 +206,12 @@ jQuery(document).ready(function($) {
140
  if(dateD !== '' && dateD !== undefined && dateD < 32)
141
  output += ' day="'+dateD+'"';
142
 
 
143
  // ---------------------------
144
  // - Authors
145
  // ---------------------------
146
 
147
- var author = $('.authors select').val();
148
  if(author !== '' && author !== undefined)
149
  output += ' author="'+author+'"';
150
 
@@ -235,7 +302,16 @@ jQuery(document).ready(function($) {
235
 
236
  var posts_per_page = $('.posts_per_page input').val();
237
  if(posts_per_page > 0 && posts_per_page != 5)
238
- output += ' posts_per_page="'+posts_per_page+'"';
 
 
 
 
 
 
 
 
 
239
 
240
 
241
 
@@ -245,24 +321,15 @@ jQuery(document).ready(function($) {
245
 
246
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
247
  if(scroll_load === 'f'){
248
- $('.row.max_pages').slideUp(100, 'alm_easeInOutQuad');
249
  if($('.scroll_load input').hasClass('changed'))
250
  output += ' scroll="false"';
251
  }else{
252
- $('.row.max_pages').slideDown(100, 'alm_easeInOutQuad');
253
  var max_pages = $('.max_pages input').val();
254
- if(max_pages > 0 && max_pages != 5)
255
  output += ' max_pages="'+$('.max_pages input').val()+'"';
256
- }
257
-
258
-
259
- // ---------------------------
260
- // - Pause Loading
261
- // ---------------------------
262
-
263
- var pause_load = $('.pause_load input[name=pause]:checked').val();
264
- if(pause_load === 't')
265
- output += ' pause="true"';
266
 
267
 
268
  // ---------------------------
@@ -272,6 +339,15 @@ jQuery(document).ready(function($) {
272
  var transition = $('.transition input[name=transition]:checked').val();
273
  if(transition !== 'slide')
274
  output += ' transition="'+transition+'"';
 
 
 
 
 
 
 
 
 
275
 
276
 
277
  // ---------------------------
@@ -285,7 +361,12 @@ jQuery(document).ready(function($) {
285
 
286
 
287
  output += ']'; //Close shortcode
288
- output_div.text(output);
 
 
 
 
 
289
  }
290
 
291
 
@@ -319,7 +400,7 @@ jQuery(document).ready(function($) {
319
 
320
 
321
  $("input.numbers-only").keydown(function (e) {
322
- if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
323
  // Allow: Ctrl+A
324
  (e.keyCode == 65 && e.ctrlKey === true) ||
325
  // Allow: home, end, left, right, down, up
@@ -329,7 +410,9 @@ jQuery(document).ready(function($) {
329
  }
330
  // Ensure that it is a number and stop the keypress
331
  if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
332
- e.preventDefault();
 
 
333
  }
334
  });
335
 
@@ -376,7 +459,7 @@ jQuery(document).ready(function($) {
376
  var pos = $(this).val();
377
  if(pos !== 'null'){
378
  $('html,body').animate({
379
- scrollTop: $('#'+pos).offset().top - 50
380
  }, 500, 'alm_easeInOutQuad');
381
  }
382
  });
@@ -388,9 +471,10 @@ jQuery(document).ready(function($) {
388
  almResizeTOC();
389
 
390
  $(window).resize(function() {
391
- almResizeTOC();
392
  });
393
 
 
394
  $(window).scroll(function(){
395
  almSidebarAttach();
396
  });
@@ -405,39 +489,8 @@ jQuery(document).ready(function($) {
405
  $('.table-of-contents').removeClass('attached');
406
  }
407
  almSidebarAttach();
408
-
409
- /*
410
- * Expand/Collapse shortcode headings
411
- *
412
- * @since 2.0.0
413
- */
414
 
415
- $(document).on('click', 'h3.heading', function(){
416
- var el = $(this);
417
- if($(el).hasClass('open')){
418
- $(el).next('.expand-wrap').slideDown(100, 'alm_easeInOutQuad', function(){
419
- $(el).removeClass('open');
420
- });
421
- }else{
422
- $(el).next('.expand-wrap').slideUp(100, 'alm_easeInOutQuad', function(){
423
- $(el).addClass('open');
424
- });
425
- }
426
- });
427
-
428
- $(document).on('click', '.toggle-all', function(){
429
- var el = $(this);
430
- if($(el).hasClass('closed')){
431
- $(el).removeClass('closed');
432
- $('h3.heading').removeClass('open');
433
- $('.expand-wrap').slideDown(100, 'alm_easeInOutQuad');
434
- }else{
435
- $(el).addClass('closed');
436
- $('h3.heading').addClass('open');
437
- $('.expand-wrap').slideUp(100, 'alm_easeInOutQuad');
438
- }
439
- });
440
-
441
 
442
  /*
443
  * get_tax_terms
@@ -513,24 +566,17 @@ jQuery(document).ready(function($) {
513
 
514
 
515
 
516
-
517
  /*
518
- * _alm.copyToClipboard
519
- * Copy shortcode to clipboard
520
  *
521
- * @since 2.0.0
522
- */
523
-
524
- _alm.copyToClipboard = function(text) {
525
- window.prompt ("Copy link to your clipboard: Press Ctrl + C then hit Enter to copy.", text);
526
- }
527
-
528
- $('.output-wrap .copy').click(function(){
529
- var c = $('#shortcode_output').html();
530
- _alm.copyToClipboard(c);
531
- });
532
-
533
 
 
 
 
 
 
534
 
535
 
536
 
1
  jQuery(document).ready(function($) {
2
+ "use strict";
 
 
3
 
4
  var _alm = {},
5
  output_div = $('#shortcode_output'),
6
+ output = '[ajax_load_more]';
7
+
8
+ output_div.text(output); //Init the shortcode output
9
+
10
 
11
+
12
+ /*
13
+ * _alm.select2
14
+ * Init Select2 select replacement
15
+ *
16
+ * @since 2.5.0
17
+ */
18
+ _alm.select2 = function(){
19
+ // Default Select2
20
+ $('.row select, .cnkt-main select, select.jump-menu').not('.multiple').select2({});
21
+
22
+ // multiple
23
+ $('.ajax-load-more .categories select.multiple').select2({
24
+ placeholder : 'Select Categories',
25
+ });
26
+ $('.ajax-load-more .tags select.multiple').select2({
27
+ placeholder : 'Select Tags'
28
+ });
29
+ };
30
+ _alm.select2();
31
+
32
+
33
+
34
+ // Reset all selects
35
+ _alm.reset_select2 = function(){
36
+ // Default Select2
37
+ $('.row select, .cnkt-main select, select.jump-menu').not('.multiple').select2();
38
+
39
+ // multiple
40
+ $('.ajax-load-more .categories select.multiple').select2();
41
+ $('.ajax-load-more .tags select.multiple').select2();
42
+ };
43
+
44
 
45
 
46
  /*
54
  output = '[ajax_load_more';
55
 
56
 
57
+ // ---------------------------
58
+ // - Preload
59
+ // ---------------------------
60
+
61
+ var preload = $('.preload input[name=preload]:checked').val();
62
+ if(preload !== 'false' && preload != undefined){
63
+ $('.preload_amount').slideDown(100, 'alm_easeInOutQuad');
64
+ output += ' preloaded="'+preload+'"';
65
+ var preload_amount = $('.preload input#preload-amount').val();
66
+ if(preload_amount > 0 && preload_amount != 5)
67
+ output += ' preloaded_amount="'+preload_amount+'"';
68
+ }else{
69
+ $('.preload_amount').slideUp(100, 'alm_easeInOutQuad')
70
+ }
71
+
72
+
73
  // ---------------------------
74
  // - SEO
75
  // ---------------------------
76
 
77
  var seo = $('.seo input[name=seo]:checked').val();
78
+ if(seo !== 'false' && seo != undefined){
79
+ if(preload === 'true')
80
+ alert("Sorry, at this time Preloaded and SEO can not be used together. Sorry for any inconvenience this may cause.");
81
+ else
82
+ output += ' seo="'+seo+'"';
83
+ }
84
 
85
  // ---------------------------
86
  // - Repeater
119
  if(post_format != '' && post_format != undefined)
120
  output += ' post_format="'+post_format+'"';
121
 
122
+
123
+ // ---------------------------
124
+ // - Categories
125
+ // ---------------------------
126
+
127
+ // IN
128
+ var cat = $('.categories #category-select').val();
129
+ if(cat !== '' && cat !== undefined && cat !== null)
130
+ output += ' category="'+cat+'"';
131
+
132
+ // NOT_IN
133
+ var cat_not_in = $('.categories #category-exclude-select').val();
134
+ if(cat_not_in !== '' && cat_not_in !== undefined && cat_not_in !== null)
135
+ output += ' category__not_in="'+cat_not_in+'"';
136
+
137
+
138
+ // ---------------------------
139
+ // - Tags
140
+ // ---------------------------
141
+
142
+ var tag = $('.tags #tag-select').val();
143
+ if(tag !== '' && tag !== undefined && tag !== null)
144
+ output += ' tag="'+tag+'"';
145
+
146
+ // NOT_IN
147
+ var tag_not_in = $('.tags #tag-exclude-select').val();
148
+ if(tag_not_in !== '' && tag_not_in !== undefined && tag_not_in !== null)
149
+ output += ' tag__not_in="'+tag_not_in+'"';
150
+
151
+
152
  // ---------------------------
153
  // - Taxonomy Query
154
  // ---------------------------
186
  }else{
187
  $('#taxonomy-extended').slideUp(200, 'alm_easeInOutQuad');
188
  }
189
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
 
191
  // ---------------------------
192
  // - Date
206
  if(dateD !== '' && dateD !== undefined && dateD < 32)
207
  output += ' day="'+dateD+'"';
208
 
209
+
210
  // ---------------------------
211
  // - Authors
212
  // ---------------------------
213
 
214
+ var author = $('.authors #author-select').val();
215
  if(author !== '' && author !== undefined)
216
  output += ' author="'+author+'"';
217
 
302
 
303
  var posts_per_page = $('.posts_per_page input').val();
304
  if(posts_per_page > 0 && posts_per_page != 5)
305
+ output += ' posts_per_page="'+posts_per_page+'"';
306
+
307
+
308
+ // ---------------------------
309
+ // - Pause Loading
310
+ // ---------------------------
311
+
312
+ var pause_load = $('.pause_load input[name=pause]:checked').val();
313
+ if(pause_load === 't')
314
+ output += ' pause="true"';
315
 
316
 
317
 
321
 
322
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
323
  if(scroll_load === 'f'){
324
+ $('.max_pages').slideUp(100, 'alm_easeInOutQuad');
325
  if($('.scroll_load input').hasClass('changed'))
326
  output += ' scroll="false"';
327
  }else{
328
+ $('.max_pages').slideDown(100, 'alm_easeInOutQuad');
329
  var max_pages = $('.max_pages input').val();
330
+ if(max_pages != 5)
331
  output += ' max_pages="'+$('.max_pages input').val()+'"';
332
+ }
 
 
 
 
 
 
 
 
 
333
 
334
 
335
  // ---------------------------
339
  var transition = $('.transition input[name=transition]:checked').val();
340
  if(transition !== 'slide')
341
  output += ' transition="'+transition+'"';
342
+
343
+
344
+ // ---------------------------
345
+ // - disbale after
346
+ // ---------------------------
347
+
348
+ var destroy_after = $('.destroy-after input[name=destroy-after]').val();
349
+ if(destroy_after !== '' && destroy_after !== undefined && destroy_after !== '0')
350
+ output += ' destroy_after="'+destroy_after+'"';
351
 
352
 
353
  // ---------------------------
361
 
362
 
363
  output += ']'; //Close shortcode
364
+ output_div.text(output);
365
+
366
+ if(output != '[ajax_load_more]')
367
+ $('.reset-shortcode-builder').show();
368
+ else
369
+ $('.reset-shortcode-builder').hide();
370
  }
371
 
372
 
400
 
401
 
402
  $("input.numbers-only").keydown(function (e) {
403
+ if ($.inArray(e.keyCode, [188, 46, 8, 9, 27, 13, 110, 190]) !== -1 ||
404
  // Allow: Ctrl+A
405
  (e.keyCode == 65 && e.ctrlKey === true) ||
406
  // Allow: home, end, left, right, down, up
410
  }
411
  // Ensure that it is a number and stop the keypress
412
  if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
413
+ if(e.keyCode !== 188){ // If keycode is not a comma
414
+ e.preventDefault();
415
+ }
416
  }
417
  });
418
 
459
  var pos = $(this).val();
460
  if(pos !== 'null'){
461
  $('html,body').animate({
462
+ scrollTop: $('#'+pos).offset().top - 46
463
  }, 500, 'alm_easeInOutQuad');
464
  }
465
  });
471
  almResizeTOC();
472
 
473
  $(window).resize(function() {
474
+ almResizeTOC()
475
  });
476
 
477
+
478
  $(window).scroll(function(){
479
  almSidebarAttach();
480
  });
489
  $('.table-of-contents').removeClass('attached');
490
  }
491
  almSidebarAttach();
 
 
 
 
 
 
492
 
493
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
 
495
  /*
496
  * get_tax_terms
566
 
567
 
568
 
 
569
  /*
570
+ * Reset shortcode builder
 
571
  *
572
+ * @since 2.5.0
573
+ */
 
 
 
 
 
 
 
 
 
 
574
 
575
+ $(document).on('click', '.reset-shortcode-builder a', function(){
576
+ $('#alm-shortcode-builder-form').trigger("reset");
577
+ _alm.reset_select2();
578
+ _alm.buildShortcode();
579
+ });
580
 
581
 
582
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -1,9 +1,60 @@
1
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  <?php if(has_action('alm_seo_installed')){ ?>
5
  <!-- SEO -->
6
- <div class="row input seo" id="alm-seo">
7
  <h3 class="heading"><?php _e('SEO (Search Engine Optimization)', ALM_NAME); ?></h3>
8
  <div class="expand-wrap">
9
  <div class="section-title">
@@ -23,6 +74,9 @@
23
  </ul>
24
  </div>
25
  </div>
 
 
 
26
  </div>
27
  </div>
28
  <?php } ?>
@@ -34,7 +88,7 @@
34
  echo '<h3 class="heading">'.__('Template', ALM_NAME). '</h3>';
35
  echo '<div class="expand-wrap">';
36
  echo '<div class="section-title">';
37
- echo '<p>'.__('Select a <a href="admin.php?page=ajax-load-more-repeaters" target="_parent">repeater template</a>.', ALM_NAME). '</p>';
38
  echo '</div>';
39
  echo '<div class="wrap"><div class="inner">';
40
  echo '<select name="repeater-select" id="repeater-select" class="alm_element">';
@@ -49,17 +103,9 @@
49
 
50
  echo '</div></div>';
51
 
52
- // Custom Repeaters - /cta/extend.php
53
- // Removed in 2.2.8
54
- if (!has_action('alm_get_custom_repeaters')) {
55
- //include( ALM_PATH . 'admin/includes/cta/extend.php');
56
- }
57
-
58
  // Custom Repeaters v2 - /cta/extend.php
59
- if (!has_action('alm_get_unlimited_repeaters')) {
60
- if (!has_action('alm_get_custom_repeaters')) {
61
- include( ALM_PATH . 'admin/includes/cta/extend.php');
62
- }
63
  }
64
 
65
  echo '</div>';
@@ -104,7 +150,7 @@
104
  echo '</div>';
105
  echo '<div class="wrap"><div class="inner"><select class="alm_element" name="post-format-select" id="post-format-select">';
106
  echo '<option value="" selected="selected">-- ' . __('Select Post Format', ALM_NAME) . ' --</option>';
107
- echo '<option name="chk-standard" id="chk-standard" value="chk-standard">' . __('Standard', ALM_NAME) . '</option>';
108
  foreach( $post_formats[0] as $post_format ){
109
  echo '<option name="chk-'.$post_format.'" id="chk-'.$post_format.'" value="'.$post_format.'">'.ucwords($post_format).'</option>';
110
  }
@@ -115,45 +161,124 @@
115
 
116
  }
117
 
118
- // List Categories
119
- $cats = get_categories();
120
- if($cats){
121
- echo '<div class="row checkboxes categories" id="alm-categories">';
122
- echo '<h3 class="heading">' . __('Category', ALM_NAME) . '</h3>';
123
- echo '<div class="expand-wrap">';
124
- echo '<div class="section-title">';
125
- echo '<p>' . __('Select a Category to query(by slug).', ALM_NAME) . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-catgory">view example</a></p>';
126
- echo '</div>';
127
- echo '<div class="wrap"><div class="inner"><select class="alm_element" name="category-select" id="category-select">';
128
- echo '<option value="" selected="selected">-- ' . __('Select Category', ALM_NAME) . ' --</option>';
129
- foreach( $cats as $cat ){
130
- echo '<option name="chk-'.$cat->slug.'" id="chk-'.$cat->slug.'" value="'.$cat->slug.'">'.$cat->name.'</option>';
131
- }
132
- echo '</select></div></div>';
133
- echo '</div>';
134
- echo '</div>';
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
- // Tags
138
- $tags = get_tags();
139
- if($tags){
140
- echo '<div class="row checkboxes tags" id="alm-tags">';
141
- echo '<h3 class="heading">' . __('Tag', ALM_NAME) . '</h3>';
142
- echo '<div class="expand-wrap">';
143
- echo '<div class="section-title">';
144
- echo '<p>' . __('Select a Tag to query(by slug).', ALM_NAME) . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-tag">view example</a></p>';
145
- echo '</div>';
146
- echo '<div class="wrap"><div class="inner"><select class="alm_element" name="tag-select" id="tag-select">';
147
- echo '<option value="" selected="selected">-- ' . __('Select Tag', ALM_NAME) . ' --</option>';
148
- foreach( $tags as $tag ){
149
- echo '<option name="chk-'.$tag->slug.'" id="chk-'.$tag->slug.'" value="'.$tag->slug.'">'.$tag->name.'</option>';
150
- }
151
- echo '</select></div></div>';
152
- echo '</div>';
153
- echo '</div>';
154
- }
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
 
157
  // Taxonomies
158
  $tax_args = array(
159
  'public' => true,
@@ -238,20 +363,25 @@
238
  </div>
239
  <div class="wrap">
240
  <div class="inner">
241
- <label for="meta-key" class="full"><?php _e('Field Key (Name):', ALM_NAME); ?></label>
 
242
  <input class="alm_element" name="meta-key" type="text" id="meta-key" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
243
  </div>
244
  <div id="meta-query-extended">
245
  <?php // Meta Value ?>
246
  <div class="inner border-top">
247
- <label for="meta-value" class="full"><?php _e('Field Value:', ALM_NAME); ?></label>
248
  <input class="alm_element" name="meta-value" type="text" id="meta-value" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
249
  </div>
250
  <?php // Meta Compare ?>
251
  <div class="inner border-top">
252
- <label for="meta-compare" class="full"><?php _e('Field Operator:', ALM_NAME); ?></label>
253
  <select class="alm_element" id="meta-compare" name="meta-compare">
254
- <option value="=" selected="selected">= &nbsp;&nbsp; (equals)</option>
 
 
 
 
255
  <option value="!=">!= &nbsp; (does NOT equal)</option>
256
  <option value=">">> &nbsp;&nbsp; (greater than)</option>
257
  <option value=">=">>= &nbsp;(greater than or equal to)</option>
@@ -259,10 +389,6 @@
259
  <option value="<=">&lt;= &nbsp;(less than or equal to)</option>
260
  <option value="LIKE">LIKE</option>
261
  <option value="NOT LIKE">NOT LIKE</option>
262
- <option value="IN">IN</option>
263
- <option value="NOT IN">NOT IN</option>
264
- <option value="BETWEEN">BETWEEN</option>
265
- <option value="NOT BETWEEN">NOT BETWEEN</option>
266
  <option value="EXISTS">EXISTS</option>
267
  <option value="NOT EXISTS">NOT EXISTS</option>
268
  </select>
@@ -273,8 +399,12 @@
273
  </div>
274
 
275
 
276
- <?php // List Authors
277
- $authors = get_users();
 
 
 
 
278
  if($authors){
279
  echo '<div class="row checkboxes authors" id="alm-authors">';
280
  echo '<h3 class="heading">' . __('Author', ALM_NAME) . '</h3>';
@@ -282,17 +412,22 @@
282
  echo '<div class="section-title">';
283
  echo '<p>' . __('Select an Author to query(by ID).', ALM_NAME) . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-author">view example</a></p>';
284
  echo '</div>';
285
- echo '<div class="wrap"><div class="inner"><select class="alm_element" name="author-select" id="author-select">';
286
- echo '<option value="" selected="selected">-- ' . __('Select Author', ALM_NAME) . ' --</option>';
287
- foreach( $authors as $author ){
288
- echo '<option name="chk-'.$author->user_login.'" id="chk-'.$author->user_login.'" value="'.$author->ID.'">'.$author->display_name.'</option>';
289
- }
290
- echo '</select></div></div>';
291
- echo '</div>';
292
- echo '</div>';
 
 
 
 
 
 
293
  }
294
- ?>
295
-
296
 
297
  <!-- Search term -->
298
  <div class="row input search-term" id="alm-search">
@@ -307,14 +442,14 @@
307
  </div>
308
  </div>
309
  </div>
310
- </div>
311
 
312
  <!-- Post Status -->
313
  <div class="row input post-status" id="alm-post-status">
314
  <h3 class="heading"><?php _e('Post Status', ALM_NAME); ?></h3>
315
  <div class="expand-wrap">
316
  <div class="section-title">
317
- <p><?php _e('Query by post status.', ALM_NAME); ?></p>
318
  </div>
319
  <div class="wrap">
320
  <div class="inner">
@@ -329,14 +464,14 @@
329
  </div>
330
  </div>
331
  </div>
332
- </div>
333
 
334
  <!-- Ordering -->
335
  <div class="row ordering" id="alm-order">
336
  <h3 class="heading"><?php _e('Ordering', ALM_NAME); ?></h3>
337
  <div class="expand-wrap">
338
  <div class="section-title">
339
- <p><?php _e('Sort retrieved posts by Order and Orderby parameters.', ALM_NAME); ?></p>
340
  </div>
341
  <div class="wrap">
342
  <div class="inner half">
@@ -353,7 +488,7 @@
353
  <option value="title">Title</option>
354
  <option value="name">Name (slug)</option>
355
  <option value="menu_order">Menu Order</option>
356
- <!-- <option value="rand">Random</option> -->
357
  <option value="author">Author</option>
358
  <option value="ID">ID</option>
359
  <option value="comment_count">Comment Count</option>
@@ -392,7 +527,7 @@
392
  </div>
393
  </div>
394
  </div>
395
-
396
  <!-- Display posts -->
397
  <div class="row input posts_per_page" id="alm-post-page">
398
  <h3 class="heading"><?php _e('Posts Per Page', ALM_NAME); ?></h3>
@@ -406,57 +541,14 @@
406
  </div>
407
  </div>
408
  </div>
409
- </div>
410
-
411
-
412
- <!-- Allow Scrolling Load -->
413
- <div class="row checkbox scroll_load" id="alm-scroll">
414
- <h3 class="heading"><?php _e('Load Posts on Scroll', ALM_NAME); ?></h3>
415
- <div class="expand-wrap">
416
- <div class="section-title">
417
- <p><?php _e('Load more posts as the user scrolls the page.', ALM_NAME); ?></p>
418
- </div>
419
- <div class="wrap">
420
- <div class="inner">
421
- <ul>
422
- <li>
423
- <input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked>
424
- <label for="scroll_t"><?php _e('True', ALM_NAME); ?></label>
425
- </li>
426
- <li>
427
- <input class="alm_element" type="radio" name="scroll" value="f" id="scroll_f">
428
- <label for="scroll_f"><?php _e('False', ALM_NAME); ?></label>
429
- </li>
430
- </ul>
431
- </div>
432
- </div>
433
- </div>
434
- </div>
435
-
436
-
437
- <!-- Max Pages -->
438
- <div class="row input max_pages" id="alm-max-pages">
439
- <h3 class="heading"><?php _e('Max Pages', ALM_NAME); ?></h3>
440
- <div class="expand-wrap">
441
- <div class="section-title">
442
- <p><?php _e('Maximum number of pages to load while scrolling.', ALM_NAME); ?></p>
443
- </div>
444
- <div class="wrap">
445
- <div class="inner">
446
-
447
- <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="5">
448
- </div>
449
- </div>
450
- </div>
451
- </div>
452
-
453
-
454
  <!-- Pause Post Loading -->
455
  <div class="row checkbox pause_load" id="alm-pause">
456
- <h3 class="heading"><?php _e('Pause Loading of Posts', ALM_NAME); ?></h3>
457
  <div class="expand-wrap">
458
  <div class="section-title">
459
- <p><?php _e('Do not load posts until user clicks <em>load</em> button.', ALM_NAME); ?></p>
460
  </div>
461
  <div class="wrap">
462
  <div class="inner">
@@ -473,8 +565,46 @@
473
  </div>
474
  </div>
475
  </div>
476
- </div>
477
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
 
479
  <!-- Transition -->
480
  <div class="row input transition" id="alm-transition">
@@ -494,13 +624,31 @@
494
  <input class="alm_element" type="radio" name="transition" value="fade" id="transition-fade">
495
  <label for="transition-fade"><?php _e('Fade', ALM_NAME); ?></label>
496
  </li>
 
 
 
 
497
  </ul>
498
  </div>
499
  </div>
500
  </div>
501
  </div>
502
 
503
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  <!-- Button Text -->
505
  <div class="row input btn-label" id="alm-btn-label">
506
  <h3 class="heading"><?php _e('Button Label', ALM_NAME); ?></h3>
1
  <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></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
+ <?php if(has_action('alm_preload_installed')){ ?>
12
+ <!-- PRELOAD -->
13
+ <div class="row input preload add-on" id="alm-preload">
14
+ <h3 class="heading"><?php _e('Preloaded', ALM_NAME); ?></h3>
15
+ <div class="expand-wrap">
16
+ <div class="section-title">
17
+ <p><?php _e('Preload posts prior to making Ajax requests.', ALM_NAME); ?></p>
18
+ </div>
19
+ <div class="wrap">
20
+ <div class="inner">
21
+ <ul>
22
+ <li>
23
+ <input class="alm_element" type="radio" name="preload" value="true" id="preload-true" >
24
+ <label for="preload-true"><?php _e('True', ALM_NAME); ?></label>
25
+ </li>
26
+ <li>
27
+ <input class="alm_element" type="radio" name="preload" value="false" id="preload-false" checked>
28
+ <label for="preload-false"><?php _e('False', ALM_NAME); ?></label>
29
+ </li>
30
+ </ul>
31
+ </div>
32
+ </div>
33
+ <div class="clear"></div>
34
+ <div class="preload_amount">
35
+ <div class="clear"></div>
36
+ <hr>
37
+ <div class="section-title">
38
+ <h4>Preload Amount</h4>
39
+ <p><?php _e('Enter the number of posts to preload.', ALM_NAME); ?></p>
40
+ </div>
41
+ <div class="wrap">
42
+ <div class="inner">
43
+ <input type="number" class="alm_element numbers-only" name="preload-amount" id="preload-amount" step="1" min="1" value="5">
44
+ </div>
45
+ </div>
46
+ <?php if(has_action('alm_seo_installed')){ ?>
47
+ <!-- <p class="warning-callout">If using <strong>Preload</strong> and <strong>SEO</strong> together, the value of <strong>preload_amount</strong> will be determined by the value set within the <strong>posts_per_page</strong> parameter.</p> -->
48
+ <?php } ?>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <?php } ?>
53
+
54
 
55
  <?php if(has_action('alm_seo_installed')){ ?>
56
  <!-- SEO -->
57
+ <div class="row input seo add-on" id="alm-seo">
58
  <h3 class="heading"><?php _e('SEO (Search Engine Optimization)', ALM_NAME); ?></h3>
59
  <div class="expand-wrap">
60
  <div class="section-title">
74
  </ul>
75
  </div>
76
  </div>
77
+ <?php if(has_action('alm_preload_installed')){ ?>
78
+ <p class="warning-callout"><?php _e('At this time it is not possible to use <strong>preloaded</strong> and <strong>SEO</strong> together - We are still working out the kinks but you can expect a fix to be released shortly.', ALM_NAME); ?></p>
79
+ <?php } ?>
80
  </div>
81
  </div>
82
  <?php } ?>
88
  echo '<h3 class="heading">'.__('Template', ALM_NAME). '</h3>';
89
  echo '<div class="expand-wrap">';
90
  echo '<div class="section-title">';
91
+ echo '<p>'.__('Select which <a href="admin.php?page=ajax-load-more-repeaters" target="_parent">repeater template</a> you would like to use.', ALM_NAME). '</p>';
92
  echo '</div>';
93
  echo '<div class="wrap"><div class="inner">';
94
  echo '<select name="repeater-select" id="repeater-select" class="alm_element">';
103
 
104
  echo '</div></div>';
105
 
 
 
 
 
 
 
106
  // Custom Repeaters v2 - /cta/extend.php
107
+ if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters')) {
108
+ include( ALM_PATH . 'admin/includes/cta/extend.php');
 
 
109
  }
110
 
111
  echo '</div>';
150
  echo '</div>';
151
  echo '<div class="wrap"><div class="inner"><select class="alm_element" name="post-format-select" id="post-format-select">';
152
  echo '<option value="" selected="selected">-- ' . __('Select Post Format', ALM_NAME) . ' --</option>';
153
+ echo '<option name="chk-standard" id="chk-standard" value="standard">' . __('Standard', ALM_NAME) . '</option>';
154
  foreach( $post_formats[0] as $post_format ){
155
  echo '<option name="chk-'.$post_format.'" id="chk-'.$post_format.'" value="'.$post_format.'">'.ucwords($post_format).'</option>';
156
  }
161
 
162
  }
163
 
164
+ // List Categories
165
+
166
+ if($disable_dynamic_content){
167
+ $cats = 'null';
168
+ }else{
169
+ $cats = get_categories();
170
+ }
171
+ if($cats){ ?>
172
+ <div class="row checkboxes categories" id="alm-categories">
173
+ <h3 class="heading"><?php _e('Category', ALM_NAME); ?></h3>
174
+ <div class="expand-wrap">
175
+ <div class="section-title">
176
+ <h4>Include</h4>
177
+ <p><?php _e('A comma separated list of categories to include by slug. (design, research etc...)', ALM_NAME); ?><br/>
178
+ &raquo; <a href="admin.php?page=ajax-load-more-examples#example-category">
179
+ <?php _e('view example', ALM_NAME); ?></a></p>
180
+ </div>
181
+ <div class="wrap">
182
+ <div class="inner">
183
+ <?php
184
+ if(!$disable_dynamic_content){
185
+ echo '<select class="alm_element multiple" name="category-select" id="category-select" multiple="multiple">';
186
+ foreach( $cats as $cat ){
187
+ echo '<option name="chk-'.$cat->slug.'" id="chk-'.$cat->slug.'" value="'.$cat->slug.'">'.$cat->name.'</option>';
188
+ }
189
+ echo '</select>';
190
+ }else{
191
+ echo '<input type="text" class="alm_element" name="category-select" id="category-select" placeholder="design, development, science etc...">';
192
+ }
193
+ ?>
194
+ </div>
195
+ </div>
196
+
197
+ <div class="clear"></div>
198
+ <hr/>
199
+
200
+ <div class="section-title">
201
+ <h4><?php _e('Exclude', ALM_NAME); ?></h4>
202
+ <p><?php _e('A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)', ALM_NAME); ?></p>
203
+ </div>
204
+ <div class="wrap">
205
+ <div class="inner">
206
+ <?php
207
+ if(!$disable_dynamic_content){
208
+ echo '<select class="alm_element multiple" name="category-exclude-select" id="category-exclude-select" multiple="multiple">';
209
+ foreach( $cats as $cat ){
210
+ echo '<option name="chk-'.$cat->term_id.'" id="chk-'.$cat->term_id.'" value="'.$cat->term_id.'">'.$cat->name.'</option>';
211
+ }
212
+ echo '</select>';
213
+ }else{
214
+ echo '<input type="text" class="alm_element numbers-only" name="category-exclude-select" id="category-exclude-select" placeholder="10, 12, 19 etc...">';
215
+ }
216
+ ?>
217
+ </div>
218
+ <div class="clear"></div>
219
+ </div>
220
+ </div>
221
+ </div>
222
 
223
+ <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
 
225
+ // Tags
226
+ if($disable_dynamic_content){
227
+ $tags = 'null';
228
+ }else{
229
+ $tags = get_tags();
230
+ }
231
+ if($tags){ ?>
232
+ <div class="row checkboxes tags" id="alm-tags">
233
+ <h3 class="heading"><?php _e('Tag', ALM_NAME); ?></h3>
234
+ <div class="expand-wrap">
235
+ <div class="section-title">
236
+ <h4><?php _e('Include', ALM_NAME); ?></h4>
237
+ <p><?php _e('A comma separated list of tags to include by slug. (toronto, canada etc...)', ALM_NAME); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-tag">view example</a></p>
238
+ </div>
239
+ <div class="wrap">
240
+ <div class="inner">
241
+ <?php
242
+ if(!$disable_dynamic_content){
243
+ echo '<select class="alm_element multiple" name="tag-select" id="tag-select" multiple="multiple">';
244
+ foreach( $tags as $tag ){
245
+ echo '<option name="chk-'.$tag->slug.'" id="chk-'.$tag->slug.'" value="'.$tag->slug.'">'.$tag->name.'</option>';
246
+ }
247
+ echo '</select>';
248
+ }else{
249
+ echo '<input type="text" class="alm_element" name="tag-select" id="tag-select" placeholder="hockey, puck, crosby etc...">';
250
+ }
251
+ ?>
252
+ </div>
253
+ </div>
254
+ <div class="clear"></div>
255
+ <hr/>
256
+
257
+ <div class="section-title">
258
+ <h4><?php _e('Exclude', ALM_NAME); ?></h4>
259
+ <p><?php _e('A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)', ALM_NAME); ?></p>
260
+ </div>
261
+ <div class="wrap">
262
+ <div class="inner">
263
+ <?php
264
+ if(!$disable_dynamic_content){
265
+ echo '<select class="alm_element multiple" name="tag-exclude-select" id="tag-exclude-select" multiple="multiple">';
266
+ foreach( $tags as $tag ){
267
+ echo '<option name="chk-'.$tag->term_id.'" id="chk-'.$tag->term_id.'" value="'.$tag->term_id.'">'.$tag->name.'</option>';
268
+ }
269
+ echo '</select>';
270
+ }else{
271
+ echo '<input type="text" class="alm_element numbers-only" name="tag-exclude-select" id="tag-exclude-select" placeholder="10, 12, 19 etc...">';
272
+ }
273
+ ?>
274
+ </div>
275
+ <div class="clear"></div>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ <?php } ?>
280
 
281
+ <?php
282
  // Taxonomies
283
  $tax_args = array(
284
  'public' => true,
363
  </div>
364
  <div class="wrap">
365
  <div class="inner">
366
+ <?php // Meta Key ?>
367
+ <label for="meta-key" class="full"><?php _e('Key (Name):', ALM_NAME); ?></label>
368
  <input class="alm_element" name="meta-key" type="text" id="meta-key" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
369
  </div>
370
  <div id="meta-query-extended">
371
  <?php // Meta Value ?>
372
  <div class="inner border-top">
373
+ <label for="meta-value" class="full"><?php _e('Value:', ALM_NAME); ?></label>
374
  <input class="alm_element" name="meta-value" type="text" id="meta-value" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
375
  </div>
376
  <?php // Meta Compare ?>
377
  <div class="inner border-top">
378
+ <label for="meta-compare" class="full"><?php _e('Operator:', ALM_NAME); ?></label>
379
  <select class="alm_element" id="meta-compare" name="meta-compare">
380
+ <option value="IN" selected="selected">IN</option>
381
+ <option value="NOT IN">NOT IN</option>
382
+ <option value="BETWEEN">BETWEEN</option>
383
+ <option value="NOT BETWEEN">NOT BETWEEN</option>
384
+ <option value="=">= &nbsp;&nbsp; (equals)</option>
385
  <option value="!=">!= &nbsp; (does NOT equal)</option>
386
  <option value=">">> &nbsp;&nbsp; (greater than)</option>
387
  <option value=">=">>= &nbsp;(greater than or equal to)</option>
389
  <option value="<=">&lt;= &nbsp;(less than or equal to)</option>
390
  <option value="LIKE">LIKE</option>
391
  <option value="NOT LIKE">NOT LIKE</option>
 
 
 
 
392
  <option value="EXISTS">EXISTS</option>
393
  <option value="NOT EXISTS">NOT EXISTS</option>
394
  </select>
399
  </div>
400
 
401
 
402
+ <?php // List Authors
403
+ if($disable_dynamic_content){
404
+ $authors = 'null';
405
+ }else{
406
+ $authors = get_users();
407
+ }
408
  if($authors){
409
  echo '<div class="row checkboxes authors" id="alm-authors">';
410
  echo '<h3 class="heading">' . __('Author', ALM_NAME) . '</h3>';
412
  echo '<div class="section-title">';
413
  echo '<p>' . __('Select an Author to query(by ID).', ALM_NAME) . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-author">view example</a></p>';
414
  echo '</div>';
415
+ echo '<div class="wrap"><div class="inner">';
416
+ if(!$disable_dynamic_content){
417
+ echo '<select class="alm_element" name="author-select" id="author-select">';
418
+ echo '<option value="" selected="selected">-- ' . __('Select Author', ALM_NAME) . ' --</option>';
419
+ foreach( $authors as $author ){
420
+ echo '<option name="chk-'.$author->user_login.'" id="chk-'.$author->user_login.'" value="'.$author->ID.'">'.$author->display_name.'</option>';
421
+ }
422
+ echo '</select>';
423
+ }else{
424
+ echo '<input type="text" class="alm_element numbers-only" name="author-select" id="author-select" placeholder="1">';
425
+ }
426
+ echo '</div></div>';
427
+ echo '</div>';
428
+ echo '</div>';
429
  }
430
+ ?>
 
431
 
432
  <!-- Search term -->
433
  <div class="row input search-term" id="alm-search">
442
  </div>
443
  </div>
444
  </div>
445
+ </div>
446
 
447
  <!-- Post Status -->
448
  <div class="row input post-status" id="alm-post-status">
449
  <h3 class="heading"><?php _e('Post Status', ALM_NAME); ?></h3>
450
  <div class="expand-wrap">
451
  <div class="section-title">
452
+ <p><?php _e('Select status of the post.', ALM_NAME); ?></p>
453
  </div>
454
  <div class="wrap">
455
  <div class="inner">
464
  </div>
465
  </div>
466
  </div>
467
+ </div>
468
 
469
  <!-- Ordering -->
470
  <div class="row ordering" id="alm-order">
471
  <h3 class="heading"><?php _e('Ordering', ALM_NAME); ?></h3>
472
  <div class="expand-wrap">
473
  <div class="section-title">
474
+ <p><?php _e('Sort posts by Order and Orderby parameters.', ALM_NAME); ?></p>
475
  </div>
476
  <div class="wrap">
477
  <div class="inner half">
488
  <option value="title">Title</option>
489
  <option value="name">Name (slug)</option>
490
  <option value="menu_order">Menu Order</option>
491
+ <option value="rand">Random</option>
492
  <option value="author">Author</option>
493
  <option value="ID">ID</option>
494
  <option value="comment_count">Comment Count</option>
527
  </div>
528
  </div>
529
  </div>
530
+
531
  <!-- Display posts -->
532
  <div class="row input posts_per_page" id="alm-post-page">
533
  <h3 class="heading"><?php _e('Posts Per Page', ALM_NAME); ?></h3>
541
  </div>
542
  </div>
543
  </div>
544
+ </div>
545
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
  <!-- Pause Post Loading -->
547
  <div class="row checkbox pause_load" id="alm-pause">
548
+ <h3 class="heading"><?php _e('Pause', ALM_NAME); ?></h3>
549
  <div class="expand-wrap">
550
  <div class="section-title">
551
+ <p><?php _e('Do <u>NOT</u> load any posts until user the clicks <em>Load More</em> button.', ALM_NAME); ?></p>
552
  </div>
553
  <div class="wrap">
554
  <div class="inner">
565
  </div>
566
  </div>
567
  </div>
568
+ </div>
569
+
570
+ <!-- Allow Scrolling Load -->
571
+ <div class="row checkbox scroll_load" id="alm-scroll">
572
+ <h3 class="heading"><?php _e('Scrolling', ALM_NAME); ?></h3>
573
+ <div class="expand-wrap">
574
+ <div class="section-title">
575
+ <h4>Enable Scrolling</h4>
576
+ <p><?php _e('Load more posts as the user scrolls the page.', ALM_NAME); ?></p>
577
+ </div>
578
+ <div class="wrap">
579
+ <div class="inner">
580
+ <ul>
581
+ <li>
582
+ <input class="alm_element" type="radio" name="scroll" value="t" id="scroll_t" checked>
583
+ <label for="scroll_t"><?php _e('True', ALM_NAME); ?></label>
584
+ </li>
585
+ <li>
586
+ <input class="alm_element" type="radio" name="scroll" value="f" id="scroll_f">
587
+ <label for="scroll_f"><?php _e('False', ALM_NAME); ?></label>
588
+ </li>
589
+ </ul>
590
+ </div>
591
+ </div>
592
+ <div class="clear"></div>
593
+ <div class="max_pages">
594
+ <div class="clear"></div>
595
+ <hr>
596
+ <div class="section-title">
597
+ <h4>Maximum Pages</h4>
598
+ <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', ALM_NAME); ?></p>
599
+ </div>
600
+ <div class="wrap">
601
+ <div class="inner">
602
+ <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="5">
603
+ </div>
604
+ </div>
605
+ </div>
606
+ </div>
607
+ </div>
608
 
609
  <!-- Transition -->
610
  <div class="row input transition" id="alm-transition">
624
  <input class="alm_element" type="radio" name="transition" value="fade" id="transition-fade">
625
  <label for="transition-fade"><?php _e('Fade', ALM_NAME); ?></label>
626
  </li>
627
+ <li>
628
+ <input class="alm_element" type="radio" name="transition" value="none" id="transition-none">
629
+ <label for="transition-none"><?php _e('None', ALM_NAME); ?></label>
630
+ </li>
631
  </ul>
632
  </div>
633
  </div>
634
  </div>
635
  </div>
636
 
637
+ <!-- Destroy After -->
638
+ <div class="row input destroy-after" id="alm-destroy-after">
639
+ <h3 class="heading"><?php _e('Destroy After', ALM_NAME); ?></h3>
640
+ <div class="expand-wrap">
641
+ <div class="section-title">
642
+ <p><?php _e('Remove ajax load more functionality after \'<em>n</em>\' number of pages have been loaded.', ALM_NAME); ?></p>
643
+ </div>
644
+ <div class="wrap">
645
+ <div class="inner">
646
+ <input type="number" class="alm_element numbers-only" name="destroy-after" id="disable-after" step="1" min="0" value="">
647
+ </div>
648
+ </div>
649
+ </div>
650
+ </div>
651
+
652
  <!-- Button Text -->
653
  <div class="row input btn-label" id="alm-btn-label">
654
  <h3 class="heading"><?php _e('Button Label', ALM_NAME); ?></h3>
admin/views/add-ons.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more" id="alm-add-ons">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php _e('Ajax Load More: Add-ons', ALM_NAME); ?></h2>
5
+ <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More.', ALM_NAME); ?></p>
6
+ </div>
7
+ <div class="cnkt-main">
8
+
9
+ <!-- Custom Repeaters -->
10
+ <div class="group">
11
+ <div class="row no-brd">
12
+ <div class="expand-wrap">
13
+ <div class="section-title">
14
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg">
15
+ </div>
16
+ <div class="wrap">
17
+ <h2 class="addon-title"><?php _e('Custom Repeaters', ALM_NAME); ?></h2>
18
+ <p class="addon-intro"><?php _e('Extend Ajax Load More with unlimited repeater templates.', ALM_NAME); ?></p>
19
+ <p><?php _e('Create, delete and modify <a href="?page=ajax-load-more-repeaters">repeater templates</a> as you need them with absolutely zero restrictions.', ALM_NAME); ?></p>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <?php
24
+ $cr_url = 'http://connekthq.com/plugins/ajax-load-more/custom-repeaters/';
25
+ if (has_action('alm_unlimited_installed')){
26
+ echo '<a class="btn installed" href="'. $cr_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
27
+ }else{
28
+ echo '<a class="btn" href="'. $cr_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
29
+ }
30
+ ?>
31
+ </div>
32
+ <!-- End Custom Repeaters -->
33
+
34
+ <!-- Preloaded -->
35
+ <div class="group">
36
+ <div class="row no-brd">
37
+ <div class="expand-wrap">
38
+ <div class="section-title">
39
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/preloaded-add-ons.jpg">
40
+ </div>
41
+ <div class="wrap">
42
+ <h2 class="addon-title"><?php _e('Preloaded', ALM_NAME); ?></h2>
43
+ <p class="addon-intro"><?php _e('Easily preload an initial set of posts before completing any Ajax requests to the server.', ALM_NAME); ?></p>
44
+ <p><?php _e('The Preloaded add-on will display content to your site visitors faster and allow you cache the initial result set which can greatly reduce stress on your server.', ALM_NAME); ?></p>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <?php
49
+ $cr_url = 'http://connekthq.com/plugins/ajax-load-more/preloaded/';
50
+ if (has_action('alm_preload_installed')){
51
+ echo '<a class="btn installed" href="'. $cr_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
52
+ }else{
53
+ echo '<a class="btn" href="'. $cr_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
54
+ }
55
+ ?>
56
+ </div>
57
+ <!-- End Preloaded -->
58
+
59
+ <!-- SEO -->
60
+ <div class="group">
61
+ <div class="row no-brd">
62
+ <div class="expand-wrap">
63
+ <div class="section-title">
64
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg">
65
+ </div>
66
+ <div class="wrap">
67
+ <h2 class="addon-title"><?php _e('Search Engine Optimization', ALM_NAME); ?></h2>
68
+ <p class="addon-intro"><?php _e('Generate unique paging URLs with every Ajax Load More query.', ALM_NAME); ?></p>
69
+ <p><?php _e('The SEO add-on will optimize your ajax loaded content for search engines and site visitors by generating unique paging URLs with every query.</p>', ALM_NAME); ?></p>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <?php
74
+ $seo_url = 'http://connekthq.com/plugins/ajax-load-more/seo/';
75
+ if (has_action('alm_seo_installed')){
76
+ echo '<a class="btn installed" href="'. $seo_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
77
+ }else{
78
+ echo '<a class="btn" href="'. $seo_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
79
+ }
80
+ ?>
81
+ </div>
82
+ <!-- End SEO -->
83
+
84
+ </div>
85
+
86
+ <div class="cnkt-sidebar">
87
+ <div class="cta">
88
+ <h3><?php _e('Add-on Updates', ALM_NAME); ?></h3>
89
+ <p><?php _e('All add-ons are installed as stand alone plugins and will receive plugin update notifications directly within the <a href="plugins.php">WordPress Plugin dashboard</a>.', ALM_NAME); ?></p>
90
+ </div>
91
+ <?php include_once( ALM_PATH . 'admin/includes/cta/writeable.php'); ?>
92
+ </div>
93
+
94
+ </div>
95
+ </div>
admin/views/examples.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more" id="alm-examples">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php _e('Ajax Load More: Examples', ALM_NAME); ?></h2>
5
+ <p><?php _e('A collection of everyday shortcode usages and implementation examples', ALM_NAME); ?></p>
6
+ </div>
7
+ <div class="cnkt-main forceColors">
8
+ <div class="group">
9
+ <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
10
+
11
+ <div class="row gist" id="example-archive">
12
+ <h3 class="heading"><?php _e('Archive.php', ALM_NAME); ?></h3>
13
+ <div class="expand-wrap">
14
+ <p><?php _e('Shortcode for use on generic archive page.', ALM_NAME); ?></p>
15
+ <div class="inner">
16
+ <script src="https://gist.github.com/dcooney/ebe912c7772e669f1370.js"></script>
17
+ </div>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="row gist" id="example-author">
22
+ <h3 class="heading"><?php _e('Author.php', ALM_NAME); ?></h3>
23
+ <div class="expand-wrap">
24
+ <p><?php _e('Shortcode for use on author archive pages.', ALM_NAME); ?></p>
25
+ <div class="inner">
26
+ <script src="https://gist.github.com/dcooney/4d07ff95f7274f38fd3a.js"></script>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ <div class="row gist" id="example-category">
31
+ <h3 class="heading"><?php _e('Category.php', ALM_NAME); ?></h3>
32
+ <div class="expand-wrap">
33
+ <p><?php _e('Shortcode for use on category archive pages.', ALM_NAME); ?></p>
34
+ <div class="inner">
35
+ <script src="https://gist.github.com/dcooney/ae4caec3f9061dd47627.js"></script>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div class="row gist" id="example-date">
40
+ <h3 class="heading"><?php _e('Date Archives', ALM_NAME); ?></h3>
41
+ <div class="expand-wrap">
42
+ <p><?php _e('Shortcode for use for archiving by date.', ALM_NAME); ?></p>
43
+ <div class="inner">
44
+ <script src="https://gist.github.com/dcooney/6f74bebdd40cad9e3ee7.js"></script>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div class="row gist" id="example-exclude">
49
+ <h3 class="heading"><?php _e('Excluding Posts', ALM_NAME); ?></h3>
50
+ <div class="expand-wrap">
51
+ <p><?php _e('Shortcode for excluding an array of posts.', ALM_NAME); ?></p>
52
+ <script src="https://gist.github.com/dcooney/9b037efbd166b4dba5ae.js"></script>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="row gist" id="example-tag">
57
+ <h3 class="heading"><?php _e('Tag.php', ALM_NAME); ?></h3>
58
+ <div class="expand-wrap">
59
+ <p><?php _e('Shortcode for use on tag archive pages.', ALM_NAME); ?></p>
60
+ <div class="inner">
61
+ <script src="https://gist.github.com/dcooney/fc4276bebbdd05af64d1.js"></script>
62
+ </div>
63
+ </div>
64
+ </div>
65
+
66
+ <div class="row no-brd">
67
+ <p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
68
+ </div>
69
+ </div>
70
+
71
+ </div>
72
+ <div class="cnkt-sidebar">
73
+
74
+ <div class="cta">
75
+ <h3><?php _e('Did you know?', ALM_NAME); ?></h3>
76
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
77
+ <?php _e('<p class="addon-intro">You can generate shortcodes while editing pages!</p><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 in an overlay window.', ALM_NAME); ?></p>
78
+ </div>
79
+
80
+ <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
81
+
82
+ </div>
83
+
84
+
85
+ </div>
86
+ </div>
admin/views/repeater-templates.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more" id="alm-repeaters">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php _e('Ajax Load More: Repeater Templates', ALM_NAME); ?></h2>
5
+ <p><?php _e('The library of available templates to use within your theme', ALM_NAME); ?></p>
6
+ </div>
7
+ <div class="cnkt-main form-table repeaters">
8
+
9
+ <!-- Repeaters -->
10
+ <div class="group">
11
+ <?php
12
+ if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
13
+ <span class="toggle-all"><span class="inner-wrap"><em class="collapse"><?php _e('Collapse All', ALM_NAME); ?></em><em class="expand"><?php _e('Expand All', ALM_NAME); ?></em></span></span>
14
+ <?php } ?>
15
+
16
+ <!-- Default -->
17
+ <div class="row template default-repeater">
18
+ <?php
19
+ $filename = ALM_PATH. 'core/repeater/default.php';
20
+ $handle = fopen ($filename, "r");
21
+ $contents = '';
22
+ if(filesize ($filename) != 0){
23
+ $contents = fread ($handle, filesize ($filename));
24
+ }
25
+ fclose ($handle);
26
+ ?>
27
+ <h3 class="heading"><?php _e('Default Template', ALM_NAME); ?></h3>
28
+ <div class="expand-wrap">
29
+ <div class="wrap repeater-wrap" data-name="default" data-type="default">
30
+ <label class="template-title" for="template-default"><?php _e('Enter the HTML and PHP code for the default template', ALM_NAME); ?></label>
31
+ <textarea rows="10" id="template-default" class="_alm_repeater"><?php echo $contents; ?></textarea>
32
+ <script>
33
+ var editorDefault = CodeMirror.fromTextArea(document.getElementById("template-default"), {
34
+ mode: "application/x-httpd-php",
35
+ lineNumbers: true,
36
+ lineWrapping: true,
37
+ indentUnit: 0,
38
+ matchBrackets: true,
39
+ //theme: 'pastel-on-dark',
40
+ viewportMargin: Infinity,
41
+ extraKeys: {"Ctrl-Space": "autocomplete"},
42
+ });
43
+ </script>
44
+ <input type="submit" value="<?php _e('Save Template', ALM_NAME); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
45
+ <div class="saved-response">&nbsp;</div>
46
+ <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <!-- End Default -->
51
+ <?php
52
+ // Custom Repeaters v2 - /cta/extend.php
53
+ if (!has_action('alm_get_unlimited_repeaters') && !has_action('alm_get_custom_repeaters')){ // If Custom Repeaters is NOT installed
54
+ echo '<div class="row no-brd">';
55
+ include( ALM_PATH . 'admin/includes/cta/extend.php');
56
+ echo '</div>';
57
+ }
58
+ ?>
59
+ <!-- End Default -->
60
+ <?php
61
+ if (has_action('alm_custom_repeaters')) // List custom repeaters v1
62
+ do_action('alm_custom_repeaters');
63
+ ?>
64
+ <?php
65
+ if (has_action('alm_unlimited_repeaters')) // List custom repeaters v2
66
+ do_action('alm_unlimited_repeaters');
67
+ ?>
68
+
69
+ <script>
70
+ jQuery(document).ready(function($) {
71
+ "use strict";
72
+ var _alm_admin = {};
73
+
74
+ /*
75
+ * _alm_admin.saveRepeater
76
+ * Save Custom Repeater Value
77
+ *
78
+ * @since 2.0.0
79
+ */
80
+
81
+ _alm_admin.saveRepeater = function(btn, editorId) {
82
+ var container = btn.parent('.repeater-wrap'),
83
+ el = $('textarea._alm_repeater', container),
84
+ btn = btn,
85
+ value = '',
86
+ repeater = container.data('name'), // Get templete name
87
+ type = container.data('type'), // Get template type (default/repeater/unlimited)
88
+ alias = ($('input._alm_repeater_alias', container).length) ? $('input._alm_repeater_alias', container).val() : '',
89
+ responseText = $(".saved-response", container);
90
+
91
+ if(type === undefined) // Fix for custom repeaters v1
92
+ type = 'undefined';
93
+
94
+ //Get value from CodeMirror textarea
95
+ var id = editorId.replace('template-', ''); // Editor ID
96
+
97
+ if(id === 'default'){ // Default Template
98
+ value = editorDefault.getValue();
99
+ }else{ // Repeater Templates
100
+ var eid = window['editor_'+id]; // Set editor ID
101
+ value = eid.getValue();
102
+ }
103
+
104
+ // if value is null, then set repeater to non breaking space
105
+ if(value === '' || value === 'undefined'){
106
+ value = '&nbsp;';
107
+ }
108
+
109
+ //If template is not already saving, then proceed
110
+ if (!btn.hasClass('saving')) {
111
+ btn.addClass('saving');
112
+ responseText.addClass('loading').html('<?php _e('Saving template...', ALM_NAME) ?>');
113
+ responseText.animate({'opacity' : 1});
114
+
115
+ $.ajax({
116
+ type: 'POST',
117
+ url: alm_admin_localize.ajax_admin_url,
118
+ data: {
119
+ action: 'alm_save_repeater',
120
+ value: value,
121
+ repeater: repeater,
122
+ type: type,
123
+ alias: alias,
124
+ nonce: alm_admin_localize.alm_admin_nonce,
125
+ },
126
+ success: function(response) {
127
+
128
+ $('textarea#'+editorId).val(value); // Set the target textarea val to 'value'
129
+
130
+ setTimeout(function() {
131
+ responseText.delay(500).html(response).removeClass('loading');
132
+ }, 250);
133
+
134
+ setTimeout(function() {
135
+ responseText.animate({'opacity': 0}, function(){
136
+ responseText.html('&nbsp;');
137
+ btn.removeClass('saving');
138
+ });
139
+
140
+ }, 6000);
141
+
142
+ },
143
+ error: function(xhr, status, error) {
144
+ responseText.html('<?php _e('Something went wrong and the data could not be saved.', ALM_NAME) ?>').removeClass('loading');
145
+ btn.removeClass('saving');
146
+ }
147
+ });
148
+
149
+ }
150
+ }
151
+
152
+ $(document).on('click', 'input.save-repeater', function(){
153
+ var btn = $(this),
154
+ editorId = btn.data('editor-id');
155
+ _alm_admin.saveRepeater(btn, editorId);
156
+ });
157
+
158
+
159
+
160
+ /*
161
+ * _alm_admin.updateRepeater
162
+ * Update Repeater Value
163
+ *
164
+ * @since 2.5
165
+ */
166
+
167
+ _alm_admin.updateRepeater = function(btn, editorId) {
168
+ var container = btn.closest('.repeater-wrap'),
169
+ el = $('textarea._alm_repeater', container),
170
+ btn = btn,
171
+ btn_text = btn.html(),
172
+ editor = $('.CodeMirror', container),
173
+ repeater = container.data('name'), // Get templete name
174
+ type = container.data('type'); // Get template type (default/repeater/unlimited)
175
+
176
+ //console.log(repeater, type);
177
+
178
+ //Get value from CodeMirror textarea
179
+ var editorId = repeater,
180
+ id = editorId.replace('template-', ''); // Editor ID
181
+
182
+ //If template is not already saving, then proceed
183
+ if (!btn.hasClass('updating')) {
184
+ btn.addClass('updating').text("<?php _e('Updating template...', ALM_NAME); ?>");
185
+
186
+ $.ajax({
187
+ type: 'POST',
188
+ url: alm_admin_localize.ajax_admin_url,
189
+ data: {
190
+ action: 'alm_update_repeater',
191
+ repeater: repeater,
192
+ type: type,
193
+ nonce: alm_admin_localize.alm_admin_nonce,
194
+ },
195
+ success: function(response) {
196
+ if(id === 'default'){ // Default Template
197
+ editorDefault.setValue(response);
198
+ }else{ // Repeater Templates
199
+ var eid = window['editor_'+id]; // Set editor ID
200
+ eid.setValue(response);
201
+ }
202
+
203
+ // Clear button styles
204
+ setTimeout(function() {
205
+ btn.text("<?php _e('Template Updated', ALM_NAME); ?>").blur();
206
+ setTimeout(function() {
207
+ btn.removeClass('updating').html(btn_text).blur();
208
+ }, 750);
209
+ }, 350);
210
+
211
+ },
212
+ error: function(xhr, status, error) {
213
+ btn.removeClass('updating').html(btn_text).blur();
214
+ }
215
+ });
216
+
217
+ }
218
+ }
219
+
220
+
221
+ $('.option-update a').click(function(){
222
+ var btn = $(this);
223
+ _alm_admin.updateRepeater(btn);
224
+ });
225
+
226
+ });
227
+ </script>
228
+ </div>
229
+ <!-- End Repeaters -->
230
+ </div>
231
+ <div class="cnkt-sidebar">
232
+ <?php include_once( ALM_PATH . 'admin/includes/cta/writeable.php'); ?>
233
+ <div class="cta">
234
+ <h3><?php _e('Templating Help', ALM_NAME); ?></h3>
235
+ <div class="item">
236
+ <p><strong><?php _e('What is a repeater template?', ALM_NAME); ?></strong></p>
237
+ <p><?php _e('A repeater template 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>.</p>', ALM_NAME); ?></p>
238
+ </div>
239
+ <div class="item">
240
+ <p><strong><?php _e('Can I include PHP in the repeater template?', ALM_NAME); ?></strong></p>
241
+ <p><?php _e('Yes, PHP and core WordPress functions such as, <code>the_title()</code> and <code>the_permalink()</code> are required.</p>', ALM_NAME); ?></p>
242
+ </div>
243
+ <div class="item">
244
+ <p><strong><?php _e('Tips and Tricks', ALM_NAME); ?></strong></p>
245
+ <ul>
246
+ <li><?php _e('Always open and close your templates with an HTML element. In some rare cases data may not be displayed if not wrapped in HTML.<br/>e.g. <code>&lt;li> &lt;/li></code> or <code>&lt;div> &lt;/div></code>', ALM_NAME); ?><br/> </li>
247
+ </ul>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
admin/views/settings.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more settings" id="alm-settings">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span></h2>
5
+ <p><?php _e('A WordPress plugin for lazy loading posts with Ajax', ALM_NAME); ?></p>
6
+ </div>
7
+ <?php if( isset($_GET['settings-updated']) ) { ?>
8
+ <div id="message" class="updated inline">
9
+ <p><strong><?php _e('Ajax Load More settings have been saved.') ?></strong></p>
10
+ </div>
11
+ <?php } ?>
12
+ <div class="cnkt-main">
13
+ <div class="group">
14
+ <form action="options.php" method="post" id="alm_OptionsForm">
15
+ <?php
16
+ settings_fields( 'alm-setting-group' );
17
+ do_settings_sections( 'ajax-load-more' );
18
+ //get the older values, wont work the first time
19
+ $options = get_option( '_alm_settings' ); ?>
20
+ <div class="row no-brd alm-save-settings">
21
+ <?php submit_button('Save Settings'); ?>
22
+ <div class="loading"></div>
23
+ </div>
24
+ </form>
25
+ <script type="text/javascript">
26
+ jQuery(document).ready(function() {
27
+ jQuery('#alm_OptionsForm').submit(function() {
28
+ jQuery('.alm-save-settings .loading').fadeIn();
29
+ jQuery(this).ajaxSubmit({
30
+ success: function(){
31
+ jQuery('.alm-save-settings .loading').fadeOut(250, function(){
32
+ window.location.reload();
33
+ });
34
+ },
35
+ error: function(){
36
+ alert("<?php _e('Sorry, settings could not be saved.', ALM_NAME); ?>");
37
+ }
38
+ });
39
+ return false;
40
+ });
41
+ });
42
+ </script>
43
+ </div>
44
+ </div>
45
+ <div class="cnkt-sidebar">
46
+ <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
47
+ <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
48
+ </div>
49
+ </div>
50
+ </div>
admin/views/shortcode-builder.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more shortcode-builder" id="alm-builder">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php _e('Ajax Load More: Shortcode Builder', ALM_NAME); ?></h2>
5
+ <p><?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', ALM_NAME); ?></p>
6
+ </div>
7
+ <div class="cnkt-main">
8
+ <div class="group">
9
+ <form id="alm-shortcode-builder-form">
10
+ <?php include_once( ALM_PATH . 'admin/shortcode-builder/shortcode-builder.php'); ?>
11
+ </form>
12
+ <div class="row no-brd">
13
+ <p class="back2top"><a href="#wpcontent"><i class="fa fa-chevron-up"></i> <?php _e('Back to Top', ALM_NAME); ?></a></p>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ <div class="cnkt-sidebar">
18
+ <div class="table-of-contents">
19
+ <div class="cta">
20
+ <select class="toc"></select>
21
+ </div>
22
+ <div class="cta">
23
+ <h3><?php _e('Shortcode Output', ALM_NAME); ?></h3>
24
+ <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', ALM_NAME); ?></p>
25
+ <div class="output-wrap">
26
+ <div id="shortcode_output"></div>
27
+ <span class="copy"><?php _e('Copy', ALM_NAME); ?></span>
28
+ </div>
29
+ <p class="small reset-shortcode-builder"><a href="javascript:void(0);" title="<?php _e('Clear all Shortcode Builder settings', ALM_NAME); ?>"><i class="fa fa-refresh"></i> Reset Shortcode Builder</a></p>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </div>
ajax-load-more.php CHANGED
@@ -2,16 +2,18 @@
2
  /*
3
  Plugin Name: Ajax Load More
4
  Plugin URI: http://connekthq.com/plugins/ajax-load-more
5
- Description: A simple solution for lazy loading WordPress posts and pages with Ajax
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
- Version: 2.4.1
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
- */
13
- define('ALM_VERSION', '2.4.1');
14
- define('ALM_RELEASE', 'January 13, 2015');
 
 
15
  /*
16
  * alm_install
17
  * Create table for storing repeater
@@ -23,7 +25,7 @@ register_activation_hook( __FILE__, 'alm_install' );
23
  function alm_install() {
24
  global $wpdb;
25
  $table_name = $wpdb->prefix . "alm";
26
- $defaultRepeater = '<li><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));}?><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>';
27
 
28
  //Create table, if it doesn't already exist.
29
  if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
@@ -37,7 +39,7 @@ function alm_install() {
37
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
38
  dbDelta( $sql );
39
 
40
- //Insert default data in newly created table
41
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'pluginVersion' => ALM_VERSION));
42
  }
43
  }
@@ -46,514 +48,560 @@ function alm_install() {
46
 
47
  if( !class_exists('AjaxLoadMore') ):
48
  class AjaxLoadMore {
49
- function __construct(){
50
- define('ALM_PATH', plugin_dir_path(__FILE__));
51
- define('ALM_URL', plugins_url('', __FILE__));
52
- define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
53
- define('ALM_NAME', '_ajax_load_more');
54
- define('ALM_TITLE', 'Ajax Load More');
55
-
56
- add_action('wp_ajax_ajax_load_more_init', array(&$this, 'alm_query_posts'));
57
- add_action('wp_ajax_nopriv_ajax_load_more_init', array(&$this, 'alm_query_posts'));
58
- add_action('wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts'));
59
- add_action('alm_get_repeater', array(&$this, 'alm_get_current_repeater'));
60
- add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links'));
61
-
62
- add_shortcode('ajax_load_more', array(&$this, 'alm_shortcode'));
63
-
64
- // Allow shortcodes in widget areas
65
- add_filter('widget_text', 'do_shortcode');
66
 
67
- // load text domain
68
- load_plugin_textdomain( 'ajax-load-more', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
69
-
70
- // includes Admin core
71
- $this->alm_before_theme();
72
-
73
- // set up variables
74
- $total = 0;
75
- }
76
-
77
-
78
- /*
79
- * alm_before_theme
80
- * Load these files before the theme loads
81
- *
82
- * @since 2.0.0
83
- */
84
-
85
- function alm_before_theme(){
86
- if( is_admin()){
87
- include_once('admin/editor.php');
88
- include_once('admin/admin.php');
89
- }
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
- /*
93
- * alm_action_links
94
- * Add plugin action links to WP plugin screen
95
- *
96
- * @since 2.2.3
97
- */
98
 
99
- function alm_action_links( $links ) {
100
- $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more') .'">Settings</a>';
101
- $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more-shortcode-builder') .'">Shortcode Builder</a>';
102
- return $links;
103
- }
104
-
105
-
106
-
107
- /*
108
- * alm_enqueue_scripts
109
- * Enqueue our scripts and create our localize variables
110
- *
111
- * @since 2.0.0
112
- */
113
-
114
- function alm_enqueue_scripts(){
115
- $options = get_option( 'alm_settings' );
116
- //wp_enqueue_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.js', __FILE__ ), array('jquery'), '1.1', true );
117
- wp_enqueue_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.min.js', __FILE__ ), array('jquery'), '1.1', true );
118
- wp_localize_script(
119
- 'ajax-load-more',
120
- 'alm_localize',
121
- array(
122
- 'ajaxurl' => admin_url('admin-ajax.php'),
123
- 'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
124
- 'pluginurl' => ALM_URL
125
- )
126
- );
127
- if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
128
- wp_enqueue_style( 'ajax-load-more-css', plugins_url('/core/css/ajax-load-more.css', __FILE__ ));
129
- }
130
- }
131
-
132
-
133
- /*
134
- * alm_shortcode
135
- * The AjaxLoadMore shortcode
136
- *
137
- * @since 2.0.0
138
- */
139
-
140
- function alm_shortcode( $atts, $content = null ) {
141
- $options = get_option( 'alm_settings' ); //Get plugin options
142
- extract(shortcode_atts(array(
143
  'seo' => 'false',
144
  'repeater' => 'default',
145
  'post_type' => 'post',
146
  'post_format' => '',
147
- 'category' => '',
 
 
 
148
  'taxonomy' => '',
149
  'taxonomy_terms' => '',
150
  'taxonomy_operator' => '',
151
  'meta_key' => '',
152
  'meta_value' => '',
153
- 'meta_compare' => '',
154
- 'tag' => '',
155
  'year' => '',
156
  'month' => '',
157
  'day' => '',
158
  'author' => '',
159
- 'search' => '',
160
- 'post_status' => 'publish',
161
- 'order' => '',
162
- 'orderby' => '',
163
  'exclude' => '',
164
  'offset' => '0',
165
  'posts_per_page' => '5',
166
  'scroll' => 'true',
167
  'max_pages' => '5',
168
  'pause' => 'false',
 
169
  'transition' => 'slide',
170
  'button_label' => 'Older Posts',
171
- ),
172
- $atts));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
- // Get container elements (ul | div)
175
- $container_element = 'ul';
176
- if($options['_alm_container_type'] == '2'){
177
- $container_element = 'div';
178
- }
179
- // Get extra classnames
180
- $classname = '';
181
- if(isset($options['_alm_classname'])){
182
- $classname = ' '.$options['_alm_classname'];
183
- }
184
- // Get button color
185
- $btn_color = '';
186
- if(isset($options['_alm_btn_color'])){
187
- $btn_color = ' '.$options['_alm_btn_color'];
188
- }
189
- // Get btn classnames
190
- $button_classname = '';
191
- if(isset($options['_alm_btn_classname'])){
192
- $button_classname = $options['_alm_btn_classname'];
193
- }
194
-
195
- // Language support
196
-
197
- // WPML - http://wpml.org
198
- $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML
199
-
200
- // Polylang - https://wordpress.org/plugins/polylang/
201
- if (function_exists('pll_current_language'))
202
- $lang = pll_current_language();
203
-
204
- // qTranslate - https://wordpress.org/plugins/qtranslate/
205
- if (function_exists('qtrans_getLanguage'))
206
- $lang = qtrans_getLanguage();
207
-
208
-
209
- $ajaxloadmore = '<div id="ajax-load-more" class="ajax-load-more-wrap '. $btn_color .'">';
210
- $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $classname . '"';
211
- $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
212
- $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
213
- $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
214
- $ajaxloadmore .= ' data-category="'.$category.'"';
215
- $ajaxloadmore .= ' data-taxonomy="'.$taxonomy.'"';
216
- $ajaxloadmore .= ' data-taxonomy-terms="'.$taxonomy_terms.'"';
217
- $ajaxloadmore .= ' data-taxonomy-operator="'.$taxonomy_operator.'"';
218
- $ajaxloadmore .= ' data-tag="'.$tag.'"';
219
- $ajaxloadmore .= ' data-meta-key="'.$meta_key.'"';
220
- $ajaxloadmore .= ' data-meta-value="'.$meta_value.'"';
221
- $ajaxloadmore .= ' data-meta-compare="'.$meta_compare.'"';
222
- $ajaxloadmore .= ' data-year="'.$year.'"';
223
- $ajaxloadmore .= ' data-month="'.$month.'"';
224
- $ajaxloadmore .= ' data-day="'.$day.'"';
225
- $ajaxloadmore .= ' data-author="'.$author.'"';
226
- $ajaxloadmore .= ' data-search="'.$search.'"';
227
- $ajaxloadmore .= ' data-post-status="'.$post_status.'"';
228
- $ajaxloadmore .= ' data-order="'.$order.'"';
229
- $ajaxloadmore .= ' data-orderby="'.$orderby.'"';
230
- $ajaxloadmore .= ' data-exclude="'.$exclude.'"';
231
- $ajaxloadmore .= ' data-offset="'.$offset.'"';
232
-
233
- // Posts per page
234
- $wp_posts_per_page = get_option( 'posts_per_page' );
235
-
236
- /* If posts per page on settings -> reading is great than shortcode value
237
- & the SEO add-on is installed.
238
- Set $posts_per_page to be new value
239
- */
240
- if($wp_posts_per_page > $posts_per_page && has_action('alm_seo_installed') && $seo === 'true')
241
- $posts_per_page = $wp_posts_per_page;
242
-
243
- $ajaxloadmore .= ' data-posts-per-page="'.$posts_per_page.'"';
244
-
245
- $ajaxloadmore .= ' data-lang="'.$lang.'"';
246
- $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
247
- $ajaxloadmore .= ' data-max-pages="'.$max_pages.'"';
248
- $ajaxloadmore .= ' data-pause="'.$pause.'"';
249
- $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
250
- $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
251
- $ajaxloadmore .= ' data-transition="'.$transition.'"';
252
-
253
- if(has_action('alm_seo_installed') && $seo === 'true'){
254
-
255
- // Get scroll speed
256
- $seo_scroll_speed = '1000';
257
- if(isset($options['_alm_seo_speed'])){
258
- $seo_scroll_speed = ''.$options['_alm_seo_speed'];
259
- }
260
 
261
- // Enabled Scrolling
262
- $ajaxloadmore .= ' data-test-seo-scroll="'.$options['_alm_seo_scroll'].'"';
263
- $seo_enable_scroll = $options['_alm_seo_scroll'];
264
- if(!isset($seo_enable_scroll) || empty($seo_enable_scroll)){
265
- $seo_enable_scroll = 'true';
266
- }else{
267
- if($seo_enable_scroll == '1'){
268
- $seo_enable_scroll = 'true';
269
- }else{
270
- $seo_enable_scroll = 'false';
 
 
271
  }
272
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
 
274
- // Permalink Structure
275
- $seo_permalink = 'pretty';
276
- if(isset($options['_alm_seo_permalinks'])){
277
- $seo_permalink = ''.$options['_alm_seo_permalinks'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  }
279
-
280
- // Get $paged var from WP
281
- if ( get_query_var('paged') ) {
282
- $current_page = get_query_var('paged');
283
- } elseif ( get_query_var('page') ) {
284
- $current_page = get_query_var('page');
285
- } else {
286
- $current_page = 1;
287
- }
288
- $ajaxloadmore .= ' data-seo="'.$seo.'"';
289
- $ajaxloadmore .= ' data-seo-start-page="'.$current_page.'"';
290
- $ajaxloadmore .= ' data-seo-scroll="'.$seo_enable_scroll.'"';
291
- $ajaxloadmore .= ' data-seo-scroll-speed="'.$seo_scroll_speed.'"';
292
- $ajaxloadmore .= ' data-seo-permalink="'.$seo_permalink.'"';
293
-
294
- }
295
-
296
- $ajaxloadmore .= '></'.$container_element.'>';
297
- $ajaxloadmore .= '</div>';
298
-
299
- return $ajaxloadmore;
300
- }
301
-
302
-
303
- /*
304
- * alm_query_posts
305
- * Ajax Load More Query
306
- *
307
- * @since 2.0.0
308
- */
309
-
310
- function alm_query_posts() {
311
-
312
- $nonce = $_GET['nonce'];
313
- // Check our nonce, if they don't match then bounce!
314
- if (! wp_verify_nonce( $nonce, 'ajax_load_more_nonce' ))
315
- die('Error, could not verify WP nonce.');
316
-
317
- $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
318
- $type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater vale at number to determine type
319
- $type = $type[0]; // default | repeater | template_
320
-
321
- $postType = (isset($_GET['postType'])) ? $_GET['postType'] : 'post';
322
- $postFormat = (isset($_GET['postFormat'])) ? $_GET['postFormat'] : '';
323
- $category = (isset($_GET['category'])) ? $_GET['category'] : '';
324
- $tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
325
- $author_id = (isset($_GET['author'])) ? $_GET['author'] : '';
326
-
327
- $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
328
- $taxonomy_terms = (isset($_GET['taxonomy_terms'])) ? $_GET['taxonomy_terms'] : '';
329
- $taxonomy_operator = $_GET['taxonomy_operator'];
330
- if($taxonomy_operator == ''){
331
- $taxonomy_operator = 'IN';
332
- }
333
-
334
- $post_format = (isset($_GET['postFormat'])) ? $_GET['postFormat'] : '';
335
- $s = (isset($_GET['search'])) ? $_GET['search'] : '';
336
-
337
- $meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';
338
- $meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';
339
- $meta_compare = (isset($_GET['meta_compare'])) ? $_GET['meta_compare'] : '=';
340
-
341
- $year = (isset($_GET['year'])) ? $_GET['year'] : '';
342
- $month = (isset($_GET['month'])) ? $_GET['month'] : '';
343
- $day = (isset($_GET['day'])) ? $_GET['day'] : '';
344
-
345
- $post_status = (isset($_GET['post_status'])) ? $_GET['post_status'] : 'publish';
346
- $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
347
- $orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'date';
348
- $exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
349
- $numPosts = (isset($_GET['numPosts'])) ? $_GET['numPosts'] : 5;
350
- $page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;
351
- $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
352
- $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
353
-
354
- // Set up initial args
355
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
356
- $args = array(
357
- 'post_type' => $postType,
358
- 'posts_per_page' => $numPosts,
359
- 'offset' => $offset + ($numPosts*$page),
360
- 'order' => $order,
361
- 'orderby' => $orderby,
362
- 'post_status' => $post_status,
363
- 'ignore_sticky_posts' => false,
364
- 'paged' => $paged,
365
- );
366
-
367
- // Category
368
- if(!empty($category)){
369
- $args['category_name'] = $category;
370
- }
371
-
372
- // Tag
373
- if(!empty($tag)){
374
- $args['tag'] = $tag;
375
- }
376
-
377
- // Author
378
- if(!empty($author_id)){
379
- $args['author'] = $author_id;
380
- }
381
-
382
- // Search Term
383
- if(!empty($s)){
384
- $args['s'] = $s;
385
- }
386
-
387
- // Language
388
- if(!empty($lang)){
389
- $args['lang'] = $lang;
390
- }
391
-
392
- // Exclude posts
393
- // - Please see plugin examples for more info on excluding posts
394
-
395
- if(!empty($exclude)){
396
- $exclude = explode(",",$exclude);
397
- $args['post__not_in'] = $exclude;
398
- }
399
-
400
- // Post Format
401
- if(!empty($postFormat)){
402
- $format = "post-format-$postFormat";
403
- //If query is for standard then we need to filter by NOT IN
404
- if($format == 'post-format-standard'){
405
- if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
406
- $terms = array();
407
- foreach ($post_formats[0] as $format) {
408
- $terms[] = 'post-format-'.$format;
409
- }
410
- }
411
- $args['tax_query'] = array(
412
- array(
413
- 'taxonomy' => 'post_format',
414
- 'terms' => $terms,
415
- 'field' => 'slug',
416
- 'operator' => 'NOT IN'
417
- )
418
- );
419
- }else{
420
- $args['tax_query'] = array(
421
- array(
422
- 'taxonomy' => 'post_format',
423
- 'field' => 'slug',
424
- 'terms' => array($format),
425
- )
426
  );
427
- }
428
- }
429
-
430
- // Taxonomy
431
- if(!empty($taxonomy)){
432
- $the_terms = explode(", ", $taxonomy_terms);
433
- $args['tax_query'] = array(
434
- array(
435
- 'taxonomy' => $taxonomy,
436
- 'field' => 'slug',
437
- 'terms' => $the_terms,
438
- 'operator' => $taxonomy_operator
439
- ),
440
- );
441
- }
442
-
443
- // Meta Query
444
- if(!empty($meta_key) && !empty($meta_value)){
445
- $args['meta_query'] = array(
446
- array(
447
- 'key' => $meta_key,
448
- 'value' => $meta_value,
449
- 'compare' => $meta_compare,
450
- ),
451
- );
452
- }
453
-
454
- // Meta_key, used for ordering by meta value
455
- if(!empty($meta_key)){
456
- $args['meta_key'] = $meta_key;
457
- }
458
-
459
- // Date Archives
460
- // Not using date_query for now. Issue with year/month archives
461
- if(!empty($year)){
462
- $args['year'] = $year;
463
- }
464
- if(!empty($month)){
465
- $args['monthnum'] = $month;
466
- }
467
- if(!empty($day)){
468
- $args['day'] = $day;
469
- }
470
-
471
-
472
- // Set current page number for determining item number
473
- if($page == 0){
474
- $alm_page_count = 1;
475
- }else{
476
- $alm_page_count = $page + 1;
477
- }
478
-
479
-
480
- // WP_Query()
481
- $alm_query = new WP_Query( $args );
482
- $total = $alm_query->found_posts - $offset;
483
- // Run the loop
484
- if ($alm_query->have_posts()) :
485
-
486
- $alm_loop_count = 0;
487
-
488
- while ($alm_query->have_posts()): $alm_query->the_post();
489
- $template = $repeater;
490
- $include = '';
491
- $found = false;
492
- //array_push($exclude, $post->ID); // Push post IDs into exclude array
493
-
494
- // If is Custom Repeaters add-on
495
- if( $type == 'repeater' && has_action('alm_repeater_installed' ))
496
- {
497
- $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
498
-
499
- if(!file_exists($include)){ //confirm file exists
500
- $include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
501
- }
502
-
503
- }
504
- // If is Unlimited add-ons
505
- elseif( $type == 'template_' && has_action('alm_unlimited_installed' ))
506
- {
507
- $include = ALM_UNLIMITED_REPEATER_PATH. ''.$template.'.php';
508
-
509
- if(!file_exists($include)){ //confirm file exists
510
- $include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
511
- }
512
-
513
- }
514
- // Default repeater
515
- else
516
- {
517
- $include = plugin_dir_path( __FILE__ ) . 'core/repeater/default.php';
518
- }
519
-
520
- // Get page number and current item in overall loop
521
- $alm_loop_count++;
522
- $alm_page = $alm_page_count;
523
- $alm_item = ($alm_page_count * $numPosts) - $numPosts + $alm_loop_count;
524
- $alm_found_posts = $total;
525
-
526
- //Include repeater template
527
- include( $include );
528
-
529
- endwhile;
530
- endif;
531
- wp_reset_query();
532
- exit;
533
- }
534
- }
535
-
536
-
537
- /*
538
- * AjaxLoadMore
539
- * The main function responsible for returning the one true AjaxLoadMore Instance to functions everywhere.
540
- *
541
- * @since 2.0.0
542
- */
543
-
544
- function AjaxLoadMore(){
545
- global $ajax_load_more;
546
-
547
- if( !isset($ajax_load_more) )
548
- {
549
- $ajax_load_more = new AjaxLoadMore();
550
- }
551
-
552
- return $ajax_load_more;
553
- }
554
-
555
-
556
- // initialize
557
- AjaxLoadMore();
558
 
559
  endif; // class_exists check
2
  /*
3
  Plugin Name: Ajax Load More
4
  Plugin URI: http://connekthq.com/plugins/ajax-load-more
5
+ Description: A simple solution for lazy loading WordPress posts and pages with Ajax.
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
+ Version: 2.5.1
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
+ */
13
+
14
+ define('ALM_VERSION', '2.5.1');
15
+ define('ALM_RELEASE', 'February 12, 2015');
16
+
17
  /*
18
  * alm_install
19
  * Create table for storing repeater
25
  function alm_install() {
26
  global $wpdb;
27
  $table_name = $wpdb->prefix . "alm";
28
+ $defaultRepeater = '<li <?php if (!has_post_thumbnail()) { ?> class="no-img"<?php } ?>><?php if ( has_post_thumbnail() ) { the_post_thumbnail(array(100,100));}?><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>';
29
 
30
  //Create table, if it doesn't already exist.
31
  if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) {
39
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
40
  dbDelta( $sql );
41
 
42
+ //Insert the default data in created table
43
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'pluginVersion' => ALM_VERSION));
44
  }
45
  }
48
 
49
  if( !class_exists('AjaxLoadMore') ):
50
  class AjaxLoadMore {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
+ function __construct(){
53
+
54
+ define('ALM_PATH', plugin_dir_path(__FILE__));
55
+ define('ALM_URL', plugins_url('', __FILE__));
56
+ define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
57
+ define('ALM_NAME', '_ajax_load_more');
58
+ define('ALM_TITLE', 'Ajax Load More');
59
+
60
+ add_action( 'wp_ajax_ajax_load_more_init', array(&$this, 'alm_query_posts') );
61
+ add_action( 'wp_ajax_nopriv_ajax_load_more_init', array(&$this, 'alm_query_posts') );
62
+ add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
63
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links') );
64
+
65
+ add_shortcode( 'ajax_load_more', array(&$this, 'alm_shortcode') );
66
+
67
+ // Allow shortcodes in widget areas
68
+ add_filter( 'widget_text', 'do_shortcode' );
69
+
70
+ // load text domain
71
+ load_plugin_textdomain( 'ajax-load-more', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
72
+
73
+ // Include ALM query functions
74
+ include_once( ALM_PATH . 'core/functions.php');
75
+
76
+ // includes WP admin core
77
+ $this->alm_before_theme();
78
+
79
+ }
80
+
81
+
82
+ /*
83
+ * alm_before_theme
84
+ * Load these files before the theme loads
85
+ *
86
+ * @since 2.0.0
87
+ */
88
+
89
+ function alm_before_theme(){
90
+ if( is_admin()){
91
+ include_once('admin/editor/editor.php');
92
+ include_once('admin/admin.php');
93
+ }
94
+ }
95
+
96
+ /*
97
+ * alm_action_links
98
+ * Add plugin action links to WP plugin screen
99
+ *
100
+ * @since 2.2.3
101
+ */
102
+
103
+ function alm_action_links( $links ) {
104
+ $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more') .'">Settings</a>';
105
+ $links[] = '<a href="'. get_admin_url(null, 'admin.php?page=ajax-load-more-shortcode-builder') .'">Shortcode Builder</a>';
106
+ return $links;
107
+ }
108
 
 
 
 
 
 
 
109
 
110
+
111
+ /*
112
+ * alm_enqueue_scripts
113
+ * Enqueue our scripts and create our localize variables
114
+ *
115
+ * @since 2.0.0
116
+ */
117
+
118
+ function alm_enqueue_scripts(){
119
+ $options = get_option( 'alm_settings' );
120
+ //wp_enqueue_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.js', __FILE__ ), array('jquery'), '1.1', true );
121
+ wp_enqueue_script( 'ajax-load-more', plugins_url( '/core/js/ajax-load-more.min.js', __FILE__ ), array('jquery'), '1.1', true );
122
+ wp_localize_script(
123
+ 'ajax-load-more',
124
+ 'alm_localize',
125
+ array(
126
+ 'ajaxurl' => admin_url('admin-ajax.php'),
127
+ 'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
128
+ 'pluginurl' => ALM_URL
129
+ )
130
+ );
131
+ if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
132
+ wp_enqueue_style( 'ajax-load-more', plugins_url('/core/css/ajax-load-more.css', __FILE__ ));
133
+ }
134
+ }
135
+
136
+
137
+
138
+ /*
139
+ * alm_shortcode
140
+ * The AjaxLoadMore shortcode
141
+ *
142
+ * @since 2.0.0
143
+ */
144
+
145
+ function alm_shortcode( $atts, $content = null ) {
146
+ $options = get_option( 'alm_settings' ); //Get plugin options
147
+
148
+ extract(shortcode_atts(array(
149
+ 'preloaded' => 'false',
150
+ 'preloaded_amount' => '5',
 
 
 
151
  'seo' => 'false',
152
  'repeater' => 'default',
153
  'post_type' => 'post',
154
  'post_format' => '',
155
+ 'category' => '',
156
+ 'category__not_in' => '',
157
+ 'tag' => '',
158
+ 'tag__not_in' => '',
159
  'taxonomy' => '',
160
  'taxonomy_terms' => '',
161
  'taxonomy_operator' => '',
162
  'meta_key' => '',
163
  'meta_value' => '',
164
+ 'meta_compare' => '',
 
165
  'year' => '',
166
  'month' => '',
167
  'day' => '',
168
  'author' => '',
169
+ 'search' => '',
170
+ 'post_status' => '',
171
+ 'order' => 'DESC',
172
+ 'orderby' => 'date',
173
  'exclude' => '',
174
  'offset' => '0',
175
  'posts_per_page' => '5',
176
  'scroll' => 'true',
177
  'max_pages' => '5',
178
  'pause' => 'false',
179
+ 'destroy_after' => '',
180
  'transition' => 'slide',
181
  'button_label' => 'Older Posts',
182
+ ), $atts));
183
+
184
+ // Get container elements (ul | div)
185
+ $container_element = 'ul';
186
+ if($options['_alm_container_type'] == '2')
187
+ $container_element = 'div';
188
+
189
+ // Get extra classnames
190
+ $classname = '';
191
+ if(isset($options['_alm_classname']))
192
+ $classname = ' '.$options['_alm_classname'];
193
+
194
+ // Get button color
195
+ $btn_color = '';
196
+ if(isset($options['_alm_btn_color']))
197
+ $btn_color = ' '.$options['_alm_btn_color'];
198
+
199
+ // Get btn classnames
200
+ $button_classname = '';
201
+ if(isset($options['_alm_btn_classname']))
202
+ $button_classname = $options['_alm_btn_classname'];
203
+
204
+
205
+ // Language support
206
+ $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
207
+ if (function_exists('pll_current_language')) // Polylang - https://wordpress.org/plugins/polylang/
208
+ $lang = pll_current_language();
209
+ if (function_exists('qtrans_getLanguage')) // qTranslate - https://wordpress.org/plugins/qtranslate/
210
+ $lang = qtrans_getLanguage();
211
+
212
+
213
+ // Start ALM object
214
+ $ajaxloadmore = '<div id="ajax-load-more" class="ajax-load-more-wrap '. $btn_color .'">';
215
+
216
+ // Preload Posts
217
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
218
+
219
+ // If SEO then set $preloaded_amount to $posts_per_page
220
+ if(has_action('alm_seo_installed') && $seo === 'true'){
221
+ $preloaded_amount = $posts_per_page; //
222
+ }
223
+
224
+ $preloaded_arr = array( // Create preload data array
225
+ 'post_type' => $post_type,
226
+ 'post_format' => $post_format,
227
+ 'category' => $category,
228
+ 'category__not_in' => $category__not_in,
229
+ 'tag' => $tag,
230
+ 'tag__not_in' => $tag__not_in,
231
+ 'taxonomy' => $taxonomy,
232
+ 'taxonomy_terms' => $taxonomy_terms,
233
+ 'taxonomy_operator' => $taxonomy_operator,
234
+ 'meta_key' => $meta_key,
235
+ 'meta_value' => $meta_value,
236
+ 'meta_compare' => $meta_compare,
237
+ 'year' => $year,
238
+ 'month' => $month,
239
+ 'day' => $day,
240
+ 'author' => $author,
241
+ 'search' => $search,
242
+ 'post_status' => $post_status,
243
+ 'order' => $order,
244
+ 'orderby' => $orderby,
245
+ 'exclude' => $exclude,
246
+ 'offset' => $offset,
247
+ 'posts_per_page' => $preloaded_amount,
248
+ 'lang' => $lang,
249
+ );
250
+
251
+ $preloaded_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
252
+ $preloaded_type = $preloaded_type[0]; // (default | repeater | template_)
253
+
254
+ // Create $args array and store it in $preloaded_arg_array
255
+ $args = apply_filters('alm_preload_args', $preloaded_arr);
256
+
257
+ $alm_preload_query = new WP_Query($args);
258
+ $alm_total_posts = $alm_preload_query->found_posts - $offset;
259
+ $output = '';
260
+ if ($alm_preload_query->have_posts()) :
261
+ $alm_loop_count = 0; // Count var
262
+ $alm_page = 0; // Set page to 0
263
+ $alm_found_posts = $alm_total_posts;
264
+ while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
265
+ $alm_loop_count++;
266
+ $alm_item = $alm_loop_count; // Get current item in loop
267
+ $output .= apply_filters('alm_preload_inc', $repeater, $preloaded_type, $alm_found_posts, $alm_page, $alm_item);
268
+ endwhile;
269
+ wp_reset_query();
270
+ endif;
271
+ $preloaded_output = '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .'" data-total-posts="'. $alm_total_posts .'">';
272
+ $preloaded_output .= $output;
273
+ $preloaded_output .= '</'.$container_element.'>';
274
+
275
+ // Add $preloadeded data to $ajaxloadmore
276
+ $ajaxloadmore .= $preloaded_output;
277
+ }
278
+ // End Preload Posts
279
+
280
+
281
+ // Build ALM container
282
+ $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $classname . '"';
283
+ $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
284
+ $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
285
+ $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
286
+ $ajaxloadmore .= ' data-category="'.$category.'"';
287
+ $ajaxloadmore .= ' data-category__not_in="'.$category__not_in.'"';
288
+ $ajaxloadmore .= ' data-tag="'.$tag.'"';
289
+ $ajaxloadmore .= ' data-tag__not_in="'.$tag__not_in.'"';
290
+ $ajaxloadmore .= ' data-taxonomy="'.$taxonomy.'"';
291
+ $ajaxloadmore .= ' data-taxonomy-terms="'.$taxonomy_terms.'"';
292
+ $ajaxloadmore .= ' data-taxonomy-operator="'.$taxonomy_operator.'"';
293
+ $ajaxloadmore .= ' data-meta-key="'.$meta_key.'"';
294
+ $ajaxloadmore .= ' data-meta-value="'.$meta_value.'"';
295
+ $ajaxloadmore .= ' data-meta-compare="'.$meta_compare.'"';
296
+ $ajaxloadmore .= ' data-year="'.$year.'"';
297
+ $ajaxloadmore .= ' data-month="'.$month.'"';
298
+ $ajaxloadmore .= ' data-day="'.$day.'"';
299
+ $ajaxloadmore .= ' data-author="'.$author.'"';
300
+ $ajaxloadmore .= ' data-search="'.$search.'"';
301
+ $ajaxloadmore .= ' data-post-status="'.$post_status.'"';
302
+ $ajaxloadmore .= ' data-order="'.$order.'"';
303
+ $ajaxloadmore .= ' data-orderby="'.$orderby.'"';
304
+ $ajaxloadmore .= ' data-exclude="'.$exclude.'"';
305
+ $ajaxloadmore .= ' data-offset="'.$offset.'"';
306
+ $ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
307
+ $ajaxloadmore .= ' data-preloaded_amount="'.$preloaded_amount.'"';
308
+
309
+ // Posts per page
310
+ $wp_posts_per_page = get_option( 'posts_per_page' );
311
+ /* If posts per page on settings -> reading is greater than shortcode value set $posts_per_page to be new value
312
+ */
313
+ if(has_action('alm_seo_installed') && $wp_posts_per_page > $posts_per_page && $seo === 'true')
314
+ $posts_per_page = $wp_posts_per_page;
315
+
316
+ $ajaxloadmore .= ' data-posts-per-page="'.$posts_per_page.'"';
317
 
318
+ $ajaxloadmore .= ' data-lang="'.$lang.'"';
319
+ $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
320
+ $ajaxloadmore .= ' data-max-pages="'.$max_pages.'"';
321
+ $ajaxloadmore .= ' data-pause="'.$pause.'"';
322
+ $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
323
+ $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
324
+ $ajaxloadmore .= ' data-destroy_after="'.$destroy_after.'"';
325
+ $ajaxloadmore .= ' data-transition="'.$transition.'"';
326
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
 
328
+ // Disables SEO if $preload
329
+ // To be removed in future versions
330
+ if($seo === 'true' && $preloaded === 'true')
331
+ $seo = 'false';
332
+
333
+
334
+ if(has_action('alm_seo_installed') && $seo === 'true'){
335
+
336
+ // Get scroll speed
337
+ $seo_scroll_speed = '1000';
338
+ if(isset($options['_alm_seo_speed'])){
339
+ $seo_scroll_speed = ''.$options['_alm_seo_speed'];
340
  }
341
+
342
+ // Enabled Scrolling
343
+ $ajaxloadmore .= ' data-test-seo-scroll="'.$options['_alm_seo_scroll'].'"';
344
+ $seo_enable_scroll = $options['_alm_seo_scroll'];
345
+ if(!isset($seo_enable_scroll) || empty($seo_enable_scroll)){
346
+ $seo_enable_scroll = 'true';
347
+ }else{
348
+ if($seo_enable_scroll == '1'){
349
+ $seo_enable_scroll = 'true';
350
+ }else{
351
+ $seo_enable_scroll = 'false';
352
+ }
353
+ }
354
+
355
+ // Permalink Structure
356
+ $seo_permalink = 'pretty';
357
+ if(isset($options['_alm_seo_permalinks'])){
358
+ $seo_permalink = ''.$options['_alm_seo_permalinks'];
359
+ }
360
+
361
+ // Get $paged var from WP
362
+ if ( get_query_var('paged') ) {
363
+ $current_page = get_query_var('paged');
364
+ } elseif ( get_query_var('page') ) {
365
+ $current_page = get_query_var('page');
366
+ } else {
367
+ $current_page = 1;
368
+ }
369
+ $ajaxloadmore .= ' data-seo="'.$seo.'"';
370
+ $ajaxloadmore .= ' data-seo-start-page="'.$current_page.'"';
371
+ $ajaxloadmore .= ' data-seo-scroll="'.$seo_enable_scroll.'"';
372
+ $ajaxloadmore .= ' data-seo-scroll-speed="'.$seo_scroll_speed.'"';
373
+ $ajaxloadmore .= ' data-seo-permalink="'.$seo_permalink.'"';
374
+
375
+ }
376
+
377
+ $ajaxloadmore .= '></'.$container_element.'>';
378
+ $ajaxloadmore .= '</div>';
379
+ // End Build ALM container
380
+
381
+ return $ajaxloadmore;
382
+ }
383
+
384
+
385
+
386
+ /*
387
+ * alm_query_posts
388
+ * Ajax Load More Query
389
+ *
390
+ * @since 2.0.0
391
+ */
392
+
393
+ function alm_query_posts() {
394
+
395
+ $nonce = $_GET['nonce'];
396
+ if(!is_user_logged_in()){ // Skip nonce verification if user is logged in
397
+ // Check our nonce, if they don't match then bounce!
398
+ if (! wp_verify_nonce( $nonce, 'ajax_load_more_nonce' )) die('Error, could not verify WP nonce.');
399
+ }
400
+
401
+ $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
402
+ $type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater value at number to determine type
403
+ $type = $type[0]; // default | repeater | template_
404
+
405
+ $postType = (isset($_GET['postType'])) ? $_GET['postType'] : 'post';
406
+ $post_format = (isset($_GET['post_format'])) ? $_GET['post_format'] : '';
407
+
408
+ $category = (isset($_GET['category'])) ? $_GET['category'] : '';
409
+ $category__not_in = (isset($_GET['category__not_in'])) ? $_GET['category__not_in'] : '';
410
+ $tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
411
+ $tag__not_in = (isset($_GET['tag__not_in'])) ? $_GET['tag__not_in'] : '';
412
+
413
+ // Taxonomy
414
+ $taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
415
+ $taxonomy_terms = (isset($_GET['taxonomy_terms'])) ? $_GET['taxonomy_terms'] : '';
416
+ $taxonomy_operator = $_GET['taxonomy_operator'];
417
+ if(empty($taxonomy_operator)) $taxonomy_operator = 'IN';
418
+
419
+ // Date
420
+ $year = (isset($_GET['year'])) ? $_GET['year'] : '';
421
+ $month = (isset($_GET['month'])) ? $_GET['month'] : '';
422
+ $day = (isset($_GET['day'])) ? $_GET['day'] : '';
423
+
424
+ // Custom Fields
425
+ $meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';
426
+ $meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';
427
+ $meta_compare = $_GET['meta_compare'];
428
+ if($meta_compare == '') $meta_compare = 'IN';
429
 
430
+ $s = (isset($_GET['search'])) ? $_GET['search'] : '';
431
+ $author_id = (isset($_GET['author'])) ? $_GET['author'] : '';
432
+
433
+ // Ordering
434
+ $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
435
+ $orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'date';
436
+
437
+ // Exclude, Offset, Status
438
+ $exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
439
+ $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
440
+ $post_status = $_GET['post_status'];
441
+ if($post_status == '') $post_status = 'publish';
442
+
443
+ // Page
444
+ $numPosts = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
445
+ $page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;
446
+
447
+ // Preload
448
+ $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
449
+ $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
450
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
451
+ // If preload - offset the ajax posts by posts_per_page + preload_amount val
452
+ $old_offset = $preloaded_amount;
453
+ $offset = $offset + $preloaded_amount;
454
+ }
455
+
456
+ // Language (Is this needed?)
457
+ $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
458
+
459
+ // Set up initial args
460
+ $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
461
+ $args = array(
462
+ 'post_type' => $postType,
463
+ 'posts_per_page' => $numPosts,
464
+ 'offset' => $offset + ($numPosts*$page),
465
+ 'order' => $order,
466
+ 'orderby' => $orderby,
467
+ 'post_status' => $post_status,
468
+ 'ignore_sticky_posts' => false,
469
+ 'paged' => $paged,
470
+ );
471
+
472
+ // Post Format & taxonomy
473
+ if(!empty($post_format) || !empty($taxonomy)){
474
+ $args['tax_query'] = array(
475
+ 'relation' => 'AND',
476
+ alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_operator)
477
+ );
478
+ }
479
+
480
+ // Category
481
+ if(!empty($category)){
482
+ $args['category_name'] = $category;
483
  }
484
+
485
+ // Category Not In
486
+ if(!empty($category__not_in)){
487
+ $exclude_cats = explode(",",$category__not_in);
488
+ $args['category__not_in'] = $exclude_cats;
489
+ }
490
+
491
+ // Tag
492
+ if(!empty($tag)){
493
+ $args['tag'] = $tag;
494
+ }
495
+
496
+ // Tag Not In
497
+ if(!empty($tag__not_in)){
498
+ $exclude_tags = explode(",",$tag__not_in);
499
+ $args['tag__not_in'] = $exclude_tags;
500
+ }
501
+
502
+ // Date (not using date_query as there was issue with year/month archives)
503
+ if(!empty($year)){
504
+ $args['year'] = $year;
505
+ }
506
+ if(!empty($month)){
507
+ $args['monthnum'] = $month;
508
+ }
509
+ if(!empty($day)){
510
+ $args['day'] = $day;
511
+ }
512
+
513
+ // Meta Query
514
+ if(!empty($meta_key) && !empty($meta_value)){
515
+ $args['meta_query'] = array(
516
+ alm_get_meta_query($meta_key, $meta_value, $meta_compare)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
517
  );
518
+ }
519
+
520
+ // Author
521
+ if(!empty($author_id)){
522
+ $args['author'] = $author_id;
523
+ }
524
+
525
+ // Search Term
526
+ if(!empty($s)){
527
+ $args['s'] = $s;
528
+ }
529
+
530
+ // Meta_key, used for ordering by meta value
531
+ if(!empty($meta_key)){
532
+ $args['meta_key'] = $meta_key;
533
+ }
534
+
535
+ // Exclude posts
536
+ if(!empty($exclude)){
537
+ $exclude = explode(",",$exclude);
538
+ $args['post__not_in'] = $exclude;
539
+ }
540
+
541
+ // Language
542
+ if(!empty($lang)){
543
+ $args['lang'] = $lang;
544
+ }
545
+
546
+ // Set current page number for determining item number
547
+ if($page == 0){
548
+ $alm_page_count = 1;
549
+ }else{
550
+ $alm_page_count = $page + 1;
551
+ }
552
+
553
+ // WP_Query()
554
+ $alm_query = new WP_Query( $args );
555
+
556
+ // If preload, set our loop count and total posts to
557
+ if(has_action('alm_preload_installed') && $preloaded === 'true'){
558
+ $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
559
+ if($old_offset > 0)
560
+ $alm_loop_count = $old_offset;
561
+ else
562
+ $alm_loop_count = $offset;
563
+ }else {
564
+ $alm_total_posts = $alm_query->found_posts - $offset;
565
+ $alm_loop_count = 0;
566
+ }
567
+
568
+
569
+ // Run the loop
570
+ if ($alm_query->have_posts()) :
571
+ $alm_found_posts = $alm_total_posts;
572
+ while ($alm_query->have_posts()): $alm_query->the_post();
573
+ $alm_loop_count++;
574
+ $alm_page = $alm_page_count; // Get page number
575
+ $alm_item = ($alm_page_count * $numPosts) - $numPosts + $alm_loop_count; // Get current item
576
+ include( alm_get_current_repeater($repeater, $type) );//Include repeater template
577
+ endwhile;
578
+ wp_reset_query();
579
+ endif; exit;
580
+ }
581
+
582
+ }
583
+
584
+
585
+ /*
586
+ * AjaxLoadMore
587
+ * The main function responsible for returning the one true AjaxLoadMore Instance to functions everywhere.
588
+ *
589
+ * @since 2.0.0
590
+ */
591
+
592
+ function AjaxLoadMore(){
593
+ global $ajax_load_more;
594
+
595
+ if( !isset($ajax_load_more) )
596
+ {
597
+ $ajax_load_more = new AjaxLoadMore();
598
+ }
599
+
600
+ return $ajax_load_more;
601
+ }
602
+
603
+
604
+ // initialize
605
+ AjaxLoadMore();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
606
 
607
  endif; // class_exists check
core/css/ajax-load-more.css CHANGED
@@ -3,7 +3,7 @@
3
  * http://wordpress.org/plugins/ajax-load-more/
4
  * https://github.com/dcooney/wordpress-ajax-load-more
5
  *
6
- * Copyright 2014 Connekt Media - http://connekthq.com
7
  * Free to use under the GPLv2 license.
8
  * http://www.gnu.org/licenses/gpl-2.0.html
9
  *
@@ -187,10 +187,10 @@ button.alm-load-more-btn{
187
  overflow: hidden;
188
  position: relative;
189
  list-style: none;
190
- }
191
  .alm-listing li.no-img{
192
- padding: 0;
193
- }
194
  .alm-listing li a{
195
  color: #34383D;
196
  }
3
  * http://wordpress.org/plugins/ajax-load-more/
4
  * https://github.com/dcooney/wordpress-ajax-load-more
5
  *
6
+ * Copyright 2015 Connekt Media - http://connekthq.com
7
  * Free to use under the GPLv2 license.
8
  * http://www.gnu.org/licenses/gpl-2.0.html
9
  *
187
  overflow: hidden;
188
  position: relative;
189
  list-style: none;
190
+ }
191
  .alm-listing li.no-img{
192
+ padding: 0;
193
+ }
194
  .alm-listing li a{
195
  color: #34383D;
196
  }
core/functions.php ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ /*
5
+ * alm_get_current_repeater
6
+ * Get the current repeater template file
7
+ *
8
+ * @return $include (file path)
9
+ * @since 2.5.0
10
+ */
11
+
12
+ function alm_get_current_repeater($repeater, $type) {
13
+ $template = $repeater;
14
+ $include = '';
15
+ // If is Custom Repeaters (Custom Repeaters v1)
16
+ if( $type == 'repeater' && has_action('alm_repeater_installed' ))
17
+ {
18
+ $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
19
+
20
+ if(!file_exists($include)) //confirm file exists
21
+ $include = ALM_PATH . 'core/repeater/default.php';
22
+
23
+ }
24
+ // If is Unlimited Repeaters (Custom Repeaters v2)
25
+ elseif( $type == 'template_' && has_action('alm_unlimited_installed' ))
26
+ {
27
+ $include = ALM_UNLIMITED_REPEATER_PATH. ''.$template.'.php';
28
+
29
+ if(!file_exists($include)) //confirm file exists
30
+ $include = ALM_PATH . 'core/repeater/default.php';
31
+
32
+ }
33
+ // Default repeater
34
+ else
35
+ {
36
+ $include = ALM_PATH . 'core/repeater/default.php';
37
+ }
38
+
39
+ return $include;
40
+ }
41
+
42
+
43
+
44
+ /*
45
+ * alm_get_post_format
46
+ * Query by post format
47
+ *
48
+ * @return $args = array();
49
+ * @since 2.5.0
50
+ */
51
+ function alm_get_post_format($post_format){
52
+ if(!empty($post_format)){
53
+ $format = "post-format-$post_format";
54
+ //If query is for standard then we need to filter by NOT IN
55
+ if($format == 'post-format-standard'){
56
+ if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
57
+ $terms = array();
58
+ foreach ($post_formats[0] as $format) {
59
+ $terms[] = 'post-format-'.$format;
60
+ }
61
+ }
62
+ $args = array(
63
+ 'taxonomy' => 'post_format',
64
+ 'terms' => $terms,
65
+ 'field' => 'slug',
66
+ 'operator' => 'NOT IN',
67
+ );
68
+ }else{
69
+ $args = array(
70
+ 'taxonomy' => 'post_format',
71
+ 'field' => 'slug',
72
+ 'terms' => array($format),
73
+ );
74
+ }
75
+ return $args;
76
+ }
77
+ }
78
+
79
+
80
+
81
+ /*
82
+ * alm_get_taxonomy
83
+ * Query by custom taxonomy values
84
+ *
85
+ * @return $args = array();
86
+ * @since 2.5.0
87
+ */
88
+ function alm_get_taxonomy($taxonomy, $taxonomy_terms, $taxonomy_operator){
89
+ if(!empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator)){
90
+ $the_terms = explode(",", $taxonomy_terms);
91
+ $args = array(
92
+ 'taxonomy' => $taxonomy,
93
+ 'field' => 'slug',
94
+ 'terms' => $the_terms,
95
+ 'operator' => $taxonomy_operator,
96
+ );
97
+ return $args;
98
+ }
99
+ }
100
+
101
+
102
+
103
+ /*
104
+ * alm_get_tax_query
105
+ * Query by custom taxonomy values
106
+ *
107
+ * @return $args = array();
108
+ * @since 2.5.0
109
+ */
110
+ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_operator){
111
+
112
+ // Taxonomy [ONLY]
113
+ if(!empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator) && empty($post_format)){
114
+ $the_terms = explode(",", $taxonomy_terms);
115
+ $args = array(
116
+ 'taxonomy' => $taxonomy,
117
+ 'field' => 'slug',
118
+ 'terms' => $the_terms,
119
+ 'operator' => $taxonomy_operator,
120
+ );
121
+ return $args;
122
+ }
123
+
124
+ // Post Format [ONLY]
125
+ if(!empty($post_format) && empty($taxonomy)){
126
+ $format = "post-format-$post_format";
127
+ //If query is for standard then we need to filter by NOT IN
128
+ if($format == 'post-format-standard'){
129
+ if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
130
+ $terms = array();
131
+ foreach ($post_formats[0] as $format) {
132
+ $terms[] = 'post-format-'.$format;
133
+ }
134
+ }
135
+ $args = array(
136
+ 'taxonomy' => 'post_format',
137
+ 'terms' => $terms,
138
+ 'field' => 'slug',
139
+ 'operator' => 'NOT IN',
140
+ );
141
+ }else{
142
+ $args = array(
143
+ 'taxonomy' => 'post_format',
144
+ 'field' => 'slug',
145
+ 'terms' => array($format),
146
+ );
147
+ }
148
+ return $args;
149
+ }
150
+
151
+ // Taxonomy && Post Format [COMBINED]
152
+ if(!empty($post_format) && !empty($taxonomy) && !empty($taxonomy_terms) && !empty($taxonomy_operator)){
153
+ $the_terms = explode(",", $taxonomy_terms);
154
+ $args = array(
155
+ 'taxonomy' => $taxonomy,
156
+ 'field' => 'slug',
157
+ 'terms' => $the_terms,
158
+ 'operator' => $taxonomy_operator,
159
+ );
160
+ $format = "post-format-$post_format";
161
+ //If query is for standard then we need to filter by NOT IN
162
+ if($format == 'post-format-standard'){
163
+ if (($post_formats = get_theme_support('post-formats')) && is_array($post_formats[0]) && count($post_formats[0])) {
164
+ $terms = array();
165
+ foreach ($post_formats[0] as $format) {
166
+ $terms[] = 'post-format-'.$format;
167
+ }
168
+ }
169
+ $format_args = array(
170
+ 'taxonomy' => 'post_format',
171
+ 'terms' => $terms,
172
+ 'field' => 'slug',
173
+ 'operator' => 'NOT IN',
174
+ );
175
+ }else{
176
+ $format_args = array(
177
+ 'taxonomy' => 'post_format',
178
+ 'field' => 'slug',
179
+ 'terms' => array($format),
180
+ );
181
+ }
182
+ $args[] = $format_args; // Combined format and tax $args
183
+ return $args;
184
+ }
185
+ }
186
+
187
+
188
+
189
+ /*
190
+ * alm_get_meta_query
191
+ * Query by custom field values
192
+ *
193
+ * @return $args = array();
194
+ * @since 2.5.0
195
+ */
196
+ function alm_get_meta_query($meta_key, $meta_value, $meta_compare){
197
+ if(!empty($meta_key) && !empty($meta_value)){
198
+ // See the docs (http://codex.wordpress.org/Class_Reference/WP_Meta_Query)
199
+ if($meta_compare === 'IN' || $meta_compare === 'NOT IN' || $meta_compare === 'BETWEEN' || $meta_compare === 'NOT BETWEEN'){
200
+ // Remove all whitespace for meta_value because it needs to be an exact match
201
+ $mv_trimmed = preg_replace('/\s+/', ' ', $meta_value); // Trim whitespace
202
+ $meta_values = str_replace(', ', ',', $mv_trimmed); // Replace [term, term] with [term,term]
203
+ $meta_values = explode(",", $meta_values);
204
+ }else{
205
+ $meta_values = $meta_value;
206
+ }
207
+ $args = array(
208
+ 'key' => $meta_key,
209
+ 'value' => $meta_values,
210
+ 'compare' => $meta_compare,
211
+ );
212
+ return $args;
213
+ }
214
+ }
215
+
core/js/ajax-load-more.js CHANGED
@@ -11,9 +11,11 @@
11
  * Twitter: @KaptonKaos
12
  */
13
 
14
- (function ($) {
15
  "use strict";
16
 
 
 
17
  $.ajaxloadmore = function (el) {
18
 
19
  //Set variables
@@ -22,6 +24,7 @@
22
  alm.page = 0;
23
  alm.speed = 300;
24
  alm.proceed = false;
 
25
  alm.init = true;
26
  alm.loading = true;
27
  alm.finished = false;
@@ -29,23 +32,44 @@
29
  alm.button_label = '';
30
  alm.data;
31
  alm.el = el;
32
- alm.content = $('.alm-listing', alm.el);
33
- alm.scroll = true;
34
  alm.prefix = 'alm-';
35
  alm.repeater = alm.content.data('repeater');
36
  alm.max_pages = alm.content.data('max-pages');
37
- alm.pause = alm.content.data('pause');
38
- alm.offset = alm.content.data('offset');
39
  alm.transition = alm.content.data('transition');
 
40
  alm.lang = alm.content.data('lang');
41
- alm.posts_per_page = alm.content.data('posts-per-page');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
-
44
  /* SEO ADD-ON */
45
  // - get SEO values from shortcode
46
- // - Added v2.3
47
 
48
- alm.seo = alm.content.data('seo'); // true | false
49
  if (alm.seo === undefined)
50
  alm.seo = false;
51
 
@@ -57,7 +81,7 @@
57
  alm.seo_scroll = alm.content.data('seo-scroll');
58
  alm.seo_scroll_speed = alm.content.data('seo-scroll-speed');
59
 
60
- alm.isPaged = false;
61
 
62
  if(alm.start_page > 1) {
63
  alm.isPaged = true; // Is this a $paged page > 1 ?
@@ -68,40 +92,39 @@
68
  /* END SEO Add-on */
69
 
70
 
71
- // Pause
72
- // - Cound be used to hold the loading of posts for a button click.
 
73
  if (alm.pause === undefined || (alm.seo && alm.start_page > 1)) {
74
  alm.pause = false;
75
  }
76
 
77
- // Repeater Template
78
  if (alm.repeater === undefined) {
79
  alm.repeater = 'default';
80
  }
81
 
82
- // Max Pages to load while scrolling
83
  if (alm.max_pages === undefined) {
84
  alm.max_pages = 5;
85
  }
86
- if (alm.max_pages === 'none') {
87
- alm.max_pages = 1000000;
88
  }
89
 
90
- // Transition
91
  if (alm.transition === undefined) {
92
  alm.transition = 'slide';
93
  } else if (alm.transition === "fade") {
94
  alm.transition = 'fade';
 
 
95
  } else {
96
  alm.transition = 'slide';
97
  }
98
 
99
- // Offset
100
- if (alm.offset === undefined) {
101
- alm.offset = 0;
102
- } else {
103
- alm.offset = alm.content.data('offset');
104
- }
105
 
106
  // Button Label & classes
107
  if (alm.content.data('button-label') === undefined) {
@@ -113,9 +136,9 @@
113
  alm.button_class = '';
114
  } else {
115
  alm.button_class = ' ' + alm.content.data('button-class');
116
- }
117
 
118
- // Scroll (true/false)
119
  if (alm.content.data('scroll') === undefined) {
120
  alm.scroll = true;
121
  } else if (alm.content.data('scroll') === false) {
@@ -124,7 +147,7 @@
124
  alm.scroll = true;
125
  }
126
 
127
- // Post Types (split mulitples into array)
128
  alm.post_type = alm.content.data('post-type');
129
  alm.post_type = alm.post_type.split(",");
130
 
@@ -139,108 +162,138 @@
139
  * @since 2.0.0
140
  */
141
  alm.AjaxLoadMore.loadPosts = function () {
142
- alm.button.addClass('loading');
143
- alm.loading = true;
144
- $.ajax({
145
- type: "GET",
146
- url: alm_localize.ajaxurl,
147
- data: {
148
- action: 'ajax_load_more_init',
149
- nonce: alm_localize.alm_nonce,
150
- repeater: alm.repeater,
151
- postType: alm.post_type,
152
- postFormat: alm.content.data('post-format'),
153
- category: alm.content.data('category'),
154
- author: alm.content.data('author'),
155
- taxonomy: alm.content.data('taxonomy'),
156
- taxonomy_terms: alm.content.data('taxonomy-terms'),
157
- taxonomy_operator: alm.content.data('taxonomy-operator'),
158
- meta_key: alm.content.data('meta-key'),
159
- meta_value: alm.content.data('meta-value'),
160
- meta_compare: alm.content.data('meta-compare'),
161
- year: alm.content.data('year'),
162
- month: alm.content.data('month'),
163
- day: alm.content.data('day'),
164
- tag: alm.content.data('tag'),
165
- post_status: alm.content.data('post-status'),
166
- order: alm.content.data('order'),
167
- orderby: alm.content.data('orderby'),
168
- search: alm.content.data('search'),
169
- exclude: alm.content.data('exclude'),
170
- numPosts: alm.posts_per_page,
171
- pageNumber: alm.page,
172
- offset: alm.offset,
173
- lang: alm.lang
174
- },
175
- dataType: "html",
176
- // parse the data as html
177
- beforeSend: function () {
178
- if (alm.page != 1) {
179
- alm.button.addClass('loading');
180
- }
181
- },
182
- success: function (data) {
183
- alm.data = $(data); // Convert data to an object
184
- //console.log(alm.data.length);
185
- if (alm.init) {
186
- alm.button.text(alm.button_label);
187
- alm.init = false;
 
 
188
 
189
- if(alm.isPaged){
190
- alm.posts_per_page = alm.content.data('posts-per-page'); // Reset our posts per page variable
191
- alm.page = alm.start_page - 1; // Set our new page #
 
 
 
 
 
192
  }
193
 
194
- }
195
- if (alm.data.length > 0) {
196
- alm.el = $('<div class="' + alm.prefix + 'reveal"/>');
197
- alm.el.append(alm.data);
198
- alm.el.hide();
199
- alm.content.append(alm.el);
200
- if (alm.transition === 'fade') { // Fade transition
201
- alm.el.fadeIn(alm.speed, 'alm_easeInOutQuad', function () {
202
- alm.loading = false;
203
- alm.button.delay(alm.speed).removeClass('loading');
204
- if (alm.data.length < alm.posts_per_page) {
205
- alm.finished = true;
206
- alm.button.addClass('done');
207
- }
208
- });
209
- } else { // Slide transition
210
- alm.el.slideDown(alm.speed, 'alm_easeInOutQuad', function () {
211
  alm.loading = false;
212
  alm.button.delay(alm.speed).removeClass('loading');
213
  if (alm.data.length < alm.posts_per_page) {
214
  alm.finished = true;
215
  alm.button.addClass('done');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
- });
218
- }
219
-
220
- // ALM Complete
221
- if ($.isFunction($.fn.almComplete)) {
222
- $.fn.almComplete(alm);
223
  }
224
 
225
- // ALM SEO
226
- // - Only run if a single instance is on the page.
227
- if($(".ajax-load-more-wrap").length === 1){
228
- if ($.isFunction($.fn.almSEO) && alm.seo) {
229
- $.fn.almSEO(alm);
 
 
 
 
 
230
  }
231
  }
232
-
233
- } else {
234
- alm.button.delay(alm.speed).removeClass('loading').addClass('done');
 
235
  alm.loading = false;
236
- alm.finished = true;
237
  }
238
- },
239
- error: function (jqXHR, textStatus, errorThrown) {
240
- alm.loading = false;
241
- alm.button.removeClass('loading');
242
- }
243
- });
244
  };
245
 
246
 
@@ -285,8 +338,7 @@
285
  alm.window.bind("scroll touchstart", function () {
286
  if (alm.AjaxLoadMore.isVisible()) {
287
  var content_offset = alm.button.offset();
288
- if (!alm.loading && !alm.finished && alm.window.scrollTop() >= Math.round(content_offset.top - (alm.window.height() - 150)) && alm.page < (alm.max_pages - 1) && alm.proceed && !alm.pause) {
289
- alm.loading = true;
290
  alm.page++;
291
  alm.AjaxLoadMore.loadPosts();
292
  }
@@ -294,13 +346,21 @@
294
  });
295
  }
296
 
297
-
298
- //Check for pause variable
299
- if (alm.pause === true) {
300
- alm.button.text(alm.button_label);
301
- alm.loading = false;
302
- } else {
303
- alm.AjaxLoadMore.loadPosts();
 
 
 
 
 
 
 
 
304
  }
305
 
306
 
@@ -329,17 +389,11 @@
329
  $(this).data('alm', new $.ajaxloadmore($(this)));
330
  });
331
  }
332
-
333
-
334
- $(window).scrollTop(0); //Prevent loading of unnessasry posts - move user to top of page
335
-
336
-
337
  /*
338
  * Initiate Ajax load More if div is present on screen
339
  * @since 2.1.2
340
  */
341
-
342
- if ($(".ajax-load-more-wrap").length)
343
- $(".ajax-load-more-wrap").ajaxloadmore();
344
 
345
  })(jQuery);
11
  * Twitter: @KaptonKaos
12
  */
13
 
14
+ (function ($) {
15
  "use strict";
16
 
17
+ $(window).scrollTop(0); //Prevent loading of unnessasry posts - move user to top of page
18
+
19
  $.ajaxloadmore = function (el) {
20
 
21
  //Set variables
24
  alm.page = 0;
25
  alm.speed = 300;
26
  alm.proceed = false;
27
+ alm.disable_ajax = false;
28
  alm.init = true;
29
  alm.loading = true;
30
  alm.finished = false;
32
  alm.button_label = '';
33
  alm.data;
34
  alm.el = el;
35
+ alm.content = $('.alm-listing.alm-ajax', alm.el);
 
36
  alm.prefix = 'alm-';
37
  alm.repeater = alm.content.data('repeater');
38
  alm.max_pages = alm.content.data('max-pages');
39
+ alm.pause = alm.content.data('pause'); // true | false
 
40
  alm.transition = alm.content.data('transition');
41
+ alm.destroy_after = alm.content.data('destroy_after');
42
  alm.lang = alm.content.data('lang');
43
+ alm.posts_per_page = alm.content.data('posts-per-page');
44
+ alm.seo = alm.content.data('seo'); // true | false
45
+ alm.preloaded = alm.content.data('preloaded'); // true | false
46
+ alm.preloaded_amount = alm.content.data('preloaded_amount'); // 0 - ?
47
+
48
+ // Define offset
49
+ if (alm.content.data('offset') === undefined) {
50
+ alm.offset = 0;
51
+ } else {
52
+ alm.offset = alm.content.data('offset');
53
+ }
54
+
55
+ /* Preloaded */
56
+ // Check preloaded posts to ensure posts_per_page > alm.total_posts
57
+ // - if posts_per_page <= total_posts disable ajax load more
58
+ if(alm.preloaded){
59
+ alm.preload_wrap = alm.content.prev('.alm-preloaded');
60
+ alm.total_posts = alm.preload_wrap.data('total-posts');
61
+ if (alm.preloaded_amount === undefined)
62
+ alm.preloaded_amount = false;
63
+ if(alm.total_posts <= alm.preloaded_amount)
64
+ alm.disable_ajax = true;
65
+ }
66
+ /* END Preload */
67
+
68
 
 
69
  /* SEO ADD-ON */
70
  // - get SEO values from shortcode
71
+ // - Added v2.3
72
 
 
73
  if (alm.seo === undefined)
74
  alm.seo = false;
75
 
81
  alm.seo_scroll = alm.content.data('seo-scroll');
82
  alm.seo_scroll_speed = alm.content.data('seo-scroll-speed');
83
 
84
+ alm.isPaged = false;
85
 
86
  if(alm.start_page > 1) {
87
  alm.isPaged = true; // Is this a $paged page > 1 ?
92
  /* END SEO Add-on */
93
 
94
 
95
+
96
+ // Check for pause on init
97
+ // Pause could be used to hold the loading of posts for a button click.
98
  if (alm.pause === undefined || (alm.seo && alm.start_page > 1)) {
99
  alm.pause = false;
100
  }
101
 
102
+ // Select the repeater template
103
  if (alm.repeater === undefined) {
104
  alm.repeater = 'default';
105
  }
106
 
107
+ // Max number of pages to load while scrolling
108
  if (alm.max_pages === undefined) {
109
  alm.max_pages = 5;
110
  }
111
+ if (alm.max_pages === 0) {
112
+ alm.max_pages = 1000;
113
  }
114
 
115
+ // select the transition
116
  if (alm.transition === undefined) {
117
  alm.transition = 'slide';
118
  } else if (alm.transition === "fade") {
119
  alm.transition = 'fade';
120
+ } else if (alm.transition === "none") {
121
+ alm.transition = 'none';
122
  } else {
123
  alm.transition = 'slide';
124
  }
125
 
126
+ // Destroy After
127
+ if (alm.destroy_after !== undefined) {}
 
 
 
 
128
 
129
  // Button Label & classes
130
  if (alm.content.data('button-label') === undefined) {
136
  alm.button_class = '';
137
  } else {
138
  alm.button_class = ' ' + alm.content.data('button-class');
139
+ }
140
 
141
+ // Define on Scroll event
142
  if (alm.content.data('scroll') === undefined) {
143
  alm.scroll = true;
144
  } else if (alm.content.data('scroll') === false) {
147
  alm.scroll = true;
148
  }
149
 
150
+ // Parse multiple Post Types
151
  alm.post_type = alm.content.data('post-type');
152
  alm.post_type = alm.post_type.split(",");
153
 
162
  * @since 2.0.0
163
  */
164
  alm.AjaxLoadMore.loadPosts = function () {
165
+ if(!alm.disable_ajax){ // Check for ajax blocker
166
+ alm.button.addClass('loading');
167
+ alm.loading = true;
168
+ $.ajax({
169
+ type: "GET",
170
+ url: alm_localize.ajaxurl,
171
+ data: {
172
+ action: 'ajax_load_more_init',
173
+ nonce: alm_localize.alm_nonce,
174
+ repeater: alm.repeater,
175
+ postType: alm.post_type,
176
+ post_format: alm.content.data('post-format'),
177
+ category: alm.content.data('category'),
178
+ category__not_in: alm.content.data('category__not_in'),
179
+ tag: alm.content.data('tag'),
180
+ tag__not_in: alm.content.data('tag__not_in'),
181
+ taxonomy: alm.content.data('taxonomy'),
182
+ taxonomy_terms: alm.content.data('taxonomy-terms'),
183
+ taxonomy_operator: alm.content.data('taxonomy-operator'),
184
+ meta_key: alm.content.data('meta-key'),
185
+ meta_value: alm.content.data('meta-value'),
186
+ meta_compare: alm.content.data('meta-compare'),
187
+ author: alm.content.data('author'),
188
+ year: alm.content.data('year'),
189
+ month: alm.content.data('month'),
190
+ day: alm.content.data('day'),
191
+ post_status: alm.content.data('post-status'),
192
+ order: alm.content.data('order'),
193
+ orderby: alm.content.data('orderby'),
194
+ search: alm.content.data('search'),
195
+ exclude: alm.content.data('exclude'),
196
+ posts_per_page: alm.posts_per_page,
197
+ pageNumber: alm.page,
198
+ offset: alm.offset,
199
+ preloaded: alm.preloaded,
200
+ preloaded_amount: alm.preloaded_amount,
201
+ lang: alm.lang
202
+ },
203
+ dataType: "html",
204
+ // parse the data as html
205
+ beforeSend: function () {
206
+ if (alm.page != 1) {
207
+ alm.button.addClass('loading');
208
+ }
209
+ },
210
+ success: function (data) {
211
+ alm.data = $(data); // Convert data to an object
212
+ //console.log(alm.data.length);
213
 
214
+ if (alm.init) {
215
+ alm.button.text(alm.button_label);
216
+ alm.init = false;
217
+
218
+ if(alm.isPaged){
219
+ alm.posts_per_page = alm.content.data('posts-per-page'); // Reset our posts per page variable
220
+ alm.page = alm.start_page - 1; // Set our new page #
221
+ }
222
  }
223
 
224
+ if (alm.data.length > 0) {
225
+ alm.el = $('<div class="' + alm.prefix + 'reveal"/>');
226
+ alm.el.append(alm.data);
227
+ alm.el.hide();
228
+ alm.content.append(alm.el);
229
+ if (alm.transition === 'fade') { // Fade transition
230
+ alm.el.fadeIn(alm.speed, 'alm_easeInOutQuad', function () {
231
+ alm.loading = false;
232
+ alm.button.delay(alm.speed).removeClass('loading');
233
+ if (alm.data.length < alm.posts_per_page) {
234
+ alm.finished = true;
235
+ alm.button.addClass('done');
236
+ }
237
+ });
238
+ }else if(alm.transition === 'none') { // Fade transition
239
+ alm.el.show();
 
240
  alm.loading = false;
241
  alm.button.delay(alm.speed).removeClass('loading');
242
  if (alm.data.length < alm.posts_per_page) {
243
  alm.finished = true;
244
  alm.button.addClass('done');
245
+ }
246
+ }else { // Slide transition
247
+ alm.el.slideDown(alm.speed, 'alm_easeInOutQuad', function () {
248
+ alm.loading = false;
249
+ alm.button.delay(alm.speed).removeClass('loading');
250
+ if (alm.data.length < alm.posts_per_page) {
251
+ alm.finished = true;
252
+ alm.button.addClass('done');
253
+ }
254
+ });
255
+ }
256
+
257
+ // ALM Complete
258
+ if ($.isFunction($.fn.almComplete)) {
259
+ $.fn.almComplete(alm);
260
+ }
261
+
262
+ // ALM SEO
263
+ // - Only run if a single instance is on the page.
264
+ if($(".ajax-load-more-wrap").length === 1){
265
+ if ($.isFunction($.fn.almSEO) && alm.seo) {
266
+ $.fn.almSEO(alm);
267
  }
268
+ }
269
+
270
+ } else {
271
+ alm.button.delay(alm.speed).removeClass('loading').addClass('done');
272
+ alm.loading = false;
273
+ alm.finished = true;
274
  }
275
 
276
+ // Destroy After param
277
+ if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
278
+ //console.log(alm.destroy_after);
279
+ //console.log(alm.page);
280
+ var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
281
+ if(alm.preload) currentPage++;
282
+
283
+ if(currentPage === alm.destroy_after){ // - Disable ALM is page = alm.destroy_after value
284
+ alm.disable_ajax = true;
285
+ alm.button.delay(alm.speed).fadeOut(alm.speed);
286
  }
287
  }
288
+
289
+
290
+ },
291
+ error: function (jqXHR, textStatus, errorThrown) {
292
  alm.loading = false;
293
+ alm.button.removeClass('loading');
294
  }
295
+ });
296
+ }
 
 
 
 
297
  };
298
 
299
 
338
  alm.window.bind("scroll touchstart", function () {
339
  if (alm.AjaxLoadMore.isVisible()) {
340
  var content_offset = alm.button.offset();
341
+ if (!alm.loading && !alm.finished && (alm.window.scrollTop() >= Math.round(content_offset.top - (alm.window.height() - 150))) && alm.page < (alm.max_pages - 1) && alm.proceed && !alm.pause) {
 
342
  alm.page++;
343
  alm.AjaxLoadMore.loadPosts();
344
  }
346
  });
347
  }
348
 
349
+ /* Init Ajax load More
350
+ *
351
+ * Load posts as user scrolls the page
352
+ * @since 2.0
353
+ */
354
+ if(alm.disable_ajax){
355
+ alm.finished = true;
356
+ alm.button.addClass('done');
357
+ }else{
358
+ if (alm.pause === true) {
359
+ alm.button.text(alm.button_label);
360
+ alm.loading = false;
361
+ } else {
362
+ alm.AjaxLoadMore.loadPosts();
363
+ }
364
  }
365
 
366
 
389
  $(this).data('alm', new $.ajaxloadmore($(this)));
390
  });
391
  }
392
+
 
 
 
 
393
  /*
394
  * Initiate Ajax load More if div is present on screen
395
  * @since 2.1.2
396
  */
397
+ if ($(".ajax-load-more-wrap").length) $(".ajax-load-more-wrap").ajaxloadmore();
 
 
398
 
399
  })(jQuery);
core/js/ajax-load-more.min.js CHANGED
@@ -9,26 +9,30 @@
9
  *
10
  * Author: Darren Cooney
11
  * Twitter: @KaptonKaos
12
- */
13
 
14
- (function($){"use strict";$.ajaxloadmore=function(el){var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.speed=300;alm.proceed=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.data;alm.el=el;alm.content=$('.alm-listing',alm.el);alm.scroll=true;alm.prefix='alm-';alm.repeater=alm.content.data('repeater');alm.max_pages=alm.content.data('max-pages');alm.pause=alm.content.data('pause');alm.offset=alm.content.data('offset');alm.transition=alm.content.data('transition');alm.lang=alm.content.data('lang');alm.posts_per_page=alm.content.data('posts-per-page');alm.seo=alm.content.data('seo');if(alm.seo===undefined)
 
 
 
 
15
  alm.seo=false;alm.permalink=alm.content.data('seo-permalink');alm.start_page=alm.content.data('seo-start-page');if(alm.start_page){alm.seo_scroll=alm.content.data('seo-scroll');alm.seo_scroll_speed=alm.content.data('seo-scroll-speed');alm.isPaged=false;if(alm.start_page>1){alm.isPaged=true;alm.posts_per_page=alm.start_page*alm.posts_per_page;}}
16
  if(alm.pause===undefined||(alm.seo&&alm.start_page>1)){alm.pause=false;}
17
  if(alm.repeater===undefined){alm.repeater='default';}
18
  if(alm.max_pages===undefined){alm.max_pages=5;}
19
- if(alm.max_pages==='none'){alm.max_pages=1000000;}
20
- if(alm.transition===undefined){alm.transition='slide';}else if(alm.transition==="fade"){alm.transition='fade';}else{alm.transition='slide';}
21
- if(alm.offset===undefined){alm.offset=0;}else{alm.offset=alm.content.data('offset');}
22
  if(alm.content.data('button-label')===undefined){alm.button_label='Older Posts';}else{alm.button_label=alm.content.data('button-label');}
23
  if(alm.content.data('button-class')===undefined){alm.button_class='';}else{alm.button_class=' '+alm.content.data('button-class');}
24
  if(alm.content.data('scroll')===undefined){alm.scroll=true;}else if(alm.content.data('scroll')===false){alm.scroll=false;}else{alm.scroll=true;}
25
- alm.post_type=alm.content.data('post-type');alm.post_type=alm.post_type.split(",");alm.el.append('<div class="'+alm.prefix+'btn-wrap"><button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button></div>');alm.button=$('.alm-load-more-btn',alm.el);alm.AjaxLoadMore.loadPosts=function(){alm.button.addClass('loading');alm.loading=true;$.ajax({type:"GET",url:alm_localize.ajaxurl,data:{action:'ajax_load_more_init',nonce:alm_localize.alm_nonce,repeater:alm.repeater,postType:alm.post_type,postFormat:alm.content.data('post-format'),category:alm.content.data('category'),author:alm.content.data('author'),taxonomy:alm.content.data('taxonomy'),taxonomy_terms:alm.content.data('taxonomy-terms'),taxonomy_operator:alm.content.data('taxonomy-operator'),meta_key:alm.content.data('meta-key'),meta_value:alm.content.data('meta-value'),meta_compare:alm.content.data('meta-compare'),year:alm.content.data('year'),month:alm.content.data('month'),day:alm.content.data('day'),tag:alm.content.data('tag'),post_status:alm.content.data('post-status'),order:alm.content.data('order'),orderby:alm.content.data('orderby'),search:alm.content.data('search'),exclude:alm.content.data('exclude'),numPosts:alm.posts_per_page,pageNumber:alm.page,offset:alm.offset,lang:alm.lang},dataType:"html",beforeSend:function(){if(alm.page!=1){alm.button.addClass('loading');}},success:function(data){alm.data=$(data);if(alm.init){alm.button.text(alm.button_label);alm.init=false;if(alm.isPaged){alm.posts_per_page=alm.content.data('posts-per-page');alm.page=alm.start_page-1;}}
26
- if(alm.data.length>0){alm.el=$('<div class="'+alm.prefix+'reveal"/>');alm.el.append(alm.data);alm.el.hide();alm.content.append(alm.el);if(alm.transition==='fade'){alm.el.fadeIn(alm.speed,'alm_easeInOutQuad',function(){alm.loading=false;alm.button.delay(alm.speed).removeClass('loading');if(alm.data.length<alm.posts_per_page){alm.finished=true;alm.button.addClass('done');}});}else{alm.el.slideDown(alm.speed,'alm_easeInOutQuad',function(){alm.loading=false;alm.button.delay(alm.speed).removeClass('loading');if(alm.data.length<alm.posts_per_page){alm.finished=true;alm.button.addClass('done');}});}
27
  if($.isFunction($.fn.almComplete)){$.fn.almComplete(alm);}
28
- if($(".ajax-load-more-wrap").length===1){if($.isFunction($.fn.almSEO)&&alm.seo){$.fn.almSEO(alm);}}}else{alm.button.delay(alm.speed).removeClass('loading').addClass('done');alm.loading=false;alm.finished=true;}},error:function(jqXHR,textStatus,errorThrown){alm.loading=false;alm.button.removeClass('loading');}});};alm.button.on('click',function(){if(alm.pause===true){alm.pause=false;alm.AjaxLoadMore.loadPosts();}
 
29
  if(!alm.loading&&!alm.finished&&!$(this).hasClass('done')){alm.loading=true;alm.page++;alm.AjaxLoadMore.loadPosts();}});alm.AjaxLoadMore.isVisible=function(){alm.visible=false;if(alm.el.is(":visible")){alm.visible=true;}
30
- return alm.visible;};if(alm.scroll){alm.window.bind("scroll touchstart",function(){if(alm.AjaxLoadMore.isVisible()){var content_offset=alm.button.offset();if(!alm.loading&&!alm.finished&&alm.window.scrollTop()>=Math.round(content_offset.top-(alm.window.height()-150))&&alm.page<(alm.max_pages-1)&&alm.proceed&&!alm.pause){alm.loading=true;alm.page++;alm.AjaxLoadMore.loadPosts();}}});}
31
- if(alm.pause===true){alm.button.text(alm.button_label);alm.loading=false;}else{alm.AjaxLoadMore.loadPosts();}
32
  setTimeout(function(){alm.proceed=true;},1000);$.easing.alm_easeInOutQuad=function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;};};$.fn.ajaxloadmore=function(){return this.each(function(){$(this).data('alm',new $.ajaxloadmore($(this)));});}
33
- $(window).scrollTop(0);if($(".ajax-load-more-wrap").length)
34
- $(".ajax-load-more-wrap").ajaxloadmore();})(jQuery);
9
  *
10
  * Author: Darren Cooney
11
  * Twitter: @KaptonKaos
12
+ */
13
 
14
+ (function($){"use strict";$(window).scrollTop(0);$.ajaxloadmore=function(el){var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.speed=300;alm.proceed=false;alm.disable_ajax=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.data;alm.el=el;alm.content=$('.alm-listing.alm-ajax',alm.el);alm.prefix='alm-';alm.repeater=alm.content.data('repeater');alm.max_pages=alm.content.data('max-pages');alm.pause=alm.content.data('pause');alm.transition=alm.content.data('transition');alm.destroy_after=alm.content.data('destroy_after');alm.lang=alm.content.data('lang');alm.posts_per_page=alm.content.data('posts-per-page');alm.seo=alm.content.data('seo');alm.preloaded=alm.content.data('preloaded');alm.preloaded_amount=alm.content.data('preloaded_amount');if(alm.content.data('offset')===undefined){alm.offset=0;}else{alm.offset=alm.content.data('offset');}
15
+ if(alm.preloaded){alm.preload_wrap=alm.content.prev('.alm-preloaded');alm.total_posts=alm.preload_wrap.data('total-posts');if(alm.preloaded_amount===undefined)
16
+ alm.preloaded_amount=false;if(alm.total_posts<=alm.preloaded_amount)
17
+ alm.disable_ajax=true;}
18
+ if(alm.seo===undefined)
19
  alm.seo=false;alm.permalink=alm.content.data('seo-permalink');alm.start_page=alm.content.data('seo-start-page');if(alm.start_page){alm.seo_scroll=alm.content.data('seo-scroll');alm.seo_scroll_speed=alm.content.data('seo-scroll-speed');alm.isPaged=false;if(alm.start_page>1){alm.isPaged=true;alm.posts_per_page=alm.start_page*alm.posts_per_page;}}
20
  if(alm.pause===undefined||(alm.seo&&alm.start_page>1)){alm.pause=false;}
21
  if(alm.repeater===undefined){alm.repeater='default';}
22
  if(alm.max_pages===undefined){alm.max_pages=5;}
23
+ if(alm.max_pages===0){alm.max_pages=1000;}
24
+ if(alm.transition===undefined){alm.transition='slide';}else if(alm.transition==="fade"){alm.transition='fade';}else if(alm.transition==="none"){alm.transition='none';}else{alm.transition='slide';}
25
+ if(alm.destroy_after!==undefined){}
26
  if(alm.content.data('button-label')===undefined){alm.button_label='Older Posts';}else{alm.button_label=alm.content.data('button-label');}
27
  if(alm.content.data('button-class')===undefined){alm.button_class='';}else{alm.button_class=' '+alm.content.data('button-class');}
28
  if(alm.content.data('scroll')===undefined){alm.scroll=true;}else if(alm.content.data('scroll')===false){alm.scroll=false;}else{alm.scroll=true;}
29
+ alm.post_type=alm.content.data('post-type');alm.post_type=alm.post_type.split(",");alm.el.append('<div class="'+alm.prefix+'btn-wrap"><button id="load-more" class="'+alm.prefix+'load-more-btn more'+alm.button_class+'">'+alm.button_label+'</button></div>');alm.button=$('.alm-load-more-btn',alm.el);alm.AjaxLoadMore.loadPosts=function(){if(!alm.disable_ajax){alm.button.addClass('loading');alm.loading=true;$.ajax({type:"GET",url:alm_localize.ajaxurl,data:{action:'ajax_load_more_init',nonce:alm_localize.alm_nonce,repeater:alm.repeater,postType:alm.post_type,post_format:alm.content.data('post-format'),category:alm.content.data('category'),category__not_in:alm.content.data('category__not_in'),tag:alm.content.data('tag'),tag__not_in:alm.content.data('tag__not_in'),taxonomy:alm.content.data('taxonomy'),taxonomy_terms:alm.content.data('taxonomy-terms'),taxonomy_operator:alm.content.data('taxonomy-operator'),meta_key:alm.content.data('meta-key'),meta_value:alm.content.data('meta-value'),meta_compare:alm.content.data('meta-compare'),author:alm.content.data('author'),year:alm.content.data('year'),month:alm.content.data('month'),day:alm.content.data('day'),post_status:alm.content.data('post-status'),order:alm.content.data('order'),orderby:alm.content.data('orderby'),search:alm.content.data('search'),exclude:alm.content.data('exclude'),posts_per_page:alm.posts_per_page,pageNumber:alm.page,offset:alm.offset,preloaded:alm.preloaded,preloaded_amount:alm.preloaded_amount,lang:alm.lang},dataType:"html",beforeSend:function(){if(alm.page!=1){alm.button.addClass('loading');}},success:function(data){alm.data=$(data);if(alm.init){alm.button.text(alm.button_label);alm.init=false;if(alm.isPaged){alm.posts_per_page=alm.content.data('posts-per-page');alm.page=alm.start_page-1;}}
30
+ if(alm.data.length>0){alm.el=$('<div class="'+alm.prefix+'reveal"/>');alm.el.append(alm.data);alm.el.hide();alm.content.append(alm.el);if(alm.transition==='fade'){alm.el.fadeIn(alm.speed,'alm_easeInOutQuad',function(){alm.loading=false;alm.button.delay(alm.speed).removeClass('loading');if(alm.data.length<alm.posts_per_page){alm.finished=true;alm.button.addClass('done');}});}else if(alm.transition==='none'){alm.el.show();alm.loading=false;alm.button.delay(alm.speed).removeClass('loading');if(alm.data.length<alm.posts_per_page){alm.finished=true;alm.button.addClass('done');}}else{alm.el.slideDown(alm.speed,'alm_easeInOutQuad',function(){alm.loading=false;alm.button.delay(alm.speed).removeClass('loading');if(alm.data.length<alm.posts_per_page){alm.finished=true;alm.button.addClass('done');}});}
31
  if($.isFunction($.fn.almComplete)){$.fn.almComplete(alm);}
32
+ if($(".ajax-load-more-wrap").length===1){if($.isFunction($.fn.almSEO)&&alm.seo){$.fn.almSEO(alm);}}}else{alm.button.delay(alm.speed).removeClass('loading').addClass('done');alm.loading=false;alm.finished=true;}
33
+ if(alm.destroy_after!==undefined&&alm.destroy_after!==''){var currentPage=alm.page+1;if(alm.preload)currentPage++;if(currentPage===alm.destroy_after){alm.disable_ajax=true;alm.button.delay(alm.speed).fadeOut(alm.speed);}}},error:function(jqXHR,textStatus,errorThrown){alm.loading=false;alm.button.removeClass('loading');}});}};alm.button.on('click',function(){if(alm.pause===true){alm.pause=false;alm.AjaxLoadMore.loadPosts();}
34
  if(!alm.loading&&!alm.finished&&!$(this).hasClass('done')){alm.loading=true;alm.page++;alm.AjaxLoadMore.loadPosts();}});alm.AjaxLoadMore.isVisible=function(){alm.visible=false;if(alm.el.is(":visible")){alm.visible=true;}
35
+ return alm.visible;};if(alm.scroll){alm.window.bind("scroll touchstart",function(){if(alm.AjaxLoadMore.isVisible()){var content_offset=alm.button.offset();if(!alm.loading&&!alm.finished&&(alm.window.scrollTop()>=Math.round(content_offset.top-(alm.window.height()-150)))&&alm.page<(alm.max_pages-1)&&alm.proceed&&!alm.pause){alm.page++;alm.AjaxLoadMore.loadPosts();}}});}
36
+ if(alm.disable_ajax){alm.finished=true;alm.button.addClass('done');}else{if(alm.pause===true){alm.button.text(alm.button_label);alm.loading=false;}else{alm.AjaxLoadMore.loadPosts();}}
37
  setTimeout(function(){alm.proceed=true;},1000);$.easing.alm_easeInOutQuad=function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;};};$.fn.ajaxloadmore=function(){return this.each(function(){$(this).data('alm',new $.ajaxloadmore($(this)));});}
38
+ if($(".ajax-load-more-wrap").length)$(".ajax-load-more-wrap").ajaxloadmore();})(jQuery);
 
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: 2015-01-12 23:23-0500\n"
5
- "PO-Revision-Date: 2015-01-12 23:23-0500\n"
6
  "Last-Translator: Darren Cooney <darren.cooney@gmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
@@ -15,381 +15,170 @@ msgstr ""
15
  "X-Poedit-KeywordsList: __;_e\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
- #: ../admin/admin.php:202
19
- msgid "A WordPress plugin for lazy loading posts with Ajax"
20
- msgstr ""
21
-
22
- #: ../admin/admin.php:206
23
- msgid "Ajax Load More settings have been saved."
24
- msgstr ""
25
-
26
- #: ../admin/admin.php:233
27
- msgid "Sorry, settings could not be saved."
28
- msgstr ""
29
-
30
- #: ../admin/admin.php:263
31
- msgid "Ajax Load More: Repeater Templates"
32
- msgstr ""
33
-
34
- #: ../admin/admin.php:264
35
- msgid "The library of available templates to use within your theme"
36
- msgstr ""
37
-
38
- #: ../admin/admin.php:272 ../admin/admin.php:738
39
- #: ../admin/shortcode-builder/shortcode-builder.php:1
40
- msgid "Collapse All"
41
- msgstr ""
42
-
43
- #: ../admin/admin.php:272 ../admin/admin.php:738
44
- #: ../admin/shortcode-builder/shortcode-builder.php:1
45
- msgid "Expand All"
46
- msgstr ""
47
-
48
- #: ../admin/admin.php:286
49
- msgid "Default Template"
50
- msgstr ""
51
-
52
- #: ../admin/admin.php:289
53
- msgid "Enter the HTML and PHP code for the default template"
54
- msgstr ""
55
-
56
- #: ../admin/admin.php:304
57
- msgid "Save Template"
58
- msgstr ""
59
-
60
- #: ../admin/admin.php:379
61
- msgid "Saving template..."
62
- msgstr ""
63
-
64
- #: ../admin/admin.php:409
65
- msgid "Something went wrong and the data could not be saved."
66
- msgstr ""
67
-
68
- #: ../admin/admin.php:447
69
- msgid "Updating template..."
70
- msgstr ""
71
-
72
- #: ../admin/admin.php:476
73
- msgid "Something went wrong and the data could not be updated."
74
- msgstr ""
75
-
76
- #: ../admin/admin.php:500
77
- msgid "Templating Help"
78
- msgstr ""
79
-
80
- #: ../admin/admin.php:502
81
- msgid "What is a repeater template?"
82
- msgstr ""
83
-
84
- #: ../admin/admin.php:503
85
- msgid ""
86
- "A repeater template is a snippet of code that will execute over and over "
87
- "within a <a href=\"http://codex.wordpress.org/The_Loop\" target=\"_blank"
88
- "\">WordPress loop</a>.</p>"
89
- msgstr ""
90
-
91
- #: ../admin/admin.php:506
92
- msgid "Can I include PHP in the repeater template?"
93
- msgstr ""
94
-
95
- #: ../admin/admin.php:507
96
- msgid ""
97
- "Yes, PHP and core WordPress functions such as, <code>the_title()</code> and "
98
- "<code>the_permalink()</code> are required.</p>"
99
- msgstr ""
100
-
101
- #: ../admin/admin.php:510
102
- msgid "Tips and Tricks"
103
- msgstr ""
104
-
105
- #: ../admin/admin.php:512
106
- msgid ""
107
- "Always open and close your templates with an HTML element. In some rare "
108
- "cases data may not be displayed if not wrapped in HTML.<br/>e.g. <code>&lt;"
109
- "li> &lt;/li></code> or <code>&lt;div> &lt;/div></code>"
110
- msgstr ""
111
-
112
- #: ../admin/admin.php:555
113
  msgid "Error Opening File"
114
  msgstr ""
115
 
116
- #: ../admin/admin.php:557 ../admin/admin.php:561
117
  msgid ""
118
  "Please check your file path and ensure your server is configured to allow "
119
  "Ajax Load More to read and write files within the /ajax-load-more/ plugin "
120
  "directory"
121
  msgstr ""
122
 
123
- #: ../admin/admin.php:559
124
  msgid "Error Saving File"
125
  msgstr ""
126
 
127
- #: ../admin/admin.php:596
128
  msgid "Error Writing File"
129
  msgstr ""
130
 
131
- #: ../admin/admin.php:653
132
- msgid "Ajax Load More: Shortcode Builder"
133
- msgstr ""
134
-
135
- #: ../admin/admin.php:654
136
- msgid ""
137
- "Create your own Ajax Load More <a href=\"http://en.support.wordpress.com/"
138
- "shortcodes/\" target=\"_blank\">shortcode</a> by adjusting the values below"
139
- msgstr ""
140
-
141
- #: ../admin/admin.php:660 ../admin/admin.php:796
142
- msgid "Back to Top"
143
- msgstr ""
144
-
145
- #: ../admin/admin.php:670
146
- msgid "Shortcode Output"
147
- msgstr ""
148
-
149
- #: ../admin/admin.php:671
150
- msgid ""
151
- "Place the following shortcode into the content editor or widget area of your "
152
- "theme."
153
- msgstr ""
154
-
155
- #: ../admin/admin.php:674 ../admin/editor-build.php:45
156
- msgid "Copy"
157
- msgstr ""
158
-
159
- #: ../admin/admin.php:733
160
- msgid "Ajax Load More: Examples"
161
- msgstr ""
162
-
163
- #: ../admin/admin.php:734
164
- msgid "A collection of everyday shortcode usages and implementation examples"
165
- msgstr ""
166
-
167
- #: ../admin/admin.php:741
168
- msgid "Archive.php"
169
- msgstr ""
170
-
171
- #: ../admin/admin.php:743
172
- msgid "Shortcode for use on generic archive page."
173
- msgstr ""
174
-
175
- #: ../admin/admin.php:751
176
- msgid "Author.php"
177
- msgstr ""
178
-
179
- #: ../admin/admin.php:753
180
- msgid "Shortcode for use on author archive pages."
181
- msgstr ""
182
-
183
- #: ../admin/admin.php:760
184
- msgid "Category.php"
185
- msgstr ""
186
-
187
- #: ../admin/admin.php:762
188
- msgid "Shortcode for use on category archive pages."
189
- msgstr ""
190
-
191
- #: ../admin/admin.php:769
192
- msgid "Date Archives"
193
- msgstr ""
194
-
195
- #: ../admin/admin.php:771
196
- msgid "Shortcode for use for archiving by date."
197
- msgstr ""
198
-
199
- #: ../admin/admin.php:778
200
- msgid "Excluding Posts"
201
- msgstr ""
202
-
203
- #: ../admin/admin.php:780
204
- msgid "Shortcode for excluding an array of posts."
205
- msgstr ""
206
-
207
- #: ../admin/admin.php:786
208
- msgid "Tag.php"
209
- msgstr ""
210
-
211
- #: ../admin/admin.php:788
212
- msgid "Shortcode for use on tag archive pages."
213
- msgstr ""
214
-
215
- #: ../admin/admin.php:804
216
- msgid "Did you know?"
217
- msgstr ""
218
-
219
- #: ../admin/admin.php:806
220
- msgid ""
221
- "<p class=\"addon-intro\">You can generate shortcodes while editing pages!</"
222
- "p><p>Click the Ajax Load More icon in the content editor toolbar and the <a "
223
- "href=\"?page=ajax-load-more-shortcode-builder\">shortcode builder</a> will "
224
- "open in an overlay window."
225
- msgstr ""
226
-
227
- #: ../admin/admin.php:832
228
- msgid "Ajax Load More: Add-ons"
229
- msgstr ""
230
-
231
- #: ../admin/admin.php:833
232
- msgid ""
233
- "Add-ons are available to extend and enhance the core functionality of Ajax "
234
- "Load More."
235
- msgstr ""
236
-
237
- #: ../admin/admin.php:845
238
- msgid "Custom Repeaters"
239
- msgstr ""
240
-
241
- #: ../admin/admin.php:846
242
- msgid "Extend Ajax Load More with unlimited repeater templates."
243
- msgstr ""
244
-
245
- #: ../admin/admin.php:847
246
- msgid ""
247
- "Create, delete and modify <a href=\"?page=ajax-load-more-repeaters"
248
- "\">repeater templates</a> as you need them with absolutely zero restrictions."
249
- "</p>"
250
- msgstr ""
251
-
252
- #: ../admin/admin.php:870
253
- msgid "Search Engine Optimization"
254
- msgstr ""
255
-
256
- #: ../admin/admin.php:871
257
- msgid "Generate unique paging URLs with every Ajax Load More query."
258
- msgstr ""
259
-
260
- #: ../admin/admin.php:872
261
- msgid ""
262
- "The SEO add-on will optimize your ajax loaded content for search engines and "
263
- "site visitors by generating unique paging URLs with every query.</p>"
264
- msgstr ""
265
-
266
- #: ../admin/admin.php:891
267
- msgid "Add-on Updates"
268
- msgstr ""
269
-
270
- #: ../admin/admin.php:892
271
- msgid ""
272
- "All add-ons are installed as stand alone plugins and will receive plugin "
273
- "update notifications."
274
- msgstr ""
275
-
276
- #: ../admin/admin.php:928
277
  msgid "Container Type"
278
  msgstr ""
279
 
280
- #: ../admin/admin.php:936
281
  msgid "Container Classes"
282
  msgstr ""
283
 
284
- #: ../admin/admin.php:944
285
  msgid "Editor Button"
286
  msgstr ""
287
 
288
- #: ../admin/admin.php:952
 
 
 
 
289
  msgid "Disable CSS"
290
  msgstr ""
291
 
292
- #: ../admin/admin.php:960
293
  msgid "Button Color"
294
  msgstr ""
295
 
296
- #: ../admin/admin.php:968
297
  msgid "Button Classes"
298
  msgstr ""
299
 
300
- #: ../admin/admin.php:986
301
  msgid "SEO Permalinks"
302
  msgstr ""
303
 
304
- #: ../admin/admin.php:993
305
  msgid "Scroll to Page"
306
  msgstr ""
307
 
308
- #: ../admin/admin.php:1000
309
  msgid "Scroll Speed"
310
  msgstr ""
311
 
312
- #: ../admin/admin.php:1019
313
  msgid "Customize your version of Ajax Load More by updating the fields below."
314
  msgstr ""
315
 
316
- #: ../admin/admin.php:1048
317
  msgid "I want to use my own CSS styles"
318
  msgstr ""
319
 
320
- #: ../admin/admin.php:1049
321
  msgid "View Ajax Load More CSS"
322
  msgstr ""
323
 
324
- #: ../admin/admin.php:1068
325
  msgid "Hide shortcode button in WYSIWYG editor"
326
  msgstr ""
327
 
328
- #: ../admin/admin.php:1082
 
 
 
 
 
 
 
329
  msgid "Add classes to Ajax Load More container"
330
  msgstr ""
331
 
332
- #: ../admin/admin.php:1101 ../admin/admin.php:1104
333
  msgid "Ajax Posts Here"
334
  msgstr ""
335
 
336
- #: ../admin/admin.php:1155
337
- msgid "Choose your load more button color"
338
  msgstr ""
339
 
340
- #: ../admin/admin.php:1166
341
  msgid "Preview"
342
  msgstr ""
343
 
344
- #: ../admin/admin.php:1216
345
- msgid "Add classes to the <em>Load More</em> button"
346
  msgstr ""
347
 
348
- #: ../admin/admin.php:1229
349
  msgid ""
350
  "Customize your installation of the <a href=\"http://connekthq.com/plugins/"
351
  "ajax-load-more/seo/\">Search Engine Optimization</a> add-on."
352
  msgstr ""
353
 
354
- #: ../admin/admin.php:1253
355
  msgid ""
356
  "Pretty Permalinks (mod_rewrite) <br/><span>http://example.com/2012/post-name/"
357
  "</span>"
358
  msgstr ""
359
 
360
- #: ../admin/admin.php:1256
361
  msgid "Default (Ugly) <br/><span>http://example.com/?p=N</span>"
362
  msgstr ""
363
 
364
- #: ../admin/admin.php:1280
365
  msgid ""
366
  "Enable window scrolling.<br/><span>If scrolling is enabled, the users window "
367
  "will scroll to the current page on 'Load More' button click and while "
368
  "interacting with the forward and back browser buttons.</span>"
369
  msgstr ""
370
 
371
- #: ../admin/admin.php:1302
372
  msgid ""
373
  "Set the scrolling speed of the page in milliseconds. <br/><span>e.g. 1 "
374
  "second = 1000</span>"
375
  msgstr ""
376
 
377
- #: ../admin/editor-build.php:37
378
  msgid "Jump to Option"
379
  msgstr ""
380
 
381
- #: ../admin/editor-build.php:39
382
- msgid "Create your own Ajax Load More shortcode by adjusting the values below:"
 
383
  msgstr ""
384
 
385
- #: ../admin/editor-build.php:42
386
  msgid "Insert Shortcode"
387
  msgstr ""
388
 
389
- #: ../admin/editor.php:19
 
 
 
 
390
  msgid "You are not allowed to be here"
391
  msgstr ""
392
 
 
 
 
 
 
 
 
 
 
 
 
 
393
  #: ../admin/includes/cta/config.php:2
394
  msgid "Plugin Configurations"
395
  msgstr ""
@@ -496,276 +285,575 @@ msgid ""
496
  "be granted."
497
  msgstr ""
498
 
499
- #: ../admin/shortcode-builder/shortcode-builder.php:7
500
- msgid "SEO (Search Engine Optimization)"
 
501
  msgstr ""
502
 
503
- #: ../admin/shortcode-builder/shortcode-builder.php:10
504
- msgid ""
505
- "Enable address bar URL rewrites as users page through ajax loaded content."
 
 
 
 
 
506
  msgstr ""
507
 
508
  #: ../admin/shortcode-builder/shortcode-builder.php:17
509
- #: ../admin/shortcode-builder/shortcode-builder.php:424
510
- #: ../admin/shortcode-builder/shortcode-builder.php:466
 
 
 
 
 
511
  msgid "True"
512
  msgstr ""
513
 
514
- #: ../admin/shortcode-builder/shortcode-builder.php:21
515
- #: ../admin/shortcode-builder/shortcode-builder.php:428
516
- #: ../admin/shortcode-builder/shortcode-builder.php:470
 
517
  msgid "False"
518
  msgstr ""
519
 
520
- #: ../admin/shortcode-builder/shortcode-builder.php:34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  msgid "Template"
522
  msgstr ""
523
 
524
- #: ../admin/shortcode-builder/shortcode-builder.php:37
525
  msgid ""
526
- "Select a <a href=\"admin.php?page=ajax-load-more-repeaters\" target=\"_parent"
527
- "\">repeater template</a>."
528
  msgstr ""
529
 
530
- #: ../admin/shortcode-builder/shortcode-builder.php:76
531
  msgid "Post Types"
532
  msgstr ""
533
 
534
- #: ../admin/shortcode-builder/shortcode-builder.php:79
535
  msgid "Select Post Types to query."
536
  msgstr ""
537
 
538
- #: ../admin/shortcode-builder/shortcode-builder.php:100
539
  msgid "Post Format"
540
  msgstr ""
541
 
542
- #: ../admin/shortcode-builder/shortcode-builder.php:103
543
  msgid ""
544
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
545
  "\">Post Format</a> to query."
546
  msgstr ""
547
 
548
- #: ../admin/shortcode-builder/shortcode-builder.php:106
549
  msgid "Select Post Format"
550
  msgstr ""
551
 
552
- #: ../admin/shortcode-builder/shortcode-builder.php:107
553
  msgid "Standard"
554
  msgstr ""
555
 
556
- #: ../admin/shortcode-builder/shortcode-builder.php:122
557
  msgid "Category"
558
  msgstr ""
559
 
560
- #: ../admin/shortcode-builder/shortcode-builder.php:125
561
- msgid "Select a Category to query(by slug)."
 
 
 
 
 
 
 
 
 
 
 
 
562
  msgstr ""
563
 
564
- #: ../admin/shortcode-builder/shortcode-builder.php:128
565
- msgid "Select Category"
 
566
  msgstr ""
567
 
568
- #: ../admin/shortcode-builder/shortcode-builder.php:141
569
  msgid "Tag"
570
  msgstr ""
571
 
572
- #: ../admin/shortcode-builder/shortcode-builder.php:144
573
- msgid "Select a Tag to query(by slug)."
574
  msgstr ""
575
 
576
- #: ../admin/shortcode-builder/shortcode-builder.php:147
577
- msgid "Select Tag"
 
578
  msgstr ""
579
 
580
- #: ../admin/shortcode-builder/shortcode-builder.php:166
 
 
 
 
581
  msgid "Taxonomy"
582
  msgstr ""
583
 
584
- #: ../admin/shortcode-builder/shortcode-builder.php:169
585
  msgid "Select your custom taxonomy then select the terms and operator."
586
  msgstr ""
587
 
588
- #: ../admin/shortcode-builder/shortcode-builder.php:176
589
  msgid "Select Taxonomy"
590
  msgstr ""
591
 
592
- #: ../admin/shortcode-builder/shortcode-builder.php:185
593
  msgid "Taxonomy Terms:"
594
  msgstr ""
595
 
596
- #: ../admin/shortcode-builder/shortcode-builder.php:190
597
  msgid "Taxonomy Operator:"
598
  msgstr ""
599
 
600
- #: ../admin/shortcode-builder/shortcode-builder.php:206
601
  msgid "Date"
602
  msgstr ""
603
 
604
- #: ../admin/shortcode-builder/shortcode-builder.php:209
605
  msgid ""
606
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
607
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">view example</a>"
608
  msgstr ""
609
 
610
- #: ../admin/shortcode-builder/shortcode-builder.php:215
611
  msgid "Year:"
612
  msgstr ""
613
 
614
- #: ../admin/shortcode-builder/shortcode-builder.php:219
615
  msgid "Month:"
616
  msgstr ""
617
 
618
- #: ../admin/shortcode-builder/shortcode-builder.php:223
619
  msgid "Day:"
620
  msgstr ""
621
 
622
- #: ../admin/shortcode-builder/shortcode-builder.php:234
623
  msgid "Custom Fields (Meta)"
624
  msgstr ""
625
 
626
- #: ../admin/shortcode-builder/shortcode-builder.php:237
627
  msgid ""
628
  "Query by <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
629
  "\" target=\"_blank\">custom fields</a>. Enter your key(name) and value, "
630
  "then select your operator."
631
  msgstr ""
632
 
633
- #: ../admin/shortcode-builder/shortcode-builder.php:241
634
- msgid "Field Key (Name):"
635
  msgstr ""
636
 
637
- #: ../admin/shortcode-builder/shortcode-builder.php:242
638
  msgid "Enter custom field key(name)"
639
  msgstr ""
640
 
641
- #: ../admin/shortcode-builder/shortcode-builder.php:247
642
- msgid "Field Value:"
643
  msgstr ""
644
 
645
- #: ../admin/shortcode-builder/shortcode-builder.php:248
646
  msgid "Enter custom field value"
647
  msgstr ""
648
 
649
- #: ../admin/shortcode-builder/shortcode-builder.php:252
650
- msgid "Field Operator:"
651
  msgstr ""
652
 
653
- #: ../admin/shortcode-builder/shortcode-builder.php:280
654
  msgid "Author"
655
  msgstr ""
656
 
657
- #: ../admin/shortcode-builder/shortcode-builder.php:283
658
  msgid "Select an Author to query(by ID)."
659
  msgstr ""
660
 
661
- #: ../admin/shortcode-builder/shortcode-builder.php:286
662
  msgid "Select Author"
663
  msgstr ""
664
 
665
- #: ../admin/shortcode-builder/shortcode-builder.php:299
666
  msgid "Search Term"
667
  msgstr ""
668
 
669
- #: ../admin/shortcode-builder/shortcode-builder.php:302
670
  msgid "Enter a search term to query."
671
  msgstr ""
672
 
673
- #: ../admin/shortcode-builder/shortcode-builder.php:306
674
  msgid "Enter search term"
675
  msgstr ""
676
 
677
- #: ../admin/shortcode-builder/shortcode-builder.php:314
678
  msgid "Post Status"
679
  msgstr ""
680
 
681
- #: ../admin/shortcode-builder/shortcode-builder.php:317
682
- msgid "Query by post status."
683
  msgstr ""
684
 
685
- #: ../admin/shortcode-builder/shortcode-builder.php:336
686
  msgid "Ordering"
687
  msgstr ""
688
 
689
- #: ../admin/shortcode-builder/shortcode-builder.php:339
690
- msgid "Sort retrieved posts by Order and Orderby parameters."
691
  msgstr ""
692
 
693
- #: ../admin/shortcode-builder/shortcode-builder.php:368
694
- msgid "Exclude"
695
- msgstr ""
696
-
697
- #: ../admin/shortcode-builder/shortcode-builder.php:371
698
  msgid "A comma separated list of post ID's to exclude from query."
699
  msgstr ""
700
 
701
- #: ../admin/shortcode-builder/shortcode-builder.php:383
702
  msgid "Offset"
703
  msgstr ""
704
 
705
- #: ../admin/shortcode-builder/shortcode-builder.php:386
706
  msgid "Offset the initial WordPress query by <em>'n'</em> number of posts"
707
  msgstr ""
708
 
709
- #: ../admin/shortcode-builder/shortcode-builder.php:398
710
  msgid "Posts Per Page"
711
  msgstr ""
712
 
713
- #: ../admin/shortcode-builder/shortcode-builder.php:401
714
  msgid "Select the number of posts to load with each request."
715
  msgstr ""
716
 
717
- #: ../admin/shortcode-builder/shortcode-builder.php:414
718
- msgid "Load Posts on Scroll"
719
  msgstr ""
720
 
721
- #: ../admin/shortcode-builder/shortcode-builder.php:417
722
- msgid "Load more posts as the user scrolls the page."
723
- msgstr ""
724
-
725
- #: ../admin/shortcode-builder/shortcode-builder.php:439
726
- msgid "Max Pages"
727
  msgstr ""
728
 
729
- #: ../admin/shortcode-builder/shortcode-builder.php:442
730
- msgid "Maximum number of pages to load while scrolling."
731
  msgstr ""
732
 
733
- #: ../admin/shortcode-builder/shortcode-builder.php:456
734
- msgid "Pause Loading of Posts"
735
  msgstr ""
736
 
737
- #: ../admin/shortcode-builder/shortcode-builder.php:459
738
- msgid "Do not load posts until user clicks <em>load</em> button."
739
  msgstr ""
740
 
741
- #: ../admin/shortcode-builder/shortcode-builder.php:481
742
  msgid "Transition"
743
  msgstr ""
744
 
745
- #: ../admin/shortcode-builder/shortcode-builder.php:484
746
  msgid "Select a loading transition."
747
  msgstr ""
748
 
749
- #: ../admin/shortcode-builder/shortcode-builder.php:491
750
  msgid "Slide"
751
  msgstr ""
752
 
753
- #: ../admin/shortcode-builder/shortcode-builder.php:495
754
  msgid "Fade"
755
  msgstr ""
756
 
757
- #: ../admin/shortcode-builder/shortcode-builder.php:506
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  msgid "Button Label"
759
  msgstr ""
760
 
761
- #: ../admin/shortcode-builder/shortcode-builder.php:509
762
  msgid "Customize the <em>Load More</em> button label."
763
  msgstr ""
764
 
765
- #: ../admin/shortcode-builder/shortcode-builder.php:513
766
  msgid "Older Posts"
767
  msgstr ""
768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
769
  #~ msgid "404 Error"
770
  #~ msgstr "Erreur 404 "
771
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
+ "POT-Creation-Date: 2015-02-11 08:30-0500\n"
5
+ "PO-Revision-Date: 2015-02-11 08:30-0500\n"
6
  "Last-Translator: Darren Cooney <darren.cooney@gmail.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:291
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  msgid "Error Opening File"
20
  msgstr ""
21
 
22
+ #: ../admin/admin.php:293 ../admin/admin.php:297
23
  msgid ""
24
  "Please check your file path and ensure your server is configured to allow "
25
  "Ajax Load More to read and write files within the /ajax-load-more/ plugin "
26
  "directory"
27
  msgstr ""
28
 
29
+ #: ../admin/admin.php:295
30
  msgid "Error Saving File"
31
  msgstr ""
32
 
33
+ #: ../admin/admin.php:332
34
  msgid "Error Writing File"
35
  msgstr ""
36
 
37
+ #: ../admin/admin.php:440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  msgid "Container Type"
39
  msgstr ""
40
 
41
+ #: ../admin/admin.php:448
42
  msgid "Container Classes"
43
  msgstr ""
44
 
45
+ #: ../admin/admin.php:456
46
  msgid "Editor Button"
47
  msgstr ""
48
 
49
+ #: ../admin/admin.php:464
50
+ msgid "Dynamic Content"
51
+ msgstr ""
52
+
53
+ #: ../admin/admin.php:472
54
  msgid "Disable CSS"
55
  msgstr ""
56
 
57
+ #: ../admin/admin.php:480
58
  msgid "Button Color"
59
  msgstr ""
60
 
61
+ #: ../admin/admin.php:488
62
  msgid "Button Classes"
63
  msgstr ""
64
 
65
+ #: ../admin/admin.php:505
66
  msgid "SEO Permalinks"
67
  msgstr ""
68
 
69
+ #: ../admin/admin.php:512
70
  msgid "Scroll to Page"
71
  msgstr ""
72
 
73
+ #: ../admin/admin.php:519
74
  msgid "Scroll Speed"
75
  msgstr ""
76
 
77
+ #: ../admin/admin.php:538
78
  msgid "Customize your version of Ajax Load More by updating the fields below."
79
  msgstr ""
80
 
81
+ #: ../admin/admin.php:568
82
  msgid "I want to use my own CSS styles"
83
  msgstr ""
84
 
85
+ #: ../admin/admin.php:568
86
  msgid "View Ajax Load More CSS"
87
  msgstr ""
88
 
89
+ #: ../admin/admin.php:587
90
  msgid "Hide shortcode button in WYSIWYG editor"
91
  msgstr ""
92
 
93
+ #: ../admin/admin.php:608
94
+ msgid ""
95
+ "Disable dynamic population of categories, tags and authors in the Shortcode "
96
+ "Builder.<span style=\"display:block\">Recommended if you have an "
97
+ "extraordinary number of categories, tags and/or authors."
98
+ msgstr ""
99
+
100
+ #: ../admin/admin.php:624
101
  msgid "Add classes to Ajax Load More container"
102
  msgstr ""
103
 
104
+ #: ../admin/admin.php:646 ../admin/admin.php:649
105
  msgid "Ajax Posts Here"
106
  msgstr ""
107
 
108
+ #: ../admin/admin.php:700
109
+ msgid "Choose your <strong>Load More</strong> button color"
110
  msgstr ""
111
 
112
+ #: ../admin/admin.php:711
113
  msgid "Preview"
114
  msgstr ""
115
 
116
+ #: ../admin/admin.php:730
117
+ msgid "Add classes to your <strong>Load More</strong> button"
118
  msgstr ""
119
 
120
+ #: ../admin/admin.php:775
121
  msgid ""
122
  "Customize your installation of the <a href=\"http://connekthq.com/plugins/"
123
  "ajax-load-more/seo/\">Search Engine Optimization</a> add-on."
124
  msgstr ""
125
 
126
+ #: ../admin/admin.php:799
127
  msgid ""
128
  "Pretty Permalinks (mod_rewrite) <br/><span>http://example.com/2012/post-name/"
129
  "</span>"
130
  msgstr ""
131
 
132
+ #: ../admin/admin.php:802
133
  msgid "Default (Ugly) <br/><span>http://example.com/?p=N</span>"
134
  msgstr ""
135
 
136
+ #: ../admin/admin.php:826
137
  msgid ""
138
  "Enable window scrolling.<br/><span>If scrolling is enabled, the users window "
139
  "will scroll to the current page on 'Load More' button click and while "
140
  "interacting with the forward and back browser buttons.</span>"
141
  msgstr ""
142
 
143
+ #: ../admin/admin.php:848
144
  msgid ""
145
  "Set the scrolling speed of the page in milliseconds. <br/><span>e.g. 1 "
146
  "second = 1000</span>"
147
  msgstr ""
148
 
149
+ #: ../admin/editor/editor-build.php:40
150
  msgid "Jump to Option"
151
  msgstr ""
152
 
153
+ #: ../admin/editor/editor-build.php:44
154
+ msgid ""
155
+ "Create your own Ajax Load More shortcode by adjusting the parameters below:"
156
  msgstr ""
157
 
158
+ #: ../admin/editor/editor-build.php:51
159
  msgid "Insert Shortcode"
160
  msgstr ""
161
 
162
+ #: ../admin/editor/editor-build.php:54 ../admin/views/shortcode-builder.php:27
163
+ msgid "Copy"
164
+ msgstr ""
165
+
166
+ #: ../admin/editor/editor.php:19
167
  msgid "You are not allowed to be here"
168
  msgstr ""
169
 
170
+ #: ../admin/includes/components/repeater-options.php:2
171
+ msgid "Options"
172
+ msgstr ""
173
+
174
+ #: ../admin/includes/components/repeater-options.php:6
175
+ msgid "Update Template from Database"
176
+ msgstr ""
177
+
178
+ #: ../admin/includes/components/repeater-options.php:7
179
+ msgid "Copy Template Data"
180
+ msgstr ""
181
+
182
  #: ../admin/includes/cta/config.php:2
183
  msgid "Plugin Configurations"
184
  msgstr ""
285
  "be granted."
286
  msgstr ""
287
 
288
+ #: ../admin/shortcode-builder/shortcode-builder.php:1
289
+ #: ../admin/views/examples.php:9 ../admin/views/repeater-templates.php:13
290
+ msgid "Collapse All"
291
  msgstr ""
292
 
293
+ #: ../admin/shortcode-builder/shortcode-builder.php:1
294
+ #: ../admin/views/examples.php:9 ../admin/views/repeater-templates.php:13
295
+ msgid "Expand All"
296
+ msgstr ""
297
+
298
+ #: ../admin/shortcode-builder/shortcode-builder.php:14
299
+ #: ../admin/views/add-ons.php:42
300
+ msgid "Preloaded"
301
  msgstr ""
302
 
303
  #: ../admin/shortcode-builder/shortcode-builder.php:17
304
+ msgid "Preload posts prior to making Ajax requests."
305
+ msgstr ""
306
+
307
+ #: ../admin/shortcode-builder/shortcode-builder.php:24
308
+ #: ../admin/shortcode-builder/shortcode-builder.php:68
309
+ #: ../admin/shortcode-builder/shortcode-builder.php:544
310
+ #: ../admin/shortcode-builder/shortcode-builder.php:569
311
  msgid "True"
312
  msgstr ""
313
 
314
+ #: ../admin/shortcode-builder/shortcode-builder.php:28
315
+ #: ../admin/shortcode-builder/shortcode-builder.php:72
316
+ #: ../admin/shortcode-builder/shortcode-builder.php:548
317
+ #: ../admin/shortcode-builder/shortcode-builder.php:573
318
  msgid "False"
319
  msgstr ""
320
 
321
+ #: ../admin/shortcode-builder/shortcode-builder.php:39
322
+ msgid "Enter the number of posts to preload."
323
+ msgstr ""
324
+
325
+ #: ../admin/shortcode-builder/shortcode-builder.php:58
326
+ msgid "SEO (Search Engine Optimization)"
327
+ msgstr ""
328
+
329
+ #: ../admin/shortcode-builder/shortcode-builder.php:61
330
+ msgid ""
331
+ "Enable address bar URL rewrites as users page through ajax loaded content."
332
+ msgstr ""
333
+
334
+ #: ../admin/shortcode-builder/shortcode-builder.php:78
335
+ msgid ""
336
+ "At this time it is not possible to use <strong>preloaded</strong> and "
337
+ "<strong>SEO</strong> together - We are still working out the kinks but you "
338
+ "can expect a fix to be released shortly."
339
+ msgstr ""
340
+
341
+ #: ../admin/shortcode-builder/shortcode-builder.php:88
342
  msgid "Template"
343
  msgstr ""
344
 
345
+ #: ../admin/shortcode-builder/shortcode-builder.php:91
346
  msgid ""
347
+ "Select which <a href=\"admin.php?page=ajax-load-more-repeaters\" target="
348
+ "\"_parent\">repeater template</a> you would like to use."
349
  msgstr ""
350
 
351
+ #: ../admin/shortcode-builder/shortcode-builder.php:122
352
  msgid "Post Types"
353
  msgstr ""
354
 
355
+ #: ../admin/shortcode-builder/shortcode-builder.php:125
356
  msgid "Select Post Types to query."
357
  msgstr ""
358
 
359
+ #: ../admin/shortcode-builder/shortcode-builder.php:146
360
  msgid "Post Format"
361
  msgstr ""
362
 
363
+ #: ../admin/shortcode-builder/shortcode-builder.php:149
364
  msgid ""
365
  "Select a <a href=\"http://codex.wordpress.org/Post_Formats\" target=\"_blank"
366
  "\">Post Format</a> to query."
367
  msgstr ""
368
 
369
+ #: ../admin/shortcode-builder/shortcode-builder.php:152
370
  msgid "Select Post Format"
371
  msgstr ""
372
 
373
+ #: ../admin/shortcode-builder/shortcode-builder.php:153
374
  msgid "Standard"
375
  msgstr ""
376
 
377
+ #: ../admin/shortcode-builder/shortcode-builder.php:168
378
  msgid "Category"
379
  msgstr ""
380
 
381
+ #: ../admin/shortcode-builder/shortcode-builder.php:172
382
+ msgid ""
383
+ "A comma separated list of categories to include by slug. (design, research "
384
+ "etc...)"
385
+ msgstr ""
386
+
387
+ #: ../admin/shortcode-builder/shortcode-builder.php:174
388
+ msgid "view example"
389
+ msgstr ""
390
+
391
+ #: ../admin/shortcode-builder/shortcode-builder.php:195
392
+ #: ../admin/shortcode-builder/shortcode-builder.php:248
393
+ #: ../admin/shortcode-builder/shortcode-builder.php:489
394
+ msgid "Exclude"
395
  msgstr ""
396
 
397
+ #: ../admin/shortcode-builder/shortcode-builder.php:196
398
+ msgid ""
399
+ "A comma separated list of categories to exclude by ID. (3, 12, 35 etc..)"
400
  msgstr ""
401
 
402
+ #: ../admin/shortcode-builder/shortcode-builder.php:223
403
  msgid "Tag"
404
  msgstr ""
405
 
406
+ #: ../admin/shortcode-builder/shortcode-builder.php:226
407
+ msgid "Include"
408
  msgstr ""
409
 
410
+ #: ../admin/shortcode-builder/shortcode-builder.php:227
411
+ msgid ""
412
+ "A comma separated list of tags to include by slug. (toronto, canada etc...)"
413
  msgstr ""
414
 
415
+ #: ../admin/shortcode-builder/shortcode-builder.php:249
416
+ msgid "A comma separated list of tags to exclude by ID. (30, 12, 99 etc..)"
417
+ msgstr ""
418
+
419
+ #: ../admin/shortcode-builder/shortcode-builder.php:281
420
  msgid "Taxonomy"
421
  msgstr ""
422
 
423
+ #: ../admin/shortcode-builder/shortcode-builder.php:284
424
  msgid "Select your custom taxonomy then select the terms and operator."
425
  msgstr ""
426
 
427
+ #: ../admin/shortcode-builder/shortcode-builder.php:291
428
  msgid "Select Taxonomy"
429
  msgstr ""
430
 
431
+ #: ../admin/shortcode-builder/shortcode-builder.php:300
432
  msgid "Taxonomy Terms:"
433
  msgstr ""
434
 
435
+ #: ../admin/shortcode-builder/shortcode-builder.php:305
436
  msgid "Taxonomy Operator:"
437
  msgstr ""
438
 
439
+ #: ../admin/shortcode-builder/shortcode-builder.php:321
440
  msgid "Date"
441
  msgstr ""
442
 
443
+ #: ../admin/shortcode-builder/shortcode-builder.php:324
444
  msgid ""
445
  "Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a "
446
  "href=\"admin.php?page=ajax-load-more-examples#example-date\">view example</a>"
447
  msgstr ""
448
 
449
+ #: ../admin/shortcode-builder/shortcode-builder.php:330
450
  msgid "Year:"
451
  msgstr ""
452
 
453
+ #: ../admin/shortcode-builder/shortcode-builder.php:334
454
  msgid "Month:"
455
  msgstr ""
456
 
457
+ #: ../admin/shortcode-builder/shortcode-builder.php:338
458
  msgid "Day:"
459
  msgstr ""
460
 
461
+ #: ../admin/shortcode-builder/shortcode-builder.php:349
462
  msgid "Custom Fields (Meta)"
463
  msgstr ""
464
 
465
+ #: ../admin/shortcode-builder/shortcode-builder.php:352
466
  msgid ""
467
  "Query by <a href=\"http://codex.wordpress.org/Class_Reference/WP_Meta_Query"
468
  "\" target=\"_blank\">custom fields</a>. Enter your key(name) and value, "
469
  "then select your operator."
470
  msgstr ""
471
 
472
+ #: ../admin/shortcode-builder/shortcode-builder.php:357
473
+ msgid "Key (Name):"
474
  msgstr ""
475
 
476
+ #: ../admin/shortcode-builder/shortcode-builder.php:358
477
  msgid "Enter custom field key(name)"
478
  msgstr ""
479
 
480
+ #: ../admin/shortcode-builder/shortcode-builder.php:363
481
+ msgid "Value:"
482
  msgstr ""
483
 
484
+ #: ../admin/shortcode-builder/shortcode-builder.php:364
485
  msgid "Enter custom field value"
486
  msgstr ""
487
 
488
+ #: ../admin/shortcode-builder/shortcode-builder.php:368
489
+ msgid "Operator:"
490
  msgstr ""
491
 
492
+ #: ../admin/shortcode-builder/shortcode-builder.php:396
493
  msgid "Author"
494
  msgstr ""
495
 
496
+ #: ../admin/shortcode-builder/shortcode-builder.php:399
497
  msgid "Select an Author to query(by ID)."
498
  msgstr ""
499
 
500
+ #: ../admin/shortcode-builder/shortcode-builder.php:404
501
  msgid "Select Author"
502
  msgstr ""
503
 
504
+ #: ../admin/shortcode-builder/shortcode-builder.php:420
505
  msgid "Search Term"
506
  msgstr ""
507
 
508
+ #: ../admin/shortcode-builder/shortcode-builder.php:423
509
  msgid "Enter a search term to query."
510
  msgstr ""
511
 
512
+ #: ../admin/shortcode-builder/shortcode-builder.php:427
513
  msgid "Enter search term"
514
  msgstr ""
515
 
516
+ #: ../admin/shortcode-builder/shortcode-builder.php:435
517
  msgid "Post Status"
518
  msgstr ""
519
 
520
+ #: ../admin/shortcode-builder/shortcode-builder.php:438
521
+ msgid "Select status of the post."
522
  msgstr ""
523
 
524
+ #: ../admin/shortcode-builder/shortcode-builder.php:457
525
  msgid "Ordering"
526
  msgstr ""
527
 
528
+ #: ../admin/shortcode-builder/shortcode-builder.php:460
529
+ msgid "Sort posts by Order and Orderby parameters."
530
  msgstr ""
531
 
532
+ #: ../admin/shortcode-builder/shortcode-builder.php:492
 
 
 
 
533
  msgid "A comma separated list of post ID's to exclude from query."
534
  msgstr ""
535
 
536
+ #: ../admin/shortcode-builder/shortcode-builder.php:504
537
  msgid "Offset"
538
  msgstr ""
539
 
540
+ #: ../admin/shortcode-builder/shortcode-builder.php:507
541
  msgid "Offset the initial WordPress query by <em>'n'</em> number of posts"
542
  msgstr ""
543
 
544
+ #: ../admin/shortcode-builder/shortcode-builder.php:519
545
  msgid "Posts Per Page"
546
  msgstr ""
547
 
548
+ #: ../admin/shortcode-builder/shortcode-builder.php:522
549
  msgid "Select the number of posts to load with each request."
550
  msgstr ""
551
 
552
+ #: ../admin/shortcode-builder/shortcode-builder.php:534
553
+ msgid "Pause"
554
  msgstr ""
555
 
556
+ #: ../admin/shortcode-builder/shortcode-builder.php:537
557
+ msgid ""
558
+ "Do <u>NOT</u> load any posts until user the clicks <em>Load More</em> button."
 
 
 
559
  msgstr ""
560
 
561
+ #: ../admin/shortcode-builder/shortcode-builder.php:558
562
+ msgid "Scrolling"
563
  msgstr ""
564
 
565
+ #: ../admin/shortcode-builder/shortcode-builder.php:562
566
+ msgid "Load more posts as the user scrolls the page."
567
  msgstr ""
568
 
569
+ #: ../admin/shortcode-builder/shortcode-builder.php:584
570
+ msgid "Maximum number of pages to load while scrolling. (0 = unlimited)"
571
  msgstr ""
572
 
573
+ #: ../admin/shortcode-builder/shortcode-builder.php:597
574
  msgid "Transition"
575
  msgstr ""
576
 
577
+ #: ../admin/shortcode-builder/shortcode-builder.php:600
578
  msgid "Select a loading transition."
579
  msgstr ""
580
 
581
+ #: ../admin/shortcode-builder/shortcode-builder.php:607
582
  msgid "Slide"
583
  msgstr ""
584
 
585
+ #: ../admin/shortcode-builder/shortcode-builder.php:611
586
  msgid "Fade"
587
  msgstr ""
588
 
589
+ #: ../admin/shortcode-builder/shortcode-builder.php:615
590
+ msgid "None"
591
+ msgstr ""
592
+
593
+ #: ../admin/shortcode-builder/shortcode-builder.php:625
594
+ msgid "Destroy After"
595
+ msgstr ""
596
+
597
+ #: ../admin/shortcode-builder/shortcode-builder.php:628
598
+ msgid ""
599
+ "Remove ajax load more functionality after '<em>n</em>' number of pages have "
600
+ "been loaded."
601
+ msgstr ""
602
+
603
+ #: ../admin/shortcode-builder/shortcode-builder.php:640
604
  msgid "Button Label"
605
  msgstr ""
606
 
607
+ #: ../admin/shortcode-builder/shortcode-builder.php:643
608
  msgid "Customize the <em>Load More</em> button label."
609
  msgstr ""
610
 
611
+ #: ../admin/shortcode-builder/shortcode-builder.php:647
612
  msgid "Older Posts"
613
  msgstr ""
614
 
615
+ #: ../admin/views/add-ons.php:4
616
+ msgid "Ajax Load More: Add-ons"
617
+ msgstr ""
618
+
619
+ #: ../admin/views/add-ons.php:5
620
+ msgid ""
621
+ "Add-ons are available to extend and enhance the core functionality of Ajax "
622
+ "Load More."
623
+ msgstr ""
624
+
625
+ #: ../admin/views/add-ons.php:17
626
+ msgid "Custom Repeaters"
627
+ msgstr ""
628
+
629
+ #: ../admin/views/add-ons.php:18
630
+ msgid "Extend Ajax Load More with unlimited repeater templates."
631
+ msgstr ""
632
+
633
+ #: ../admin/views/add-ons.php:19
634
+ msgid ""
635
+ "Create, delete and modify <a href=\"?page=ajax-load-more-repeaters"
636
+ "\">repeater templates</a> as you need them with absolutely zero restrictions."
637
+ msgstr ""
638
+
639
+ #: ../admin/views/add-ons.php:43
640
+ msgid ""
641
+ "Easily preload an initial set of posts before completing any Ajax requests "
642
+ "to the server."
643
+ msgstr ""
644
+
645
+ #: ../admin/views/add-ons.php:44
646
+ msgid ""
647
+ "The Preloaded add-on will display content to your site visitors faster and "
648
+ "allow you cache the initial result set which can greatly reduce stress on "
649
+ "your server."
650
+ msgstr ""
651
+
652
+ #: ../admin/views/add-ons.php:67
653
+ msgid "Search Engine Optimization"
654
+ msgstr ""
655
+
656
+ #: ../admin/views/add-ons.php:68
657
+ msgid "Generate unique paging URLs with every Ajax Load More query."
658
+ msgstr ""
659
+
660
+ #: ../admin/views/add-ons.php:69
661
+ msgid ""
662
+ "The SEO add-on will optimize your ajax loaded content for search engines and "
663
+ "site visitors by generating unique paging URLs with every query.</p>"
664
+ msgstr ""
665
+
666
+ #: ../admin/views/add-ons.php:88
667
+ msgid "Add-on Updates"
668
+ msgstr ""
669
+
670
+ #: ../admin/views/add-ons.php:89
671
+ msgid ""
672
+ "All add-ons are installed as stand alone plugins and will receive plugin "
673
+ "update notifications directly within the <a href=\"plugins.php\">WordPress "
674
+ "Plugin dashboard</a>."
675
+ msgstr ""
676
+
677
+ #: ../admin/views/examples.php:4
678
+ msgid "Ajax Load More: Examples"
679
+ msgstr ""
680
+
681
+ #: ../admin/views/examples.php:5
682
+ msgid "A collection of everyday shortcode usages and implementation examples"
683
+ msgstr ""
684
+
685
+ #: ../admin/views/examples.php:12
686
+ msgid "Archive.php"
687
+ msgstr ""
688
+
689
+ #: ../admin/views/examples.php:14
690
+ msgid "Shortcode for use on generic archive page."
691
+ msgstr ""
692
+
693
+ #: ../admin/views/examples.php:22
694
+ msgid "Author.php"
695
+ msgstr ""
696
+
697
+ #: ../admin/views/examples.php:24
698
+ msgid "Shortcode for use on author archive pages."
699
+ msgstr ""
700
+
701
+ #: ../admin/views/examples.php:31
702
+ msgid "Category.php"
703
+ msgstr ""
704
+
705
+ #: ../admin/views/examples.php:33
706
+ msgid "Shortcode for use on category archive pages."
707
+ msgstr ""
708
+
709
+ #: ../admin/views/examples.php:40
710
+ msgid "Date Archives"
711
+ msgstr ""
712
+
713
+ #: ../admin/views/examples.php:42
714
+ msgid "Shortcode for use for archiving by date."
715
+ msgstr ""
716
+
717
+ #: ../admin/views/examples.php:49
718
+ msgid "Excluding Posts"
719
+ msgstr ""
720
+
721
+ #: ../admin/views/examples.php:51
722
+ msgid "Shortcode for excluding an array of posts."
723
+ msgstr ""
724
+
725
+ #: ../admin/views/examples.php:57
726
+ msgid "Tag.php"
727
+ msgstr ""
728
+
729
+ #: ../admin/views/examples.php:59
730
+ msgid "Shortcode for use on tag archive pages."
731
+ msgstr ""
732
+
733
+ #: ../admin/views/examples.php:67 ../admin/views/shortcode-builder.php:13
734
+ msgid "Back to Top"
735
+ msgstr ""
736
+
737
+ #: ../admin/views/examples.php:75
738
+ msgid "Did you know?"
739
+ msgstr ""
740
+
741
+ #: ../admin/views/examples.php:77
742
+ msgid ""
743
+ "<p class=\"addon-intro\">You can generate shortcodes while editing pages!</"
744
+ "p><p>Click the Ajax Load More icon in the content editor toolbar and the <a "
745
+ "href=\"?page=ajax-load-more-shortcode-builder\">shortcode builder</a> will "
746
+ "open in an overlay window."
747
+ msgstr ""
748
+
749
+ #: ../admin/views/repeater-templates.php:4
750
+ msgid "Ajax Load More: Repeater Templates"
751
+ msgstr ""
752
+
753
+ #: ../admin/views/repeater-templates.php:5
754
+ msgid "The library of available templates to use within your theme"
755
+ msgstr ""
756
+
757
+ #: ../admin/views/repeater-templates.php:27
758
+ msgid "Default Template"
759
+ msgstr ""
760
+
761
+ #: ../admin/views/repeater-templates.php:30
762
+ msgid "Enter the HTML and PHP code for the default template"
763
+ msgstr ""
764
+
765
+ #: ../admin/views/repeater-templates.php:44
766
+ msgid "Save Template"
767
+ msgstr ""
768
+
769
+ #: ../admin/views/repeater-templates.php:112
770
+ msgid "Saving template..."
771
+ msgstr ""
772
+
773
+ #: ../admin/views/repeater-templates.php:144
774
+ msgid "Something went wrong and the data could not be saved."
775
+ msgstr ""
776
+
777
+ #: ../admin/views/repeater-templates.php:184
778
+ msgid "Updating template..."
779
+ msgstr ""
780
+
781
+ #: ../admin/views/repeater-templates.php:205
782
+ msgid "Template Updated"
783
+ msgstr ""
784
+
785
+ #: ../admin/views/repeater-templates.php:234
786
+ msgid "Templating Help"
787
+ msgstr ""
788
+
789
+ #: ../admin/views/repeater-templates.php:236
790
+ msgid "What is a repeater template?"
791
+ msgstr ""
792
+
793
+ #: ../admin/views/repeater-templates.php:237
794
+ msgid ""
795
+ "A repeater template is a snippet of code that will execute over and over "
796
+ "within a <a href=\"http://codex.wordpress.org/The_Loop\" target=\"_blank"
797
+ "\">WordPress loop</a>.</p>"
798
+ msgstr ""
799
+
800
+ #: ../admin/views/repeater-templates.php:240
801
+ msgid "Can I include PHP in the repeater template?"
802
+ msgstr ""
803
+
804
+ #: ../admin/views/repeater-templates.php:241
805
+ msgid ""
806
+ "Yes, PHP and core WordPress functions such as, <code>the_title()</code> and "
807
+ "<code>the_permalink()</code> are required.</p>"
808
+ msgstr ""
809
+
810
+ #: ../admin/views/repeater-templates.php:244
811
+ msgid "Tips and Tricks"
812
+ msgstr ""
813
+
814
+ #: ../admin/views/repeater-templates.php:246
815
+ msgid ""
816
+ "Always open and close your templates with an HTML element. In some rare "
817
+ "cases data may not be displayed if not wrapped in HTML.<br/>e.g. <code>&lt;"
818
+ "li> &lt;/li></code> or <code>&lt;div> &lt;/div></code>"
819
+ msgstr ""
820
+
821
+ #: ../admin/views/settings.php:5
822
+ msgid "A WordPress plugin for lazy loading posts with Ajax"
823
+ msgstr ""
824
+
825
+ #: ../admin/views/settings.php:9
826
+ msgid "Ajax Load More settings have been saved."
827
+ msgstr ""
828
+
829
+ #: ../admin/views/settings.php:36
830
+ msgid "Sorry, settings could not be saved."
831
+ msgstr ""
832
+
833
+ #: ../admin/views/shortcode-builder.php:4
834
+ msgid "Ajax Load More: Shortcode Builder"
835
+ msgstr ""
836
+
837
+ #: ../admin/views/shortcode-builder.php:5
838
+ msgid ""
839
+ "Create your own Ajax Load More <a href=\"http://en.support.wordpress.com/"
840
+ "shortcodes/\" target=\"_blank\">shortcode</a> by adjusting the values below"
841
+ msgstr ""
842
+
843
+ #: ../admin/views/shortcode-builder.php:23
844
+ msgid "Shortcode Output"
845
+ msgstr ""
846
+
847
+ #: ../admin/views/shortcode-builder.php:24
848
+ msgid ""
849
+ "Place the following shortcode into the content editor or widget area of your "
850
+ "theme."
851
+ msgstr ""
852
+
853
+ #: ../admin/views/shortcode-builder.php:29
854
+ msgid "Clear all Shortcode Builder settings"
855
+ msgstr ""
856
+
857
  #~ msgid "404 Error"
858
  #~ msgstr "Erreur 404 "
859
 
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file