[wp-trac] [WordPress Trac] #31641: Theme Preview using "Customize.php" error

WordPress Trac noreply at wordpress.org
Sat Mar 14 07:41:06 UTC 2015


#31641: Theme Preview using "Customize.php" error
--------------------------+------------------------------
 Reporter:  selnomeria    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by selnomeria):

 I am forced to use this trick in my theme's functions.php, to avoid that
 problem:


 {{{
 if (strpos($_SERVER['REQUEST_URI'], '/wp-admin/customize.php?return=') !==
 false)       {setcookie('my_redirct_indx', 'hii', time()+100000000, '/');}
 else
 {setcookie('my_redirct_indx', 'hii', time()-100000000, '/');}

 ....

 //then here is my redirection code
 if (empty($_COOKIE['my_redirct_indx'])) {..REDIRECT..}
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31641#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list