Results 1 to 2 of 2

Thread: $post_name

  1. #1
    alxvallejo is offline Hello World
    Join Date
    Nov 2011
    Location
    Boston, MA
    Posts
    4

    Default $post_name

    I have $post_name as an argument for a function in a plugin. I have no idea where $post_name is assigned. It's not a global variable, I checked it out here: http://ifacethoughts.net/2006/02/25/wordpress-global-variables/

    A
    ny ideas? I'm thinking it's in a core file somewhere.

  2. #2
    mmuro is offline Hello World
    Join Date
    Mar 2011
    Location
    Birmingham, AL
    Posts
    13

    Default

    I'm assuming you are talking about it being defined in the function call, like so: function do_stuff( $post_name = 'Hello', $post_status = 'public' ){ //do stuff in this function }

    If that's the case, then $post_name has a scope local to that function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •