WordPress.org

Make WordPress Core

Changeset 21781


Ignore:
Timestamp:
09/07/2012 03:49:20 PM (9 years ago)
Author:
nacin
Message:

Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r21770 r21781  
    32013201
    32023202#postcustomstuff .submit input,
    3203 #postcustomstuff table #addmetasub {
     3203#postcustomstuff table #newmeta-submit {
    32043204    width: auto;
    32053205}
  • trunk/wp-admin/includes/template.php

    r21742 r21781  
    494494    $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false );
    495495    $r .= "\n\t\t";
    496     $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , 'updatemeta', false );
     496    $r .= get_submit_button( __( 'Update' ), "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce updatemeta" , "meta-{$entry['meta_id']}-submit", false );
    497497    $r .= "</div>";
    498498    $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false );
     
    555555
    556556<tr><td colspan="2" class="submit">
    557 <?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'addmetasub' ) ); ?>
     557<?php submit_button( __( 'Add Custom Field' ), 'add:the-list:newmeta', 'addmeta', false, array( 'id' => 'newmeta-submit' ) ); ?>
    558558<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
    559559</td></tr>
  • trunk/wp-includes/js/wp-lists.js

    r21737 r21781  
    7979            return false;
    8080
    81         if ( !e.is('[id="' + s.what + '-add-submit"]') )
     81        if ( !e.is('[id="' + s.element + '-submit"]') )
    8282            return !wpList.add.call( list, e, s );
    8383
Note: See TracChangeset for help on using the changeset viewer.