WordPress.org

Make WordPress Core

Changeset 31200


Ignore:
Timestamp:
01/16/2015 04:15:52 AM (6 years ago)
Author:
wonderboymusic
Message:

In HTML5, the action attribute is no longer required. Remove this attribute when empty.

The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces."
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

Location:
trunk/src/wp-admin
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-background.php

    r31133 r31200  
    238238<th scope="row"><?php _e('Remove Image'); ?></th>
    239239<td>
    240 <form method="post" action="">
     240<form method="post">
    241241<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
    242242<?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
     
    252252<th scope="row"><?php _e('Restore Original Image'); ?></th>
    253253<td>
    254 <form method="post" action="">
     254<form method="post">
    255255<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
    256256<?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
     
    263263<tr>
    264264<th scope="row"><?php _e('Select Image'); ?></th>
    265 <td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="">
     265<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
    266266    <p>
    267267        <label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
     
    284284
    285285<h3><?php _e('Display Options') ?></h3>
    286 <form method="post" action="">
     286<form method="post">
    287287<table class="form-table">
    288288<tbody>
  • trunk/src/wp-admin/edit-comments.php

    r30356 r31200  
    225225<?php $wp_list_table->views(); ?>
    226226
    227 <form id="comments-form" action="" method="get">
     227<form id="comments-form" method="get">
    228228
    229229<?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>
  • trunk/src/wp-admin/edit-tags.php

    r31121 r31200  
    312312<div id="ajax-response"></div>
    313313
    314 <form class="search-form" action="" method="get">
     314<form class="search-form" method="get">
    315315<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    316316<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
     
    325325<div id="col-right">
    326326<div class="col-wrap">
    327 <form id="posts-filter" action="" method="post">
     327<form id="posts-filter" method="post">
    328328<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
    329329<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
  • trunk/src/wp-admin/edit.php

    r31121 r31200  
    310310<?php $wp_list_table->views(); ?>
    311311
    312 <form id="posts-filter" action="" method="get">
     312<form id="posts-filter" method="get">
    313313
    314314<?php $wp_list_table->search_box( $post_type_object->labels->search_items, 'post' ); ?>
  • trunk/src/wp-admin/export.php

    r31090 r31200  
    151151
    152152<h3><?php _e( 'Choose what to export' ); ?></h3>
    153 <form action="" method="get" id="export-filters">
     153<form method="get" id="export-filters">
    154154<input type="hidden" name="download" value="true" />
    155155<p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e( 'All content' ); ?></label></p>
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r31181 r31200  
    962962    ?>
    963963
    964     <form method="get" action=""><table style="display: none"><tbody id="inlineedit">
     964    <form method="get"><table style="display: none"><tbody id="inlineedit">
    965965        <?php
    966966        $hclass = count( $hierarchical_taxonomies ) ? 'post' : 'page';
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r31181 r31200  
    464464?>
    465465
    466     <form method="get" action=""><table style="display: none"><tbody id="inlineedit">
     466    <form method="get"><table style="display: none"><tbody id="inlineedit">
    467467        <tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
    468468
  • trunk/src/wp-admin/includes/dashboard.php

    r31075 r31200  
    156156
    157157function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
    158     echo '<form action="" method="post" class="dashboard-widget-control-form">';
     158    echo '<form method="post" class="dashboard-widget-control-form">';
    159159    wp_dashboard_trigger_widget_control( $meta_box['id'] );
    160160    wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
  • trunk/src/wp-admin/includes/media.php

    r31187 r31200  
    22942294?>
    22952295
    2296 <form id="filter" action="" method="get">
     2296<form id="filter" method="get">
    22972297<input type="hidden" name="type" value="<?php echo esc_attr( $type ); ?>" />
    22982298<input type="hidden" name="tab" value="<?php echo esc_attr( $tab ); ?>" />
  • trunk/src/wp-admin/includes/plugin-install.php

    r31110 r31200  
    177177    }
    178178
    179     ?><form class="search-form search-plugins" method="get" action="">
     179    ?><form class="search-form search-plugins" method="get">
    180180        <input type="hidden" name="tab" value="search" />
    181181        <?php if ( $type_selector ) : ?>
     
    223223    ?>
    224224    <p class="install-help"><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p>
    225     <form method="get" action="">
     225    <form method="get">
    226226        <input type="hidden" name="tab" value="favorites" />
    227227        <p>
     
    254254
    255255    ?>
    256     <form id="plugin-filter" action="" method="post">
     256    <form id="plugin-filter" method="post">
    257257        <?php $wp_list_table->display(); ?>
    258258    </form>
  • trunk/src/wp-admin/includes/screen.php

    r31188 r31200  
    10271027        ?>
    10281028        <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
    1029         <form id="adv-settings" action="" method="post">
     1029        <form id="adv-settings" method="post">
    10301030        <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
    10311031            <h5><?php _e( 'Show on screen' ); ?></h5>
  • trunk/src/wp-admin/includes/template.php

    r31188 r31200  
    445445
    446446?>
    447 <form method="get" action="">
     447<form method="get">
    448448<?php if ( $table_row ) : ?>
    449449<table style="display:none;"><tbody id="com-reply"><tr id="replyrow" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
  • trunk/src/wp-admin/includes/theme-install.php

    r27499 r31200  
    5858        echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>';
    5959    ?>
    60 <form id="search-themes" method="get" action="">
     60<form id="search-themes" method="get">
    6161    <input type="hidden" name="tab" value="search" />
    6262    <?php if ( $type_selector ) : ?>
     
    100100<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
    101101
    102 <form method="get" action="">
     102<form method="get">
    103103    <input type="hidden" name="tab" value="search" />
    104104    <?php
  • trunk/src/wp-admin/includes/widgets.php

    r29206 r31200  
    206206
    207207    <div class="widget-inside">
    208     <form action="" method="post">
     208    <form method="post">
    209209    <div class="widget-content">
    210210<?php
  • trunk/src/wp-admin/link-manager.php

    r27469 r31200  
    8585?>
    8686
    87 <form id="posts-filter" action="" method="get">
     87<form id="posts-filter" method="get">
    8888
    8989<?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?>
  • trunk/src/wp-admin/media.php

    r29206 r31200  
    112112</h2>
    113113
    114 <form method="post" action="" class="media-upload-form" id="media-single-form">
     114<form method="post" class="media-upload-form" id="media-single-form">
    115115<p class="submit" style="padding-bottom: 0;">
    116116<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
  • trunk/src/wp-admin/my-sites.php

    r31181 r31200  
    6565else :
    6666?>
    67 <form id="myblogs" action="" method="post">
     67<form id="myblogs" method="post">
    6868    <?php
    6969    choose_primary_blog();
  • trunk/src/wp-admin/nav-menus.php

    r30356 r31200  
    685685        <div class="clear"></div>
    686686
    687         <form id="nav-menu-meta" action="" class="nav-menu-meta" method="post" enctype="multipart/form-data">
     687        <form id="nav-menu-meta" class="nav-menu-meta" method="post" enctype="multipart/form-data">
    688688            <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
    689689            <input type="hidden" name="action" value="add-menu-item" />
     
    695695    <div id="menu-management-liquid">
    696696        <div id="menu-management">
    697             <form id="update-nav-menu" action="" method="post" enctype="multipart/form-data">
     697            <form id="update-nav-menu" method="post" enctype="multipart/form-data">
    698698                <div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>">
    699699                    <?php
  • trunk/src/wp-admin/network.php

    r29899 r31200  
    180180    }
    181181
    182     echo '<form method="post" action="">';
     182    echo '<form method="post">';
    183183
    184184    wp_nonce_field( 'install-network-1' );
  • trunk/src/wp-admin/network/site-themes.php

    r27715 r31200  
    168168<p><?php _e( 'Network enabled themes are not shown on this screen.' ) ?></p>
    169169
    170 <form method="get" action="">
     170<form method="get">
    171171<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
    172172<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
  • trunk/src/wp-admin/network/site-users.php

    r31034 r31200  
    234234endif; ?>
    235235
    236 <form class="search-form" action="" method="get">
     236<form class="search-form" method="get">
    237237<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
    238238<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
  • trunk/src/wp-admin/network/sites.php

    r30647 r31200  
    262262<?php echo $msg; ?>
    263263
    264 <form action="" method="get" id="ms-search">
     264<form method="get" id="ms-search">
    265265<?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
    266266<input type="hidden" name="action" value="blogs" />
  • trunk/src/wp-admin/network/themes.php

    r29856 r31200  
    268268?>
    269269
    270 <form method="get" action="">
     270<form method="get">
    271271<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
    272272</form>
     
    279279?>
    280280
    281 <form method="post" action="">
     281<form method="post">
    282282<input type="hidden" name="theme_status" value="<?php echo esc_attr($status) ?>" />
    283283<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
  • trunk/src/wp-admin/network/users.php

    r30020 r31200  
    285285    <?php $wp_list_table->views(); ?>
    286286
    287     <form action="" method="get" class="search-form">
     287    <form method="get" class="search-form">
    288288        <?php $wp_list_table->search_box( __( 'Search Users' ), 'all-user' ); ?>
    289289    </form>
  • trunk/src/wp-admin/plugins.php

    r30117 r31200  
    457457<?php $wp_list_table->views(); ?>
    458458
    459 <form method="get" action="">
     459<form method="get">
    460460<?php $wp_list_table->search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?>
    461461</form>
    462462
    463 <form method="post" action="">
     463<form method="post">
    464464
    465465<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
  • trunk/src/wp-admin/upload.php

    r31041 r31200  
    288288<?php } ?>
    289289
    290 <form id="posts-filter" action="" method="get">
     290<form id="posts-filter" method="get">
    291291
    292292<?php $wp_list_table->views(); ?>
  • trunk/src/wp-admin/user-new.php

    r30855 r31200  
    281281    }
    282282?>
    283 <form action="" method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php
     283<form method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php
    284284    /**
    285285     * Fires inside the adduser form tag.
     
    335335?>
    336336<p><?php _e('Create a brand new user and add them to this site.'); ?></p>
    337 <form action="" method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php
     337<form method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php
    338338    /** This action is documented in wp-admin/user-new.php */
    339339    do_action( 'user_new_form_tag' );
  • trunk/src/wp-admin/users.php

    r30356 r31200  
    210210    include( ABSPATH . 'wp-admin/admin-header.php' );
    211211?>
    212 <form action="" method="post" name="updateusers" id="updateusers">
     212<form method="post" name="updateusers" id="updateusers">
    213213<?php wp_nonce_field('delete-users') ?>
    214214<?php echo $referer; ?>
     
    322322    include( ABSPATH . 'wp-admin/admin-header.php' );
    323323?>
    324 <form action="" method="post" name="updateusers" id="updateusers">
     324<form method="post" name="updateusers" id="updateusers">
    325325<?php wp_nonce_field('remove-users') ?>
    326326<?php echo $referer; ?>
     
    444444<?php $wp_list_table->views(); ?>
    445445
    446 <form action="" method="get">
     446<form method="get">
    447447
    448448<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
  • trunk/src/wp-admin/widgets.php

    r30459 r31200  
    429429</div>
    430430</div>
    431 <form action="" method="post">
     431<form method="post">
    432432<?php wp_nonce_field( 'save-sidebar-widgets', '_wpnonce_widgets', false ); ?>
    433433</form>
Note: See TracChangeset for help on using the changeset viewer.