Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *********************************** Enable PHP code in your theme widget ***********************************************
- //Just paste this code in your theme's function.php file to enable php code in widget
- add_filter('widget_text', 'enable_php_code', 99);
- function enable_php_code ($text) {
- if (strpos($text, '<' . '?') !== false) {
- ob_start();
- eval('?' . '>' . $text);
- $text = ob_get_contents();
- ob_end_clean();
- }
- return $text;
- }
- ************************************** THANK YOU *****************************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement