PHP Code Widget - Version 2.4

Version Description

  • After much demand, made it stop throwing a warning in PHP 8. Please consider ceasing usage of this widget on modern sites. Switch to block based themes, or use purpose specific plugins to solve your needs instead of storing PHP code in the database.
Download this release

Release Info

Developer Otto42
Plugin Icon PHP Code Widget
Version 2.4
Comparing to
See all releases

Code changes from version 2.3 to 2.4

Files changed (2) hide show
  1. execphp.php +5 -2
  2. readme.txt +5 -2
execphp.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: PHP Code Widget
4
  Plugin URI: http://ottopress.com/wordpress-plugins/php-code-widget/
5
  Description: Like the Text widget, but it will take PHP code as well. Heavily derived from the Text widget code in WordPress.
6
  Author: Otto
7
- Version: 2.3
8
  Text Domain: php-code-widget
9
  Author URI: http://ottodestruct.com
10
  */
@@ -59,4 +59,7 @@ class PHP_Code_Widget extends WP_Widget {
59
  }
60
  }
61
 
62
- add_action('widgets_init', create_function('', 'return register_widget("PHP_Code_Widget");'));
 
 
 
4
  Plugin URI: http://ottopress.com/wordpress-plugins/php-code-widget/
5
  Description: Like the Text widget, but it will take PHP code as well. Heavily derived from the Text widget code in WordPress.
6
  Author: Otto
7
+ Version: 2.4
8
  Text Domain: php-code-widget
9
  Author URI: http://ottodestruct.com
10
  */
59
  }
60
  }
61
 
62
+ add_action('widgets_init', 'php_code_widget_register');
63
+ function php_code_widget_register() {
64
+ register_widget('PHP_Code_Widget');
65
+ }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: Otto42
3
  Tags: php, widget, execphp
4
  Requires at least: 2.8
5
- Tested up to: 4.7
6
- Stable tag: 2.3
7
  License: GPLv2
8
  License URI: http://www.opensource.org/licenses/GPL-2.0
9
 
@@ -44,6 +44,9 @@ Code in a template runs in the global context. Code in the widget will run in a
44
 
45
  == Changelog ==
46
 
 
 
 
47
  = 2.3 =
48
  * Changed the call to WP_Widget to use the PHP 5 __construct() method. Ref: https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/
49
 
2
  Contributors: Otto42
3
  Tags: php, widget, execphp
4
  Requires at least: 2.8
5
+ Tested up to: 5.9
6
+ Stable tag: 2.4
7
  License: GPLv2
8
  License URI: http://www.opensource.org/licenses/GPL-2.0
9
 
44
 
45
  == Changelog ==
46
 
47
+ = 2.4 =
48
+ * After much demand, made it stop throwing a warning in PHP 8. Please consider ceasing usage of this widget on modern sites. Switch to block based themes, or use purpose specific plugins to solve your needs instead of storing PHP code in the database.
49
+
50
  = 2.3 =
51
  * Changed the call to WP_Widget to use the PHP 5 __construct() method. Ref: https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/
52