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.

Built from https://develop.svn.wordpress.org/trunk@31200


git-svn-id: http://core.svn.wordpress.org/trunk@31181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-01-16 04:16:24 +00:00
parent d0c327443c
commit 7f8b548df1
30 changed files with 43 additions and 43 deletions

View File

@ -237,7 +237,7 @@ class Custom_Background {
<tr>
<th scope="row"><?php _e('Remove Image'); ?></th>
<td>
<form method="post" action="">
<form method="post">
<?php wp_nonce_field('custom-background-remove', '_wpnonce-custom-background-remove'); ?>
<?php submit_button( __( 'Remove Background Image' ), 'button', 'remove-background', false ); ?><br/>
<?php _e('This will remove the background image. You will not be able to restore any customizations.') ?>
@ -251,7 +251,7 @@ class Custom_Background {
<tr>
<th scope="row"><?php _e('Restore Original Image'); ?></th>
<td>
<form method="post" action="">
<form method="post">
<?php wp_nonce_field('custom-background-reset', '_wpnonce-custom-background-reset'); ?>
<?php submit_button( __( 'Restore Original Image' ), 'button', 'reset-background', false ); ?><br/>
<?php _e('This will restore the original background image. You will not be able to restore any customizations.') ?>
@ -262,7 +262,7 @@ class Custom_Background {
<tr>
<th scope="row"><?php _e('Select Image'); ?></th>
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="">
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
<p>
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
<input type="file" id="upload" name="import" />
@ -283,7 +283,7 @@ class Custom_Background {
</table>
<h3><?php _e('Display Options') ?></h3>
<form method="post" action="">
<form method="post">
<table class="form-table">
<tbody>
<?php if ( get_background_image() ) : ?>

View File

@ -224,7 +224,7 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU
<?php $wp_list_table->views(); ?>
<form id="comments-form" action="" method="get">
<form id="comments-form" method="get">
<?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>

View File

@ -311,7 +311,7 @@ if ( !empty($_REQUEST['s']) )
endif; ?>
<div id="ajax-response"></div>
<form class="search-form" action="" method="get">
<form class="search-form" method="get">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
@ -324,7 +324,7 @@ endif; ?>
<div id="col-right">
<div class="col-wrap">
<form id="posts-filter" action="" method="post">
<form id="posts-filter" method="post">
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />

View File

@ -309,7 +309,7 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated
<?php $wp_list_table->views(); ?>
<form id="posts-filter" action="" method="get">
<form id="posts-filter" method="get">
<?php $wp_list_table->search_box( $post_type_object->labels->search_items, 'post' ); ?>

View File

@ -150,7 +150,7 @@ function export_date_options( $post_type = 'post' ) {
<p><?php _e('Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.'); ?></p>
<h3><?php _e( 'Choose what to export' ); ?></h3>
<form action="" method="get" id="export-filters">
<form method="get" id="export-filters">
<input type="hidden" name="download" value="true" />
<p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e( 'All content' ); ?></label></p>
<p class="description"><?php _e( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts.' ); ?></p>

View File

@ -961,7 +961,7 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
<form method="get" action=""><table style="display: none"><tbody id="inlineedit">
<form method="get"><table style="display: none"><tbody id="inlineedit">
<?php
$hclass = count( $hierarchical_taxonomies ) ? 'post' : 'page';
$bulk = 0;

View File

@ -463,7 +463,7 @@ class WP_Terms_List_Table extends WP_List_Table {
return;
?>
<form method="get" action=""><table style="display: none"><tbody id="inlineedit">
<form method="get"><table style="display: none"><tbody id="inlineedit">
<tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
<fieldset><div class="inline-edit-col">

View File

@ -155,7 +155,7 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
}
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
echo '<form action="" method="post" class="dashboard-widget-control-form">';
echo '<form method="post" class="dashboard-widget-control-form">';
wp_dashboard_trigger_widget_control( $meta_box['id'] );
wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';

View File

@ -2293,7 +2293,7 @@ function media_upload_library_form($errors) {
?>
<form id="filter" action="" method="get">
<form id="filter" method="get">
<input type="hidden" name="type" value="<?php echo esc_attr( $type ); ?>" />
<input type="hidden" name="tab" value="<?php echo esc_attr( $tab ); ?>" />
<input type="hidden" name="post_id" value="<?php echo (int) $post_id; ?>" />

View File

@ -176,7 +176,7 @@ function install_search_form( $type_selector = true ) {
$input_attrs = 'class="wp-filter-search" placeholder="' . esc_attr__( 'Search Plugins' ) . '" ';
}
?><form class="search-form search-plugins" method="get" action="">
?><form class="search-form search-plugins" method="get">
<input type="hidden" name="tab" value="search" />
<?php if ( $type_selector ) : ?>
<select name="type" id="typeselector">
@ -222,7 +222,7 @@ function install_plugins_favorites_form() {
$user = ! empty( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' );
?>
<p class="install-help"><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p>
<form method="get" action="">
<form method="get">
<input type="hidden" name="tab" value="favorites" />
<p>
<label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label>
@ -253,7 +253,7 @@ function display_plugins_table() {
}
?>
<form id="plugin-filter" action="" method="post">
<form id="plugin-filter" method="post">
<?php $wp_list_table->display(); ?>
</form>
<?php

View File

@ -1026,7 +1026,7 @@ final class WP_Screen {
?>
<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
<form id="adv-settings" action="" method="post">
<form id="adv-settings" method="post">
<?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
<h5><?php _e( 'Show on screen' ); ?></h5>
<?php

View File

@ -444,7 +444,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
}
?>
<form method="get" action="">
<form method="get">
<?php if ( $table_row ) : ?>
<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">
<?php else : ?>

View File

@ -57,7 +57,7 @@ function install_theme_search_form( $type_selector = true ) {
if ( ! $type_selector )
echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>';
?>
<form id="search-themes" method="get" action="">
<form id="search-themes" method="get">
<input type="hidden" name="tab" value="search" />
<?php if ( $type_selector ) : ?>
<label class="screen-reader-text" for="typeselector"><?php _e('Type of search'); ?></label>
@ -99,7 +99,7 @@ function install_themes_dashboard() {
<h4><?php _e('Feature Filter') ?></h4>
<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
<form method="get" action="">
<form method="get">
<input type="hidden" name="tab" value="search" />
<?php
$feature_list = get_theme_feature_list();

View File

@ -205,7 +205,7 @@ function wp_widget_control( $sidebar_args ) {
</div>
<div class="widget-inside">
<form action="" method="post">
<form method="post">
<div class="widget-content">
<?php
if ( isset($control['callback']) )

View File

@ -84,7 +84,7 @@ if ( isset($_REQUEST['deleted']) ) {
}
?>
<form id="posts-filter" action="" method="get">
<form id="posts-filter" method="get">
<?php $wp_list_table->search_box( __( 'Search Links' ), 'link' ); ?>

View File

@ -111,7 +111,7 @@ if ( current_user_can( 'upload_files' ) ) { ?>
<?php } ?>
</h2>
<form method="post" action="" class="media-upload-form" id="media-single-form">
<form method="post" class="media-upload-form" id="media-single-form">
<p class="submit" style="padding-bottom: 0;">
<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
</p>

View File

@ -64,7 +64,7 @@ if ( empty( $blogs ) ) :
echo '</p>';
else :
?>
<form id="myblogs" action="" method="post">
<form id="myblogs" method="post">
<?php
choose_primary_blog();
/**

View File

@ -684,7 +684,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<div class="clear"></div>
<form id="nav-menu-meta" action="" class="nav-menu-meta" method="post" enctype="multipart/form-data">
<form id="nav-menu-meta" class="nav-menu-meta" method="post" enctype="multipart/form-data">
<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
<input type="hidden" name="action" value="add-menu-item" />
<?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?>
@ -694,7 +694,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
</div><!-- /#menu-settings-column -->
<div id="menu-management-liquid">
<div id="menu-management">
<form id="update-nav-menu" action="" method="post" enctype="multipart/form-data">
<form id="update-nav-menu" method="post" enctype="multipart/form-data">
<div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>">
<?php
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );

View File

@ -179,7 +179,7 @@ function network_step1( $errors = false ) {
die();
}
echo '<form method="post" action="">';
echo '<form method="post">';
wp_nonce_field( 'install-network-1' );

View File

@ -167,7 +167,7 @@ if ( isset( $_GET['enabled'] ) ) {
<p><?php _e( 'Network enabled themes are not shown on this screen.' ) ?></p>
<form method="get" action="">
<form method="get">
<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
</form>

View File

@ -233,7 +233,7 @@ if ( isset($_GET['update']) ) :
}
endif; ?>
<form class="search-form" action="" method="get">
<form class="search-form" method="get">
<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>
<input type="hidden" name="id" value="<?php echo esc_attr( $id ) ?>" />
</form>

View File

@ -261,7 +261,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<?php echo $msg; ?>
<form action="" method="get" id="ms-search">
<form method="get" id="ms-search">
<?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
<input type="hidden" name="action" value="blogs" />
</form>

View File

@ -267,7 +267,7 @@ if ( isset( $_GET['enabled'] ) ) {
?>
<form method="get" action="">
<form method="get">
<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
</form>
@ -278,7 +278,7 @@ if ( 'broken' == $status )
echo '<p class="clear">' . __('The following themes are installed but incomplete. Themes must have a stylesheet and a template.') . '</p>';
?>
<form method="post" action="">
<form method="post">
<input type="hidden" name="theme_status" value="<?php echo esc_attr($status) ?>" />
<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />

View File

@ -284,7 +284,7 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
<?php $wp_list_table->views(); ?>
<form action="" method="get" class="search-form">
<form method="get" class="search-form">
<?php $wp_list_table->search_box( __( 'Search Users' ), 'all-user' ); ?>
</form>

View File

@ -456,11 +456,11 @@ do_action( 'pre_current_active_plugins', $plugins['all'] );
<?php $wp_list_table->views(); ?>
<form method="get" action="">
<form method="get">
<?php $wp_list_table->search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?>
</form>
<form method="post" action="">
<form method="post">
<input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />

View File

@ -287,7 +287,7 @@ if ( !empty($message) ) { ?>
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
<?php } ?>
<form id="posts-filter" action="" method="get">
<form id="posts-filter" method="get">
<?php $wp_list_table->views(); ?>

View File

@ -280,7 +280,7 @@ if ( is_multisite() ) {
$type = 'text';
}
?>
<form action="" method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php
<form method="post" name="adduser" id="adduser" class="validate" novalidate="novalidate"<?php
/**
* Fires inside the adduser form tag.
*
@ -334,7 +334,7 @@ if ( current_user_can( 'create_users') ) {
echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>';
?>
<p><?php _e('Create a brand new user and add them to this site.'); ?></p>
<form action="" method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php
<form method="post" name="createuser" id="createuser" class="validate" novalidate="novalidate"<?php
/** This action is documented in wp-admin/user-new.php */
do_action( 'user_new_form_tag' );
?>>

View File

@ -209,7 +209,7 @@ case 'delete':
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<form action="" method="post" name="updateusers" id="updateusers">
<form method="post" name="updateusers" id="updateusers">
<?php wp_nonce_field('delete-users') ?>
<?php echo $referer; ?>
@ -321,7 +321,7 @@ case 'remove':
include( ABSPATH . 'wp-admin/admin-header.php' );
?>
<form action="" method="post" name="updateusers" id="updateusers">
<form method="post" name="updateusers" id="updateusers">
<?php wp_nonce_field('remove-users') ?>
<?php echo $referer; ?>
@ -443,7 +443,7 @@ if ( $usersearch )
<?php $wp_list_table->views(); ?>
<form action="" method="get">
<form method="get">
<?php $wp_list_table->search_box( __( 'Search Users' ), 'user' ); ?>

View File

@ -428,7 +428,7 @@ foreach ( $theme_sidebars as $sidebar => $registered_sidebar ) {
</div>
</div>
</div>
<form action="" method="post">
<form method="post">
<?php wp_nonce_field( 'save-sidebar-widgets', '_wpnonce_widgets', false ); ?>
</form>
<br class="clear" />

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31199';
$wp_version = '4.2-alpha-31200';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.