[wp-trac] [WordPress Trac] #41812: Admin options affected by theme's functions.php settings

WordPress Trac noreply at wordpress.org
Wed Sep 6 08:27:43 UTC 2017


#41812: Admin options affected by theme's functions.php settings
--------------------------------+-----------------------------
 Reporter:  LogixTree           |      Owner:
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  4.8.1
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 Hello guys,

 Today, I was working on issue in admin general options. After following
 trails of files, started from wp-admin. I reached at theme's functions.php
 where Developer was adjusting $_POST for his own mean. Isn't it should be
 separate from the theme's changes. Because these are related to core
 functionality.

 What he was doing is removing the magic quotes with following function and
 using it multiple times under the more trailing files.


 {{{
 function wope_remove_wp_magic_quotes(){
     $_POST      = array_map( 'stripslashes_deep', $_POST );
     $_GET       = array_map( 'stripslashes_deep', $_GET );
     $_COOKIE    = array_map( 'stripslashes_deep', $_COOKIE );
     $_REQUEST   = array_map( 'stripslashes_deep', $_REQUEST );
 }

 wope_remove_wp_magic_quotes();
 }}}

 Wordpress adding magic_quotes at wp-settings.php and this guys doing
 opposite. I know it's theme fault but wordpress core options affected by
 theme. It should not be the case.

 Regards,
 Team LogixTree

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41812>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list