pusatdata

Code Enable PHP in widgets

Apr 24th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. // Enable PHP in widgets
  2. add_filter('widget_text','execute_php',100);
  3. function execute_php($html){
  4. if(strpos($html,"<"."?php")!==false){
  5. ob_start();
  6. eval("?".">".$html);
  7. $html=ob_get_contents();
  8. ob_end_clean();
  9. }
  10. return $html;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment