Disable XML-RPC-API - Version 2.1.4.4

Version Description

  • Fix warning undefined variable $htaccess_code when disable hotlink fix is off
  • Fix warning Undefined array key plugins on PHP 8+
Download this release

Release Info

Developer aminnz
Plugin Icon 128x128 Disable XML-RPC-API
Version 2.1.4.4
Comparing to
See all releases

Code changes from version 2.1.4.3 to 2.1.4.4

Files changed (2) hide show
  1. disable-xml-rpc-api.php +7 -4
  2. readme.txt +5 -2
disable-xml-rpc-api.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Disable XML-RPC-API
4
  Plugin URI: https://neatma.com/dsxmlrpc-plugin/
5
  Description: Lightweight plugin to disable XML-RPC API and Pingbacks,Trackbacks for faster and more secure website.
6
- Version: 2.1.4.3
7
  Tested up to: 6.0
8
  Requires at least: 3.5
9
  Author: Neatma
@@ -61,7 +61,7 @@ class xmlrpcSecurity
61
 
62
  add_action( 'admin_enqueue_scripts', [$this, 'load_plugin_scripts']);
63
 
64
- add_action('skelet_options_inside', [$this, 'optionsSidebar']);
65
 
66
  if (isset($disabled_methods) && is_array($disabled_methods)) {
67
  add_action('init', [$this, 'removeSelectedMethods']);
@@ -187,7 +187,8 @@ class xmlrpcSecurity
187
  {
188
  global $current_screen;
189
  if ($current_screen->id == 'toplevel_page_Security Settings' || $current_screen->id == 'plugins') {
190
-
 
191
  if ($this->get_option('hotlink-fix')) {
192
  $home_url = get_home_url();
193
  $htaccess_code = '
@@ -238,6 +239,7 @@ allow from all
238
  </Files>
239
  ';
240
  }
 
241
  $this->file_chmod();
242
  insert_with_markers(DSXMLRPC_HOME_PATH . '.htaccess', 'DS-XML-RPC-API', $htaccess_code);
243
  $this->get_option('htaccess protection') ? $this->file_protect() : '';
@@ -298,7 +300,8 @@ allow from all
298
  public function after_update($upgrader_object, $options)
299
  {
300
  $current_plugin_path_name = plugin_basename(DSXMLRPC_FILE);
301
-
 
302
  if ($options['action'] == 'update' && $options['type'] == 'plugin') {
303
  foreach ($options['plugins'] as $each_plugin) {
304
  if ($each_plugin == $current_plugin_path_name) {
3
  Plugin Name: Disable XML-RPC-API
4
  Plugin URI: https://neatma.com/dsxmlrpc-plugin/
5
  Description: Lightweight plugin to disable XML-RPC API and Pingbacks,Trackbacks for faster and more secure website.
6
+ Version: 2.1.4.4
7
  Tested up to: 6.0
8
  Requires at least: 3.5
9
  Author: Neatma
61
 
62
  add_action( 'admin_enqueue_scripts', [$this, 'load_plugin_scripts']);
63
 
64
+ //add_action('skelet_options_inside', [$this, 'optionsSidebar']);
65
 
66
  if (isset($disabled_methods) && is_array($disabled_methods)) {
67
  add_action('init', [$this, 'removeSelectedMethods']);
187
  {
188
  global $current_screen;
189
  if ($current_screen->id == 'toplevel_page_Security Settings' || $current_screen->id == 'plugins') {
190
+ $htaccess_code = '';
191
+
192
  if ($this->get_option('hotlink-fix')) {
193
  $home_url = get_home_url();
194
  $htaccess_code = '
239
  </Files>
240
  ';
241
  }
242
+
243
  $this->file_chmod();
244
  insert_with_markers(DSXMLRPC_HOME_PATH . '.htaccess', 'DS-XML-RPC-API', $htaccess_code);
245
  $this->get_option('htaccess protection') ? $this->file_protect() : '';
300
  public function after_update($upgrader_object, $options)
301
  {
302
  $current_plugin_path_name = plugin_basename(DSXMLRPC_FILE);
303
+ if(!is_array($options)) return;
304
+
305
  if ($options['action'] == 'update' && $options['type'] == 'plugin') {
306
  foreach ($options['plugins'] as $each_plugin) {
307
  if ($each_plugin == $current_plugin_path_name) {
readme.txt CHANGED
@@ -5,7 +5,6 @@ Plugin URI: https://neatma.com
5
  Contributors: aminnz,neatmarketing
6
  Description: Simple plugin to disable XML-RPC API and X-Pingback for faster and more secure website.
7
  Tags: disable xml-rpc, xmlrpc, disable xmlrpc,remove xmlrpc, XML-RPC, pingback, stop brute force attacks
8
- Version: 2.1.4.3
9
  Tested up to: 6.0
10
  Requires at least: 3.5
11
  Author: Neatma
@@ -157,4 +156,8 @@ screenshot-2.jpg
157
  * Hotfix for error on update
158
 
159
  = 2.1.4.3 =
160
- * Hotfix for error on removing wordpress metadata
 
 
 
 
5
  Contributors: aminnz,neatmarketing
6
  Description: Simple plugin to disable XML-RPC API and X-Pingback for faster and more secure website.
7
  Tags: disable xml-rpc, xmlrpc, disable xmlrpc,remove xmlrpc, XML-RPC, pingback, stop brute force attacks
 
8
  Tested up to: 6.0
9
  Requires at least: 3.5
10
  Author: Neatma
156
  * Hotfix for error on update
157
 
158
  = 2.1.4.3 =
159
+ * Hotfix for error on removing wordpress metadata
160
+
161
+ = 2.1.4.4 =
162
+ * Fix warning undefined variable $htaccess_code when disable hotlink fix is off
163
+ * Fix warning Undefined array key “plugins” on PHP 8+