WordPress.org

Ready to get started?Download WordPress

Forums

Plugin Hooks edit_form_advanced -- Display above Save/Publish Buttons? (5 posts)

  1. tripodmsu
    Member
    Posted 8 years ago #

    When using the action hooks edit_form_advanced and simple_edit_form to edit forms, input fields or content is added and displayed after the save/publish buttons. Does anyone have any tricks for getting this to display above the buttons? My users are accidentaly clicking publish too early without filling in the extra fields because they just forget about it.. Out of sight out of mind I guess.

    Any help?

  2. tripodmsu
    Member
    Posted 8 years ago #

    Any ideas?

  3. 3stripe
    Member
    Posted 7 years ago #

    I think you can do it with some sneaky javascript... not sure how save this is but:

    <script language="JavaScript" type="text/javascript"><!--
    var placement = document.getElementById("quicktags");
    var includediv = document.getElementById("YOURDIVNAMEHERE");
    var mozilla = document.getElementById&&!document.all;
    if(mozilla)
    placement.parentNode.appendChild(includediv);
    else placement.parentElement.appendChild(includediv);
    //--></script>

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    While I don't like editing the core files, if you go look in edit-form-advanced.php, and find the line:
    <?php do_action('edit_form_advanced'); ?>

    then move it up immediately under:
    <?php echo $form_prevstatus ?>

    That would do it. Seems like we need different action hooks in a few more places around that page, really.

  5. 3stripe
    Member
    Posted 7 years ago #

    Yup!

Topic Closed

This topic has been closed to new replies.

About this Topic