Making WordPress.org


Ignore:
Timestamp:
01/22/2024 02:57:15 AM (13 months ago)
Author:
dd32
Message:

Plugin Directory: Admin: Include a hidden submit button that only submits the form, and doesn't perform actions.

This is needed as the controls include a variety of submit buttons that cause actions to occur, and pressing enter in a form field such as the slug would cause the first submit button to be used.

Fixes #6635.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php

    r13084 r13134  
    1515     * Displays the Publish metabox for plugins.
    1616     * The HTML here mostly matches what Core uses.
     17     *
     18     * NOTE: The input[type="submit"].screen-reader-text is such that the default
     19     *       form submit method is a button whose submission causes no action
     20     *       (such as approval/rejection/assign). This is used for submit-by-enter.
     21     *       See https://meta.trac.wordpress.org/ticket/6635.
    1722     */
    1823    static function display() {
    1924        ?>
    2025        <div class="submitbox" id="submitpost">
     26            <input type="submit" name="save_changes" class="screen-reader-text" />
    2127            <div id="misc-publishing-actions">
    2228                <?php
Note: See TracChangeset for help on using the changeset viewer.