wheeel_o
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Fixing WordPress
In reply to: admin_notices ON save_postMy solution uses the SESSION to handle this, but it has a problem:
// put a message in $_SESSION["admin_notices"] function session_admin_notice() { if($out = $_SESSION['admin_notices']) { $_SESSION["admin_notices"] = ""; echo stripslashes($out); } return false; } add_action('admin_notices', "session_admin_notice");THE PROBLEM IS: to get it to work you need to initialize the session USING THE SESSION COOKIE!?
public static function fix_session_bs() { // TODO: Why do I have to do this? if(!session_id() && $_COOKIE["PHPSESSID"]) { session_start($_COOKIE["PHPSESSID"]); } } add_action('admin_init', 'fix_session_bs');Where is the session being reset? What am I doing wrong?
—–
Curiously, the admin_notices hook puts your messages at the top of the page, before the header is rendered, while the default $message is rendered below the header.
(then there’s a javascript cludge to move it down below the header)
Is there any way to echo the admin_notices to the $message variable?
Forum: Fixing WordPress
In reply to: localhost issuesoh my god
arg!
I was so bent on fixing the issue in the command line that I couldn’t look to the nice tools already there.
Thanks so very much the blog URI was the whole problem.
Viewing 2 replies - 1 through 2 (of 2 total)