Changeset 29226
- Timestamp:
- 07/18/2014 08:48:28 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r29206 r29226 109 109 update_option( 'recently_activated', $recently_activated ); 110 110 } 111 112 $plugin_info = get_site_transient( 'update_plugins' ); 111 113 112 114 foreach ( (array) $plugins['all'] as $plugin_file => $plugin_data ) { 115 // Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide. 116 if ( isset( $plugin_info->response[ $plugin_file ] ) ) { 117 $plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data ); 118 } elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) { 119 $plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data ); 120 } 121 113 122 // Filter into individual sections 114 123 if ( is_multisite() && ! $screen->in_admin( 'network' ) && is_network_only_plugin( $plugin_file ) && ! is_plugin_active( $plugin_file ) ) { … … 345 354 'deactivate' => '', 346 355 'activate' => '', 356 'details' => '', 347 357 'edit' => '', 348 358 'delete' => '', … … 393 403 $actions['delete'] = '<a href="' . wp_nonce_url('plugins.php?action=delete-selected&checked[]=' . $plugin_file . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins') . '" title="' . esc_attr__('Delete this plugin') . '" class="delete">' . __('Delete') . '</a>'; 394 404 } // end if $is_active 405 395 406 } // end if $screen->in_admin( 'network' ) 407 408 // Details link using API info, if available 409 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && isset( $plugin_data['slug'] ) ) { 410 $actions['details'] = sprintf( '<a href="%s" class="thickbox" title="%s">%s</a>', 411 esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . 412 '&TB_iframe=true&width=600&height=550' ) ), 413 esc_attr( sprintf( __( 'More information about %s' ), $plugin_data['Name'] ) ), 414 __( 'Details' ) ); 415 } 396 416 397 417 if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) -
trunk/src/wp-includes/update.php
r28823 r29226 278 278 'translations' => json_encode( $translations ), 279 279 'locale' => json_encode( $locales ), 280 'all' => json_encode( true ), 280 281 ), 281 282 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) … … 304 305 } 305 306 unset( $plugin ); 307 foreach ( $response['no_update'] as &$plugin ) { 308 $plugin = (object) $plugin; 309 } 310 unset( $plugin ); 306 311 307 312 if ( is_array( $response ) ) { 308 313 $new_option->response = $response['plugins']; 309 314 $new_option->translations = $response['translations']; 315 // TODO: Perhaps better to store no_update in a separate transient with an expiry? 316 $new_option->no_update = $response['no_update']; 310 317 } else { 311 318 $new_option->response = array(); 312 319 $new_option->translations = array(); 320 $new_option->no_update = array(); 313 321 } 314 322
Note: See TracChangeset
for help on using the changeset viewer.