WordPress Infinite Scroll – Ajax Load More - Version 2.7.0

Version Description

  • MILESTONE - This 2.7.0 release includes major updates to ALM core functionality to allow for new features and various fixes.
  • NEW - Added multiple meta query functionality to the shortcode builder - users can now query by up to 4 custom fields.
  • NEW - Adding 'css_classes' parameter - users can now add container css classes directly within the shortcode builder as well as the setting screen.
  • NEW - Adding Paging add-on functionality.
  • NEW - Adding secondary query to return total posts for entire ALM query.
  • NEW - Adding licensing section for add-on license key activation.
  • FIX - Fixed issue with boolean vs string variables in core JS.
  • FIX - Fixed bug with the 'custom_args' parameter that was blocking arrays from being passed. Please check the documentation for the updated 'custom_args' syntax for multiple values.
Download this release

Release Info

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

Code changes from version 2.6.3.2 to 2.7.0

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.2.2
7
- Stable tag: 2.6.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,11 +48,12 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
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 (IN/NOT IN/=/!=/>/>=/</<= etc.). Default = ‘IN’
 
51
  * **author** - Query by author id. Default = null
52
  * **post__in** - Comma separated list of post ID’s to include in query. Default = null
53
  * **exclude** - Comma separated list of post ID’s to exclude from query. Default = null
54
  * **search** - Query search term (‘s’). Default = null
55
- * **custom_args** - A comma separated list of custom value:pair arguments. e.g. tag_slug__and:array(design), event_display:upcoming. Default = null
56
  * **post_status** - Select status of the post. Default = 'publish'
57
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
58
  * **orderby** - Order posts by date, title, name, menu order, random, author, post ID or comment count. Default = ‘date’
@@ -65,11 +66,16 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
65
  * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
66
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
67
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
 
68
  * **cache** - Turn on content caching for the specific Ajax Load More query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - (true/false). Default = ‘false’
69
  * **cache_id** - A unique 10 digit ID for the cached query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - Default = A random 10 digit integer
70
  * **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’
71
  * **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’
72
  * **preloaded_amount** - The amount of posts to preload. <a href="http://connekthq.com/plugins/ajax-load-more/preloaded/">add-on only</a> - Default = ‘5’
 
 
 
 
73
 
74
 
75
  ***
@@ -85,12 +91,14 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
85
  * **[Destroy After](http://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages
86
  * **[Fade Transition](http://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded
87
  * **[Filtering](http://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance
88
- * **[Mansory](http://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS
89
  * **[Multiple Instances](http://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page
 
90
  * **[Pause Loading](http://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user
91
- * **[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
92
  * **[Search Results](http://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms
93
- * **[SEO Paging](http://connekthq.com/plugins/ajax-load-more/examples/seo-paging/)** - Generate unique paging URLs with each Ajax Load More query
 
94
 
95
  *The [Custom Repeater Add-On](http://connekthq.com/plugins/ajax-load-more/custom-repeaters/) has been installed for use on each of our product demos*
96
 
@@ -109,6 +117,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
109
  > The **[Cache](http://connekthq.com/plugins/ajax-load-more/cache)** creates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
110
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/cache)
111
  >
 
 
 
 
112
  > #### Preloaded
113
  > 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 />
114
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/preloaded)
@@ -252,13 +264,23 @@ How to install Ajax Load More.
252
  == Changelog ==
253
 
254
 
 
 
 
 
 
 
 
 
 
 
 
255
  = 2.6.3.2 =
256
  * FIX - Fixed bug with Preloaded + SEO and scrolling to current page in core Ajax Load More JS.
257
  * UPDATE - Moved SEO and Cache add-on settings and controls from ALM core to SEO core.
258
  * NEW - Added Google Analytics Pageview support to SEO add-on.
259
  * UPDATE - Various admin UI improvements.
260
 
261
-
262
  = 2.6.3.1 =
263
  * FIX - Fixed/updated error handling of repeater templates. Errors are now being reported in the browser console and do not interfere with the WP admin.
264
  * FIX - Fixed javascript issue with shorthand if statements and script concatenation.
4
  Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
  Tested up to: 4.2.2
7
+ Stable tag: 2.7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
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 (IN/NOT IN/=/!=/>/>=/</<= etc.). Default = ‘IN’
51
+ * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
52
  * **author** - Query by author id. Default = null
53
  * **post__in** - Comma separated list of post ID’s to include in query. Default = null
54
  * **exclude** - Comma separated list of post ID’s to exclude from query. Default = null
55
  * **search** - Query search term (‘s’). Default = null
56
+ * **custom_args** - A semicolon separated list of value:pair arguments. e.g. tag_slug__and:design,development; event_display:upcoming. Default = null
57
  * **post_status** - Select status of the post. Default = 'publish'
58
  * **order** - Display posts in ASC(ascending) or DESC(descending) order. Default = ‘DESC’
59
  * **orderby** - Order posts by date, title, name, menu order, random, author, post ID or comment count. Default = ‘date’
66
  * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
67
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
68
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
69
+ * **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
70
  * **cache** - Turn on content caching for the specific Ajax Load More query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - (true/false). Default = ‘false’
71
  * **cache_id** - A unique 10 digit ID for the cached query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - Default = A random 10 digit integer
72
  * **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’
73
  * **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’
74
  * **preloaded_amount** - The amount of posts to preload. <a href="http://connekthq.com/plugins/ajax-load-more/preloaded/">add-on only</a> - Default = ‘5’
75
+ * **paging** - Replace infinite scrolling with a paged navigation system. <a href="http://connekthq.com/plugins/ajax-load-more/paging/">add-on only</a> (true/false). Default = ‘false’
76
+ * **paging_controls** - Show previous(«) and next(») buttons (true/false). Default = ‘false’
77
+ * **paging_classes** - Add classes to the paging navigation menu for CSS styling.
78
+ * **paging_show_at_most** - Maximum amount of pages to show at a time. 0 = no maximum. Default = ‘0’
79
 
80
 
81
  ***
91
  * **[Destroy After](http://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages
92
  * **[Fade Transition](http://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded
93
  * **[Filtering](http://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance
94
+ * **[Masonry](http://connekthq.com/plugins/ajax-load-more/examples/masonry/)** - Creating a flexible grid layout with Masonry JS
95
  * **[Multiple Instances](http://connekthq.com/plugins/ajax-load-more/examples/multiple-instances/)** - Include multiple Ajax Load More' on a single page
96
+ * **[Paging URLs](http://connekthq.com/plugins/ajax-load-more/examples/paging-urls/)** - Generate unique paging URLs for every Ajax Load More query with the SEO add-on
97
  * **[Pause Loading](http://connekthq.com/plugins/ajax-load-more/examples/pause-loading/)** - Posts will not load until initiated by the user
98
+ * **[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
99
  * **[Search Results](http://connekthq.com/plugins/ajax-load-more/examples/search-results/)** - Returning results based on search terms
100
+ * **[SEO & Paging](https://connekthq.com/plugins/ajax-load-more/examples/seo-paging-add-ons/)** - Combine these two add-ons to create one powerful navigation system
101
+ * **[Slideshow Gallery](https://connekthq.com/plugins/ajax-load-more/examples/slideshow-gallery/)** - Create a gallery of posts with Ajax Load More and the Paging add-on.
102
 
103
  *The [Custom Repeater Add-On](http://connekthq.com/plugins/ajax-load-more/custom-repeaters/) has been installed for use on each of our product demos*
104
 
117
  > The **[Cache](http://connekthq.com/plugins/ajax-load-more/cache)** creates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
118
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/cache)
119
  >
120
+ > #### Paging
121
+ > The **[Paging](http://connekthq.com/plugins/ajax-load-more/paging)** add-on will transform Ajax Load More’s lazy load/infinite scroll functionality into a robust ajax powered navigation system.<br />
122
+ > [Get More Information](http://connekthq.com/plugins/ajax-load-more/paging)
123
+ > >
124
  > #### Preloaded
125
  > 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 />
126
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/preloaded)
264
  == Changelog ==
265
 
266
 
267
+ = 2.7.0 =
268
+ * MILESTONE - This 2.7.0 release includes major updates to ALM core functionality to allow for new features and various fixes.
269
+ * NEW - Added multiple meta query functionality to the shortcode builder - users can now query by up to 4 custom fields.
270
+ * NEW - Adding 'css_classes' parameter - users can now add container css classes directly within the shortcode builder as well as the setting screen.
271
+ * NEW - Adding Paging add-on functionality.
272
+ * NEW - Adding secondary query to return total posts for entire ALM query.
273
+ * NEW - Adding licensing section for add-on license key activation.
274
+ * FIX - Fixed issue with boolean vs string variables in core JS.
275
+ * FIX - Fixed bug with the 'custom_args' parameter that was blocking arrays from being passed. Please check the documentation for the updated 'custom_args' syntax for multiple values.
276
+
277
+
278
  = 2.6.3.2 =
279
  * FIX - Fixed bug with Preloaded + SEO and scrolling to current page in core Ajax Load More JS.
280
  * UPDATE - Moved SEO and Cache add-on settings and controls from ALM core to SEO core.
281
  * NEW - Added Google Analytics Pageview support to SEO add-on.
282
  * UPDATE - Various admin UI improvements.
283
 
 
284
  = 2.6.3.1 =
285
  * FIX - Fixed/updated error handling of repeater templates. Errors are now being reported in the browser console and do not interfere with the WP admin.
286
  * FIX - Fixed javascript issue with shorthand if statements and script concatenation.
admin/admin.php CHANGED
@@ -112,20 +112,79 @@ add_action( 'admin_menu', 'alm_admin_menu' );
112
  function alm_admin_menu() {
113
  $icon = 'dashicons-plus-alt';
114
  $icon = ALM_ADMIN_URL . "/img/alm-logo-16x16.png";
115
- $alm_page = add_menu_page( 'Ajax Load More', 'Ajax Load More', 'edit_theme_options', 'ajax-load-more', 'alm_settings_page', $icon );
116
 
117
- $alm_settings_page = add_submenu_page( 'ajax-load-more', 'Settings', 'Settings', 'edit_theme_options', 'ajax-load-more', 'alm_settings_page');
 
 
 
 
 
 
 
118
 
119
- $alm_template_page = add_submenu_page( 'ajax-load-more', 'Repeater Templates', 'Repeater Templates', 'edit_theme_options', 'ajax-load-more-repeaters', 'alm_repeater_page');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
- $alm_shortcode_page = add_submenu_page( 'ajax-load-more', 'Shortcode Builder', 'Shortcode Builder', 'edit_theme_options', 'ajax-load-more-shortcode-builder', 'alm_shortcode_builder_page');
 
 
 
 
 
 
 
122
 
123
- $alm_examples_page = add_submenu_page( 'ajax-load-more', 'Examples', 'Examples', 'edit_theme_options', 'ajax-load-more-examples', 'alm_example_page');
 
 
 
 
 
 
 
124
 
125
- $alm_addons_page = add_submenu_page( 'ajax-load-more', 'Add-ons', 'Add-ons', 'edit_theme_options', 'ajax-load-more-add-ons', 'alm_add_ons_page');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
  if(has_action('alm_cache_installed')){
128
- $alm_cache_page = add_submenu_page( 'ajax-load-more', 'Cache', '<span style="color: #f2f5bf">Cache<span>', 'edit_theme_options', 'ajax-load-more-cache', 'alm_cache_page');
 
 
 
 
 
 
 
129
  add_action( 'load-' . $alm_cache_page, 'alm_load_admin_js' );
130
  add_action( 'load-' . $alm_cache_page, 'alm_load_cache_admin_js' );
131
  }
@@ -136,6 +195,7 @@ function alm_admin_menu() {
136
  add_action( 'load-' . $alm_shortcode_page, 'alm_load_admin_js' );
137
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
138
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
 
139
  }
140
 
141
 
@@ -268,6 +328,19 @@ function alm_add_ons_page(){
268
  }
269
 
270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  /*
272
  * alm_cache_page
273
  * Cache Add-on page
@@ -566,6 +639,24 @@ function alm_admin_init(){
566
  // CACHE
567
  if(has_action('alm_cache_settings')){
568
  do_action('alm_cache_settings');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
569
  }
570
 
571
 
@@ -673,7 +764,7 @@ function alm_disable_dynamic_callback(){
673
  function alm_class_callback(){
674
  $options = get_option( 'alm_settings' );
675
 
676
- $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container.', ALM_NAME).'</label><br/>';
677
  $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
678
 
679
  echo $html;
@@ -753,7 +844,7 @@ function alm_btn_color_callback() {
753
  $html .= '<option value="white" ' . $selected6 .'>White</option>';
754
  $html .= '</select>';
755
 
756
- $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>';
757
  echo $html;
758
  }
759
 
@@ -782,8 +873,8 @@ function alm_btn_class_callback(){
782
  var colorArray = "default grey purple green red blue white";
783
  jQuery("select#alm_settings_btn_color").change(function() {
784
  var color = jQuery(this).val();
785
- jQuery('.ajax-load-more-wrap').removeClass(colorArray);
786
- jQuery('.ajax-load-more-wrap').addClass(color);
787
  });
788
  jQuery("select#alm_settings_btn_color").click(function(e){
789
  e.preventDefault();
112
  function alm_admin_menu() {
113
  $icon = 'dashicons-plus-alt';
114
  $icon = ALM_ADMIN_URL . "/img/alm-logo-16x16.png";
 
115
 
116
+ $alm_page = add_menu_page(
117
+ 'Ajax Load More',
118
+ 'Ajax Load More',
119
+ 'edit_theme_options',
120
+ 'ajax-load-more',
121
+ 'alm_settings_page',
122
+ $icon
123
+ );
124
 
125
+ $alm_settings_page = add_submenu_page(
126
+ 'ajax-load-more',
127
+ 'Settings',
128
+ 'Settings',
129
+ 'edit_theme_options',
130
+ 'ajax-load-more',
131
+ 'alm_settings_page'
132
+ );
133
+
134
+ $alm_template_page = add_submenu_page(
135
+ 'ajax-load-more',
136
+ 'Repeater Templates',
137
+ 'Repeater Templates',
138
+ 'edit_theme_options',
139
+ 'ajax-load-more-repeaters',
140
+ 'alm_repeater_page'
141
+ );
142
 
143
+ $alm_shortcode_page = add_submenu_page(
144
+ 'ajax-load-more',
145
+ 'Shortcode Builder',
146
+ 'Shortcode Builder',
147
+ 'edit_theme_options',
148
+ 'ajax-load-more-shortcode-builder',
149
+ 'alm_shortcode_builder_page'
150
+ );
151
 
152
+ $alm_examples_page = add_submenu_page(
153
+ 'ajax-load-more',
154
+ 'Examples',
155
+ 'Examples',
156
+ 'edit_theme_options',
157
+ 'ajax-load-more-examples',
158
+ 'alm_example_page'
159
+ );
160
 
161
+ $alm_addons_page = add_submenu_page(
162
+ 'ajax-load-more',
163
+ 'Add-ons',
164
+ 'Add-ons',
165
+ 'edit_theme_options',
166
+ 'ajax-load-more-add-ons',
167
+ 'alm_add_ons_page'
168
+ );
169
+
170
+ $alm_licenses_page = add_submenu_page(
171
+ 'ajax-load-more',
172
+ 'Licenses',
173
+ 'Licenses',
174
+ 'edit_theme_options',
175
+ 'ajax-load-more-licenses',
176
+ 'alm_licenses_page'
177
+ );
178
 
179
  if(has_action('alm_cache_installed')){
180
+ $alm_cache_page = add_submenu_page(
181
+ 'ajax-load-more',
182
+ 'Cache',
183
+ '<span style="color: #f2f5bf; display:block; border-top: 1px solid #555; padding-top: 8px; border-radius: 3px;">Cache<span>',
184
+ 'edit_theme_options',
185
+ 'ajax-load-more-cache',
186
+ 'alm_cache_page'
187
+ );
188
  add_action( 'load-' . $alm_cache_page, 'alm_load_admin_js' );
189
  add_action( 'load-' . $alm_cache_page, 'alm_load_cache_admin_js' );
190
  }
195
  add_action( 'load-' . $alm_shortcode_page, 'alm_load_admin_js' );
196
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
197
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
198
+ add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
199
  }
200
 
201
 
328
  }
329
 
330
 
331
+
332
+ /*
333
+ * alm_licenses_page
334
+ * Ajax Load More Licenses
335
+ *
336
+ * @since 2.7.0
337
+ */
338
+
339
+ function alm_licenses_page(){
340
+ include_once( ALM_PATH . 'admin/views/licenses.php');
341
+ }
342
+
343
+
344
  /*
345
  * alm_cache_page
346
  * Cache Add-on page
639
  // CACHE
640
  if(has_action('alm_cache_settings')){
641
  do_action('alm_cache_settings');
642
+ }
643
+
644
+
645
+ // CUSTOM REPEATERS
646
+ if(has_action('alm_unlimited_settings')){
647
+ do_action('alm_unlimited_settings');
648
+ }
649
+
650
+
651
+ // PAGINATION
652
+ if(has_action('alm_paging_settings')){
653
+ do_action('alm_paging_settings');
654
+ }
655
+
656
+
657
+ // PRELOADED
658
+ if(has_action('alm_preloaded_settings')){
659
+ do_action('alm_preloaded_settings');
660
  }
661
 
662
 
764
  function alm_class_callback(){
765
  $options = get_option( 'alm_settings' );
766
 
767
+ $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - these classes are applied globally and will appear with every instance of Ajax Load More.<span style="display:block">You can also add classes to the ALM container when building a shortcode.</span>', ALM_NAME).'</label><br/>';
768
  $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
769
 
770
  echo $html;
844
  $html .= '<option value="white" ' . $selected6 .'>White</option>';
845
  $html .= '</select>';
846
 
847
+ $html .= '<div class="clear"></div><div class="ajax-load-more-wrap core '.$color.'"><span>'.__('Preview', ALM_NAME) .'</span><button class="alm-load-more-btn loading" disabled="disabled">Load More</button></div>';
848
  echo $html;
849
  }
850
 
873
  var colorArray = "default grey purple green red blue white";
874
  jQuery("select#alm_settings_btn_color").change(function() {
875
  var color = jQuery(this).val();
876
+ jQuery('.ajax-load-more-wrap.core').removeClass(colorArray);
877
+ jQuery('.ajax-load-more-wrap.core').addClass(color);
878
  });
879
  jQuery("select#alm_settings_btn_color").click(function(e){
880
  e.preventDefault();
admin/css/admin.css CHANGED
@@ -15,7 +15,7 @@
15
  color:#666;
16
  position: relative;
17
  font-family: 'Open Sans', sans-serif;
18
- max-width: 1100px;
19
  }
20
  .ajax-load-more a:focus{
21
  -webkit-box-shadow: none;
@@ -38,8 +38,17 @@
38
  padding: 15px 10px 140px !important;
39
  }
40
 
41
- #alm-settings h3 + p{
 
 
 
 
 
42
  color: #999;
 
 
 
 
43
  }
44
  .ajax-load-more code{
45
  background: #fcf3d0;
@@ -240,10 +249,63 @@
240
  margin: 0 0 20px;
241
  padding: 20px 0 0 !important;
242
  overflow:hidden;
 
 
 
 
243
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  .ajax-load-more #taxonomy-extended,
245
- .ajax-load-more #meta-query-extended,
246
- .ajax-load-more #seo-extended{
 
247
  display: none;
248
  overflow: hidden;
249
  }
@@ -354,7 +416,8 @@
354
  display: inline-block;
355
  vertical-align: top;
356
  }
357
- .ajax-load-more .wrap-30 input[type=text].sm{
 
358
  width: 100%;
359
  margin: 0;
360
  }
@@ -522,6 +585,11 @@
522
  padding: 21px 15px 10px;
523
  width: 45%;
524
  }
 
 
 
 
 
525
  .ajax-load-more .section-title p{
526
  font-size: 13px !important;
527
  padding-left: 21px !important;
@@ -568,6 +636,11 @@
568
  float: left;
569
  position: relative;
570
  }
 
 
 
 
 
571
 
572
 
573
  /* ***********************************
@@ -802,15 +875,24 @@
802
  .admin.ajax-load-more.settings .ajax-load-more-wrap button{
803
  margin: 0 !important;
804
  }
805
- .admin.ajax-load-more.settings .ajax-load-more-wrap span{
806
  display: block;
807
  font-size: 11px;
808
  opacity: 0.7;
809
- padding: 0 0 5px;
 
810
  }
811
  .admin.ajax-load-more.settings button.alm-load-more-btn.loading:before {
812
  margin: 5px 6px 6px;
813
  }
 
 
 
 
 
 
 
 
814
 
815
 
816
  /* Table Overrides */
@@ -1160,13 +1242,146 @@ table.highlight{
1160
  color: #5da592 !important;
1161
  top: 0;
1162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1163
 
1164
 
1165
  /*
1166
- * Plugin Sidebar
1167
- *
1168
- * @since 1.0
1169
- */
1170
  .ajax-load-more .cnkt-sidebar{
1171
  width: 30%;
1172
  float: right;
@@ -1212,6 +1427,7 @@ table.highlight{
1212
  .ajax-load-more .cnkt-sidebar li{
1213
  font-size: 13px;
1214
  margin: 0 0 10px;
 
1215
  }
1216
  .ajax-load-more .cnkt-sidebar .item i{
1217
  font-size: 12px;
@@ -2056,6 +2272,15 @@ p.cache-stats{
2056
  .alm-repeater-options{
2057
  display: none !important;
2058
  }
 
 
 
 
 
 
 
 
 
2059
 
2060
  }
2061
 
15
  color:#666;
16
  position: relative;
17
  font-family: 'Open Sans', sans-serif;
18
+ max-width: 1250px;
19
  }
20
  .ajax-load-more a:focus{
21
  -webkit-box-shadow: none;
38
  padding: 15px 10px 140px !important;
39
  }
40
 
41
+ #alm-settings form h3{
42
+ padding: 2px 0 6px 12px;
43
+ border-left: 5px solid #ff5a58;
44
+ margin: 0;
45
+ }
46
+ #alm-settings form h3 + p{
47
  color: #999;
48
+ padding: 0 0 0 12px;
49
+ border-left: 5px solid #ff5a58;
50
+ margin: 0 0 16px;
51
+ font-size: 13px;
52
  }
53
  .ajax-load-more code{
54
  background: #fcf3d0;
249
  margin: 0 0 20px;
250
  padding: 20px 0 0 !important;
251
  overflow:hidden;
252
+ position: relative;
253
+ }
254
+ .ajax-load-more .border-top.controls{
255
+ padding: 0 !important;
256
  }
257
+ .ajax-load-more .border-top.controls button{
258
+ margin-top: 20px !important;
259
+ }
260
+
261
+ .ajax-load-more .border-top.highlighted{
262
+ background-color: #fafbde;
263
+ padding: 10px !important;
264
+ border: 1px solid #efefef;
265
+ }
266
+
267
+
268
+ .meta-query-wrap{}
269
+ .ajax-load-more #meta-query-extended .meta-query-wrap .inner{
270
+ padding: 0 20px 0 0 !important;
271
+ position: relative;
272
+ }
273
+ .meta-query-wrap .remove-meta-query{
274
+ position: absolute;
275
+ right:5px;
276
+ bottom:8px;
277
+ width: 23px;
278
+ height: 23px;
279
+ line-height: 19px;
280
+ text-align: center;
281
+ font-weight: 700;
282
+ font-size: 13px;
283
+ -webkit-border-radius: 2px;
284
+ -moz-border-radius: 2px;
285
+ border-radius: 2px;
286
+ background-color: #efefef;
287
+ color: #999;
288
+ text-decoration: none;
289
+ border: 1px solid #ccc;
290
+ }
291
+ .meta-query-wrap .remove-meta-query:hover{
292
+ background-color: #cb2222;
293
+ border-color: #cb2222;
294
+ color: #fff;
295
+ }
296
+ .meta-query-wrap.removing{
297
+ /* background-color: #edd4d4; */
298
+ }
299
+
300
+ .ajax-load-more .meta-query-wrap .border-top:first-of-type{
301
+ padding: 0 0 0 !important;
302
+ border: none;
303
+ }
304
+
305
  .ajax-load-more #taxonomy-extended,
306
+ .ajax-load-more #nav-controls,
307
+ .ajax-load-more #seo-extended,
308
+ .ajax-load-more #meta-query-relation{
309
  display: none;
310
  overflow: hidden;
311
  }
416
  display: inline-block;
417
  vertical-align: top;
418
  }
419
+ .ajax-load-more .wrap-30 input[type=text].sm,
420
+ .ajax-load-more .wrap-30 .select2-container{
421
  width: 100%;
422
  margin: 0;
423
  }
585
  padding: 21px 15px 10px;
586
  width: 45%;
587
  }
588
+
589
+ .ajax-load-more .section-title.full {
590
+ width: 100%;
591
+ float: none;
592
+ }
593
  .ajax-load-more .section-title p{
594
  font-size: 13px !important;
595
  padding-left: 21px !important;
636
  float: left;
637
  position: relative;
638
  }
639
+ .ajax-load-more .row .wrap.full{
640
+ float: none;
641
+ width: 100%;
642
+ padding: 0 15px 10px 36px;
643
+ }
644
 
645
 
646
  /* ***********************************
875
  .admin.ajax-load-more.settings .ajax-load-more-wrap button{
876
  margin: 0 !important;
877
  }
878
+ .admin.ajax-load-more.settings .ajax-load-more-wrap > span{
879
  display: block;
880
  font-size: 11px;
881
  opacity: 0.7;
882
+ padding: 0 0 8px;
883
+ text-transform: uppercase;
884
  }
885
  .admin.ajax-load-more.settings button.alm-load-more-btn.loading:before {
886
  margin: 5px 6px 6px;
887
  }
888
+
889
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages{}
890
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li{
891
+ font-size: 14px;
892
+ }
893
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li a{
894
+ text-decoration: none;
895
+ }
896
 
897
 
898
  /* Table Overrides */
1242
  color: #5da592 !important;
1243
  top: 0;
1244
  }
1245
+
1246
+ /*
1247
+ * Licenses
1248
+ *
1249
+ * @since 2.7.0
1250
+ */
1251
+
1252
+ .license{
1253
+ overflow: hidden;
1254
+ margin: 0;
1255
+ display: block;
1256
+ padding: 20px 0 0;
1257
+ position: relative;
1258
+ }
1259
+ .license:first-of-type{
1260
+ padding: 10px 0 0;
1261
+ }
1262
+ .license-title{
1263
+ border-radius: 3px 3px 0 0;
1264
+ border: 1px solid #ccc;
1265
+ background-color: #efefef;
1266
+ position: relative;
1267
+ }
1268
+ .license-title .status{
1269
+ width: 12px;
1270
+ height: 12px;
1271
+ -webkit-border-radius: 100%;
1272
+ -moz-border-radius: 100%;
1273
+ border-radius: 100%;
1274
+ background: #d45656;
1275
+ position: absolute;
1276
+ left: 15px;
1277
+ top: 50%;
1278
+ margin-top: -6px;
1279
+ box-shadow: inset 0 -6px 6px rgba(0, 0, 0, 0.05), 0 1px 0 #fff;
1280
+ }
1281
+ .license-title .status.valid{
1282
+ background-color: #acd481;
1283
+ }
1284
+ .license h2{
1285
+ margin: 0;
1286
+ padding: 15px 15px 15px 35px;
1287
+ font-size: 16px;
1288
+ font-weight: 600;
1289
+ line-height: 1.2;
1290
+ }
1291
+ .license p,
1292
+ .license label{
1293
+ font-size: 400;
1294
+ font-size: 13px;
1295
+ }
1296
+ .license .cnkt-button{
1297
+ position: absolute;
1298
+ top: 9px;
1299
+ right: 15px;
1300
+ padding: 5px 7px !important;
1301
+ }
1302
+ .license a.cnkt-button.installed{
1303
+ background-color: none !important;
1304
+ -webkit-box-shadow: none !important;
1305
+ -moz-box-shadow: none !important;
1306
+ box-shadow: none !important;
1307
+ border-color: transparent !important;
1308
+ }
1309
+
1310
+ .license-wrap,
1311
+ .license-no-addons{
1312
+ overflow: hidden;
1313
+ display: block;
1314
+ padding: 15px;
1315
+ border: 1px solid #ccc;
1316
+ border-top: none;
1317
+ background-color: #f7f7f7;
1318
+ border-radius: 0 0 3px 3px;
1319
+ }
1320
+ .license-wrap label{
1321
+ font-weight: 600;
1322
+ position: relative;
1323
+ top:-3px;
1324
+ }
1325
+ .license-wrap input[type=text]{
1326
+ background-color: #fff;
1327
+ margin: 0 0 15px;
1328
+ width: 100% !important;
1329
+ }
1330
+ .license-wrap input[type=text]:focus{
1331
+ background-color: #fff;
1332
+ }
1333
+ .license-wrap .button-primary{
1334
+ margin-right: 5px;
1335
+ }
1336
+ .license-key-field{
1337
+ position: relative;
1338
+ display: block;
1339
+ }
1340
+ .license-key-field .status{
1341
+ position: absolute;
1342
+ right:5px;
1343
+ top: 5px;
1344
+ display: inline-block;
1345
+ border-radius: 2px;
1346
+ padding: 6px 12px;
1347
+ line-height: 1.3;
1348
+ color: #fff;
1349
+ border-color: #999;
1350
+ }
1351
+ .license-key-field .status.active{
1352
+ background-color: #acd481;
1353
+ }
1354
+ .license-key-field .status.inactive{
1355
+ background-color: #d45656;
1356
+ }
1357
+
1358
+ .ajax-load-more .alm-nav{
1359
+ font-size: 600;
1360
+ font-size: 13px;
1361
+ margin: 0 !important;
1362
+ padding: 5px 0 5px;
1363
+ }
1364
+ .ajax-load-more .alm-nav a{
1365
+ display: inline-block;
1366
+ }
1367
+
1368
+
1369
+ .license-no-addons{
1370
+ border: 1px solid #bad0da;
1371
+ border-radius: 3px;
1372
+ background-color: #e0f5ff;
1373
+ }
1374
+ .license-no-addons p{
1375
+ margin: 0;
1376
+ padding: 0;
1377
+ }
1378
 
1379
 
1380
  /*
1381
+ * Plugin Sidebar
1382
+ *
1383
+ * @since 1.0
1384
+ */
1385
  .ajax-load-more .cnkt-sidebar{
1386
  width: 30%;
1387
  float: right;
1427
  .ajax-load-more .cnkt-sidebar li{
1428
  font-size: 13px;
1429
  margin: 0 0 10px;
1430
+ line-height: 1.4;
1431
  }
1432
  .ajax-load-more .cnkt-sidebar .item i{
1433
  font-size: 12px;
2272
  .alm-repeater-options{
2273
  display: none !important;
2274
  }
2275
+
2276
+ .ajax-load-more .wrap-30{
2277
+ width: 100%;
2278
+ display: block;
2279
+ padding: 0 0 10px;
2280
+ }
2281
+ .ajax-load-more .row .wrap.full{
2282
+ padding: 10px;
2283
+ }
2284
 
2285
  }
2286
 
admin/editor/editor-build.php CHANGED
@@ -2,7 +2,7 @@
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>Ajax Load More: Shortcode Builder</title>
5
- <link rel="stylesheet" href="//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" />
2
  <html xmlns="http://www.w3.org/1999/xhtml">
3
  <head>
4
  <title>Ajax Load More: Shortcode Builder</title>
5
+ <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.2.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" />
admin/img/add-ons/paging-add-ons.jpg ADDED
Binary file
admin/shortcode-builder/includes/meta-query-options.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="inner border-top">
2
+ <div class="wrap-30">
3
+ <?php // Meta Key ?>
4
+ <label for="meta-key" class="full"><?php _e('Key (Name):', ALM_NAME); ?></label>
5
+ <input class="alm_element sm meta-key" name="meta-key" type="text" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
6
+ </div>
7
+ <?php // Meta Value ?>
8
+ <div class="wrap-30">
9
+ <label for="meta-value" class="full"><?php _e('Value:', ALM_NAME); ?></label>
10
+ <input class="alm_element sm meta-value" name="meta-value" type="text" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
11
+ </div>
12
+ <?php // Meta Compare ?>
13
+ <div class="wrap-30">
14
+ <label for="meta-compare" class="full"><?php _e('Operator:', ALM_NAME); ?></label>
15
+ <select class="alm_element meta-compare" name="meta-compare">
16
+ <option value="IN" selected="selected">IN</option>
17
+ <option value="NOT IN">NOT IN</option>
18
+ <option value="BETWEEN">BETWEEN</option>
19
+ <option value="NOT BETWEEN">NOT BETWEEN</option>
20
+ <option value="=">= &nbsp;&nbsp; (equals)</option>
21
+ <option value="!=">!= &nbsp; (does NOT equal)</option>
22
+ <option value=">">> &nbsp;&nbsp; (greater than)</option>
23
+ <option value=">=">>= &nbsp;(greater than or equal to)</option>
24
+ <option value="<">&lt; &nbsp;&nbsp; (less than)</option>
25
+ <option value="<=">&lt;= &nbsp;(less than or equal to)</option>
26
+ <option value="LIKE">LIKE</option>
27
+ <option value="NOT LIKE">NOT LIKE</option>
28
+ <option value="EXISTS">EXISTS</option>
29
+ <option value="NOT EXISTS">NOT EXISTS</option>
30
+ </select>
31
+ </div>
32
+ <a class="remove remove-meta-query" href="javascript:void(0);"><i class="fa fa-remove"></i></a>
33
+ </div>
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -17,7 +17,7 @@ jQuery(document).ready(function($) {
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({
@@ -25,9 +25,6 @@ jQuery(document).ready(function($) {
25
  });
26
  $('.ajax-load-more .tags select.multiple').select2({
27
  placeholder : 'Select Tags'
28
- });
29
- $('.ajax-load-more.settings select.multiple.post-types').select2({
30
- placeholder : 'Select Post Types'
31
  });
32
  };
33
  _alm.select2();
@@ -43,7 +40,58 @@ jQuery(document).ready(function($) {
43
  $('.ajax-load-more .categories select.multiple').select2();
44
  $('.ajax-load-more .tags select.multiple').select2();
45
  };
 
 
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
 
49
  /*
@@ -56,11 +104,10 @@ jQuery(document).ready(function($) {
56
  _alm.buildShortcode = function(){
57
  output = '[ajax_load_more';
58
 
59
-
60
  // ---------------------------
61
  // - Cache
62
- // ---------------------------
63
-
64
  var cache = $('#alm-cache input[name=cache]:checked').val();
65
  if(cache !== 'false' && cache != undefined){
66
  if($('input#cache-id').val() === '')
@@ -76,9 +123,33 @@ jQuery(document).ready(function($) {
76
  }
77
 
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  // ---------------------------
80
  // - Preload
81
  // ---------------------------
 
82
  var seo = $('.seo input[name=seo]:checked').val();
83
  var preload = $('.preload input[name=preload]:checked').val();
84
  if(preload !== 'false' && preload != undefined){
@@ -229,6 +300,70 @@ jQuery(document).ready(function($) {
229
  var dateD = $('.date input#input-day').val(); // Day
230
  if(dateD !== '' && dateD !== undefined && dateD < 32)
231
  output += ' day="'+dateD+'"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
 
233
 
234
  // ---------------------------
@@ -285,33 +420,6 @@ jQuery(document).ready(function($) {
285
  output += ' custom_args="'+custom_args+'"';
286
 
287
 
288
- // ---------------------------
289
- // - Meta Key
290
- // ---------------------------
291
- var meta_key = $.trim($('input#meta-key').val()),
292
- meta_value = $.trim($('input#meta-value').val()),
293
- meta_compare = $('select#meta-compare').val();
294
-
295
- // Set meta_compare default value
296
- if(meta_compare === '' || meta_compare == undefined)
297
- meta_compare = '=';
298
-
299
- if(meta_key !== '' && meta_key !== undefined){
300
- if($('input#meta-key').hasClass('changed')){
301
- $('#meta-query-extended').slideDown(200, 'alm_easeInOutQuad');
302
-
303
- output += ' meta_key="'+meta_key+'"';
304
- output += ' meta_value="'+meta_value+'"';
305
-
306
- if(meta_compare !== '=')
307
- output += ' meta_compare="'+meta_compare+'"';
308
- }
309
- }else{
310
- $('#meta-query-extended').slideUp(200, 'alm_easeInOutQuad');
311
- $('input#meta-key').removeClass('changed');
312
- }
313
-
314
-
315
  // ---------------------------
316
  // - Ordering
317
  // ---------------------------
@@ -404,7 +512,17 @@ jQuery(document).ready(function($) {
404
  var btn_lbl = $('.btn-label input').val();
405
  btn_lbl = $.trim(btn_lbl);
406
  if(btn_lbl !== '' && $('.btn-label input').hasClass('changed'))
407
- output += ' button_label="'+btn_lbl+'"';
 
 
 
 
 
 
 
 
 
 
408
 
409
 
410
  output += ']'; //Close shortcode
@@ -499,6 +617,7 @@ jQuery(document).ready(function($) {
499
 
500
 
501
  /* Table of Contents */
 
502
  $('.table-of-contents .toc').append('<option value="#">-- Jump to Option --</option>');
503
  $('.table-of-contents .toc').append(jumpOptions).select2();
504
 
@@ -511,6 +630,8 @@ jQuery(document).ready(function($) {
511
  }
512
  });
513
 
 
 
514
  function almResizeTOC(){
515
  var tocW = $('.cnkt-sidebar').width();
516
  $('.table-of-contents').css('width', tocW + 'px');
@@ -519,8 +640,7 @@ jQuery(document).ready(function($) {
519
 
520
  $(window).resize(function() {
521
  almResizeTOC()
522
- });
523
-
524
 
525
  $(window).scroll(function(){
526
  almSidebarAttach();
@@ -636,8 +756,7 @@ jQuery(document).ready(function($) {
636
 
637
  _alm.generateUniqueID = function(length) {
638
  var id = Math.floor(Math.pow(10, length-1) + Math.random() * 9 * Math.pow(10, length-1));
639
- $('#cache-id').val(id);
640
-
641
  }
642
 
643
 
17
  */
18
  _alm.select2 = function(){
19
  // Default Select2
20
+ $('.row select, .cnkt-main select, select.jump-menu').not('.multiple, .meta-compare').select2({});
21
 
22
  // multiple
23
  $('.ajax-load-more .categories select.multiple').select2({
25
  });
26
  $('.ajax-load-more .tags select.multiple').select2({
27
  placeholder : 'Select Tags'
 
 
 
28
  });
29
  };
30
  _alm.select2();
40
  $('.ajax-load-more .categories select.multiple').select2();
41
  $('.ajax-load-more .tags select.multiple').select2();
42
  };
43
+
44
+
45
 
46
+ // Add additional meta_query
47
+ var meta_query_obj = $('.meta-query-wrap').eq(0).clone();
48
+ $('.meta-query-wrap .remove').remove();
49
+ $('select.meta-compare').select2();
50
+ $('#add-meta-query').on('click', function(e){
51
+ e.preventDefault();
52
+
53
+ if($('.meta-query-wrap').length > 3){
54
+ alert("Sorry, There is a maximum of 4 meta_query objects.");
55
+ return false;
56
+ }
57
+
58
+ var target = $('#meta-query-extended');
59
+ $('input, select', meta_query_obj).val('');
60
+ var el = meta_query_obj.clone().hide();
61
+ target.append(el);
62
+ el.fadeIn(200);
63
+ $('#meta-query-extended select').select2();
64
+
65
+ if($('.meta-query-wrap').length > 1){
66
+ $('#meta-query-relation').fadeIn(150);
67
+ }else{
68
+ $('#meta-query-relation').fadeOut(150);
69
+ }
70
+
71
+ $('select.meta-compare').select2();
72
+
73
+ if($('.meta-query-wrap').length > 3){ // Hide "Add" button if 4 $('.meta-query-wrap')
74
+ $('#alm-meta-key .controls').delay(200).slideUp(150, 'alm_easeInOutQuad');
75
+ }
76
+
77
+ });
78
+
79
+ /* Delete Meta Query */
80
+ $(document).on('click', '.remove-meta-query', function(e){
81
+ var el = $(this);
82
+ el.parent().parent('.meta-query-wrap').addClass('removing');
83
+ el.parent().parent('.meta-query-wrap').fadeOut(200, function(){
84
+ el.parent().parent('.meta-query-wrap').remove();
85
+ _alm.buildShortcode();
86
+ });
87
+
88
+ if($('.meta-query-wrap').length > 3){ // Show "Add" button if less than 4 $('.meta-query-wrap')
89
+ $('#alm-meta-key .controls').delay(200).slideDown(200, 'alm_easeInOutQuad');
90
+ }
91
+
92
+ });
93
+
94
+
95
 
96
 
97
  /*
104
  _alm.buildShortcode = function(){
105
  output = '[ajax_load_more';
106
 
 
107
  // ---------------------------
108
  // - Cache
109
+ // ---------------------------
110
+
111
  var cache = $('#alm-cache input[name=cache]:checked').val();
112
  if(cache !== 'false' && cache != undefined){
113
  if($('input#cache-id').val() === '')
123
  }
124
 
125
 
126
+ // ---------------------------
127
+ // - PAGING
128
+ // ---------------------------
129
+
130
+ var paging = $('#alm-paging input[name=paging]:checked').val();
131
+ var paging_controls = $('#alm-paging input[name=paging-controls]:checked').val();
132
+ var paging_show_at_most = $('#alm-paging input#show-at-most').val();
133
+ var paging_classes = $('#alm-paging input#paging-classes').val();
134
+ if(paging !== 'false' && paging != undefined){
135
+ output += ' paging="'+paging+'"';
136
+ output += ' paging_controls="'+paging_controls+'"';
137
+ output += ' paging_show_at_most="'+paging_show_at_most+'"';
138
+ if(paging_classes !== ''){
139
+ output += ' paging_classes="'+paging_classes+'"';
140
+ }
141
+ $('#nav-controls').slideDown(100, 'alm_easeInOutQuad');
142
+ }else{
143
+ $('#nav-controls').slideUp(100, 'alm_easeInOutQuad');
144
+ }
145
+
146
+
147
+
148
+
149
  // ---------------------------
150
  // - Preload
151
  // ---------------------------
152
+
153
  var seo = $('.seo input[name=seo]:checked').val();
154
  var preload = $('.preload input[name=preload]:checked').val();
155
  if(preload !== 'false' && preload != undefined){
300
  var dateD = $('.date input#input-day').val(); // Day
301
  if(dateD !== '' && dateD !== undefined && dateD < 32)
302
  output += ' day="'+dateD+'"';
303
+
304
+
305
+
306
+ // ---------------------------
307
+ // - Custom Fields Meta Query
308
+ // ---------------------------
309
+ var meta_key = $.trim($('.meta-query-wrap').eq(0).find('input.meta-key').val()),
310
+ meta_value = $.trim($('.meta-query-wrap').eq(0).find('input.meta-value').val()),
311
+ meta_compare = $('.meta-query-wrap').eq(0).find('select.meta-compare').val(),
312
+ meta_relation = $('select.meta-relation').val(),
313
+ meta_query_length = $('.meta-query-wrap').length;
314
+
315
+ // Set meta_compare default value
316
+ if(meta_compare === '' || meta_compare == undefined)
317
+ meta_compare = '=';
318
+
319
+ // Single Meta_Query()
320
+ if(meta_query_length === 1){
321
+ if(meta_key !== '' && meta_key !== undefined){
322
+ output += ' meta_key="'+meta_key+'"';
323
+ output += ' meta_value="'+meta_value+'"';
324
+
325
+ if(meta_compare !== '=')
326
+ output += ' meta_compare="'+meta_compare+'"';
327
+
328
+ }
329
+ }
330
+ // Multiple Meta_Query()
331
+ if(meta_query_length > 1){
332
+ meta_key = '';
333
+ meta_value = '';
334
+ meta_compare = '';
335
+ $('.meta-query-wrap').each(function(e){
336
+ var el = $(this),
337
+ mk = $.trim(el.find('input.meta-key').val()),
338
+ mv = $.trim(el.find('input.meta-value').val()),
339
+ mc = $.trim(el.find('select.meta-compare').val());
340
+
341
+ if(e === 0){ // first on first only
342
+ meta_key += mk;
343
+ meta_value += mv;
344
+ meta_compare += mc;
345
+ }else{
346
+ if(mk.length > 0 && mv.length > 0){
347
+ meta_key += ':'+ mk;
348
+ meta_value += ':'+ mv;
349
+ meta_compare += ':'+ mc;
350
+ }
351
+ }
352
+
353
+ });
354
+ output += ' meta_key="'+meta_key+'"';
355
+ output += ' meta_value="'+meta_value+'"';
356
+ output += ' meta_compare="'+meta_compare+'"';
357
+
358
+ var isRelation = $('#meta-query-relation').css("display");
359
+ if(meta_relation !== '' && meta_relation !== undefined && isRelation === 'block'){
360
+ output += ' meta_relation="'+meta_relation+'"';
361
+ }
362
+
363
+ }else{
364
+ $('#meta-query-relation').fadeOut(150);
365
+ }
366
+
367
 
368
 
369
  // ---------------------------
420
  output += ' custom_args="'+custom_args+'"';
421
 
422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
423
  // ---------------------------
424
  // - Ordering
425
  // ---------------------------
512
  var btn_lbl = $('.btn-label input').val();
513
  btn_lbl = $.trim(btn_lbl);
514
  if(btn_lbl !== '' && $('.btn-label input').hasClass('changed'))
515
+ output += ' button_label="'+btn_lbl+'"';
516
+
517
+
518
+ // ---------------------------
519
+ // - Container Classes
520
+ // ---------------------------
521
+
522
+ var container_classes = $('.alm-classes input').val();
523
+ container_classes = $.trim(container_classes);
524
+ if(container_classes !== '' && $('.alm-classes input').hasClass('changed'))
525
+ output += ' css_classes="'+container_classes+'"';
526
 
527
 
528
  output += ']'; //Close shortcode
617
 
618
 
619
  /* Table of Contents */
620
+
621
  $('.table-of-contents .toc').append('<option value="#">-- Jump to Option --</option>');
622
  $('.table-of-contents .toc').append(jumpOptions).select2();
623
 
630
  }
631
  });
632
 
633
+ /* Table of Contents - onResize */
634
+
635
  function almResizeTOC(){
636
  var tocW = $('.cnkt-sidebar').width();
637
  $('.table-of-contents').css('width', tocW + 'px');
640
 
641
  $(window).resize(function() {
642
  almResizeTOC()
643
+ });
 
644
 
645
  $(window).scroll(function(){
646
  almSidebarAttach();
756
 
757
  _alm.generateUniqueID = function(length) {
758
  var id = Math.floor(Math.pow(10, length-1) + Math.random() * 9 * Math.pow(10, length-1));
759
+ $('#cache-id').val(id);
 
760
  }
761
 
762
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -16,7 +16,6 @@
16
  <h3 class="heading"><?php _e('Cache', ALM_NAME); ?></h3>
17
  <div class="expand-wrap">
18
  <div class="section-title">
19
- <h4>Enable Caching</h4>
20
  <p><?php _e('Turn on content caching for this Ajax Load More query.', ALM_NAME); ?></p>
21
  </div>
22
  <div class="wrap">
@@ -53,6 +52,83 @@
53
  </div>
54
  <?php } ?>
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  <?php if(has_action('alm_preload_installed')){ ?>
57
  <!-- PRELOAD -->
58
  <div class="row input preload add-on" id="alm-preload">
@@ -393,47 +469,38 @@
393
  </div>
394
 
395
 
396
- <?php // Custom Fields ?>
397
  <div class="row input meta-key" id="alm-meta-key">
398
- <h3 class="heading"><?php _e('Custom Fields (Meta)', ALM_NAME); ?></h3>
399
  <div class="expand-wrap">
400
- <div class="section-title">
401
- <p><?php _e('Query by <a href="http://codex.wordpress.org/Class_Reference/WP_Meta_Query" target="_blank">custom fields</a>. Enter your key(name) and value, then select your operator.', ALM_NAME); ?></p>
402
  </div>
403
- <div class="wrap">
404
- <div class="inner">
405
- <?php // Meta Key ?>
406
- <label for="meta-key" class="full"><?php _e('Key (Name):', ALM_NAME); ?></label>
407
- <input class="alm_element" name="meta-key" type="text" id="meta-key" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
408
- </div>
409
- <div id="meta-query-extended">
410
- <?php // Meta Value ?>
411
- <div class="inner border-top">
412
- <label for="meta-value" class="full"><?php _e('Value:', ALM_NAME); ?></label>
413
- <input class="alm_element" name="meta-value" type="text" id="meta-value" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
414
- </div>
415
- <?php // Meta Compare ?>
416
- <div class="inner border-top">
417
- <label for="meta-compare" class="full"><?php _e('Operator:', ALM_NAME); ?></label>
418
- <select class="alm_element" id="meta-compare" name="meta-compare">
419
- <option value="IN" selected="selected">IN</option>
420
- <option value="NOT IN">NOT IN</option>
421
- <option value="BETWEEN">BETWEEN</option>
422
- <option value="NOT BETWEEN">NOT BETWEEN</option>
423
- <option value="=">= &nbsp;&nbsp; (equals)</option>
424
- <option value="!=">!= &nbsp; (does NOT equal)</option>
425
- <option value=">">> &nbsp;&nbsp; (greater than)</option>
426
- <option value=">=">>= &nbsp;(greater than or equal to)</option>
427
- <option value="<">&lt; &nbsp;&nbsp; (less than)</option>
428
- <option value="<=">&lt;= &nbsp;(less than or equal to)</option>
429
- <option value="LIKE">LIKE</option>
430
- <option value="NOT LIKE">NOT LIKE</option>
431
- <option value="EXISTS">EXISTS</option>
432
- <option value="NOT EXISTS">NOT EXISTS</option>
433
- </select>
434
- </div>
435
  </div>
436
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  </div>
438
  </div>
439
 
@@ -488,7 +555,7 @@
488
  <h3 class="heading"><?php _e('Custom Arguments', ALM_NAME); ?></h3>
489
  <div class="expand-wrap">
490
  <div class="section-title">
491
- <p><?php _e('A comma separated list of custom value:pair arguments.<br/><br/>e.g. tag_slug__and:array(design), event_display:upcoming', ALM_NAME); ?></p>
492
  </div>
493
  <div class="wrap">
494
  <div class="inner">
@@ -496,6 +563,7 @@
496
  </div>
497
  </div>
498
  </div>
 
499
  </div>
500
 
501
  <!-- Post Parameters -->
@@ -572,6 +640,7 @@
572
  <option value="author">Author</option>
573
  <option value="ID">ID</option>
574
  <option value="comment_count">Comment Count</option>
 
575
  </select>
576
  </div>
577
  </div>
@@ -587,7 +656,7 @@
587
  </div>
588
  <div class="wrap">
589
  <div class="inner">
590
- <input type="number" class="alm_element numbers-only" name="offset-select" id="offset-select" step="1" min="0">
591
  </div>
592
  </div>
593
  </div>
@@ -742,5 +811,20 @@
742
  </div>
743
  </div>
744
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
745
  <div class="clear"></div>
746
 
16
  <h3 class="heading"><?php _e('Cache', ALM_NAME); ?></h3>
17
  <div class="expand-wrap">
18
  <div class="section-title">
 
19
  <p><?php _e('Turn on content caching for this Ajax Load More query.', ALM_NAME); ?></p>
20
  </div>
21
  <div class="wrap">
52
  </div>
53
  <?php } ?>
54
 
55
+ <?php if(has_action('alm_paging_installed')){ ?>
56
+ <!-- PAGING -->
57
+ <div class="row input paging add-on" id="alm-paging">
58
+ <h3 class="heading"><?php _e('Paging', ALM_NAME); ?></h3>
59
+ <div class="expand-wrap">
60
+ <div class="section-title">
61
+ <p><?php _e('Replace infinite scrolling with a paged ajax navigation system.', ALM_NAME); ?></p>
62
+ </div>
63
+ <div class="wrap">
64
+ <div class="inner">
65
+ <ul>
66
+ <li>
67
+ <input class="alm_element" type="radio" name="paging" value="true" id="paging-true" >
68
+ <label for="paging-true"><?php _e('True', ALM_NAME); ?></label>
69
+ </li>
70
+ <li>
71
+ <input class="alm_element" type="radio" name="paging" value="false" id="paging-false" checked="checked">
72
+ <label for="paging-false"><?php _e('False', ALM_NAME); ?></label>
73
+ </li>
74
+ </ul>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="clear"></div>
79
+ <div id="nav-controls">
80
+
81
+ <hr/>
82
+ <div class="section-title">
83
+ <h4><?php _e('Paging Controls', ALM_NAME); ?></h4>
84
+ <p><?php _e('Show (&laquo;)previous and next(&raquo;) buttons.', ALM_NAME); ?></p>
85
+ </div>
86
+ <div class="wrap">
87
+ <div class="inner">
88
+ <ul>
89
+ <li>
90
+ <input class="alm_element" type="radio" name="paging-controls" value="true" id="paging-controls-true" >
91
+ <label for="paging-controls-true"><?php _e('True', ALM_NAME); ?></label>
92
+ </li>
93
+ <li>
94
+ <input class="alm_element" type="radio" name="paging-controls" value="false" id="paging-controls-false" checked="checked">
95
+ <label for="paging-controls-false"><?php _e('False', ALM_NAME); ?></label>
96
+ </li>
97
+ </ul>
98
+ </div>
99
+ </div>
100
+
101
+ <div class="clear"></div>
102
+ <hr/>
103
+ <div class="section-title">
104
+ <h4><?php _e('Paging Navigation Classes', ALM_NAME); ?></h4>
105
+ <p><?php _e('Add custom CSS classes to the paging navigation menu.', ALM_NAME); ?></p>
106
+ </div>
107
+ <div class="wrap">
108
+ <div class="inner">
109
+ <input type="text" class="alm_element" name="paging-classes" id="paging-classes" placeholder="portfolio-paging-menu">
110
+ </div>
111
+ </div>
112
+
113
+ <div class="clear"></div>
114
+ <hr/>
115
+ <div class="section-title">
116
+ <h4><?php _e('Show at Most', ALM_NAME); ?></h4>
117
+ <p><?php _e('The maximum amount of page menu items to show at a time. <br/.>0 = no maximum', ALM_NAME); ?></p>
118
+ </div>
119
+ <div class="wrap">
120
+ <div class="inner">
121
+ <input type="number" class="alm_element numbers-only" name="show-at-most" id="show-at-most" step="2" min="0" value="7">
122
+ </div>
123
+ </div>
124
+
125
+ </div>
126
+
127
+ </div>
128
+ </div>
129
+ <?php } ?>
130
+
131
+
132
  <?php if(has_action('alm_preload_installed')){ ?>
133
  <!-- PRELOAD -->
134
  <div class="row input preload add-on" id="alm-preload">
469
  </div>
470
 
471
 
472
+ <?php // Meta_Query / Custom Fields ?>
473
  <div class="row input meta-key" id="alm-meta-key">
474
+ <h3 class="heading"><?php _e('Custom Fields (Meta_Query)', ALM_NAME); ?></h3>
475
  <div class="expand-wrap">
476
+ <div class="section-title full">
477
+ <p><?php _e('Query for <a href="http://codex.wordpress.org/Class_Reference/WP_Meta_Query" target="_blank">custom field</a> by entering a custom field key, value and operator.', ALM_NAME); ?></p>
478
  </div>
479
+ <div class="wrap full">
480
+
481
+ <div class="meta-query-wrap">
482
+ <?php include( ALM_PATH . 'admin/shortcode-builder/includes/meta-query-options.php'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  </div>
484
+ <div id="meta-query-relation">
485
+ <div class="inner border-top highlighted">
486
+ <div class="wrap-30">
487
+ <label for="meta-relation" class="full"><?php _e('Relation:', ALM_NAME); ?></label>
488
+ <select class="alm_element meta-relation" name="meta-relation">
489
+ <option value="AND" selected="selected">AND</option>
490
+ <option value="OR">OR</option>
491
+ </select>
492
+ </div>
493
+ </div>
494
+ </div>
495
+ <div id="meta-query-extended">
496
+
497
+ </div>
498
+
499
+ <div class="inner border-top controls">
500
+ <button class="button button-primary" id="add-meta-query"><?php _e('Add Another', ALM_NAME); ?></button>
501
+ </div>
502
+
503
+ </div>
504
  </div>
505
  </div>
506
 
555
  <h3 class="heading"><?php _e('Custom Arguments', ALM_NAME); ?></h3>
556
  <div class="expand-wrap">
557
  <div class="section-title">
558
+ <p><?php _e('A semicolon separated list of custom value:pair arguments.<br/><br/>e.g. tag_slug__and:design,development; event_display:upcoming. Default', ALM_NAME); ?></p>
559
  </div>
560
  <div class="wrap">
561
  <div class="inner">
563
  </div>
564
  </div>
565
  </div>
566
+ <p class="warning-callout"><em>custom_args</em> syntax has changed and can now accept an array of values.</p>
567
  </div>
568
 
569
  <!-- Post Parameters -->
640
  <option value="author">Author</option>
641
  <option value="ID">ID</option>
642
  <option value="comment_count">Comment Count</option>
643
+ <option value="meta_value_num">meta_value_num</option>
644
  </select>
645
  </div>
646
  </div>
656
  </div>
657
  <div class="wrap">
658
  <div class="inner">
659
+ <input type="number" class="alm_element numbers-only" name="offset-select" id="offset-select" value="0" step="1" min="0">
660
  </div>
661
  </div>
662
  </div>
811
  </div>
812
  </div>
813
 
814
+ <!-- Container Classes -->
815
+ <div class="row input alm-classes" id="alm-classes">
816
+ <h3 class="heading"><?php _e('Container Classes', ALM_NAME); ?></h3>
817
+ <div class="expand-wrap">
818
+ <div class="section-title">
819
+ <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', ALM_NAME); ?></p>
820
+ </div>
821
+ <div class="wrap">
822
+ <div class="inner">
823
+ <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
824
+ </div>
825
+ </div>
826
+ </div>
827
+ </div>
828
+
829
  <div class="clear"></div>
830
 
admin/views/add-ons.php CHANGED
@@ -6,7 +6,7 @@
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">
@@ -29,9 +29,10 @@
29
  }
30
  ?>
31
  </div>
32
- <!-- End Custom Repeaters -->
33
 
34
- <!-- Custom Repeaters -->
 
35
  <div class="group">
36
  <div class="row no-brd">
37
  <div class="expand-wrap">
@@ -54,7 +55,34 @@
54
  }
55
  ?>
56
  </div>
57
- <!-- End Custom Repeaters -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  <!-- Preloaded -->
60
  <div class="group">
@@ -81,6 +109,7 @@
81
  </div>
82
  <!-- End Preloaded -->
83
 
 
84
  <!-- SEO -->
85
  <div class="group">
86
  <div class="row no-brd">
6
  </div>
7
  <div class="cnkt-main">
8
 
9
+ <!-- Cache -->
10
  <div class="group">
11
  <div class="row no-brd">
12
  <div class="expand-wrap">
29
  }
30
  ?>
31
  </div>
32
+ <!-- End Cache -->
33
 
34
+
35
+ <!-- Custom Repeaters v2 -->
36
  <div class="group">
37
  <div class="row no-brd">
38
  <div class="expand-wrap">
55
  }
56
  ?>
57
  </div>
58
+ <!-- End Custom Repeaters v2 -->
59
+
60
+
61
+ <!-- Paging -->
62
+ <div class="group">
63
+ <div class="row no-brd">
64
+ <div class="expand-wrap">
65
+ <div class="section-title">
66
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg">
67
+ </div>
68
+ <div class="wrap">
69
+ <h2 class="addon-title"><?php _e('Paging', ALM_NAME); ?></h2>
70
+ <p class="addon-intro"><?php _e('Extend Ajax Load More with a numbered paging navigation.', ALM_NAME); ?></p>
71
+ <p><?php _e('The Paging add-on will transform the Ajax Load More lazy load/infinite scroll functionality into a robust ajax powered navigation system.', ALM_NAME); ?></p>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <?php
76
+ $paging_url = 'http://connekthq.com/plugins/ajax-load-more/paging/';
77
+ if (has_action('alm_paging_installed')){
78
+ echo '<a class="cnkt-button installed" href="'. $paging_url .'" target="_blank"><i class="fa fa-check-square"></i> Installed</a> ';
79
+ }else{
80
+ echo '<a class="cnkt-button" href="'. $paging_url .'" target="_blank"><i class="fa fa-download"></i> Purchase &amp; Install</a>';
81
+ }
82
+ ?>
83
+ </div>
84
+ <!-- End Custom Repeaters v2 -->
85
+
86
 
87
  <!-- Preloaded -->
88
  <div class="group">
109
  </div>
110
  <!-- End Preloaded -->
111
 
112
+
113
  <!-- SEO -->
114
  <div class="group">
115
  <div class="row no-brd">
admin/views/licenses.php ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="admin ajax-load-more" id="alm-licenses">
2
+ <div class="wrap">
3
+ <div class="header-wrap">
4
+ <h2><?php echo ALM_TITLE; ?>: <strong><?php _e('Licenses', ALM_NAME); ?></strong></h2>
5
+ <p><?php _e('Enter your license keys to enable automatic updates for <a href="admin.php?page=ajax-load-more-add-ons">ALM Add-ons</a>.', ALM_NAME); ?></p>
6
+ </div>
7
+ <div class="cnkt-main">
8
+ <div class="group">
9
+ <h3><?php _e('License Keys', ALM_NAME); ?></h3>
10
+
11
+ <p><?php _e('Manage your Ajax Load More license key\'s below - enter a key for each of your add-ons to receive plugin update notifications directly within the <a href="plugins.php">WP Plugins dashboard</a>.', ALM_NAME); ?></p>
12
+
13
+ <?php
14
+ // alm_cache_installed
15
+ // alm_unlimited_installed
16
+ // alm_preload_installed
17
+ // alm_paging_installed
18
+ // alm_seo_installed
19
+ ?>
20
+
21
+ <?php
22
+ // Check if any add ons are installed.
23
+ if(has_action('alm_cache_installed') || has_action('alm_unlimited_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_seo_installed')) : ?>
24
+
25
+
26
+ <?php
27
+ if (has_action('alm_cache_installed')){
28
+ // CACHE
29
+ $alm_cache_license = get_option( 'alm_cache_license_key' );
30
+ $alm_cache_status = get_option( 'alm_cache_license_status' );
31
+ ?>
32
+ <div class="license" id="license-paging">
33
+ <div class="license-title">
34
+ <div class="status <?php if($alm_cache_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
35
+ <h2><?php _e('Cache', ALM_NAME); ?></h2>
36
+ <a class="cnkt-button installed" href="http://connekthq.com/plugins/ajax-load-more/cache/" target="_blank"><i class="fa fa-check-square"></i> Installed</a>
37
+ </div>
38
+ <div class="license-wrap">
39
+ <form method="post" action="options.php">
40
+
41
+ <?php settings_fields('alm_cache_license'); ?>
42
+ <label class="description" for="alm_cache_license_key"><?php _e('Enter License Key', ALM_NAME); ?></label>
43
+ <div class="license-key-field">
44
+ <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', ALM_NAME); ?>" />
45
+ <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
46
+ <span class="status active">
47
+ <?php _e('Active', ALM_NAME); ?>
48
+ </span>
49
+ <?php } else { ?>
50
+ <span class="status inactive">
51
+ <?php _e('In-active', ALM_NAME); ?>
52
+ </span>
53
+ <?php } ?>
54
+ </div>
55
+
56
+ <?php wp_nonce_field( 'alm_cache_license_nonce', 'alm_cache_license_nonce' ); ?>
57
+ <?php if($alm_cache_status === '' || $alm_cache_status !== 'valid') {
58
+ submit_button(__('Save License Key', ALM_NAME), 'primary', '', false);
59
+ } ?>
60
+
61
+ <?php if( false !== $alm_cache_license ) { ?>
62
+
63
+ <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
64
+ <input type="submit" class="button-secondary" name="alm_cache_license_deactivate" value="<?php _e('De-activate License', ALM_NAME); ?>"/>
65
+ <?php } else { ?>
66
+ <?php if(!empty($alm_cache_license)){ ?>
67
+ <input type="submit" class="button-secondary" name="alm_cache_license_activate" value="<?php _e('Activate License', ALM_NAME); ?>"/>
68
+ <?php } ?>
69
+ <?php } ?>
70
+ <?php } ?>
71
+
72
+ </form>
73
+ </div>
74
+ </div>
75
+ <?php
76
+ }
77
+ // End CACHE
78
+ ?>
79
+
80
+
81
+ <?php
82
+ if (has_action('alm_unlimited_installed')){
83
+ // PAGING
84
+ $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
85
+ $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
86
+ ?>
87
+ <div class="license" id="license-paging">
88
+ <div class="license-title">
89
+ <div class="status <?php if($alm_unlimited_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
90
+ <h2><?php _e('Custom Repeaters v2', ALM_NAME); ?></h2>
91
+ <a class="cnkt-button installed" href="http://connekthq.com/plugins/ajax-load-more/paging/" target="_blank"><i class="fa fa-check-square"></i> Installed</a>
92
+ </div>
93
+ <div class="license-wrap">
94
+ <form method="post" action="options.php">
95
+
96
+ <?php settings_fields('alm_unlimited_license'); ?>
97
+ <label class="description" for="alm_unlimited_license_key"><?php _e('Enter License Key', ALM_NAME); ?></label>
98
+ <div class="license-key-field">
99
+ <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', ALM_NAME); ?>" />
100
+ <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
101
+ <span class="status active">
102
+ <?php _e('Active', ALM_NAME); ?>
103
+ </span>
104
+ <?php } else { ?>
105
+ <span class="status inactive">
106
+ <?php _e('In-active', ALM_NAME); ?>
107
+ </span>
108
+ <?php } ?>
109
+ </div>
110
+
111
+ <?php wp_nonce_field( 'alm_unlimited_license_nonce', 'alm_unlimited_license_nonce' ); ?>
112
+ <?php if($alm_unlimited_status === '' || $alm_unlimited_status !== 'valid') {