WordPress Zero Spam - Version 4.3.5

Version Description

  • Fix for Uncaught Error: Call to undefined function get_plugin_data(). See #193.
Download this release

Release Info

Developer bmarshall511
Plugin Icon 128x128 WordPress Zero Spam
Version 4.3.5
Comparing to
See all releases

Code changes from version 4.3.4 to 4.3.5

Files changed (3) hide show
  1. inc/scripts.php +8 -0
  2. readme.txt +5 -1
  3. wordpress-zero-spam.php +1 -1
inc/scripts.php CHANGED
@@ -10,6 +10,10 @@
10
  * Add admin scripts
11
  */
12
  function wpzerospam_admin_scripts( $hook_suffix ) {
 
 
 
 
13
  $plugin = get_plugin_data( WORDPRESS_ZERO_SPAM );
14
 
15
  $admin_pages = [ 'toplevel_page_wordpress-zero-spam', 'wp-zero-spam_page_wordpress-zero-spam-blocked-ips' ];
@@ -30,6 +34,10 @@ add_action( 'admin_enqueue_scripts', 'wpzerospam_admin_scripts' );
30
  * Add site scripts
31
  */
32
  function wpzerospam_enqueue_scripts() {
 
 
 
 
33
  $plugin = get_plugin_data( WORDPRESS_ZERO_SPAM );
34
 
35
  wp_enqueue_script( 'wpzerospam', plugin_dir_url( WORDPRESS_ZERO_SPAM ) . '/assets/js/wpzerospam.js', [ 'jquery' ], $plugin['Version'], true );
10
  * Add admin scripts
11
  */
12
  function wpzerospam_admin_scripts( $hook_suffix ) {
13
+ if( ! function_exists('get_plugin_data') ) {
14
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
15
+ }
16
+
17
  $plugin = get_plugin_data( WORDPRESS_ZERO_SPAM );
18
 
19
  $admin_pages = [ 'toplevel_page_wordpress-zero-spam', 'wp-zero-spam_page_wordpress-zero-spam-blocked-ips' ];
34
  * Add site scripts
35
  */
36
  function wpzerospam_enqueue_scripts() {
37
+ if( ! function_exists('get_plugin_data') ) {
38
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
39
+ }
40
+
41
  $plugin = get_plugin_data( WORDPRESS_ZERO_SPAM );
42
 
43
  wp_enqueue_script( 'wpzerospam', plugin_dir_url( WORDPRESS_ZERO_SPAM ) . '/assets/js/wpzerospam.js', [ 'jquery' ], $plugin['Version'], true );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://benmarshall.me/donate/?utm_source=wordpress_zero_spam&utm_m
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
- Stable tag: 4.3.4
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
@@ -88,6 +88,10 @@ Yes, that's what does the magic and keeps spam bots out.
88
 
89
  == Changelog ==
90
 
 
 
 
 
91
  = 4.3.4 =
92
 
93
  * Fixed issue with adding/updating IP addresses manually
5
  Requires at least: 5.2
6
  Tested up to: 5.4.2
7
  Requires PHP: 7.1
8
+ Stable tag: 4.3.5
9
  License: GNU GPLv3
10
  License URI: https://choosealicense.com/licenses/gpl-3.0/
11
 
88
 
89
  == Changelog ==
90
 
91
+ = 4.3.5 =
92
+
93
+ * Fix for `Uncaught Error: Call to undefined function get_plugin_data()`. See [#193](https://github.com/bmarshall511/wordpress-zero-spam/issues/193).
94
+
95
  = 4.3.4 =
96
 
97
  * Fixed issue with adding/updating IP addresses manually
wordpress-zero-spam.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
- * Version: 4.3.4
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall
13
  * Plugin Name: WordPress Zero Spam
14
  * Plugin URI: https://benmarshall.me/wordpress-zero-spam
15
  * Description: Tired of all the useless and bloated WordPress spam plugins? The WordPress Zero Spam plugin makes blocking spam a cinch. <strong>Just install, activate and say goodbye to spam.</strong> Based on work by <a href="http://davidwalsh.name/wordpress-comment-spam" target="_blank">David Walsh</a>.
16
+ * Version: 4.3.5
17
  * Requires at least: 5.2
18
  * Requires PHP: 7.2
19
  * Author: Ben Marshall