Changes between Initial Version and Version 1 of Ticket #31641, comment 1
- Timestamp:
- 03/14/2015 07:45:39 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31641, comment 1
initial v1 1 I am forced to use this trick in my theme's functions.php, to avoid that problem: 1 2 As i see, that the first time, the customize.php is loaded, and after that, the website php is loaded separately, then I am forced to use this trick in my theme's functions.php, to avoid that problem(because cookies are read on the next execution of the page): 2 3 3 4 4 5 {{{ 5 if (strpos($_SERVER['REQUEST_URI'], '/wp-admin/customize.php?return=') !== false) {setcookie('my_ redirct_indx', 'hii', time()+100000000, '/');}6 else {setcookie('my_ redirct_indx', 'hii', time()-100000000, '/');}6 if (strpos($_SERVER['REQUEST_URI'], '/wp-admin/customize.php?return=') !== false) {setcookie('my_Redirect', 'disable', time()+100000000, '/');} 7 else {setcookie('my_Redirect', 'enable', time()+100000000, '/');} 7 8 8 9 .... 9 10 10 11 //then here is my redirection code 11 if ( empty($_COOKIE['my_redirct_indx'])) {..REDIRECT..}12 if ('disable' != $_COOKIE['my_Redirect']) {..REDIRECT..} 12 13 }}} 13 14