WordPress Infinite Scroll – Ajax Load More - Version 2.8.3

Version Description

  • PERFORMANCE - Updating ALM core to enqueue Ajax Load More js only when shortcode is present on screen.
  • NEW - Adding 'canonical-url' data attribute to ALM plugin wrapper - this will be used by various functions throughout the core plugin and add-ons.
  • NEW - Adding new alm-thumbnail image size.
  • NEW - Adding required functionality for upcoming Layouts add-on.
  • NEW - To increase SEO and crawler access we added a
  • FIX - Fixed issue with almDone() function not firing in certain instances.
  • UPDATE - Rebuilt License activation screen to use ajax and alert users when licenses run out.
  • UPDATE - Various admin UI enhancements.
Download this release

Release Info

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

Code changes from version 2.8.2 to 2.8.3

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://connekthq.com/donate/
4
  Tags: infinite scroll, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, loop, query, dynamic, shortcode builder, wp_query, search, tags, category, post types, taxonomy, meta_query, archives, date, infinite scrolling
5
  Requires at least: 3.6
6
  Tested up to: 4.3.1
7
- Stable tag: 2.8.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,8 +12,7 @@ A powerful solution to add infinite scroll functionality to your website
12
 
13
  == Description ==
14
 
15
- Ajax Load More is a robust and intuitive solution for infinite scrolling posts, custom post types and pages with Ajax powered queries.
16
-
17
 
18
  Build complex WordPress queries using the Ajax Load More custom shortcode builder then add the shortcode to your pages via the content editor or directly into your template files.
19
 
@@ -202,7 +201,7 @@ Ajax Load More passes the following PHP [variables](https://connekthq.com/plugin
202
  ***
203
 
204
  = Website =
205
- https://connekthq.com/ajax-load-more/
206
 
207
  ***
208
 
@@ -284,9 +283,21 @@ How to install Ajax Load More.
284
  6. Edit Page Shortcode Builder
285
  7. Shortcode and implementation examples
286
 
 
287
  == Changelog ==
288
 
289
 
 
 
 
 
 
 
 
 
 
 
 
290
  = 2.8.2 =
291
  * FIX - Fixed issue with the passing of ALM template variables to Theme Repeaters add-on.
292
  * FIX - Fixed issue shortcode builder returning an error when loading custom taxonomies.
4
  Tags: infinite scroll, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, loop, query, dynamic, shortcode builder, wp_query, search, tags, category, post types, taxonomy, meta_query, archives, date, infinite scrolling
5
  Requires at least: 3.6
6
  Tested up to: 4.3.1
7
+ Stable tag: 2.8.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ Ajax Load More is the ultimate solution for infinite scrolling and lazy loading posts, custom post types and pages with Ajax powered queries.
 
16
 
17
  Build complex WordPress queries using the Ajax Load More custom shortcode builder then add the shortcode to your pages via the content editor or directly into your template files.
18
 
201
  ***
202
 
203
  = Website =
204
+ http://connekthq.com/ajax-load-more/
205
 
206
  ***
207
 
283
  6. Edit Page Shortcode Builder
284
  7. Shortcode and implementation examples
285
 
286
+
287
  == Changelog ==
288
 
289
 
290
+ = 2.8.3 =
291
+ * PERFORMANCE - Updating ALM core to enqueue Ajax Load More js only when shortcode is present on screen.
292
+ * NEW - Adding 'canonical-url' data attribute to ALM plugin wrapper - this will be used by various functions throughout the core plugin and add-ons.
293
+ * NEW - Adding new alm-thumbnail image size.
294
+ * NEW - Adding required functionality for upcoming Layouts add-on.
295
+ * NEW - To increase SEO and crawler access we added a <noscript> paging navigation when seo and preloaded are both 'true'.
296
+ * FIX - Fixed issue with almDone() function not firing in certain instances.
297
+ * UPDATE - Rebuilt License activation screen to use ajax and alert users when licenses run out.
298
+ * UPDATE - Various admin UI enhancements.
299
+
300
+
301
  = 2.8.2 =
302
  * FIX - Fixed issue with the passing of ALM template variables to Theme Repeaters add-on.
303
  * FIX - Fixed issue shortcode builder returning an error when loading custom taxonomies.
admin/admin.php CHANGED
@@ -7,6 +7,137 @@ add_action( 'wp_ajax_alm_save_repeater', 'alm_save_repeater' ); // Ajax Save Rep
7
  add_action( 'wp_ajax_alm_update_repeater', 'alm_update_repeater' ); // Ajax Update Repeater
8
  add_action( 'wp_ajax_alm_get_tax_terms', 'alm_get_tax_terms' ); // Ajax Get Taxonomy Terms
9
  add_action( 'wp_ajax_alm_delete_cache', 'alm_delete_cache' ); // Delete Cache
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
 
12
 
@@ -21,6 +152,8 @@ function alm_admin_vars() { ?>
21
  /* <![CDATA[ */
22
  var alm_admin_localize = <?php echo json_encode( array(
23
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
 
 
24
  'alm_admin_nonce' => wp_create_nonce( 'alm_repeater_nonce' )
25
  )); ?>
26
  /* ]]> */
@@ -244,6 +377,7 @@ function alm_admin_menu() {
244
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
245
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
246
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
 
247
  }
248
 
249
 
@@ -607,6 +741,31 @@ function alm_get_tax_terms(){
607
  }
608
 
609
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610
  /*
611
  * admin_init
612
  * Initiate the plugin, create our setting variables.
@@ -728,6 +887,12 @@ function alm_admin_init(){
728
  if(has_action('alm_unlimited_settings')){
729
  do_action('alm_unlimited_settings');
730
  }
 
 
 
 
 
 
731
 
732
 
733
  // PAGINATION
7
  add_action( 'wp_ajax_alm_update_repeater', 'alm_update_repeater' ); // Ajax Update Repeater
8
  add_action( 'wp_ajax_alm_get_tax_terms', 'alm_get_tax_terms' ); // Ajax Get Taxonomy Terms
9
  add_action( 'wp_ajax_alm_delete_cache', 'alm_delete_cache' ); // Delete Cache
10
+ add_action( 'wp_ajax_alm_layouts_dismiss', 'alm_layouts_dismiss' ); // Dismiss Layouts CTA
11
+ add_action( 'wp_ajax_alm_license_activation', 'alm_license_activation' ); // Activate Add-on
12
+ add_action( 'add_layout_listing', 'add_layout_listing' ); // Add layout dropmenu
13
+ add_action( 'wp_ajax_alm_layouts_get', 'alm_layouts_get' ); // Get layout
14
+ add_action( 'admin_init', 'alm_image_sizes' ); // Add image size
15
+
16
+
17
+ /*
18
+ * alm_license_activation
19
+ * Activate Add-on licenses
20
+ *
21
+ * @since 2.8.3
22
+ */
23
+
24
+ function alm_license_activation(){
25
+
26
+ $nonce = $_GET["nonce"];
27
+ $type = $_GET["type"]; // activate / deactivate
28
+ $item = $_GET["item"];
29
+ $license = $_GET["license"];
30
+ $url = $_GET["url"];
31
+ $upgrade = $_GET["upgrade"];
32
+ $option_status = $_GET["status"];
33
+ $option_key = $_GET["key"];
34
+
35
+ // Check our nonce, if they don't match then bounce!
36
+ if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
37
+ die('Error - unable to verify nonce, please try again.');
38
+
39
+ // data to send in our API request
40
+ if($type === 'activate'){
41
+ $action = 'activate_license';
42
+ }else{
43
+ $action = 'deactivate_license';
44
+ }
45
+
46
+ $api_params = array(
47
+ 'edd_action'=> $action,
48
+ 'license' => $license,
49
+ 'item_id' => $item, // the ID of our product in EDD
50
+ 'url' => home_url()
51
+ );
52
+
53
+ // Call the custom API.
54
+ $response = wp_remote_get( add_query_arg( $api_params, $url ), array( 'timeout' => 15, 'sslverify' => false ) );
55
+
56
+ $license_data = $response['body'];
57
+ $license_data = json_decode($license_data); // decode the license data
58
+
59
+
60
+ $return["success"] = $license_data->success;
61
+
62
+ $msg = '';
63
+ if($type === 'activate'){
64
+ $return["license_limit"] = $license_data->license_limit;
65
+ $return["expires"] = $license_data->expires;
66
+ $return["site_count"] = $license_data->site_count;
67
+ $return["activations_left"] = $license_data->activations_left;
68
+ $return["license"] = $license_data->license;
69
+ $return["item_name"] = $license_data->item_name;
70
+ if($license_data->activations_left === 0 && $license_data->success === false){
71
+ $msg = '<strong>Sorry, but you are out of available licenses <em>('. $license_data->license_limit .' / '. $license_data->site_count .')</em>.</strong> Please visit the <a href="'.$upgrade.'" target="_blank">'.$license_data->item_name.'</a> page to add additional licenses.';
72
+ }
73
+ }
74
+ $return["msg"] = $msg;
75
+
76
+
77
+ update_option( $option_status, $license_data->license);
78
+ update_option( $option_key, $license );
79
+
80
+ echo json_encode($return);
81
+
82
+ die();
83
+ }
84
+
85
+
86
+
87
+ /*
88
+ * alm_layouts_get
89
+ * Get layout and return value to repeater template
90
+ *
91
+ * @since 2.8.3
92
+ */
93
+
94
+ function alm_layouts_get(){
95
+ if (current_user_can( 'edit_theme_options' )){
96
+
97
+ $nonce = $_GET["nonce"];
98
+ $type = $_GET["type"];
99
+ // Check our nonce, if they don't match then bounce!
100
+ if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
101
+ die('Error - unable to verify nonce, please try again.');
102
+
103
+ if($type === 'default'){
104
+ $content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
105
+ }else{
106
+ $content = file_get_contents(ALM_LAYOUTS_PATH.'layouts/'.$type.'.php');
107
+ }
108
+
109
+ $return["value"] = $content;
110
+ echo json_encode($return);
111
+ }else {
112
+ echo __('You don\'t belong here.', ALM_NAME);
113
+ }
114
+ die();
115
+ }
116
+
117
+
118
+
119
+ /*
120
+ * alm_layouts_image_sizes
121
+ * Add the required image sizes
122
+ *
123
+ * @since 2.8.3
124
+ */
125
+
126
+ function alm_image_sizes(){
127
+ add_image_size( 'alm-thumbnail', 150, 150, true); // Custom ALM thumbnail size
128
+ }
129
+
130
+
131
+
132
+ /*
133
+ * add_layout_listing
134
+ * Get the list of layouts
135
+ *
136
+ * @since 2.8.3
137
+ */
138
+ function add_layout_listing(){
139
+ //include( ALM_PATH . 'admin/includes/components/layout-list.php');
140
+ }
141
 
142
 
143
 
152
  /* <![CDATA[ */
153
  var alm_admin_localize = <?php echo json_encode( array(
154
  'ajax_admin_url' => admin_url( 'admin-ajax.php' ),
155
+ 'active' => __('Active', 'ajax-load-more'),
156
+ 'inactive' => __('Inactive', 'ajax-load-more'),
157
  'alm_admin_nonce' => wp_create_nonce( 'alm_repeater_nonce' )
158
  )); ?>
159
  /* ]]> */
377
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
378
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
379
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
380
+ add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
381
  }
382
 
383
 
741
  }
742
 
743
 
744
+
745
+ /*
746
+ * alm_layouts_dismiss
747
+ * Dismiss Add Layouts CTA in repeater templates.
748
+ *
749
+ * @since 2.8.2.1
750
+ */
751
+ function alm_layouts_dismiss(){
752
+ if (current_user_can( 'edit_theme_options' )){
753
+
754
+ $nonce = $_POST["nonce"];
755
+
756
+ // Check our nonce, if they don't match then bounce!
757
+ if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ))
758
+ die('Error - unable to verify nonce, please try again.');
759
+
760
+ update_option('alm_layouts_dismiss', 'true');
761
+ echo 'Success';
762
+
763
+ die();
764
+ }
765
+ }
766
+
767
+
768
+
769
  /*
770
  * admin_init
771
  * Initiate the plugin, create our setting variables.
887
  if(has_action('alm_unlimited_settings')){
888
  do_action('alm_unlimited_settings');
889
  }
890
+
891
+
892
+ // LAYOUTS
893
+ if(has_action('alm_layouts_settings')){
894
+ do_action('alm_layouts_settings');
895
+ }
896
 
897
 
898
  // PAGINATION
admin/css/admin.css CHANGED
@@ -156,7 +156,7 @@
156
  /* Expand/Collapse all rows */
157
  .ajax-load-more .toggle-all{
158
  position: absolute;
159
- top:-12px;
160
  right: 20px;
161
  width: auto;
162
  display: inline-block;
@@ -442,7 +442,7 @@
442
  .ajax-load-more input[type=number]{
443
  padding: 10px;
444
  line-height: 1.3;
445
- border: 1px solid #ccc;
446
  width: 60%;
447
  }
448
  .ajax-load-more input[type=text].full{
@@ -497,7 +497,7 @@
497
  background: #f7f7f7;
498
  }
499
  .ajax-load-more .repeaters input[type=text]{
500
- padding: 7px 10px;
501
  }
502
 
503
  .ajax-load-more input.disabled-input{
@@ -541,6 +541,9 @@
541
  -webkit-border-radius: 2px;
542
  -moz-border-radius: 2px;
543
  border-radius: 2px;
 
 
 
544
  }
545
  .ajax-load-more .row.no-brd{
546
  border: none !important;
@@ -667,7 +670,7 @@
667
  .ajax-load-more label.template-title{
668
  padding: 10px 0;
669
  margin: 0;
670
- font-size: 0.9em;
671
  color: #888;
672
  }
673
 
@@ -1006,23 +1009,22 @@
1006
  overflow: hidden;
1007
  padding-top: 11px;
1008
  }
1009
- .ajax-load-more .header-wrap h2{
1010
  padding-top: 0;
1011
- font-size: 26px;
1012
  }
1013
- .ajax-load-more .header-wrap h2 + p{
1014
  margin-top: -3px;
1015
  opacity: 0.8;
1016
  }
1017
 
1018
- .ajax-load-more h2 span{
1019
  color: #999;
1020
  background: #fff;
1021
  padding: 0 5px;
1022
  border-radius: 2px;
1023
- font-size: 0.8em;
1024
  position: relative;
1025
- top: -2px;
1026
  }
1027
  .ajax-load-more h2.addon-title{
1028
  font-size: 19px !important;
@@ -1113,13 +1115,13 @@ p.loading{
1113
  .saved-response.loading,
1114
  p.loading,
1115
  .alm-dropdown ul li a.updating{
1116
- background: url(../img/loader.gif) no-repeat left center;
1117
  padding-left: 24px;
1118
  }
1119
 
1120
  .alm-dropdown ul li a.updating{
1121
- background-position: 1px center;
1122
- padding-left: 25px;
1123
  }
1124
 
1125
  input.save-repeater{
@@ -1147,7 +1149,7 @@ input.save-repeater{
1147
  height: 26px;
1148
  display: none;
1149
  float: left;
1150
- background: #fff url(../img/loader.gif) no-repeat center center;
1151
  }
1152
 
1153
 
@@ -1398,6 +1400,7 @@ table.highlight{
1398
  padding: 20px 0 0;
1399
  position: relative;
1400
  }
 
1401
  .license:first-of-type{
1402
  padding: 10px 0 0;
1403
  }
@@ -1449,6 +1452,38 @@ table.highlight{
1449
  border-color: transparent !important;
1450
  }
1451
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1452
  .license-wrap,
1453
  .license-no-addons{
1454
  overflow: hidden;
@@ -1669,7 +1704,7 @@ table.highlight{
1669
  border-radius: 3px;
1670
  padding: 8px;
1671
  background: #f7f7f7;
1672
- border: 1px solid #ccc;
1673
  color: #999;
1674
  line-height: 1.3;
1675
  }
@@ -1697,7 +1732,7 @@ table.highlight{
1697
  color: #0a4b83 !important;
1698
  }
1699
  .ajax-load-more .cm-string{ /* Elements in " " */
1700
- color: #d14 !important;
1701
  }
1702
  .ajax-load-more .cm-attribute{ /* class names */
1703
  color: #008080 !important;
@@ -1753,7 +1788,7 @@ table.highlight{
1753
  }
1754
 
1755
  .admin.ajax-load-more .row.unlimited.deleting{ /* Deleting Row */
1756
- background: #fff url(../img/loader-unlimited.gif) no-repeat center center;
1757
  border-color: #fff;
1758
  opacity: 0.4;
1759
  }
@@ -1761,7 +1796,7 @@ table.highlight{
1761
  background-image: none !important;
1762
  }
1763
  .admin.ajax-load-more .row.unlimited.new{ /* New Row */
1764
- background: url(../img/loader-unlimited.gif) no-repeat center center;
1765
  border-color: #efefef !important;
1766
  min-height: 60px;
1767
  display: none;
@@ -1800,7 +1835,7 @@ table.highlight{
1800
  transition: all 0.2s ease;
1801
  position: absolute;
1802
  right: 15px;
1803
- bottom: 15px;
1804
  }
1805
  .repeaters .alm-delete a{
1806
  border-radius: 2px;
@@ -1814,9 +1849,6 @@ table.highlight{
1814
  .repeaters .alm-delete a:hover{
1815
  background-color: #c94141;
1816
  color: #fff;
1817
- -webkit-box-shadow: 0 0 3px #ccc;
1818
- -moz-box-shadow: 0 0 3px #ccc;
1819
- box-shadow: 0 0 3px #ccc;
1820
  }
1821
  .repeaters .alm-delete a:focus{
1822
  -webkit-box-shadow: none;
@@ -1977,7 +2009,7 @@ table.highlight{
1977
 
1978
  .alm-dir-listing.deleting{
1979
  opacity: 0.5;
1980
- background: #fff url(../img/loader-unlimited.gif) no-repeat center center;
1981
  }
1982
 
1983
  .alm-dir-listing .dir-title{
@@ -2252,16 +2284,17 @@ p.cache-stats{
2252
  opacity: 1;
2253
  }
2254
 
2255
- .alm-repeater-options{
2256
  position: absolute;
2257
  top: -38px;
2258
  right: 6px;
2259
  z-index:99;
2260
  }
2261
- .alm-repeater-options a.target{
 
2262
  color: #999;
2263
  text-decoration: none !important;
2264
- padding: 5px 9px;
2265
  border: 1px solid #e7e7e7;
2266
  -webkit-border-radius: 3px;
2267
  -moz-border-radius: 3px;
@@ -2279,11 +2312,10 @@ p.cache-stats{
2279
  top:1px;
2280
  left: -2px;
2281
  }
2282
- .alm-repeater-options a.target:hover,
2283
- .alm-repeater-options a.target:active{
2284
- border-color: #c9c9c9;
2285
- color: #666;
2286
  background-color: #fff;
 
 
2287
  -webkit-box-shadow: 0 0 3px #ccc;
2288
  -moz-box-shadow: 0 0 3px #ccc;
2289
  box-shadow: 0 0 3px #ccc;
@@ -2305,8 +2337,151 @@ p.cache-stats{
2305
  .alm-repeater-options.active a.target i.fa-cog{
2306
  color: #444;
2307
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2309
  /* Dropwbown */
 
 
 
 
 
 
 
2310
  .alm-dropdown{
2311
  display: none;
2312
  position: absolute;
@@ -2324,7 +2499,10 @@ p.cache-stats{
2324
  border: 1px solid #ccc;
2325
  box-shadow: 0 0 4px #ccc;
2326
  padding: 8px;
2327
- width: 230px;
 
 
 
2328
  }
2329
  .alm-drop-inner:after,
2330
  .alm-drop-inner:before {
@@ -2353,54 +2531,60 @@ p.cache-stats{
2353
  }
2354
 
2355
  .alm-dropdown.active{
2356
- display: block;
2357
  }
2358
  .alm-dropdown ul{
2359
  padding:0;
2360
  margin:0;
 
 
 
 
 
2361
  }
2362
  .alm-dropdown ul li{
2363
  margin:0;
2364
  padding:0;
2365
  list-style: none;
2366
  clear: both;
2367
- font-size: 11px;
2368
  margin: 0;
2369
  padding: 0;
2370
  line-height: 1.2;
2371
- border-top: 1px solid #efefef;
2372
  }
2373
  .alm-dropdown ul li:first-child{
2374
  border: none;
2375
  }
2376
  .alm-dropdown ul li a{
2377
- padding: 11px 5px 11px 24px;
2378
  display: block;
2379
  text-decoration: none;
2380
- background-position: 1px center;
2381
  color: #666;
2382
  -webkit-box-shadow: none !important;
2383
  -moz-box-shadow: none !important;
2384
  box-shadow: none !important;
2385
  position: relative;
2386
  }
 
2387
  .alm-dropdown ul li a i{
2388
  margin: 0;
2389
  color: #999 !important;
2390
  position: absolute;
2391
- left: 0px;
2392
- top: 11px;
2393
  font-size: 14px;
2394
  width: 19px;
2395
  padding-left: 3px;
2396
  display: inline-block;
2397
- }
2398
- .alm-dropdown ul li.copy a i{
2399
- left: -1px;
2400
- }
2401
  .alm-dropdown ul li.option-update a i{
2402
- top: 12px;
2403
- }
 
 
 
2404
 
2405
  .alm-dropdown ul li a:hover{
2406
  color: #111;
@@ -2663,6 +2847,10 @@ p.cache-stats{
2663
  .call-out.light {
2664
  padding: 15px !important;
2665
  }
 
 
 
 
2666
  }
2667
 
2668
  @media screen and (max-width: 480px){
@@ -2722,6 +2910,21 @@ p.cache-stats{
2722
  .call-out.light p{
2723
  padding: 0;
2724
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2725
 
2726
  }
2727
 
156
  /* Expand/Collapse all rows */
157
  .ajax-load-more .toggle-all{
158
  position: absolute;
159
+ top:-13px;
160
  right: 20px;
161
  width: auto;
162
  display: inline-block;
442
  .ajax-load-more input[type=number]{
443
  padding: 10px;
444
  line-height: 1.3;
445
+ border: 1px solid #e7e7e7;
446
  width: 60%;
447
  }
448
  .ajax-load-more input[type=text].full{
497
  background: #f7f7f7;
498
  }
499
  .ajax-load-more .repeaters input[type=text]{
500
+ padding: 9px 10px;
501
  }
502
 
503
  .ajax-load-more input.disabled-input{
541
  -webkit-border-radius: 2px;
542
  -moz-border-radius: 2px;
543
  border-radius: 2px;
544
+ }
545
+ .ajax-load-more#alm-repeaters .row{
546
+ overflow: visible;
547
  }
548
  .ajax-load-more .row.no-brd{
549
  border: none !important;
670
  .ajax-load-more label.template-title{
671
  padding: 10px 0;
672
  margin: 0;
673
+ font-size: 13px;
674
  color: #888;
675
  }
676
 
1009
  overflow: hidden;
1010
  padding-top: 11px;
1011
  }
1012
+ .ajax-load-more .header-wrap h1{
1013
  padding-top: 0;
 
1014
  }
1015
+ .ajax-load-more .header-wrap h1 + p{
1016
  margin-top: -3px;
1017
  opacity: 0.8;
1018
  }
1019
 
1020
+ .ajax-load-more h1 span{
1021
  color: #999;
1022
  background: #fff;
1023
  padding: 0 5px;
1024
  border-radius: 2px;
1025
+ font-size: 0.9em;
1026
  position: relative;
1027
+ top: -1px;
1028
  }
1029
  .ajax-load-more h2.addon-title{
1030
  font-size: 19px !important;
1115
  .saved-response.loading,
1116
  p.loading,
1117
  .alm-dropdown ul li a.updating{
1118
+ background: url("../img/loader.gif") no-repeat left center;
1119
  padding-left: 24px;
1120
  }
1121
 
1122
  .alm-dropdown ul li a.updating{
1123
+ background-position: 4px center;
1124
+ padding-left: 29px;
1125
  }
1126
 
1127
  input.save-repeater{
1149
  height: 26px;
1150
  display: none;
1151
  float: left;
1152
+ background: #fff url("../img/loader.gif") no-repeat center center;
1153
  }
1154
 
1155
 
1400
  padding: 20px 0 0;
1401
  position: relative;
1402
  }
1403
+
1404
  .license:first-of-type{
1405
  padding: 10px 0 0;
1406
  }
1452
  border-color: transparent !important;
1453
  }
1454
 
1455
+
1456
+
1457
+ .license .loading{
1458
+ position: absolute;
1459
+ left: 0;
1460
+ top: 0;
1461
+ width: 100%;
1462
+ height: 100%;
1463
+ background: rgba(255, 255, 255, 0.6) url("../img/loader.gif") no-repeat center center;
1464
+ z-index: 9;
1465
+ display: none;
1466
+ }
1467
+ .license-btn.hide{
1468
+ display: none;
1469
+ }
1470
+ .license-btn-wrap{
1471
+ display: block;
1472
+ }
1473
+ .license-btn-wrap .msg{
1474
+ display: block;
1475
+ padding: 10px 0 0;
1476
+ font-size: 13px;
1477
+ line-height: 18px;
1478
+ }
1479
+ .license-btn-wrap .msg strong{
1480
+ display: block;
1481
+ }
1482
+ .license-btn-wrap .msg em{
1483
+ opacity: 0.7;
1484
+ font-style: normal;
1485
+ }
1486
+
1487
  .license-wrap,
1488
  .license-no-addons{
1489
  overflow: hidden;
1704
  border-radius: 3px;
1705
  padding: 8px;
1706
  background: #f7f7f7;
1707
+ border: 1px solid #e7e7e7;
1708
  color: #999;
1709
  line-height: 1.3;
1710
  }
1732
  color: #0a4b83 !important;
1733
  }
1734
  .ajax-load-more .cm-string{ /* Elements in " " */
1735
+ color: #c75050 !important;
1736
  }
1737
  .ajax-load-more .cm-attribute{ /* class names */
1738
  color: #008080 !important;
1788
  }
1789
 
1790
  .admin.ajax-load-more .row.unlimited.deleting{ /* Deleting Row */
1791
+ background: #fff url("../img/loader-unlimited.gif") no-repeat center center;
1792
  border-color: #fff;
1793
  opacity: 0.4;
1794
  }
1796
  background-image: none !important;
1797
  }
1798
  .admin.ajax-load-more .row.unlimited.new{ /* New Row */
1799
+ background: url("../img/loader-unlimited.gif") no-repeat center center;
1800
  border-color: #efefef !important;
1801
  min-height: 60px;
1802
  display: none;
1835
  transition: all 0.2s ease;
1836
  position: absolute;
1837
  right: 15px;
1838
+ bottom: 17px;
1839
  }
1840
  .repeaters .alm-delete a{
1841
  border-radius: 2px;
1849
  .repeaters .alm-delete a:hover{
1850
  background-color: #c94141;
1851
  color: #fff;
 
 
 
1852
  }
1853
  .repeaters .alm-delete a:focus{
1854
  -webkit-box-shadow: none;
2009
 
2010
  .alm-dir-listing.deleting{
2011
  opacity: 0.5;
2012
+ background: #fff url("../img/loader-unlimited.gif") no-repeat center center;
2013
  }
2014
 
2015
  .alm-dir-listing .dir-title{
2284
  opacity: 1;
2285
  }
2286
 
2287
+ .alm-drop-btn.alm-repeater-options{
2288
  position: absolute;
2289
  top: -38px;
2290
  right: 6px;
2291
  z-index:99;
2292
  }
2293
+ .alm-repeater-options a.target,
2294
+ .alm-drop-btn.alm-layout-selection a.target{
2295
  color: #999;
2296
  text-decoration: none !important;
2297
+ padding: 5px 11px;
2298
  border: 1px solid #e7e7e7;
2299
  -webkit-border-radius: 3px;
2300
  -moz-border-radius: 3px;
2312
  top:1px;
2313
  left: -2px;
2314
  }
2315
+ .alm-repeater-options a.target:hover{
 
 
 
2316
  background-color: #fff;
2317
+ color: #666;
2318
+ border-color: #c9c9c9;
2319
  -webkit-box-shadow: 0 0 3px #ccc;
2320
  -moz-box-shadow: 0 0 3px #ccc;
2321
  box-shadow: 0 0 3px #ccc;
2337
  .alm-repeater-options.active a.target i.fa-cog{
2338
  color: #444;
2339
  }
2340
+
2341
+
2342
+ /* Layout Dropdown */
2343
+ .alm-drop-btn.alm-layout-selection{
2344
+ display: inline-block;
2345
+ float: none;
2346
+ margin: 0 0 13px;
2347
+ }
2348
+ .alm-drop-btn.alm-layout-selection a.target{
2349
+ background-color: #fefeed;
2350
+ border-color: #e7e7e7;
2351
+ color: #555;
2352
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
2353
+ }
2354
+ .alm-drop-btn.alm-layout-selection a i{
2355
+ margin: 0 2px 0 0;
2356
+ }
2357
+
2358
+ .alm-drop-btn.alm-layout-selection li.type{
2359
+ height: 34px;
2360
+ line-height: 34px;
2361
+ padding: 0 0 0 29px;
2362
+ position: relative;
2363
+ }
2364
+ .alm-dropdown ul li.type i {
2365
+ color: #999 !important;
2366
+ display: inline-block;
2367
+ font-size: 14px;
2368
+ left: 4px;
2369
+ margin: 0;
2370
+ padding-left: 3px;
2371
+ position: absolute;
2372
+ top: 10px;
2373
+ width: 19px;
2374
+ }
2375
+ .alm-drop-btn.alm-layout-selection li.type .col-select{
2376
+ float: right;
2377
+ text-align: right;
2378
+ width: auto;
2379
+ height: 34px;
2380
+ line-height: 34px;
2381
+ }
2382
+ .alm-drop-btn.alm-layout-selection li.type .col-select a{
2383
+ width: 30px;
2384
+ height: 34px;
2385
+ display: inline-block;
2386
+ margin: 0;
2387
+ border-left: 1px solid #efefef;
2388
+ padding: 0;
2389
+ text-align: center;
2390
+ }
2391
+
2392
+ /* External Link + Add-on */
2393
+ .alm-drop-btn.alm-layout-selection a.external,
2394
+ .alm-drop-btn.alm-layout-selection a.add-on{
2395
+ border-top: 1px solid #ccc;
2396
+ background-color: #f7f7f7;
2397
+ padding: 13px 10px 13px 29px;
2398
+ display: block;
2399
+ }
2400
+ .alm-drop-btn.alm-layout-selection a.add-on{
2401
+ line-height: 1.45;
2402
+ }
2403
+ .alm-drop-btn.alm-layout-selection a.add-on strong{
2404
+ color: #111;
2405
+ }
2406
+ .alm-drop-btn.alm-layout-selection a.add-on i,
2407
+ .alm-drop-btn.alm-layout-selection a.external i{
2408
+ top: 14px;
2409
+ }
2410
+
2411
+ .alm-drop-btn.alm-layout-selection a.target:hover,
2412
+ .alm-drop-btn.alm-layout-selection a.target:active,
2413
+ .alm-drop-btn.alm-layout-selection.active a.target{
2414
+ color: #222;
2415
+ background-color: #fafad7;
2416
+ border-color: #ccc;
2417
+ -webkit-box-shadow: 0 0 3px #efefef;
2418
+ -moz-box-shadow: 0 0 3px #efefef;
2419
+ box-shadow: 0 0 3px #efefef;
2420
+ }
2421
+ .alm-drop-btn.alm-layout-selection.active a.target,
2422
+ .alm-drop-btn.alm-layout-selection a.target:active{
2423
+ -webkit-box-shadow: inset 0 1px 1px #ccc !important;
2424
+ -moz-box-shadow: inset 0 1px 1px #ccc !important;
2425
+ box-shadow: inset 0 1px 1px #ccc !important;
2426
+ }
2427
 
2428
+
2429
+ .alm-drop-btn.alm-layout-selection .alm-dropdown {
2430
+ display: none;
2431
+ position: absolute;
2432
+ right: auto;
2433
+ left: -2px;
2434
+ top: 108%;
2435
+ z-index: 9;
2436
+ }
2437
+ .alm-drop-btn .alm-dropdown:hover{
2438
+ display: block !important;
2439
+ }
2440
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:after,
2441
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:before {
2442
+ right: auto;
2443
+ left: 36px;
2444
+ }
2445
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner::after{
2446
+ margin-left: 0;
2447
+ }
2448
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:before {
2449
+ right: auto;
2450
+ left: 35px;
2451
+ }
2452
+
2453
+ .add-layout-cta{
2454
+ border-radius: 2px;
2455
+ border: 1px solid #e7e7e7;
2456
+ background-color: #fefeed;
2457
+ padding: 10px 100px 10px 10px;
2458
+ display: block;
2459
+ margin: 5px 0 15px;
2460
+ font-weight: 600;
2461
+ position: relative;
2462
+ }
2463
+ .add-layout-cta p{
2464
+ margin: 0;
2465
+ font-size: 13px;
2466
+ }
2467
+ span.dismiss{
2468
+ position: absolute;
2469
+ right: 10px;
2470
+ top:11px;
2471
+ font-size: 13px;
2472
+ }
2473
+ span.dismiss a{
2474
+ text-decoration: none;
2475
+ }
2476
+
2477
  /* Dropwbown */
2478
+ .alm-drop-btn{
2479
+ position: relative;
2480
+ width: auto;
2481
+ }
2482
+ .alm-drop-btn a.target{
2483
+ font-weight: 600;
2484
+ }
2485
  .alm-dropdown{
2486
  display: none;
2487
  position: absolute;
2499
  border: 1px solid #ccc;
2500
  box-shadow: 0 0 4px #ccc;
2501
  padding: 8px;
2502
+ width: 260px;
2503
+ }
2504
+ .alm-layout-selection .alm-dropdown .alm-drop-inner{
2505
+ width: 280px;
2506
  }
2507
  .alm-drop-inner:after,
2508
  .alm-drop-inner:before {
2531
  }
2532
 
2533
  .alm-dropdown.active{
2534
+ display: block !important;
2535
  }
2536
  .alm-dropdown ul{
2537
  padding:0;
2538
  margin:0;
2539
+ -webkit-border-radius: 2px;
2540
+ -moz-border-radius: 2px;
2541
+ border-radius: 2px;
2542
+ border: 1px solid #f7f7f7;
2543
+ overflow: hidden;
2544
  }
2545
  .alm-dropdown ul li{
2546
  margin:0;
2547
  padding:0;
2548
  list-style: none;
2549
  clear: both;
2550
+ font-size: 13px;
2551
  margin: 0;
2552
  padding: 0;
2553
  line-height: 1.2;
2554
+ border-top: 1px solid #f7f7f7;
2555
  }
2556
  .alm-dropdown ul li:first-child{
2557
  border: none;
2558
  }
2559
  .alm-dropdown ul li a{
2560
+ padding: 13px 5px 13px 29px;
2561
  display: block;
2562
  text-decoration: none;
2563
+ background-position: 4px center;
2564
  color: #666;
2565
  -webkit-box-shadow: none !important;
2566
  -moz-box-shadow: none !important;
2567
  box-shadow: none !important;
2568
  position: relative;
2569
  }
2570
+
2571
  .alm-dropdown ul li a i{
2572
  margin: 0;
2573
  color: #999 !important;
2574
  position: absolute;
2575
+ left: 4px;
2576
+ top: 13px;
2577
  font-size: 14px;
2578
  width: 19px;
2579
  padding-left: 3px;
2580
  display: inline-block;
2581
+ }
 
 
 
2582
  .alm-dropdown ul li.option-update a i{
2583
+ top: 14px;
2584
+ }
2585
+ .alm-dropdown ul li a i.fa-th-large{
2586
+ left: 5px;
2587
+ }
2588
 
2589
  .alm-dropdown ul li a:hover{
2590
  color: #111;
2847
  .call-out.light {
2848
  padding: 15px !important;
2849
  }
2850
+
2851
+ .repeaters input.save-repeater{
2852
+ max-width: 50%;
2853
+ }
2854
  }
2855
 
2856
  @media screen and (max-width: 480px){
2910
  .call-out.light p{
2911
  padding: 0;
2912
  }
2913
+
2914
+ .ajax-load-more .one_half{
2915
+ width: 100%;
2916
+ margin: 0 0 2%;
2917
+ display: block;
2918
+ }
2919
+ .add-layout-cta{
2920
+ padding: 10px;
2921
+ }
2922
+ span.dismiss{
2923
+ position: static;
2924
+ padding-top: 20px;
2925
+ display: block;
2926
+ font-size: 12px;
2927
+ }
2928
 
2929
  }
2930
 
admin/css/select2.css CHANGED
@@ -26,7 +26,7 @@
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;
26
  padding: 0 10px;
27
  overflow: hidden;
28
  position: relative;
29
+ border: 1px solid #e7e7e7;
30
  white-space: nowrap;
31
  line-height: 40px;
32
  color: #333;
admin/img/loader-unlimited.gif CHANGED
Binary file
admin/includes/components/layout-list.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="clear"></div>
2
+ <div class="alm-drop-btn alm-layout-selection">
3
+ <a href="javascript:void(0);" class="target"><i class="fa fa-chevron-circle-down"></i> <?php _e('Apply Layout', 'ajax-load-more'); ?></a>
4
+ <div class="alm-dropdown">
5
+ <div class="alm-drop-inner">
6
+ <ul>
7
+ <li>
8
+ <a href="javascript:void(0);" class="layout" data-type="default"><i class="fa fa-picture-o"></i>
9
+ <?php _e('Default', 'ajax-load-more'); ?>
10
+ </a>
11
+ </li>
12
+ <?php if (has_action('alm_layouts_installed')){
13
+ do_action('alm_get_layouts_add_on');
14
+ } else {
15
+ echo '<li><a href="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=Extend&utm_campaign=Layouts" class="add-on" target="_blank">';
16
+ echo '<i class="fa fa-key"></i>';
17
+ _e('Unlock additional layout templates with the <strong>Layouts add-on</strong>', 'ajax-load-more');
18
+ echo '</a></li>';
19
+ }?>
20
+
21
+ </ul>
22
+ </div>
23
+ </div>
24
+ </div>
admin/includes/cta/about.php CHANGED
@@ -1,10 +1,10 @@
1
  <div class="cta">
2
  <h3>Other Projects</h3>
3
  <ul>
4
- <li><strong><a target="blank" href="https://wordpress.org/plugins/easy-query/">Easy Query</a></strong><br>The fastest and simplest way to build WordPress queries without ever touching a single line of code.</li>
5
- <li><strong><a target="blank" href="https://wordpress.org/plugins/unsplash-stock-photo-library/">Unsplash WP</a></strong><br>The fastest way to upload high quality stock photos from unsplash.com directly to your media library</li>
6
  <li><strong><a target="blank" href="https://github.com/dcooney/flexpanel">FlexPanel</a></strong><br>A responsive scrolling panel navigation for mobile and desktop</li>
7
- <li><strong><a target="blank" href="http://connekthq.com">Connekt Media</a></strong><br>A digital creation company</li>
8
  </ul>
9
  </div>
10
 
1
  <div class="cta">
2
  <h3>Other Projects</h3>
3
  <ul>
4
+ <li><strong><a target="blank" href="https://connekthq.com/plugins/easy-query/">Easy Query</a></strong><br>A simple solution to build and display WordPress queries without touching a single line of code.</li>
5
+ <li><strong><a target="blank" href="https://connekthq.com/plugins/unsplash-wp/">Unsplash WP</a></strong><br>The fastest way to upload high quality stock photos from unsplash.com directly to your media library</li>
6
  <li><strong><a target="blank" href="https://github.com/dcooney/flexpanel">FlexPanel</a></strong><br>A responsive scrolling panel navigation for mobile and desktop</li>
7
+ <li><strong><a target="blank" href="https://connekthq.com">Connekt Media</a></strong><br>A digital creation company</li>
8
  </ul>
9
  </div>
10
 
admin/includes/cta/extend.php CHANGED
@@ -1 +1 @@
1
- <div class="clear"></div><div class="call-out"><?php _e('Unlock additional templates with the <a href="?page=ajax-load-more-add-ons" target="_parent">Custom Repeaters add-on</a>', 'ajax-load-more'); ?> <a class="cnkt-button" href="https://connekthq.com/plugins/ajax-load-more/custom-repeaters" target="_blank"><?php _e('More Info', 'ajax-load-more'); ?></a></div>
1
+ <div class="clear"></div><div class="call-out"><?php _e('Unlock additional templates with the <a href="?page=ajax-load-more-add-ons" target="_parent">Custom Repeaters add-on</a>', 'ajax-load-more'); ?> <a class="cnkt-button" href="https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=CustomRepeaters%20Extend&utm_campaign=Custom%20Repeaters" target="_blank"><?php _e('More Info', 'ajax-load-more'); ?></a></div>
admin/includes/cta/resources.php CHANGED
@@ -2,11 +2,11 @@
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
  <ul>
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
5
- <li><a target="blank" href="http://wordpress.org/plugins/ajax-load-more"><i class="fa fa-file-text"></i> <?php _e('Documentation', 'ajax-load-more'); ?></a></li>
6
- <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support/Issue', 'ajax-load-more'); ?>s</a></li>
7
  <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
8
  <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
9
  <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
 
10
  </ul>
11
- <a href="https://github.com/dcooney/wordpress-ajax-load-more" target="blank" class="visit"><i class="fa fa-github"></i> <?php _e('Latest build on Github', 'ajax-load-more'); ?></a>
12
  </div>
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
  <ul>
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
5
+ <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support and Issues', 'ajax-load-more'); ?>s</a></li>
 
6
  <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
7
  <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
8
  <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
9
+ <li><a target="blank" href="https://github.com/dcooney/wordpress-ajax-load-more"><i class="fa fa-github"></i> <?php _e('Github', 'ajax-load-more'); ?></a></li>
10
  </ul>
11
+ <a href="https://wordpress.org/plugins/ajax-load-more/" target="blank" class="visit"><i class="fa fa-wordpress"></i> <?php _e('WordPress Repository', 'ajax-load-more'); ?></a>
12
  </div>
admin/includes/layout/default.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>>
2
+ <?php if ( has_post_thumbnail() ) {
3
+ the_post_thumbnail(array(150,150));
4
+ }?>
5
+ <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
6
+ <p class="entry-meta">
7
+ <?php the_time("F d, Y"); ?>
8
+ </p>
9
+ <?php the_excerpt(); ?>
10
+ </li>
admin/js/admin.js CHANGED
@@ -134,6 +134,141 @@ jQuery(document).ready(function($) {
134
  });
135
 
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  /*
139
  * Scroll to setting section
134
  });
135
 
136
 
137
+ /*
138
+ * Activate License
139
+ *
140
+ * @since 2.8.3
141
+ */
142
+ //
143
+ var almActivating = false;
144
+ $(document).on('click', '.license-btn', function(e){
145
+ e.preventDefault();
146
+ if(!almActivating){
147
+ $('.license-btn-wrap .msg').remove();
148
+ almActivating = true;
149
+ var el = $(this),
150
+ wrap = el.closest('.license-btn-wrap'),
151
+ parent = el.closest('.license'),
152
+ type = el.data('type'),
153
+ item = wrap.data('name'),
154
+ url = wrap.data('url'),
155
+ upgrade = wrap.data('upgrade-url'),
156
+ status = wrap.data('option-status'),
157
+ key = wrap.data('option-key'),
158
+ license = parent.find('input[type=text]').val();
159
+
160
+ $('.loading', parent).fadeIn(300);
161
+
162
+ // Get value from Ajax
163
+ $.ajax({
164
+ type: 'GET',
165
+ url: alm_admin_localize.ajax_admin_url,
166
+ dataType: 'json',
167
+
168
+ data: {
169
+ action: 'alm_license_activation',
170
+ nonce: alm_admin_localize.alm_admin_nonce,
171
+ type: type,
172
+ item: item,
173
+ status: status,
174
+ url: url,
175
+ upgrade: upgrade,
176
+ key: key,
177
+ license: license,
178
+ },
179
+
180
+ success: function(data) {
181
+
182
+ //console.log(data);
183
+
184
+ if(data['msg']){
185
+ $('.license-btn-wrap', parent).append('<div class="msg">'+data['msg']+'</div>');
186
+ }
187
+
188
+ if(data['license'] === 'valid'){
189
+ $('.license-key-field .status', parent).addClass('active').removeClass('inactive').text(alm_admin_localize.active);
190
+ $('.license-title .status', parent).addClass('valid').removeClass('invalid');
191
+ $('.activate.license-btn', parent).addClass('hide');
192
+ $('.deactivate.license-btn', parent).removeClass('hide');
193
+
194
+ }else{
195
+ $('.license-key-field .status', parent).removeClass('active').addClass('inactive').text(alm_admin_localize.inactive);
196
+ $('.license-title .status', parent).removeClass('valid').addClass('invalid');
197
+ $('.activate.license-btn', parent).removeClass('hide');
198
+ $('.deactivate.license-btn', parent).addClass('hide');
199
+ }
200
+
201
+ $('.loading', parent).delay(250).fadeOut(300);
202
+ almActivating = false;
203
+
204
+ },
205
+ error: function(xhr, status, error) {
206
+ console.log(status);
207
+ $('.loading', parent).delay(250).fadeOut(300);
208
+ almActivating = false;
209
+ }
210
+ });
211
+ }
212
+
213
+ });
214
+
215
+
216
+
217
+ // Get layout value Ajax
218
+ //$('.alm-layout-selection ul li a.layout').click(function(){
219
+ $(document).on('click', '.alm-layout-selection li a.layout', function(e){
220
+ e.preventDefault();
221
+ var el = $(this),
222
+ type = el.data('type'),
223
+ layout_btn_text = el.html(),
224
+ name = el.closest('.repeater-wrap').data('name');
225
+
226
+ if(!el.hasClass('updating')){
227
+
228
+ el.addClass('updating').text("Applying layout...");
229
+
230
+ // Get editor ID
231
+ var eid = '';
232
+ if(name === 'default'){ // Default Template
233
+ eid = window['editorDefault'];
234
+ }else{ // Repeater Templates
235
+ eid = window['editor_'+name]; // Set editor ID
236
+ }
237
+
238
+ // Get value from Ajax
239
+ $.ajax({
240
+ type: 'GET',
241
+ url: alm_admin_localize.ajax_admin_url,
242
+ data: {
243
+ action: 'alm_layouts_get',
244
+ type: type,
245
+ nonce: alm_admin_localize.alm_admin_nonce,
246
+ },
247
+ dataType: "JSON",
248
+ success: function(data) {
249
+ eid.setValue(data.value);
250
+
251
+ // Clear button styles
252
+ setTimeout(function() {
253
+ el.text('Template Updated').blur();
254
+ setTimeout(function() {
255
+ el.removeClass('updating').html(layout_btn_text).blur(); // CLose drop menu
256
+ el.closest('.alm-drop-btn').trigger('click');
257
+ }, 400);
258
+ }, 400);
259
+
260
+
261
+ },
262
+ error: function(xhr, status, error) {
263
+ console.log(status);
264
+ }
265
+ });
266
+ }
267
+
268
+ });
269
+
270
+
271
+
272
 
273
  /*
274
  * Scroll to setting section
admin/js/libs/jquery.drops.js CHANGED
@@ -1,4 +1,5 @@
1
  var drops = drops || {};
 
2
  jQuery(document).ready(function($) {
3
  "use strict";
4
 
@@ -25,9 +26,11 @@ jQuery(document).ready(function($) {
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) {
@@ -37,12 +40,13 @@ jQuery(document).ready(function($) {
37
  };
38
 
39
  //Dropdown links
40
- $('.alm-dropdown').each(function(i){
41
- var el = $(this).parent('.alm-drop-btn');
42
- $('> a', el).click(function(e){
43
- var e = $(this);
44
- drops.dropdown(e);
45
- return false;
46
- });
47
  });
 
 
 
 
48
  });
1
  var drops = drops || {};
2
+
3
  jQuery(document).ready(function($) {
4
  "use strict";
5
 
26
  text.focus(); //Focus on input boxes
27
 
28
  $(window).unbind('click').bind('click', drops.closeDropDown); // Bind click event to site container
29
+
30
+ dropdown.unbind('click').bind('click', function(event){
31
+ //event.stopPropagation();
32
  });
33
+ //http://stackoverflow.com/questions/10439779/closing-modal-popup-by-clicking-away-from-it
34
  };
35
  drops.closeDropDown = function() {
36
  $('.alm-dropdown').each(function(i) {
40
  };
41
 
42
  //Dropdown links
43
+ $(document).on('click', '.alm-drop-btn a.target', function(){
44
+ var e = $(this);
45
+ drops.dropdown(e);
46
+ return false;
 
 
 
47
  });
48
+
49
+
50
+
51
+
52
  });
admin/views/add-ons.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="admin ajax-load-more" id="alm-add-ons">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
- <h2><?php echo ALM_TITLE; ?>: <strong><?php _e('Add-ons', 'ajax-load-more'); ?></strong></h2>
5
  <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main full">
@@ -56,7 +56,9 @@
56
  </div>
57
 
58
  </div>
59
- <!-- End Custom Repeaters -->
 
 
60
 
61
 
62
  <!-- Paging -->
@@ -83,7 +85,7 @@
83
  </div>
84
 
85
  </div>
86
- <!-- End Paging -->
87
 
88
 
89
  <!-- Preloaded -->
@@ -191,6 +193,32 @@
191
  </div>
192
  <!-- End Theme Repeaters -->
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  </div>
195
 
196
  <div class="call-out light">
1
  <div class="admin ajax-load-more" id="alm-add-ons">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
+ <h1><?php echo ALM_TITLE; ?>: <strong><?php _e('Add-ons', 'ajax-load-more'); ?></strong></h1>
5
  <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main full">
56
  </div>
57
 
58
  </div>
59
+ <!-- End Custom Repeaters -->
60
+
61
+
62
 
63
 
64
  <!-- Paging -->
85
  </div>
86
 
87
  </div>
88
+ <!-- End Paging -->
89
 
90
 
91
  <!-- Preloaded -->
193
  </div>
194
  <!-- End Theme Repeaters -->
195
 
196
+
197
+ <!-- Layouts -->
198
+ <div class="group" style="display: none !important;">
199
+ <div class="row no-brd">
200
+ <?php
201
+ $layouts_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Layouts';
202
+ ?>
203
+ <a href="<?php echo $layouts_url; ?>">
204
+ <div class="expand-wrap">
205
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg">
206
+ <h2 class="addon-title"><?php _e('Layouts', 'ajax-load-more'); ?></h2>
207
+ <p class="addon-intro"><?php _e('Extend Ajax Load More with predefined responsive layouts.', 'ajax-load-more'); ?></p>
208
+ <p><?php _e('Boost the look of your theme with a library of mobile ready layouts.', 'ajax-load-more'); ?></p>
209
+ <?php
210
+ if (has_action('alm_layouts_installed')){
211
+ echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
212
+ }else{
213
+ echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
214
+ }
215
+ ?>
216
+ </div>
217
+ </a>
218
+ </div>
219
+ </div>
220
+ <!-- End Layouts -->
221
+
222
  </div>
223
 
224
  <div class="call-out light">
admin/views/examples.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="admin ajax-load-more" id="alm-examples">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
- <h2><?php echo ALM_TITLE; ?>: <strong><?php _e('Examples', 'ajax-load-more'); ?></strong></h2>
5
  <p><?php _e('A collection of everyday shortcode usages and implementation examples', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main forceColors">
1
  <div class="admin ajax-load-more" id="alm-examples">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
+ <h1><?php echo ALM_TITLE; ?>: <strong><?php _e('Examples', 'ajax-load-more'); ?></strong></h1>
5
  <p><?php _e('A collection of everyday shortcode usages and implementation examples', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main forceColors">
admin/views/licenses.php CHANGED
@@ -1,7 +1,7 @@
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', 'ajax-load-more'); ?></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>.', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main">
@@ -13,6 +13,7 @@
13
  <?php
14
  // alm_cache_installed
15
  // alm_unlimited_installed
 
16
  // alm_preload_installed
17
  // alm_paging_installed
18
  // alm_prev_post_installed
@@ -22,7 +23,7 @@
22
 
23
  <?php
24
  // Check if any add ons are installed.
25
- if(has_action('alm_cache_installed') || has_action('alm_unlimited_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) : ?>
26
 
27
 
28
  <?php
@@ -31,7 +32,7 @@
31
  $alm_cache_license = get_option( 'alm_cache_license_key' );
32
  $alm_cache_status = get_option( 'alm_cache_license_status' );
33
  ?>
34
- <div class="license" id="license-paging">
35
  <div class="license-title">
36
  <div class="status <?php if($alm_cache_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
37
  <h2><?php _e('Cache', 'ajax-load-more'); ?></h2>
@@ -39,39 +40,40 @@
39
  <div class="license-wrap">
40
  <form method="post" action="options.php">
41
 
42
- <?php settings_fields('alm_cache_license'); ?>
43
- <label class="description" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
44
- <div class="license-key-field">
45
- <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
46
- <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
47
- <span class="status active">
48
- <?php _e('Active', 'ajax-load-more'); ?>
49
- </span>
50
- <?php } else { ?>
51
- <span class="status inactive">
52
- <?php _e('In-active', 'ajax-load-more'); ?>
53
- </span>
54
- <?php } ?>
55
- </div>
56
-
57
- <?php wp_nonce_field( 'alm_cache_license_nonce', 'alm_cache_license_nonce' ); ?>
58
- <?php if($alm_cache_status === '' || $alm_cache_status !== 'valid') {
59
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
60
- } ?>
61
-
62
- <?php if( false !== $alm_cache_license ) { ?>
63
-
64
- <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
65
- <input type="submit" class="button-secondary" name="alm_cache_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
66
- <?php } else { ?>
67
- <?php if(!empty($alm_cache_license)){ ?>
68
- <input type="submit" class="button-secondary" name="alm_cache_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
69
- <?php } ?>
70
- <?php } ?>
71
- <?php } ?>
72
 
73
  </form>
74
  </div>
 
75
  </div>
76
  <?php
77
  }
@@ -81,11 +83,11 @@
81
 
82
  <?php
83
  if (has_action('alm_unlimited_installed')){
84
- // PAGING
85
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
86
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
87
  ?>
88
- <div class="license" id="license-paging">
89
  <div class="license-title">
90
  <div class="status <?php if($alm_unlimited_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
91
  <h2><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
@@ -93,39 +95,40 @@
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', 'ajax-load-more'); ?></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', 'ajax-load-more'); ?>" />
100
- <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
101
- <span class="status active">
102
- <?php _e('Active', 'ajax-load-more'); ?>
103
- </span>
104
- <?php } else { ?>
105
- <span class="status inactive">
106
- <?php _e('In-active', 'ajax-load-more'); ?>
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') {
113
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
114
- } ?>
115
-
116
- <?php if( false !== $alm_unlimited_license ) { ?>
117
-
118
- <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
119
- <input type="submit" class="button-secondary" name="alm_unlimited_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
120
- <?php } else { ?>
121
- <?php if(!empty($alm_unlimited_license)){ ?>
122
- <input type="submit" class="button-secondary" name="alm_unlimited_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
123
- <?php } ?>
124
- <?php } ?>
125
- <?php } ?>
126
 
127
  </form>
128
  </div>
 
129
  </div>
130
  <?php
131
  }
@@ -133,6 +136,7 @@
133
  ?>
134
 
135
 
 
136
  <?php
137
  if (has_action('alm_paging_installed')){
138
  // PAGING
@@ -147,39 +151,40 @@
147
  <div class="license-wrap">
148
  <form method="post" action="options.php">
149
 
150
- <?php settings_fields('alm_paging_license'); ?>
151
- <label class="description" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
152
- <div class="license-key-field">
153
- <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
154
- <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
155
- <span class="status active">
156
- <?php _e('Active', 'ajax-load-more'); ?>
157
- </span>
158
- <?php } else { ?>
159
- <span class="status inactive">
160
- <?php _e('In-active', 'ajax-load-more'); ?>
161
- </span>
162
- <?php } ?>
163
- </div>
164
-
165
- <?php wp_nonce_field( 'alm_paging_license_nonce', 'alm_paging_license_nonce' ); ?>
166
- <?php if($alm_paging_status === '' || $alm_paging_status !== 'valid') {
167
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
168
- } ?>
169
 
170
- <?php if( false !== $alm_paging_license ) { ?>
171
-
172
- <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
173
- <input type="submit" class="button-secondary" name="alm_paging_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
174
- <?php } else { ?>
175
- <?php if(!empty($alm_paging_license)){ ?>
176
- <input type="submit" class="button-secondary" name="alm_paging_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
177
- <?php } ?>
178
- <?php } ?>
179
- <?php } ?>
 
 
 
 
 
180
 
181
  </form>
182
  </div>
 
183
  </div>
184
  <?php
185
  }
@@ -200,39 +205,39 @@
200
  <div class="license-wrap">
201
  <form method="post" action="options.php">
202
 
203
- <?php settings_fields('alm_preloaded_license'); ?>
204
- <label class="description" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
205
- <div class="license-key-field">
206
- <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
207
- <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
208
- <span class="status active">
209
- <?php _e('Active', 'ajax-load-more'); ?>
210
- </span>
211
- <?php } else { ?>
212
- <span class="status inactive">
213
- <?php _e('In-active', 'ajax-load-more'); ?>
214
- </span>
215
- <?php } ?>
216
- </div>
217
-
218
- <?php wp_nonce_field( 'alm_preloaded_license_nonce', 'alm_preloaded_license_nonce' ); ?>
219
- <?php if($alm_preloaded_status === '' || $alm_preloaded_status !== 'valid') {
220
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
221
- } ?>
222
-
223
- <?php if( false !== $alm_preloaded_license ) { ?>
224
-
225
- <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
226
- <input type="submit" class="button-secondary" name="alm_preloaded_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
227
- <?php } else { ?>
228
- <?php if(!empty($alm_preloaded_license)){ ?>
229
- <input type="submit" class="button-secondary" name="alm_preloaded_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
230
- <?php } ?>
231
- <?php } ?>
232
- <?php } ?>
233
-
234
  </form>
235
  </div>
 
236
  </div>
237
  <?php
238
  }
@@ -253,39 +258,40 @@
253
  <div class="license-wrap">
254
  <form method="post" action="options.php">
255
 
256
- <?php settings_fields('alm_prev_post_license'); ?>
257
- <label class="description" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
258
- <div class="license-key-field">
259
- <input id="alm_prev_post_license_key" name="alm_prev_post_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_prev_post_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
260
- <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
261
- <span class="status active">
262
- <?php _e('Active', 'ajax-load-more'); ?>
263
- </span>
264
- <?php } else { ?>
265
- <span class="status inactive">
266
- <?php _e('In-active', 'ajax-load-more'); ?>
267
- </span>
268
- <?php } ?>
269
- </div>
270
-
271
- <?php wp_nonce_field( 'alm_prev_post_license_nonce', 'alm_prev_post_license_nonce' ); ?>
272
- <?php if($alm_prev_post_status === '' || $alm_prev_post_status !== 'valid') {
273
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
274
- } ?>
275
-
276
- <?php if( false !== $alm_prev_post_license ) { ?>
277
-
278
- <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
279
- <input type="submit" class="button-secondary" name="alm_prev_post_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
280
- <?php } else { ?>
281
- <?php if(!empty($alm_prev_post_license)){ ?>
282
- <input type="submit" class="button-secondary" name="alm_prev_post_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
283
- <?php } ?>
284
- <?php } ?>
285
- <?php } ?>
286
-
287
  </form>
288
  </div>
 
289
  </div>
290
  <?php
291
  }
@@ -299,7 +305,7 @@
299
  $alm_seo_license = get_option( 'alm_seo_license_key' );
300
  $alm_seo_status = get_option( 'alm_seo_license_status' );
301
  ?>
302
- <div class="license" id="license-paging">
303
  <div class="license-title">
304
  <div class="status <?php if($alm_seo_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
305
  <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
@@ -307,39 +313,41 @@
307
  <div class="license-wrap">
308
  <form method="post" action="options.php">
309
 
310
- <?php settings_fields('alm_seo_license'); ?>
311
- <label class="description" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
312
- <div class="license-key-field">
313
- <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
314
- <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
315
- <span class="status active">
316
- <?php _e('Active', 'ajax-load-more'); ?>
317
- </span>
318
- <?php } else { ?>
319
- <span class="status inactive">
320
- <?php _e('In-active', 'ajax-load-more'); ?>
321
- </span>
322
- <?php } ?>
323
- </div>
324
-
325
- <?php wp_nonce_field( 'alm_seo_license_nonce', 'alm_seo_license_nonce' ); ?>
326
- <?php if($alm_seo_status === '' || $alm_seo_status !== 'valid') {
327
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
328
- } ?>
329
-
330
- <?php if( false !== $alm_seo_license ) { ?>
331
-
332
- <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
333
- <input type="submit" class="button-secondary" name="alm_seo_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
334
- <?php } else { ?>
335
- <?php if(!empty($alm_seo_license)){ ?>
336
- <input type="submit" class="button-secondary" name="alm_seo_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
337
- <?php } ?>
338
- <?php } ?>
339
- <?php } ?>
340
-
341
  </form>
342
  </div>
 
 
343
  </div>
344
  <?php
345
  }
@@ -350,50 +358,54 @@
350
  <?php
351
  if (has_action('alm_theme_repeaters_installed')){
352
  // Theme Templates
 
353
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
354
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
355
  ?>
356
  <div class="license" id="license-theme_repeaters">
357
  <div class="license-title">
358
  <div class="status <?php if($alm_theme_repeaters_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
359
- <h2><?php _e('Theme Repeaters', 'ajax-load-more'); ?></h2>
360
  </div>
361
  <div class="license-wrap">
362
  <form method="post" action="options.php">
363
 
364
- <?php settings_fields('alm_theme_repeaters_license'); ?>
365
- <label class="description" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
366
- <div class="license-key-field">
367
- <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_theme_repeaters_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
368
- <?php if( $alm_theme_repeaters_status !== false && $alm_theme_repeaters_status == 'valid' ) { ?>
369
- <span class="status active">
370
- <?php _e('Active', 'ajax-load-more'); ?>
371
- </span>
372
- <?php } else { ?>
373
- <span class="status inactive">
374
- <?php _e('In-active', 'ajax-load-more'); ?>
375
- </span>
376
- <?php } ?>
377
- </div>
378
-
379
- <?php wp_nonce_field( 'alm_theme_repeaters_license_nonce', 'alm_theme_repeaters_license_nonce' ); ?>
380
- <?php if($alm_theme_repeaters_status === '' || $alm_theme_repeaters_status !== 'valid') {
381
- submit_button(__('Save License Key', 'ajax-load-more'), 'primary', '', false);
382
- } ?>
383
-
384
- <?php if( false !== $alm_theme_repeaters_license ) { ?>
385
-
386
- <?php if( $alm_theme_repeaters_status !== false && $alm_theme_repeaters_status == 'valid' ) { ?>
387
- <input type="submit" class="button-secondary" name="alm_theme_repeaters_license_deactivate" value="<?php _e('De-activate License', 'ajax-load-more'); ?>"/>
388
- <?php } else { ?>
389
- <?php if(!empty($alm_theme_repeaters_license)){ ?>
390
- <input type="submit" class="button-secondary" name="alm_theme_repeaters_license_activate" value="<?php _e('Activate License', 'ajax-load-more'); ?>"/>
391
- <?php } ?>
392
- <?php } ?>
393
- <?php } ?>
 
394
 
395
  </form>
 
396
  </div>
 
397
  </div>
398
  <?php
399
  }
1
  <div class="admin ajax-load-more" id="alm-licenses">
2
  <div class="wrap">
3
  <div class="header-wrap">
4
+ <h1><?php echo ALM_TITLE; ?>: <strong><?php _e('Licenses', 'ajax-load-more'); ?></strong></h1>
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>.', 'ajax-load-more'); ?></p>
6
  </div>
7
  <div class="cnkt-main">
13
  <?php
14
  // alm_cache_installed
15
  // alm_unlimited_installed
16
+ // alm_layouts_installed
17
  // alm_preload_installed
18
  // alm_paging_installed
19
  // alm_prev_post_installed
23
 
24
  <?php
25
  // Check if any add ons are installed.
26
+ if(has_action('alm_cache_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) : ?>
27
 
28
 
29
  <?php
32
  $alm_cache_license = get_option( 'alm_cache_license_key' );
33
  $alm_cache_status = get_option( 'alm_cache_license_status' );
34
  ?>
35
+ <div class="license" id="license-cache">
36
  <div class="license-title">
37
  <div class="status <?php if($alm_cache_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
38
  <h2><?php _e('Cache', 'ajax-load-more'); ?></h2>
40
  <div class="license-wrap">
41
  <form method="post" action="options.php">
42
 
43
+ <?php settings_fields('alm_cache_license'); ?>
44
+ <label class="description" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
45
+ <div class="license-key-field">
46
+ <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
47
+ <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
48
+ <span class="status active">
49
+ <?php _e('Active', 'ajax-load-more'); ?>
50
+ </span>
51
+ <?php } else { ?>
52
+ <span class="status inactive">
53
+ <?php _e('Inactive', 'ajax-load-more'); ?>
54
+ </span>
55
+ <?php } ?>
56
+ </div>
57
+
58
+ <?php wp_nonce_field( 'alm_cache_license_nonce', 'alm_cache_license_nonce' ); ?>
59
+ <div class="license-btn-wrap"
60
+ data-name="<?php echo ALM_CACHE_ITEM_NAME; ?>"
61
+ data-url="<?php echo ALM_STORE_URL; ?>"
62
+ data-option-status="alm_cache_license_status"
63
+ data-option-key="alm_cache_license_key"
64
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/">
65
+ <button type="button" class="activate license-btn <?php if($alm_cache_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
66
+ <?php _e('Activate License', 'ajax-load-more'); ?>
67
+ </button>
68
+
69
+ <button type="button" class="deactivate license-btn <?php if($alm_cache_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
70
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
71
+ </button>
72
+ </div>
73
 
74
  </form>
75
  </div>
76
+ <div class="loading"></div>
77
  </div>
78
  <?php
79
  }
83
 
84
  <?php
85
  if (has_action('alm_unlimited_installed')){
86
+ // Custom Repeaters
87
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
88
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
89
  ?>
90
+ <div class="license" id="license-repeaters">
91
  <div class="license-title">
92
  <div class="status <?php if($alm_unlimited_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
93
  <h2><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
95
  <div class="license-wrap">
96
  <form method="post" action="options.php">
97
 
98
+ <?php settings_fields('alm_unlimited_license'); ?>
99
+ <label class="description" for="alm_unlimited_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
100
+ <div class="license-key-field">
101
+ <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
102
+ <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
103
+ <span class="status active">
104
+ <?php _e('Active', 'ajax-load-more'); ?>
105
+ </span>
106
+ <?php } else { ?>
107
+ <span class="status inactive">
108
+ <?php _e('Inactive', 'ajax-load-more'); ?>
109
+ </span>
110
+ <?php } ?>
111
+ </div>
112
 
113
+ <?php wp_nonce_field( 'alm_unlimited_license_nonce', 'alm_unlimited_license_nonce' ); ?>
114
+ <div class="license-btn-wrap"
115
+ data-name="<?php echo ALM_UNLIMITED_ITEM_NAME; ?>"
116
+ data-url="<?php echo ALM_STORE_URL; ?>"
117
+ data-option-status="alm_unlimited_license_status"
118
+ data-option-key="alm_unlimited_license_key"
119
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/">
120
+ <button type="button" class="activate license-btn <?php if($alm_unlimited_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
121
+ <?php _e('Activate License', 'ajax-load-more'); ?>
122
+ </button>
123
+
124
+ <button type="button" class="deactivate license-btn <?php if($alm_unlimited_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
125
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
126
+ </button>
127
+ </div>
128
 
129
  </form>
130
  </div>
131
+ <div class="loading"></div>
132
  </div>
133
  <?php
134
  }
136
  ?>
137
 
138
 
139
+
140
  <?php
141
  if (has_action('alm_paging_installed')){
142
  // PAGING
151
  <div class="license-wrap">
152
  <form method="post" action="options.php">
153
 
154
+ <?php settings_fields('alm_paging_license'); ?>
155
+ <label class="description" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
156
+ <div class="license-key-field">
157
+ <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
158
+ <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
159
+ <span class="status active">
160
+ <?php _e('Active', 'ajax-load-more'); ?>
161
+ </span>
162
+ <?php } else { ?>
163
+ <span class="status inactive">
164
+ <?php _e('Inactive', 'ajax-load-more'); ?>
165
+ </span>
166
+ <?php } ?>
167
+ </div>
 
 
 
 
 
168
 
169
+ <?php wp_nonce_field( 'alm_paging_license_nonce', 'alm_paging_license_nonce' ); ?>
170
+ <div class="license-btn-wrap"
171
+ data-name="<?php echo ALM_PAGING_ITEM_NAME; ?>"
172
+ data-url="<?php echo ALM_STORE_URL; ?>"
173
+ data-option-status="alm_paging_license_status"
174
+ data-option-key="alm_paging_license_key"
175
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/paging/">
176
+ <button type="button" class="activate license-btn <?php if($alm_paging_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
177
+ <?php _e('Activate License', 'ajax-load-more'); ?>
178
+ </button>
179
+
180
+ <button type="button" class="deactivate license-btn <?php if($alm_paging_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
181
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
182
+ </button>
183
+ </div>
184
 
185
  </form>
186
  </div>
187
+ <div class="loading"></div>
188
  </div>
189
  <?php
190
  }
205
  <div class="license-wrap">
206
  <form method="post" action="options.php">
207
 
208
+ <?php settings_fields('alm_preloaded_license'); ?>
209
+ <label class="description" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
210
+ <div class="license-key-field">
211
+ <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
212
+ <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
213
+ <span class="status active">
214
+ <?php _e('Active', 'ajax-load-more'); ?>
215
+ </span>
216
+ <?php } else { ?>
217
+ <span class="status inactive">
218
+ <?php _e('Inactive', 'ajax-load-more'); ?>
219
+ </span>
220
+ <?php } ?>
221
+ </div>
222
+ <?php wp_nonce_field( 'alm_preloaded_license_nonce', 'alm_preloaded_license_nonce' ); ?>
223
+ <div class="license-btn-wrap"
224
+ data-name="<?php echo ALM_PRELOADED_ITEM_NAME; ?>"
225
+ data-url="<?php echo ALM_STORE_URL; ?>"
226
+ data-option-status="alm_preloaded_license_status"
227
+ data-option-key="alm_preloaded_license_key"
228
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/">
229
+ <button type="button" class="activate license-btn <?php if($alm_preloaded_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
230
+ <?php _e('Activate License', 'ajax-load-more'); ?>
231
+ </button>
232
+
233
+ <button type="button" class="deactivate license-btn <?php if($alm_preloaded_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
234
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
235
+ </button>
236
+ </div>
237
+
 
238
  </form>
239
  </div>
240
+ <div class="loading"></div>
241
  </div>
242
  <?php
243
  }
258
  <div class="license-wrap">
259
  <form method="post" action="options.php">
260
 
261
+ <?php settings_fields('alm_prev_post_license'); ?>
262
+ <label class="description" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
263
+ <div class="license-key-field">
264
+ <input id="alm_prev_post_license_key" name="alm_prev_post_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_prev_post_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
265
+ <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
266
+ <span class="status active">
267
+ <?php _e('Active', 'ajax-load-more'); ?>
268
+ </span>
269
+ <?php } else { ?>
270
+ <span class="status inactive">
271
+ <?php _e('Inactive', 'ajax-load-more'); ?>
272
+ </span>
273
+ <?php } ?>
274
+ </div>
275
+
276
+ <?php wp_nonce_field( 'alm_prev_post_license_nonce', 'alm_prev_post_license_nonce' ); ?>
277
+ <div class="license-btn-wrap"
278
+ data-name="<?php echo ALM_PREV_POST_ITEM_NAME; ?>"
279
+ data-url="<?php echo ALM_STORE_URL; ?>"
280
+ data-option-status="alm_prev_post_license_status"
281
+ data-option-key="alm_prev_post_license_key"
282
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/">
283
+ <button type="button" class="activate license-btn <?php if($alm_prev_post_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
284
+ <?php _e('Activate License', 'ajax-load-more'); ?>
285
+ </button>
286
+
287
+ <button type="button" class="deactivate license-btn <?php if($alm_prev_post_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
288
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
289
+ </button>
290
+ </div>
291
+
292
  </form>
293
  </div>
294
+ <div class="loading"></div>
295
  </div>
296
  <?php
297
  }
305
  $alm_seo_license = get_option( 'alm_seo_license_key' );
306
  $alm_seo_status = get_option( 'alm_seo_license_status' );
307
  ?>
308
+ <div class="license" id="license-seo">
309
  <div class="license-title">
310
  <div class="status <?php if($alm_seo_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
311
  <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
313
  <div class="license-wrap">
314
  <form method="post" action="options.php">
315
 
316
+ <?php settings_fields('alm_seo_license'); ?>
317
+ <label class="description" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
318
+ <div class="license-key-field">
319
+ <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
320
+ <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
321
+ <span class="status active">
322
+ <?php _e('Active', 'ajax-load-more'); ?>
323
+ </span>
324
+ <?php } else { ?>
325
+ <span class="status inactive">
326
+ <?php _e('Inactive', 'ajax-load-more'); ?>
327
+ </span>
328
+ <?php } ?>
329
+ </div>
330
+
331
+ <?php wp_nonce_field( 'alm_seo_license_nonce', 'alm_seo_license_nonce' ); ?>
332
+ <div class="license-btn-wrap"
333
+ data-name="<?php echo ALM_SEO_ITEM_NAME; ?>"
334
+ data-url="<?php echo ALM_STORE_URL; ?>"
335
+ data-option-status="alm_seo_license_status"
336
+ data-option-key="alm_seo_license_key"
337
+ data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/">
338
+ <button type="button" class="activate license-btn <?php if($alm_seo_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
339
+ <?php _e('Activate License', 'ajax-load-more'); ?>
340
+ </button>
341
+
342
+ <button type="button" class="deactivate license-btn <?php if($alm_seo_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
343
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
344
+ </button>
345
+ </div>
346
+
347
  </form>
348
  </div>
349
+
350
+ <div class="loading"></div>
351
  </div>
352
  <?php
353
  }
358
  <?php
359
  if (has_action('alm_theme_repeaters_installed')){
360
  // Theme Templates
361
+
362
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
363
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
364
  ?>
365
  <div class="license" id="license-theme_repeaters">
366
  <div class="license-title">
367
  <div class="status <?php if($alm_theme_repeaters_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
368
+ <h2><?php _e('Theme Repeaters', 'ajax-load-more'); ?> </h2>
369
  </div>
370
  <div class="license-wrap">
371
  <form method="post" action="options.php">
372
 
373
+ <?php settings_fields('alm_theme_repeaters_license'); ?>
374
+ <label class="description" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
375
+ <div class="license-key-field">
376
+ <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_