[wp-hackers] wp_redirect() fails on Linux

AJ Chen canovaj at gmail.com
Wed Aug 23 08:32:20 GMT 2006

It seems wp_redirect() is pretty tricky, and so I change to another approach
without using wp_redirect().  It works fine on both OS. new code:
      add_submenu_page('post.php', 'Write Project Post', '[project]', 8, '

I also want to put a post-specific notice on top of the editor using
'admin_notices" hook.  But, when editing a post, the hook does not have
access to $post variable. see code below.  Is there any way to retrieve a
custom field from the post being edited inside the admin_notices hook

add_action('admin_notices', 'w2x_admin_notices');
function w2x_admin_notices() {
    global $post;
    print_r($post); echo "<p>";  //empty!, bug?
    $w2x_type = get_post_custom_values("w2x"); //empty! bug?


On 8/23/06, Robert Deaton <false.hopes at gmail.com> wrote:
> On 8/23/06, AJ Chen <canovaj at gmail.com> wrote:
> > But, why does the same code work on windows platform?
> It doesn't. Either you have some nasty form of output buffering
> enabled by default or you don't have error reporting on.
> --
> --Robert Deaton
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list