WordPress.org

Make WordPress Core

Ticket #6209: 6209.b.diff

File 6209.b.diff, 7.2 KB (added by mdawaffe, 6 years ago)

Now with cache busting

  • wp-includes/script-loader.php

     
    1111        } 
    1212 
    1313        function default_scripts() { 
    14                 $this->add( 'common', '/wp-admin/js/common.js', array('jquery'), '1.0' ); 
     14                $this->add( 'common', '/wp-admin/js/common.js', array('jquery'), '20080318' ); 
    1515                $this->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); 
    1616 
    1717                $this->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '3958' ); 
  • wp-admin/users.php

     
    398398        else 
    399399                echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>'; 
    400400?> 
    401 <form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:users:"> 
     401<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:users: validate"> 
    402402<?php wp_nonce_field('add-user') ?> 
    403403<table class="form-table"> 
    404404        <tr class="form-field form-required"> 
  • wp-admin/includes/media.php

     
    848848        $callback = "type_form_$type"; 
    849849?> 
    850850 
    851 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form" id="<?php echo $type; ?>-form"> 
     851<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form"> 
    852852<input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" /> 
    853853<?php wp_nonce_field('media-form'); ?> 
    854854<h3><?php _e('From Computer'); ?></h3> 
     
    909909--> 
    910910</script> 
    911911 
    912 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form" id="gallery-form"> 
     912<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="gallery-form"> 
    913913<?php wp_nonce_field('media-form'); ?> 
    914914<?php //media_upload_form( $errors ); ?> 
    915915 
     
    10441044</div> 
    10451045</form> 
    10461046 
    1047 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form" id="library-form"> 
     1047<form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="library-form"> 
    10481048 
    10491049<?php wp_nonce_field('media-form'); ?> 
    10501050<?php //media_upload_form( $errors ); ?> 
  • wp-admin/js/common.js

     
    77 
    88        // Basic form validation 
    99        if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) { 
    10                 jQuery('form').submit( function() { return wpAjax.validateForm( jQuery(this) ); } ); 
     10                jQuery('form.validate').submit( function() { return wpAjax.validateForm( jQuery(this) ); } ); 
    1111        } 
    1212}); 
    1313 
  • wp-admin/edit-link-form.php

     
    22if ( ! empty($link_id) ) { 
    33        $heading = __('Edit Link'); 
    44        $submit_text = __('Save Changes'); 
    5         $form = '<form name="editlink" id="editlink" method="post" action="link.php">'; 
     5        $form = '<form name="editlink" id="editlink" method="post" action="link.php" class="validate">'; 
    66        $nonce_action = 'update-bookmark_' . $link_id; 
    77} else { 
    88        $heading = __('Add Link'); 
    99        $submit_text = __('Add Link'); 
    10         $form = '<form name="addlink" id="addlink" method="post" action="link.php">'; 
     10        $form = '<form name="addlink" id="addlink" method="post" action="link.php" class="validate">'; 
    1111        $nonce_action = 'add-bookmark'; 
    1212} 
    1313 
  • wp-admin/edit-link-category-form.php

     
    22if ( ! empty($cat_ID) ) { 
    33        $heading = __('Edit Category'); 
    44        $submit_text = __('Edit Category'); 
    5         $form = '<form name="editcat" id="editcat" method="post" action="link-category.php">'; 
     5        $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">'; 
    66        $action = 'editedcat'; 
    77        $nonce_action = 'update-link-category_' . $cat_ID; 
    88        do_action('edit_link_category_form_pre', $category); 
    99} else { 
    1010        $heading = __('Add Category'); 
    1111        $submit_text = __('Add Category'); 
    12         $form = '<form name="addcat" id="addcat" class="add:the-list:" method="post" action="link-category.php">'; 
     12        $form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">'; 
    1313        $action = 'addcat'; 
    1414        $nonce_action = 'add-link-category'; 
    1515        do_action('add_link_category_form_pre', $category); 
  • wp-admin/edit-tag-form.php

     
    22if ( ! empty($tag_ID) ) { 
    33        $heading = __('Edit Tag'); 
    44        $submit_text = __('Edit Tag'); 
    5         $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php">'; 
     5        $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">'; 
    66        $action = 'editedtag'; 
    77        $nonce_action = 'update-tag_' . $tag_ID; 
    88        do_action('edit_tag_form_pre', $tag); 
    99} else { 
    1010        $heading = __('Add Tag'); 
    1111        $submit_text = __('Add Tag'); 
    12         $form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list:">'; 
     12        $form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">'; 
    1313        $action = 'addtag'; 
    1414        $nonce_action = 'add-tag'; 
    1515        do_action('add_tag_form_pre', $tag); 
  • wp-admin/edit-category-form.php

     
    22if ( ! empty($cat_ID) ) { 
    33        $heading = __('Edit Category'); 
    44        $submit_text = __('Edit Category'); 
    5         $form = '<form name="editcat" id="editcat" method="post" action="categories.php">'; 
     5        $form = '<form name="editcat" id="editcat" method="post" action="categories.php" class="validate">'; 
    66        $action = 'editedcat'; 
    77        $nonce_action = 'update-category_' . $cat_ID; 
    88        do_action('edit_category_form_pre', $category); 
    99} else { 
    1010        $heading = __('Add Category'); 
    1111        $submit_text = __('Add Category'); 
    12         $form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list:">'; 
     12        $form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list: validate">'; 
    1313        $action = 'addcat'; 
    1414        $nonce_action = 'add-category'; 
    1515        do_action('add_category_form_pre', $category);