WordPress.org

Ready to get started?Download WordPress

Plugin Directory

PHP Code Widget

Like the Text widget, but also allows working PHP code to be inserted.

The normal Text widget allows you to insert arbitrary Text and/or HTML code. This allows that too, but also parses any PHP code in the text widget and executes it.

This can make it easier to migrate to a widget-based theme. However, this plugin should not be used long term, as anybody with access to edit the widgets on your site will be able to execute arbitrary PHP code.

All PHP code must be enclosed in the standard php opening and closing tags ( <?php and ?> ) for it to be recognized and executed.

Only users with the unfiltered_html role will be allowed to insert unfiltered HTML. This includes PHP code, so users without admin or editor permissions will not be able to use this to execute code, even if they have widget editing permissions.

Tags: , ,

Requires: 2.8 or higher
Compatible up to: 3.9.1
Last Updated: 2014-5-1
Downloads: 405,317

Ratings

4 stars
4.5 out of 5 stars

Support

3 of 4 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Works!

5 people say it works.
0 people say it's broken.

100,3,3 67,3,2 100,2,2
64,11,7
100,4,4
100,10,10
82,17,14
100,1,1 100,8,8
79,33,26
100,1,1
100,1,1
85,13,11
100,2,2
100,4,4
100,4,4
100,1,1
75,4,3
100,18,18
75,4,3
89,19,17
100,8,8
100,3,3
89,9,8
89,9,8
100,7,7
91,11,10
100,1,1
100,1,1
100,2,2 100,1,1
100,3,3
100,1,1
100,1,1 67,3,2
100,1,1
100,5,5