The MU forums have moved to WordPress.org

what checks user status on permalinks? (4 posts)

  1. easysleeper
    Member
    Posted 15 years ago #

    When calling up a blog query.php in includes does all the work to prepare the database query to see if the post should display to the current user.

    For example if the post status is 'private' it only shows to people who pass the current_user_can("read_private_{$post_type}s") or if they are the author.

    When you click on a specific blog entry, to comment lets say, where is the check performed? I have an issue where some added functionality is showing blog entries just fine but when a user tries to comment it shows them a 404, as it would if they clicked a permalink to a private entry.

    Thanks for any help.

  2. easysleeper
    Member
    Posted 15 years ago #

    Anyone?

  3. easysleeper
    Member
    Posted 15 years ago #

    Just in case anyone searches and find this I found what I was looking for, it is also doing the check in query.php but outside the loop functions.

    It is down at the bottom of the WP_Query class, for me it will be close to line 1500 my file is changed a lot so I don't know the exact location but if you search for the commented string "// Check post status to determine if post should be displayed."
    You will find it. I guess I should have found it much sooner given the nice comment that tells me what it is!

  4. MAVIC
    Member
    Posted 15 years ago #

    Just want to say thanks for coming back and posting your answer. Searching this board is tiring at times with all the questions that get asked but no answered.

About this Topic

  • Started 15 years ago by easysleeper
  • Latest reply from MAVIC