Ticket #18289: 18289.diff
File 18289.diff, 6.2 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/plugin-install.php
261 261 if ( empty($section) || ! isset($api->sections[ $section ]) ) 262 262 $section = array_shift( $section_titles = array_keys((array)$api->sections) ); 263 263 264 iframe_header( __('Plugin Install') );265 264 echo "<div id='$tab-header'>\n"; 266 265 echo "<ul id='sidemenu'>\n"; 267 266 foreach ( (array)$api->sections as $section_name => $content ) { … … 362 361 echo "\t</div>\n"; 363 362 } 364 363 echo "</div>\n"; 365 366 iframe_footer(); 364 367 365 exit; 368 366 } 369 add_action('install_plugins_pre_plugin-information', 'install_plugin_information'); 367 add_action('install_plugins_pre_plugin-information', 'install_plugin_information'); 368 No newline at end of file -
wp-admin/includes/class-wp-plugin-install-list-table.php
187 187 $author = wp_kses( $author, $plugins_allowedtags ); 188 188 189 189 $action_links = array(); 190 $action_links[] = '<a href=" ' . self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .191 '&TB_iframe=true&width=600&height=550' ) . '" class="thickbox" title="' .192 esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'Details' ) . '</a>';190 $action_links[] = '<a href="http://wordpress.org/extend/plugins/' . $plugin['slug'] . '/" 191 class="infoinline" name="' . $plugin['slug'] . '" 192 title="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'Details' ) . '</a>'; 193 193 194 194 if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { 195 195 $status = install_plugin_install_status( $plugin ); -
wp-admin/js/plugin-install.dev.js
1 /* Plugin Browser Thickbox related JS*/2 var tb_position;3 1 jQuery(document).ready(function($) { 4 tb_position = function() { 5 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; 6 7 if ( $('body.admin-bar').length ) 8 adminbar_height = 28; 9 10 if ( tbWindow.size() ) { 11 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 12 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 13 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 14 if ( typeof document.body.style.maxWidth != 'undefined' ) 15 tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'}); 16 }; 17 18 return $('a.thickbox').each( function() { 19 var href = $(this).attr('href'); 20 if ( ! href ) 21 return; 22 href = href.replace(/&width=[0-9]+/g, ''); 23 href = href.replace(/&height=[0-9]+/g, ''); 24 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 - adminbar_height ) ); 25 }); 26 }; 27 28 $(window).resize(function(){ tb_position(); }); 29 30 $('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function() { 31 tb_click.call(this); 32 33 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 34 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') ); 35 return false; 2 $('a.infoinline').click(function(e) { 3 if ($('#plugin-information').length < 1 ) { 4 $('<tr id="plugin-information"><td colspan="4"><div id="plugin-loading"><img src="' + ajaxurl.replace( '/admin-ajax.php', '' ) + '/images/loading.gif" alt="Loading..."></div></td></tr>').insertAfter($(this).parents('tr')); 5 6 $('#plugin-information td').load(ajaxurl.replace( '/admin-ajax.php', '' ) + '/plugin-install.php?tab=plugin-information&plugin=' + $(this).attr('name'), function() { 7 $('#plugin-loading').remove(); 8 $(this).wrapInner('<div style="display: none;"></div>').parent().find('td > div').slideDown('slow'); 9 }); 10 11 $(this).text('Close Details'); 12 } else { 13 $('#plugin-information td > div').slideUp('slow', function() { 14 $('#plugin-information').remove(); 15 }); 16 17 $(this).text('Details'); 18 } 19 20 e.preventDefault(); 36 21 }); 37 38 /* Plugin install related JS*/ 39 $('#plugin-information #sidemenu a').click( function() { 22 23 $('#plugin-information #sidemenu a').live('click', function(e) { 40 24 var tab = $(this).attr('name'); 41 25 //Flip the tab 42 26 $('#plugin-information-header a.current').removeClass('current'); … … 44 28 //Flip the content. 45 29 $('#section-holder div.section').hide(); //Hide 'em all 46 30 $('#section-' + tab).show(); 47 return false; 31 32 e.preventDefault(); 48 33 }); 49 34 50 35 $('a.install-now').click( function() { 51 36 return confirm( plugininstallL10n.ays ); 52 37 }); 53 }); 38 }); 39 No newline at end of file -
wp-admin/plugin-install.php
29 29 30 30 wp_enqueue_style( 'plugin-install' ); 31 31 wp_enqueue_script( 'plugin-install' ); 32 if ( 'plugin-information' != $tab )33 add_thickbox();34 32 35 33 $body_id = $tab; 36 34 -
wp-admin/css/plugin-install.dev.css
1 #plugin-loading { 2 padding: 5px 0; 3 text-align: center; 4 } 5 1 6 /* NOTE: the following CSS rules(.star*) are taken more or less straight from the bbPress rating plugin. */ 2 7 div.star-holder { 3 8 position: relative; … … 40 45 height: 19px; 41 46 } 42 47 43 /* Header on thickbox */ 48 #plugin-information td { 49 background: #fff; 50 padding: 0; 51 } 52 44 53 #plugin-information-header { 45 54 margin: 0; 46 55 padding: 0 5px; … … 58 67 bottom: -1px; 59 68 } 60 69 70 #plugin-information .updated p { 71 margin: 0.5em 0; 72 } 73 61 74 /* Install sidemenu */ 62 75 #plugin-information p.action-button { 63 76 width: 100%;