Ticket #21152: 21152.3.diff
File 21152.3.diff, 29.3 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/class-wp-comments-list-table.php
288 288 </tr> 289 289 </tfoot> 290 290 291 <tbody id="the-comment-list" class="list:comment">291 <tbody id="the-comment-list" data-wp-lists="list:comment"> 292 292 <?php $this->display_rows_or_placeholder(); ?> 293 293 </tbody> 294 294 295 <tbody id="the-extra-comment-list" class="list:comment" style="display: none;">295 <tbody id="the-extra-comment-list" data-wp-lists="list:comment" style="display: none;"> 296 296 <?php $this->items = $this->extra_items; $this->display_rows(); ?> 297 297 </tbody> 298 298 </table> … … 393 393 394 394 if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments 395 395 if ( 'approved' == $the_comment_status ) 396 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';396 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved vim-u vim-destructive' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 397 397 else if ( 'unapproved' == $the_comment_status ) 398 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';398 $actions['approve'] = "<a href='$approve_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved vim-a vim-destructive' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 399 399 } else { 400 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';401 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';400 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 401 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 402 402 } 403 403 404 404 if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { 405 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';405 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 406 406 } elseif ( 'spam' == $the_comment_status ) { 407 $actions['unspam'] = "<a href='$unspam_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>';407 $actions['unspam'] = "<a href='$unspam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>'; 408 408 } elseif ( 'trash' == $the_comment_status ) { 409 $actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';409 $actions['untrash'] = "<a href='$untrash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>'; 410 410 } 411 411 412 412 if ( 'spam' == $the_comment_status || 'trash' == $the_comment_status || !EMPTY_TRASH_DAYS ) { 413 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __( 'Delete Permanently' ) . '</a>';413 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::delete=1 delete vim-d vim-destructive'>" . __( 'Delete Permanently' ) . '</a>'; 414 414 } else { 415 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';415 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>'; 416 416 } 417 417 418 418 if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { … … 549 549 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 550 550 ?> 551 551 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0" style="display:none;"> 552 <tbody id="the-comment-list"<?php if ( $singular ) echo " class='list:$singular'"; ?>>552 <tbody id="the-comment-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>> 553 553 <?php if ( ! $output_empty ) $this->display_rows_or_placeholder(); ?> 554 554 </tbody> 555 555 </table> -
wp-admin/includes/class-wp-list-table.php
739 739 </tr> 740 740 </tfoot> 741 741 742 <tbody id="the-list"<?php if ( $singular ) echo " class='list:$singular'"; ?>>742 <tbody id="the-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>> 743 743 <?php $this->display_rows_or_placeholder(); ?> 744 744 </tbody> 745 745 </table> -
wp-admin/includes/dashboard.php
614 614 } 615 615 616 616 if ( $comments ) { 617 echo '<div id="the-comment-list" class="list:comment">';617 echo '<div id="the-comment-list" data-wp-lists="list:comment">'; 618 618 foreach ( $comments as $comment ) 619 619 _wp_dashboard_recent_comments_row( $comment ); 620 620 echo '</div>'; … … 657 657 $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 658 658 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 659 659 660 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';661 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';660 $actions['approve'] = "<a href='$approve_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 661 $actions['unapprove'] = "<a href='$unapprove_url' data-wp-lists='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 662 662 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; 663 663 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 664 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';664 $actions['spam'] = "<a href='$spam_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 665 665 if ( !EMPTY_TRASH_DAYS ) 666 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';666 $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; 667 667 else 668 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';668 $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>'; 669 669 670 670 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); 671 671 -
wp-admin/includes/meta-boxes.php
333 333 $name = ( $taxonomy == 'category' ) ? 'post_category' : 'tax_input[' . $taxonomy . ']'; 334 334 echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. 335 335 ?> 336 <ul id="<?php echo $taxonomy; ?>checklist" class="list:<?php echo $taxonomy?>categorychecklist form-no-clear">336 <ul id="<?php echo $taxonomy; ?>checklist" data-wp-lists="list:<?php echo $taxonomy?>" class="categorychecklist form-no-clear"> 337 337 <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?> 338 338 </ul> 339 339 </div> … … 354 354 <?php echo $tax->labels->parent_item_colon; ?> 355 355 </label> 356 356 <?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> 357 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" class="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-addbutton category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" />357 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" data-wp-lists="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> 358 358 <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce-add-'.$taxonomy, false ); ?> 359 359 <span id="<?php echo $taxonomy; ?>-ajax-response"></span> 360 360 </p> … … 665 665 </ul> 666 666 667 667 <div id="categories-all" class="tabs-panel"> 668 <ul id="categorychecklist" class="list:categorycategorychecklist form-no-clear">668 <ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear"> 669 669 <?php 670 670 if ( isset($link->link_id) ) 671 671 wp_link_category_checklist($link->link_id); … … 686 686 <p id="link-category-add" class="wp-hidden-child"> 687 687 <label class="screen-reader-text" for="newcat"><?php _e( '+ Add New Category' ); ?></label> 688 688 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" aria-required="true" /> 689 <input type="button" id="link-category-add-submit" class="add:categorychecklist:linkcategorydivbutton" value="<?php esc_attr_e( 'Add' ); ?>" />689 <input type="button" id="link-category-add-submit" data-wp-lists="add:categorychecklist:linkcategorydiv" class="button" value="<?php esc_attr_e( 'Add' ); ?>" /> 690 690 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> 691 691 <span id="category-ajax-response"></span> 692 692 </p> -
wp-admin/includes/nav-menu.php
696 696 <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-posttype-' . $post_type_name ) ); ?> 697 697 </p> 698 698 699 <ul id="<?php echo $post_type_name; ?>-search-checklist" class="list:<?php echo $post_type_name?>categorychecklist form-no-clear">699 <ul id="<?php echo $post_type_name; ?>-search-checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear"> 700 700 <?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?> 701 701 <?php 702 702 $args['walker'] = $walker; … … 718 718 <?php echo $page_links; ?> 719 719 </div> 720 720 <?php endif; ?> 721 <ul id="<?php echo $post_type_name; ?>checklist" class="list:<?php echo $post_type_name?>categorychecklist form-no-clear">721 <ul id="<?php echo $post_type_name; ?>checklist" data-wp-lists="list:<?php echo $post_type_name?>" class="categorychecklist form-no-clear"> 722 722 <?php 723 723 $args['walker'] = $walker; 724 724 … … 896 896 <?php echo $page_links; ?> 897 897 </div> 898 898 <?php endif; ?> 899 <ul id="<?php echo $taxonomy_name; ?>checklist" class="list:<?php echo $taxonomy_name?>categorychecklist form-no-clear">899 <ul id="<?php echo $taxonomy_name; ?>checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear"> 900 900 <?php 901 901 $args['walker'] = $walker; 902 902 echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $terms), 0, (object) $args ); … … 927 927 <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false, array( 'id' => 'submit-quick-search-taxonomy-' . $taxonomy_name ) ); ?> 928 928 </p> 929 929 930 <ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?>categorychecklist form-no-clear">930 <ul id="<?php echo $taxonomy_name; ?>-search-checklist" data-wp-lists="list:<?php echo $taxonomy_name?>" class="categorychecklist form-no-clear"> 931 931 <?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?> 932 932 <?php 933 933 $args['walker'] = $walker; -
wp-admin/includes/template.php
421 421 <th>' . __( 'Value' ) . '</th> 422 422 </tr> 423 423 </thead> 424 <tbody id="the-list" class="list:meta">424 <tbody id="the-list" data-wp-lists="list:meta"> 425 425 <tr><td></td></tr> 426 426 </tbody> 427 427 </table>'; //TBODY needed for list-manipulation JS … … 436 436 <th><?php _e( 'Value' ) ?></th> 437 437 </tr> 438 438 </thead> 439 <tbody id='the-list' class='list:meta'>439 <tbody id='the-list' data-wp-lists='list:meta'> 440 440 <?php 441 441 foreach ( $meta as $entry ) 442 442 echo _list_meta_row( $entry, $count ); … … 492 492 $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __( 'Key' ) . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' type='text' size='20' value='{$entry['meta_key']}' />"; 493 493 494 494 $r .= "\n\t\t<div class='submit'>"; 495 $r .= get_submit_button( __( 'Delete' ), "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce deletemeta", "deletemeta[{$entry['meta_id']}]", false);495 $r .= get_submit_button( __( 'Delete' ), 'deletemeta', "deletemeta[{$entry['meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['meta_id']}::_ajax_nonce=$delete_nonce" ) ); 496 496 $r .= "\n\t\t"; 497 $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);497 $r .= get_submit_button( __( 'Update' ), 'updatemeta', "meta-{$entry['meta_id']}-submit", false, array( 'data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta=$update_nonce" ) ); 498 498 $r .= "</div>"; 499 499 $r .= wp_nonce_field( 'change-meta', '_ajax_nonce', false, false ); 500 500 $r .= "</td>"; … … 555 555 </tr> 556 556 557 557 <tr><td colspan="2" class="submit"> 558 <?php submit_button( __( 'Add Custom Field' ), ' add:the-list:newmeta secondary', 'addmeta', false, array( 'id' => 'newmeta-submit' ) ); ?>558 <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?> 559 559 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?> 560 560 </td></tr> 561 561 </tbody> -
wp-admin/js/cat.js
1 1 jQuery(document).ready( function($) { 2 2 var myConfirm = function() { return '' !== $('#newcat').val(); }; 3 $('#jaxcat').prepend('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" class="add:categorychecklist:jaxcat" id="catadd" value="' + catL10n.add + '"/><input type="hidden"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span><span id="cat-ajax-response"></span>');3 $('#jaxcat').prepend('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" data-wp-lists="add:categorychecklist:jaxcat" id="catadd" value="' + catL10n.add + '"/><input type="hidden"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span><span id="cat-ajax-response"></span>'); 4 4 $('#categorychecklist').wpList( { alt: '', response: 'cat-ajax-response', confirm: myConfirm } ); 5 5 } ); -
wp-admin/js/edit-comments.js
35 35 36 36 // Send current total, page, per_page and url 37 37 delBefore = function( settings, list ) { 38 var cl = $(settings.target).attr('class'), id, el, n, h, a, author, action = false;38 var wpListsData = $(settings.target).attr('data-wp-lists'), id, el, n, h, a, author, action = false; 39 39 40 40 settings.data._total = totalInput.val() || 0; 41 41 settings.data._per_page = perPageInput.val() || 0; … … 43 43 settings.data._url = document.location.href; 44 44 settings.data.comment_status = $('input[name="comment_status"]', '#comments-form').val(); 45 45 46 if ( cl.indexOf(':trash=1') != -1 )46 if ( wpListsData.indexOf(':trash=1') != -1 ) 47 47 action = 'trash'; 48 else if ( cl.indexOf(':spam=1') != -1 )48 else if ( wpListsData.indexOf(':spam=1') != -1 ) 49 49 action = 'spam'; 50 50 51 51 if ( action ) { 52 id = cl.replace(/.*?comment-([0-9]+).*/, '$1');52 id = wpListsData.replace(/.*?comment-([0-9]+).*/, '$1'); 53 53 el = $('#comment-' + id); 54 54 note = $('#' + action + '-undo-holder').html(); 55 55 … … 72 72 $('strong', '#undo-' + id).text(author); 73 73 a = $('.undo a', '#undo-' + id); 74 74 a.attr('href', 'comment.php?action=un' + action + 'comment&c=' + id + '&_wpnonce=' + settings.data._ajax_nonce); 75 a.attr(' class', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1 vim-z vim-destructive');75 a.attr('data-wp-lists', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1 vim-z vim-destructive'); 76 76 $('.avatar', el).clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside'); 77 77 78 78 a.click(function(){ … … 279 279 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); 280 280 theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ) 281 281 .bind('wpListDelEnd', function(e, s){ 282 var id = s.element.replace(/[^0-9]+/g, '');282 var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, ''); 283 283 284 if ( s.target.className.indexOf(':trash=1') != -1 || s.target.className.indexOf(':spam=1') != -1 )284 if ( wpListsData.indexOf(':trash=1') != -1 || wpListsData.indexOf(':spam=1') != -1 ) 285 285 $('#undo-' + id).fadeIn(300, function(){ $(this).show() }); 286 286 }); 287 287 }; -
wp-admin/js/inline-edit-tax.js
5 5 init : function() { 6 6 var t = this, row = $('#inline-edit'); 7 7 8 t.type = $('#the-list').attr(' class').substr(5);8 t.type = $('#the-list').attr('data-wp-lists').substr(5); 9 9 t.what = '#'+t.type+'-'; 10 10 11 11 $('.editinline').live('click', function(){ -
wp-admin/press-this.php
506 506 </div> 507 507 508 508 <div id="category-all" class="tabs-panel"> 509 <ul id="categorychecklist" class="list:categorycategorychecklist form-no-clear">509 <ul id="categorychecklist" data-wp-lists="list:category" class="categorychecklist form-no-clear"> 510 510 <?php wp_terms_checklist($post_ID, array( 'taxonomy' => 'category', 'popular_cats' => $popular_ids ) ) ?> 511 511 </ul> 512 512 </div> … … 528 528 <?php echo $tax->labels->parent_item_colon; ?> 529 529 </label> 530 530 <?php wp_dropdown_categories( array( 'taxonomy' => 'category', 'hide_empty' => 0, 'name' => 'newcategory_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $tax->labels->parent_item . ' —' ) ); ?> 531 <input type="button" id="category-add-submit" class="add:categorychecklist:category-addbutton category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" />531 <input type="button" id="category-add-submit" data-wp-lists="add:categorychecklist:category-add" class="button category-add-submit" value="<?php echo esc_attr( $tax->labels->add_new_item ); ?>" /> 532 532 <?php wp_nonce_field( 'add-category', '_ajax_nonce-add-category', false ); ?> 533 533 <span id="category-ajax-response"></span> 534 534 </p> -
wp-admin/user-new.php
267 267 $label = __('E-mail or Username'); 268 268 } 269 269 ?> 270 <form action="" method="post" name="adduser" id="adduser" class=" add:users:validate"<?php do_action('user_new_form_tag');?>>270 <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>> 271 271 <input name="action" type="hidden" value="adduser" /> 272 272 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> 273 273 … … 300 300 echo '<h3 id="create-new-user">' . __( 'Add New User' ) . '</h3>'; 301 301 ?> 302 302 <p><?php _e('Create a brand new user and add it to this site.'); ?></p> 303 <form action="" method="post" name="createuser" id="createuser" class=" add:users:validate"<?php do_action('user_new_form_tag');?>>303 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> 304 304 <input name="action" type="hidden" value="createuser" /> 305 305 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?> 306 306 <?php -
wp-includes/js/wp-lists.js
21 21 return s.nonce || url._ajax_nonce || $('#' + s.element + ' input[name="_ajax_nonce"]').val() || url._wpnonce || $('#' + s.element + ' input[name="_wpnonce"]').val() || 0; 22 22 }, 23 23 24 parse Class: function(e,t) {25 var c = [], cl;24 parseData: function(e,t) { 25 var d = [], wpListsData; 26 26 27 27 try { 28 cl = $(e).attr('class') || '';29 cl = cl.match(new RegExp(t+':[\\S]+'));28 wpListsData = $(e).attr('data-wp-lists') || ''; 29 wpListsData = wpListsData.match(new RegExp(t+':[\\S]+')); 30 30 31 if ( cl)32 c = cl[0].split(':');31 if ( wpListsData ) 32 d = wpListsData[0].split(':'); 33 33 } catch(r) {} 34 34 35 return c;35 return d; 36 36 }, 37 37 38 38 pre: function(e,s,a) { … … 64 64 ajaxAdd: function( e, s ) { 65 65 e = $(e); 66 66 s = s || {}; 67 var list = this, cls = wpList.parseClass(e,'add'), es, valid, formData, res, rres;67 var list = this, data = wpList.parseData(e,'add'), es, valid, formData, res, rres; 68 68 69 69 s = wpList.pre.call( list, e, s, 'add' ); 70 70 71 s.element = cls[2] || e.attr( 'id' ) || s.element || null;71 s.element = data[2] || e.attr( 'id' ) || s.element || null; 72 72 73 if ( cls[3] )74 s.addColor = '#' + cls[3];73 if ( data[3] ) 74 s.addColor = '#' + data[3]; 75 75 else 76 76 s.addColor = s.addColor || '#FFFF33'; 77 77 … … 94 94 if ( !valid ) 95 95 return false; 96 96 97 s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( cls[4] || '' ) ) );97 s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( data[4] || '' ) ) ); 98 98 formData = $.isFunction(es.fieldSerialize) ? es.fieldSerialize() : es.serialize(); 99 99 100 100 if ( formData ) … … 147 147 ajaxDel: function( e, s ) { 148 148 e = $(e); 149 149 s = s || {}; 150 var list = this, cls = wpList.parseClass(e,'delete'), element, res, rres;150 var list = this, data = wpList.parseData(e,'delete'), element, res, rres; 151 151 152 152 s = wpList.pre.call( list, e, s, 'delete' ); 153 153 154 s.element = cls[2] || s.element || null;154 s.element = data[2] || s.element || null; 155 155 156 if ( cls[3] )157 s.delColor = '#' + cls[3];156 if ( data[3] ) 157 s.delColor = '#' + data[3]; 158 158 else 159 159 s.delColor = s.delColor || '#faa'; 160 160 … … 167 167 168 168 s.data = $.extend( 169 169 { action: s.action, id: s.element.split('-').pop(), _ajax_nonce: s.nonce }, 170 wpAjax.unserialize( cls[4] || '' )170 wpAjax.unserialize( data[4] || '' ) 171 171 ); 172 172 173 173 if ( $.isFunction(s.delBefore) ) { … … 221 221 e = $(e); 222 222 s = s || {}; 223 223 224 var list = this, cls = wpList.parseClass(e,'dim'), element, isClass, color, dimColor, res, rres;224 var list = this, data = wpList.parseData(e,'dim'), element, isClass, color, dimColor, res, rres; 225 225 226 226 s = wpList.pre.call( list, e, s, 'dim' ); 227 227 228 s.element = cls[2] || s.element || null;229 s.dimClass = cls[3] || s.dimClass || null;228 s.element = data[2] || s.element || null; 229 s.dimClass = data[3] || s.dimClass || null; 230 230 231 if ( cls[4] )232 s.dimAddColor = '#' + cls[4];231 if ( data[4] ) 232 s.dimAddColor = '#' + data[4]; 233 233 else 234 234 s.dimAddColor = s.dimAddColor || '#FFFF33'; 235 235 236 if ( cls[5] )237 s.dimDelColor = '#' + cls[5];236 if ( data[5] ) 237 s.dimDelColor = '#' + data[5]; 238 238 else 239 239 s.dimDelColor = s.dimDelColor || '#FF3333'; 240 240 … … 247 247 248 248 s.data = $.extend( 249 249 { action: s.action, id: s.element.split('-').pop(), dimClass: s.dimClass, _ajax_nonce : s.nonce }, 250 wpAjax.unserialize( cls[6] || '' )250 wpAjax.unserialize( data[6] || '' ) 251 251 ); 252 252 253 253 if ( $.isFunction(s.dimBefore) ) { … … 393 393 var list = this, 394 394 $el = $(el || document); 395 395 396 $el.delegate( 'form[ class^="add:' + list.id + ':"]', 'submit', function(){396 $el.delegate( 'form[data-wp-lists^="add:' + list.id + ':"]', 'submit', function(){ 397 397 return list.wpList.add(this); 398 398 }); 399 399 400 $el.delegate( 'a[ class^="add:' + list.id + ':"], input[class^="add:' + list.id + ':"]', 'click', function(){400 $el.delegate( 'a[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', 'click', function(){ 401 401 return list.wpList.add(this); 402 402 }); 403 403 404 $el.delegate( '[ class^="delete:' + list.id + ':"]', 'click', function(){404 $el.delegate( '[data-wp-lists^="delete:' + list.id + ':"]', 'click', function(){ 405 405 return list.wpList.del(this); 406 406 }); 407 407 408 $el.delegate( '[ class^="dim:' + list.id + ':"]', 'click', function(){408 $el.delegate( '[data-wp-lists^="dim:' + list.id + ':"]', 'click', function(){ 409 409 return list.wpList.dim(this); 410 410 }); 411 411 }, … … 450 450 this.each( function() { 451 451 var _this = this; 452 452 453 this.wpList = { settings: $.extend( {}, wpList.settings, { what: wpList.parse Class(this,'list')[1] || '' }, settings ) };453 this.wpList = { settings: $.extend( {}, wpList.settings, { what: wpList.parseData(this,'list')[1] || '' }, settings ) }; 454 454 $.each( fs, function(i,f) { _this.wpList[i] = function( e, s ) { return wpList[f].call( _this, e, s ); }; } ); 455 455 } ); 456 456