WordPress Infinite Scroll – Ajax Load More - Version 5.5.4.1

Version Description

  • August 24, 2022 =
  • SECURITY: Patched and improved the data sanitization of some admin level operations.
Download this release

Release Info

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

Code changes from version 5.5.4 to 5.5.4.1

Files changed (3) hide show
  1. README.txt +5 -1
  2. admin/admin.php +83 -112
  3. ajax-load-more.php +3 -3
README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: infinite scroll, load more, ajax, lazy load, endless scroll, infinite scro
5
  Requires at least: 4.4
6
  Requires PHP: 5.6
7
  Tested up to: 6.0
8
- Stable tag: 5.5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -263,6 +263,10 @@ How to install Ajax Load More.
263
 
264
  == Changelog ==
265
 
 
 
 
 
266
  = 5.5.4 - August 19, 2022 =
267
  * NEW - Added new core setting for adding custom JavaScript. This new setting will allow for adding callbacks directly from the ALM settings page.
268
  * NEW: Added new `alm_seo_posts_per_page` filter to disable the posts_per_page protection in the SEO add-on.
5
  Requires at least: 4.4
6
  Requires PHP: 5.6
7
  Tested up to: 6.0
8
+ Stable tag: 5.5.4.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
263
 
264
  == Changelog ==
265
 
266
+ = 5.5.4.1 - August 24, 2022 =
267
+ * SECURITY: Patched and improved the data sanitization of some admin level operations.
268
+
269
+
270
  = 5.5.4 - August 19, 2022 =
271
  * NEW - Added new core setting for adding custom JavaScript. This new setting will allow for adding callbacks directly from the ALM settings page.
272
  * NEW: Added new `alm_seo_posts_per_page` filter to disable the posts_per_page protection in the SEO add-on.
admin/admin.php CHANGED
@@ -187,7 +187,12 @@ function alm_set_transient(){
187
  function alm_repeaters_export() {
188
  if ( isset( $_POST['alm_repeaters_export'] ) && ! wp_doing_ajax() && current_user_can( 'edit_theme_options' ) ) {
189
  $type = esc_attr( $_POST['alm_repeaters_export_type'] );
190
- $name = esc_attr( $_POST['alm_repeaters_export_name'] );
 
 
 
 
 
191
 
192
  if ( $type === 'theme-repeater' ) {
193
  $file = AjaxLoadMore::alm_get_theme_repeater_path() . '/' . $name;
@@ -331,7 +336,7 @@ function alm_admin_notice_errors() {
331
  // Loop each addon
332
  foreach($addons as $addon){
333
 
334
- if (has_action($addon['action'])){
335
  $key = $addon['key']; // Option key
336
  $status = get_option($addon['status']); // license status
337
 
@@ -1019,96 +1024,76 @@ function alm_enqueue_admin_scripts(){
1019
 
1020
  }
1021
 
1022
-
1023
-
1024
- /*
1025
- * alm_save_repeater
1026
- * Repeater Save function
1027
  *
1028
- * @return response
1029
- * @since 2.0.0
1030
- * @updated 3.5
1031
  */
1032
-
1033
  function alm_save_repeater(){
1034
 
1035
- if (current_user_can( 'edit_theme_options' )){
1036
-
1037
  global $wpdb;
1038
  $table_name = $wpdb->prefix . "alm";
1039
- $blog_id = $wpdb->blogid;
1040
- $options = get_option( 'alm_settings' ); //Get plugin options
1041
- $nonce = $_POST["nonce"];
1042
 
1043
- if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' )){ // Check our nonce
1044
- die( 'Error - unable to verify nonce, please try again.' );
1045
  }
1046
 
1047
- // Get _POST Vars
1048
- $c = Trim(stripslashes($_POST["value"])); // Repeater Value
1049
- $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
1050
- $t = Trim(stripslashes($_POST["type"])); // Repeater name
1051
- $a = Trim(stripslashes($_POST["alias"])); // Repeater alias
1052
-
1053
 
1054
- // Default
1055
  if($t === 'default' ){
1056
-
1057
  // Create Base Repeater Dir (alm-templates)
1058
  $base_dir = AjaxLoadMore::alm_get_repeater_path();
1059
  AjaxLoadMore::alm_mkdir($base_dir);
1060
-
1061
  $f = $base_dir .'/default.php';
1062
-
1063
  }
1064
 
1065
- // Custom Repeaters v2
1066
- elseif($t === 'unlimited' ){
1067
-
1068
  // Custom Repeaters 2.5+
1069
- if(ALM_UNLIMITED_VERSION >= '2.5' ){
1070
-
1071
  // Get path to repeater dir (alm_templates)
1072
  $base_dir = AjaxLoadMore::alm_get_repeater_path();
1073
  AjaxLoadMore::alm_mkdir($base_dir);
1074
- $f = $base_dir .'/'. $n .'.php';
1075
-
1076
  } else {
1077
-
1078
- $f = ($blog_id > 1) ? ALM_UNLIMITED_PATH. 'repeaters/'. $blog_id .'/'. $n .'.php' : ALM_UNLIMITED_PATH. 'repeaters/'. $n .'.php';
1079
-
1080
  }
1081
-
1082
  }
1083
 
1084
- // Custom Repeaters v1
1085
  else{
1086
-
1087
- $f = ALM_REPEATER_PATH. 'repeaters/'.$n .'.php';
1088
-
1089
  }
1090
 
1091
-
1092
- // Write Repeater Template
1093
  try {
1094
- $o = fopen($f, 'w+' ); //Open file
1095
- if ( !$o ) {
1096
- throw new Exception(__( '[Ajax Load More] Unable to open repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more' ));
1097
  }
1098
  $w = fwrite($o, $c); //Save the file
1099
- if ( !$w ) {
1100
- throw new Exception(__( '[Ajax Load More] Error saving repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more' ));
1101
  }
1102
- fclose($o); //now close it
1103
 
1104
  } catch ( Exception $e ) {
1105
  // Display error message in console.
1106
- if(!isset($options['_alm_error_notices']) || $options['_alm_error_notices'] == '1' ){
1107
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
1108
  }
1109
  }
1110
 
1111
-
1112
  // Save to database
1113
 
1114
  if($t === 'default' ) {
@@ -1141,55 +1126,46 @@ function alm_save_repeater(){
1141
  }
1142
  }
1143
 
1144
-
1145
-
1146
- /*
1147
- * alm_update_repeater
1148
- * Update repeater template from database
1149
- * User case: User deletes plugin, then installs again and the version has not change. Click 'Update from DB' option to load template.
1150
  *
1151
- * @return Database value
1152
- * @since 2.5.0
1153
  */
1154
-
1155
  function alm_update_repeater(){
1156
 
1157
- if (current_user_can( 'edit_theme_options' )){
1158
-
1159
  $nonce = $_POST["nonce"];
1160
- // Check our nonce
1161
- if (! wp_verify_nonce( $nonce, 'alm_repeater_nonce' )){ // Check our nonce
1162
- die( 'Error - unable to verify nonce, please try again.' );
1163
  }
1164
 
1165
  // Get _POST Vars
1166
- $n = Trim(stripslashes($_POST["repeater"])); // Repeater name
1167
- $t = Trim(stripslashes($_POST["type"])); // Repeater type (default | unlimited)
1168
-
1169
 
1170
  // Get value from database
1171
  global $wpdb;
1172
  $table_name = $wpdb->prefix . "alm";
1173
 
1174
- if($t === 'default' ) $n = 'default';
1175
- if($t === 'unlimited' ) $table_name = $wpdb->prefix . "alm_unlimited";
1176
-
1177
- //$the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '$n'");
1178
- $the_repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '".esc_sql($n)."'");
 
1179
 
1180
- echo $the_repeater; // Return repeater value
 
1181
 
1182
- die();
1183
 
1184
  } else {
1185
-
1186
  echo __( 'You don\'t belong here.', 'ajax-load-more' );
1187
-
1188
  }
1189
  }
1190
 
1191
-
1192
-
1193
  /**
1194
  * Get taxonomy terms for shortcode builder and build the markup.
1195
  *
@@ -1251,12 +1227,11 @@ function alm_layouts_dismiss(){
1251
  }
1252
  }
1253
 
1254
- /*
1255
- * alm_dismiss_sharing
1256
- * Dismiss sharing widget on plugin settings page.
1257
- *
1258
- * @since 2.8.2.1
1259
- */
1260
  function alm_dismiss_sharing(){
1261
 
1262
  if (current_user_can( 'edit_theme_options' )){
@@ -1274,13 +1249,11 @@ function alm_dismiss_sharing(){
1274
  }
1275
  }
1276
 
1277
- /*
1278
- * alm_filter_admin_footer_text
1279
- * Filter the WP Admin footer text only on ALM pages
1280
- *
1281
- * @since 2.12.0
1282
- */
1283
-
1284
  function alm_filter_admin_footer_text( $text ) {
1285
  $screen = alm_is_admin_screen();
1286
  if(!$screen){
@@ -1294,13 +1267,11 @@ function alm_filter_admin_footer_text( $text ) {
1294
  }
1295
  }
1296
 
1297
- /*
1298
- * admin_init
1299
- * Initiate the plugin, create our setting variables.
1300
- *
1301
- * @since 2.0.0
1302
- */
1303
-
1304
  add_action( 'admin_init', 'alm_admin_init' );
1305
  function alm_admin_init(){
1306
 
@@ -1518,7 +1489,7 @@ function alm_sanitize_settings( $input ) {
1518
  */
1519
  function alm_disable_css_callback(){
1520
  $options = get_option( 'alm_settings' );
1521
- if(!isset($options['_alm_disable_css']))
1522
  $options['_alm_disable_css'] = '0';
1523
 
1524
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
@@ -1536,7 +1507,7 @@ function alm_disable_css_callback(){
1536
  */
1537
  function alm_hide_btn_callback(){
1538
  $options = get_option( 'alm_settings' );
1539
- if(!isset($options['_alm_hide_btn']))
1540
  $options['_alm_hide_btn'] = '0';
1541
 
1542
  $html = '<input type="hidden" name="alm_settings[_alm_hide_btn]" value="0" /><input type="checkbox" id="alm_hide_btn" name="alm_settings[_alm_hide_btn]" value="1"'. (($options['_alm_hide_btn']) ? ' checked="checked"' : '' ) .' />';
@@ -1552,7 +1523,7 @@ function alm_hide_btn_callback(){
1552
  */
1553
  function _alm_error_notices_callback(){
1554
  $options = get_option( 'alm_settings' );
1555
- if(!isset($options['_alm_error_notices']))
1556
  $options['_alm_error_notices'] = '1';
1557
 
1558
  $html = '<input type="hidden" name="alm_settings[_alm_error_notices]" value="0" />';
@@ -1569,7 +1540,7 @@ function _alm_error_notices_callback(){
1569
  */
1570
  function alm_disable_dynamic_callback(){
1571
  $options = get_option( 'alm_settings' );
1572
- if(!isset($options['_alm_disable_dynamic']))
1573
  $options['_alm_disable_dynamic'] = '0';
1574
 
1575
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
@@ -1588,7 +1559,7 @@ function alm_container_type_callback() {
1588
 
1589
  $options = get_option( 'alm_settings' );
1590
 
1591
- if(!isset($options['_alm_container_type']))
1592
  $options['_alm_container_type'] = '1';
1593
 
1594
  $html = '<input type="radio" id="_alm_container_type_one" name="alm_settings[_alm_container_type]" value="1"' . checked( 1, $options['_alm_container_type'], false ) . '/>';
@@ -1723,7 +1694,7 @@ function alm_btn_color_callback() {
1723
  */
1724
  function alm_inline_css_callback(){
1725
  $options = get_option( 'alm_settings' );
1726
- if(!isset($options['_alm_inline_css']))
1727
  $options['_alm_inline_css'] = '1';
1728
 
1729
  $html = '<input type="hidden" name="alm_settings[_alm_inline_css]" value="0" />';
@@ -1741,7 +1712,7 @@ function alm_inline_css_callback(){
1741
  function alm_btn_class_callback(){
1742
  $options = get_option( 'alm_settings' );
1743
 
1744
- if(!isset($options['_alm_btn_classname']))
1745
  $options['_alm_btn_classname'] = '';
1746
 
1747
  $html = '<label for="alm_settings[_alm_btn_classname]">'.__( 'Add classes to your <strong>Load More</strong> button.', 'ajax-load-more' ).'</label>';
@@ -1794,7 +1765,7 @@ function alm_custom_js_callback(){
1794
  */
1795
  function _alm_scroll_top_callback(){
1796
  $options = get_option( 'alm_settings' );
1797
- if(!isset($options['_alm_scroll_top']))
1798
  $options['_alm_scroll_top'] = '0';
1799
 
1800
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
@@ -1814,7 +1785,7 @@ function _alm_scroll_top_callback(){
1814
  */
1815
  function alm_use_rest_api_callback(){
1816
  $options = get_option( 'alm_settings' );
1817
- if(!isset($options['_alm_use_rest_api']))
1818
  $options['_alm_use_rest_api'] = '0';
1819
 
1820
  $html = '<input type="hidden" name="alm_settings[_alm_use_rest_api]" value="0" />';
@@ -1834,7 +1805,7 @@ function alm_use_rest_api_callback(){
1834
  */
1835
  function alm_legacy_callbacks_callback(){
1836
  $options = get_option( 'alm_settings' );
1837
- if(!isset($options['_alm_legacy_callbacks']))
1838
  $options['_alm_legacy_callbacks'] = '0';
1839
 
1840
  $html = '<input type="hidden" name="alm_settings[_alm_legacy_callbacks]" value="0" />';
@@ -1855,7 +1826,7 @@ function alm_legacy_callbacks_callback(){
1855
  function alm_uninstall_callback(){
1856
  $options = get_option( 'alm_settings' );
1857
 
1858
- if(!isset($options['_alm_uninstall']))
1859
  $options['_alm_uninstall'] = '0';
1860
 
1861
  $html = '<input type="hidden" name="alm_settings[_alm_uninstall]" value="0" />';
187
  function alm_repeaters_export() {
188
  if ( isset( $_POST['alm_repeaters_export'] ) && ! wp_doing_ajax() && current_user_can( 'edit_theme_options' ) ) {
189
  $type = esc_attr( $_POST['alm_repeaters_export_type'] );
190
+ $name = sanitize_file_name( $_POST['alm_repeaters_export_name'] );
191
+
192
+ // Security check - confirm name does NOT contain relative path.
193
+ if ( false !== strpos( $name, './' ) ) {
194
+ wp_die( __( 'Something isn\'t right here...', 'ajax-load-more' ) );
195
+ }
196
 
197
  if ( $type === 'theme-repeater' ) {
198
  $file = AjaxLoadMore::alm_get_theme_repeater_path() . '/' . $name;
336
  // Loop each addon
337
  foreach($addons as $addon){
338
 
339
+ if (has_action($addon['action'] ) ){
340
  $key = $addon['key']; // Option key
341
  $status = get_option($addon['status']); // license status
342
 
1024
 
1025
  }
1026
 
1027
+ /**
1028
+ * Repeater Save function
 
 
 
1029
  *
1030
+ * @return response
1031
+ * @since 2.0.0
 
1032
  */
 
1033
  function alm_save_repeater(){
1034
 
1035
+ if ( current_user_can( 'edit_theme_options' ) ) {
 
1036
  global $wpdb;
1037
  $table_name = $wpdb->prefix . "alm";
1038
+ $blog_id = $wpdb->blogid;
1039
+ $options = get_option( 'alm_settings' ); //Get plugin options
1040
+ $nonce = $_POST["nonce"];
1041
 
1042
+ if ( ! wp_verify_nonce( $nonce, 'alm_repeater_nonce' ) ) {
1043
+ die( __( 'Error - unable to verify nonce, please try again.', 'ajax-load-more' ) );
1044
  }
1045
 
1046
+ // Get _POST Vars.
1047
+ $c = Trim( stripslashes( $_POST["value"] ) ); // Repeater Value
1048
+ $n = Trim( stripslashes( str_replace( '/', '', $_POST["repeater"] ) ) ); // Repeater name
1049
+ $t = Trim( stripslashes( $_POST["type"] ) ); // Repeater name
1050
+ $a = Trim( stripslashes( $_POST["alias"] ) ); // Repeater alias
 
1051
 
1052
+ // Default.
1053
  if($t === 'default' ){
 
1054
  // Create Base Repeater Dir (alm-templates)
1055
  $base_dir = AjaxLoadMore::alm_get_repeater_path();
1056
  AjaxLoadMore::alm_mkdir($base_dir);
 
1057
  $f = $base_dir .'/default.php';
 
1058
  }
1059
 
1060
+ // Custom Repeaters v2.
1061
+ elseif( $t === 'unlimited' ) {
 
1062
  // Custom Repeaters 2.5+
1063
+ if( ALM_UNLIMITED_VERSION >= '2.5' ) {
 
1064
  // Get path to repeater dir (alm_templates)
1065
  $base_dir = AjaxLoadMore::alm_get_repeater_path();
1066
  AjaxLoadMore::alm_mkdir($base_dir);
1067
+ $f = $base_dir . '/' . $n . '.php';
 
1068
  } else {
1069
+ $f = $blog_id > 1 ? ALM_UNLIMITED_PATH . 'repeaters/' . $blog_id . '/' . $n . '.php' : ALM_UNLIMITED_PATH . 'repeaters/' . $n . '.php';
 
 
1070
  }
 
1071
  }
1072
 
1073
+ // Custom Repeaters v1.
1074
  else{
1075
+ $f = ALM_REPEATER_PATH . 'repeaters/' . $n . '.php';
 
 
1076
  }
1077
 
1078
+ // Write Repeater Template.
 
1079
  try {
1080
+ $o = fopen( $f, 'w+' ); //Open file
1081
+ if ( ! $o ) {
1082
+ throw new Exception( __( '[Ajax Load More] Unable to open repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more' ) );
1083
  }
1084
  $w = fwrite($o, $c); //Save the file
1085
+ if ( ! $w ) {
1086
+ throw new Exception( __( '[Ajax Load More] Error saving repeater template - '.$f.' - Please check your file path and ensure your server is configured to allow Ajax Load More to read and write files.', 'ajax-load-more' ) );
1087
  }
1088
+ fclose( $o ); //now close it
1089
 
1090
  } catch ( Exception $e ) {
1091
  // Display error message in console.
1092
+ if( isset( $options['_alm_error_notices'] ) || $options['_alm_error_notices'] == '1' ) {
1093
  echo '<script>console.log("' .$e->getMessage(). '");</script>';
1094
  }
1095
  }
1096
 
 
1097
  // Save to database
1098
 
1099
  if($t === 'default' ) {
1126
  }
1127
  }
1128
 
1129
+ /**
1130
+ * Update repeater template from database.
1131
+ * User case: User deletes plugin, then installs again and the version has not change. Click 'Update from DB' option to load template.
 
 
 
1132
  *
1133
+ * @return string The value of the Repeater Template.
1134
+ * @since 2.5.0
1135
  */
 
1136
  function alm_update_repeater(){
1137
 
1138
+ if ( current_user_can( 'edit_theme_options' ) ) {
 
1139
  $nonce = $_POST["nonce"];
1140
+ if ( ! wp_verify_nonce( $nonce, 'alm_repeater_nonce' )){ // Check our nonce
1141
+ die( __( 'Error - unable to verify nonce, please try again.', 'ajax-load-more' ) );
 
1142
  }
1143
 
1144
  // Get _POST Vars
1145
+ $n = Trim( stripslashes( str_replace( '/', '', $_POST["repeater"] ) ) ); // Repeater name
1146
+ $t = Trim( stripslashes( $_POST["type"] ) ); // Repeater type (default | unlimited)
 
1147
 
1148
  // Get value from database
1149
  global $wpdb;
1150
  $table_name = $wpdb->prefix . "alm";
1151
 
1152
+ if ($t === 'default' ) {
1153
+ $n = 'default';
1154
+ }
1155
+ if ( $t === 'unlimited' ) {
1156
+ $table_name = $wpdb->prefix . "alm_unlimited";
1157
+ }
1158
 
1159
+ $repeater = $wpdb->get_var("SELECT repeaterDefault FROM " . $table_name . " WHERE name = '".esc_sql($n)."'");
1160
+ echo $repeater; // Return repeater value.
1161
 
1162
+ wp_die();
1163
 
1164
  } else {
 
1165
  echo __( 'You don\'t belong here.', 'ajax-load-more' );
 
1166
  }
1167
  }
1168
 
 
 
1169
  /**
1170
  * Get taxonomy terms for shortcode builder and build the markup.
1171
  *
1227
  }
1228
  }
1229
 
1230
+ /**
1231
+ * Dismiss sharing widget on plugin settings page.
1232
+ *
1233
+ * @since 2.8.2.1
1234
+ */
 
1235
  function alm_dismiss_sharing(){
1236
 
1237
  if (current_user_can( 'edit_theme_options' )){
1249
  }
1250
  }
1251
 
1252
+ /**
1253
+ * Filter the WP Admin footer text only on ALM pages
1254
+ *
1255
+ * @since 2.12.0
1256
+ */
 
 
1257
  function alm_filter_admin_footer_text( $text ) {
1258
  $screen = alm_is_admin_screen();
1259
  if(!$screen){
1267
  }
1268
  }
1269
 
1270
+ /**
1271
+ * Initiate the plugin, create the setting variables.
1272
+ *
1273
+ * @since 2.0.0
1274
+ */
 
 
1275
  add_action( 'admin_init', 'alm_admin_init' );
1276
  function alm_admin_init(){
1277
 
1489
  */
1490
  function alm_disable_css_callback(){
1491
  $options = get_option( 'alm_settings' );
1492
+ if(!isset($options['_alm_disable_css'] ) )
1493
  $options['_alm_disable_css'] = '0';
1494
 
1495
  $html = '<input type="hidden" name="alm_settings[_alm_disable_css]" value="0" />';
1507
  */
1508
  function alm_hide_btn_callback(){
1509
  $options = get_option( 'alm_settings' );
1510
+ if(!isset($options['_alm_hide_btn'] ) )
1511
  $options['_alm_hide_btn'] = '0';
1512
 
1513
  $html = '<input type="hidden" name="alm_settings[_alm_hide_btn]" value="0" /><input type="checkbox" id="alm_hide_btn" name="alm_settings[_alm_hide_btn]" value="1"'. (($options['_alm_hide_btn']) ? ' checked="checked"' : '' ) .' />';
1523
  */
1524
  function _alm_error_notices_callback(){
1525
  $options = get_option( 'alm_settings' );
1526
+ if(!isset($options['_alm_error_notices'] ) )
1527
  $options['_alm_error_notices'] = '1';
1528
 
1529
  $html = '<input type="hidden" name="alm_settings[_alm_error_notices]" value="0" />';
1540
  */
1541
  function alm_disable_dynamic_callback(){
1542
  $options = get_option( 'alm_settings' );
1543
+ if(!isset($options['_alm_disable_dynamic'] ) )
1544
  $options['_alm_disable_dynamic'] = '0';
1545
 
1546
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
1559
 
1560
  $options = get_option( 'alm_settings' );
1561
 
1562
+ if(!isset($options['_alm_container_type'] ) )
1563
  $options['_alm_container_type'] = '1';
1564
 
1565
  $html = '<input type="radio" id="_alm_container_type_one" name="alm_settings[_alm_container_type]" value="1"' . checked( 1, $options['_alm_container_type'], false ) . '/>';
1694
  */
1695
  function alm_inline_css_callback(){
1696
  $options = get_option( 'alm_settings' );
1697
+ if(!isset($options['_alm_inline_css'] ) )
1698
  $options['_alm_inline_css'] = '1';
1699
 
1700
  $html = '<input type="hidden" name="alm_settings[_alm_inline_css]" value="0" />';
1712
  function alm_btn_class_callback(){
1713
  $options = get_option( 'alm_settings' );
1714
 
1715
+ if(!isset($options['_alm_btn_classname'] ) )
1716
  $options['_alm_btn_classname'] = '';
1717
 
1718
  $html = '<label for="alm_settings[_alm_btn_classname]">'.__( 'Add classes to your <strong>Load More</strong> button.', 'ajax-load-more' ).'</label>';
1765
  */
1766
  function _alm_scroll_top_callback(){
1767
  $options = get_option( 'alm_settings' );
1768
+ if(!isset($options['_alm_scroll_top'] ) )
1769
  $options['_alm_scroll_top'] = '0';
1770
 
1771
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
1785
  */
1786
  function alm_use_rest_api_callback(){
1787
  $options = get_option( 'alm_settings' );
1788
+ if(!isset($options['_alm_use_rest_api'] ) )
1789
  $options['_alm_use_rest_api'] = '0';
1790
 
1791
  $html = '<input type="hidden" name="alm_settings[_alm_use_rest_api]" value="0" />';
1805
  */
1806
  function alm_legacy_callbacks_callback(){
1807
  $options = get_option( 'alm_settings' );
1808
+ if(!isset($options['_alm_legacy_callbacks'] ) )
1809
  $options['_alm_legacy_callbacks'] = '0';
1810
 
1811
  $html = '<input type="hidden" name="alm_settings[_alm_legacy_callbacks]" value="0" />';
1826
  function alm_uninstall_callback(){
1827
  $options = get_option( 'alm_settings' );
1828
 
1829
+ if(!isset($options['_alm_uninstall'] ) )
1830
  $options['_alm_uninstall'] = '0';
1831
 
1832
  $html = '<input type="hidden" name="alm_settings[_alm_uninstall]" value="0" />';
ajax-load-more.php CHANGED
@@ -7,15 +7,15 @@
7
  * Author: Darren Cooney
8
  * Twitter: @KaptonKaos
9
  * Author URI: https://connekthq.com
10
- * Version: 5.5.4
11
  * License: GPL
12
  * Copyright: Darren Cooney & Connekt Media
13
  *
14
  * @package AjaxLoadMore
15
  */
16
 
17
- define( 'ALM_VERSION', '5.5.4' );
18
- define( 'ALM_RELEASE', 'August 19, 2022' );
19
  define( 'ALM_STORE_URL', 'https://connekthq.com' );
20
 
21
  /**
7
  * Author: Darren Cooney
8
  * Twitter: @KaptonKaos
9
  * Author URI: https://connekthq.com
10
+ * Version: 5.5.4.1
11
  * License: GPL
12
  * Copyright: Darren Cooney & Connekt Media
13
  *
14
  * @package AjaxLoadMore
15
  */
16
 
17
+ define( 'ALM_VERSION', '5.5.4.1' );
18
+ define( 'ALM_RELEASE', 'August 24, 2022' );
19
  define( 'ALM_STORE_URL', 'https://connekthq.com' );
20
 
21
  /**