Ticket #15318: 2010-11-13_1646.diff
| File 2010-11-13_1646.diff, 5.2 KB (added by edward mindreantre, 3 years ago) |
|---|
-
wp-admin/includes/class-wp-plugins-list-table.php
383 383 $actions = apply_filters( "plugin_action_links_$plugin_file", $actions, $plugin_file, $plugin_data, $context ); 384 384 385 385 $class = $is_active ? 'active' : 'inactive'; 386 $checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' />"; 386 $checkbox_id = md5($plugin_data['Name']) . "_checkbox"; 387 $checkbox = in_array( $status, array( 'mustuse', 'dropins' ) ) ? '' : "<input type='checkbox' name='checked[]' value='" . esc_attr( $plugin_file ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $plugin_data['Name'] . "</label>"; 387 388 if ( 'dropins' != $status ) { 388 389 $description = '<p>' . $plugin_data['Description'] . '</p>'; 389 390 $plugin_name = $plugin_data['Name']; … … 394 395 echo " 395 396 <tr id='$id' class='$class'> 396 397 <th scope='row' class='check-column'>$checkbox</th> 397 <td class='plugin-title'><strong>$plugin_name</strong></td> 398 <td class='desc'>$description</td> 399 </tr> 400 <tr class='$class second'> 401 <td></td> 402 <td class='plugin-title'>"; 403 398 <td class='plugin-title'> 399 <strong>$plugin_name</strong> 400 "; 401 404 402 echo $this->row_actions( $actions, true ); 405 403 406 echo "</td> 407 <td class='desc'>"; 408 $plugin_meta = array(); 409 if ( !empty( $plugin_data['Version'] ) ) 410 $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); 411 if ( !empty( $plugin_data['Author'] ) ) { 412 $author = $plugin_data['Author']; 413 if ( !empty( $plugin_data['AuthorURI'] ) ) 414 $author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . __( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>'; 415 $plugin_meta[] = sprintf( __( 'By %s' ), $author ); 416 } 417 if ( ! empty( $plugin_data['PluginURI'] ) ) 418 $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>'; 404 echo " 405 </td> 406 <td class='column-description desc'> 407 <div class='plugin-description'> 408 $description 409 </div> 410 <div class='$class second plugin-version-author-uri'> 411 "; 412 413 $plugin_meta = array(); 414 if ( !empty( $plugin_data['Version'] ) ) 415 $plugin_meta[] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); 416 if ( !empty( $plugin_data['Author'] ) ) { 417 $author = $plugin_data['Author']; 418 if ( !empty( $plugin_data['AuthorURI'] ) ) 419 $author = '<a href="' . $plugin_data['AuthorURI'] . '" title="' . __( 'Visit author homepage' ) . '">' . $plugin_data['Author'] . '</a>'; 420 $plugin_meta[] = sprintf( __( 'By %s' ), $author ); 421 } 422 if ( ! empty( $plugin_data['PluginURI'] ) ) 423 $plugin_meta[] = '<a href="' . $plugin_data['PluginURI'] . '" title="' . __( 'Visit plugin site' ) . '">' . __( 'Visit plugin site' ) . '</a>'; 424 425 $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); 426 echo implode( ' | ', $plugin_meta ); 419 427 420 $plugin_meta = apply_filters( 'plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $status ); 421 echo implode( ' | ', $plugin_meta ); 422 echo "</td> 423 </tr>\n"; 428 echo " 429 </div> 430 </td> 431 </tr> 432 "; 424 433 425 434 do_action( 'after_plugin_row', $plugin_file, $plugin_data, $status ); 426 435 do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status ); -
wp-admin/js/common.dev.js
123 123 // show/hide/save table columns 124 124 columns = { 125 125 init : function() { 126 var that = this;127 $('.hide-column-tog', '#adv-settings').click( function() {128 var $t = $(this), column = $t.val();129 if ( $t.attr('checked') )130 that.checked(column);131 else132 that.unchecked(column);133 126 127 this.toggleView( $('.hide-column-tog', '#adv-settings').attr('checked'), $('.hide-column-tog', '#adv-settings').val() ); 128 $('.column-name').css("width", "auto"); // Otherwise it only wants 50% column width... 129 130 $('.hide-column-tog', '#adv-settings').click( function() { 131 columns.toggleView( $(this).attr('checked'), $(this).val() ); 134 132 columns.saveManageColumnsState(); 135 133 }); 136 134 }, 135 136 toggleView : function(checked, column) { 137 if ( checked ) 138 this.checked(column); 139 else 140 this.unchecked(column); 141 }, 137 142 138 143 saveManageColumnsState : function() { 139 144 var hidden = this.hidden(); -
wp-admin/js/list-table.dev.js
65 65 data = $.query.get(); 66 66 67 67 this._callback = callback; 68 68 69 69 this.fetch_list( 70 70 data, 71 71 $.proxy(this, 'handle_success'), … … 107 107 $('.current-page').val($.query.GET('paged')); 108 108 109 109 $('th.column-cb :input').attr('checked', false); 110 111 columns.init(); // To rehide the hidden columns. 110 112 111 113 if ( this._callback ) 112 114 this._callback();