WordPress.org

Ready to get started?Download WordPress

Forums

Anyone know the location of the post's "quick edit" form? (8 posts)

  1. SteveYantz
    Member
    Posted 3 years ago #

    Simply stated in the header:
    Anyone know the location of the post's "quick edit" form?

    As in where's(which php file) the form code for the quick edit form.

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    wp-admin/includes/template.php
    Line - 1271

    A function named _post_rows() deals with the inline post rows.

  3. SteveYantz
    Member
    Posted 3 years ago #

    Thank you. I'm trying to get some added fields I include in the post table. Inserting it into the DB works. But displaying the fields data in the form isn't working. I'm going to have backtrack this "$screen" variable I think.

  4. SteveYantz
    Member
    Posted 3 years ago #

    Any idea what I could use instead of "$post->custom_field" just to display the current data in the quick edit form?
    Since there is no generic "$post" for this page.

  5. Mark / t31os
    Moderator
    Posted 3 years ago #

    How are you querying for the data?

    If you're adding columns/fields to the post table, i hope you realise this is pretty much ruling out any chance of upgrading the installation later on due to the database structual changes you're making.

  6. SteveYantz
    Member
    Posted 3 years ago #

    Right, I've had that problem. That's why I backup the pages after I make the changes. So I can just paste them back in when I decide to upgrade. I'm guessing the dynamic fix for this would be creating a plugin.

    I'm not quite sure how the "quick edit" queries for the data for each individual row on the post page. Trying to figure that out.

  7. SteveYantz
    Member
    Posted 3 years ago #

    Wait, are you saying that upgrades may restructure the database tables in the future? Wouldn't this mess up the current data in the tables? I'm thinking, they wouldn't erase the post table to reconstruct it. They might just add or delete known columns. Which wouldn't effect my unknown custom fields.

  8. Mark / t31os
    Moderator
    Posted 3 years ago #

    The posts are fed into the function, the first parameter.

    post_rows is actually called to populate the rows, but that function in turn calls _post_rows (which is why i named the latter one to begin with). You'll find the post_rows function just above the other one though, so not far to look... ;)

    When you said added fields to the post table i assumed you meant you added new columns to the post table, that's not going to play nice if there's a structual change to that table in an upcoming version. Could you not use the postmeta table for what you're doing? (or is that what you're actually doing, it's not clear).

Topic Closed

This topic has been closed to new replies.

About this Topic