Add AYS to "Install Now" link in plugin installer. fixes #11050
git-svn-id: http://svn.automattic.com/wordpress/trunk@13951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d23bb077c3
commit
e7486800d9
|
@ -363,7 +363,7 @@ function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
|||
switch ( $status['status'] ) {
|
||||
case 'install':
|
||||
if ( $status['url'] )
|
||||
$action_links[] = '<a href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __('Install Now') . '</a>';
|
||||
$action_links[] = '<a class="install-now" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __('Install Now') . '</a>';
|
||||
break;
|
||||
case 'update_available':
|
||||
if ( $status['url'] )
|
||||
|
|
|
@ -38,4 +38,8 @@ jQuery(document).ready(function($) {
|
|||
$('#section-' + tab).show();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#install-plugins .action-links .install-now').click( function() {
|
||||
return confirm( plugininstallL10n.ays );
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720<e)?720:e;if(f.size()){f.width(c-50).height(d-45);b("#TB_iframeContent").width(c-50).height(d-75);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(!(b.browser.msie&&b.browser.version.substr(0,1)<7)){f.css({top:"20px","margin-top":"0"})}}return b("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var g=b(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");b(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85))})};a().click(function(){b("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});b("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+b(this).attr("title"));return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false})});
|
||||
jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720<e)?720:e;if(f.size()){f.width(c-50).height(d-45);b("#TB_iframeContent").width(c-50).height(d-75);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(!(b.browser.msie&&b.browser.version.substr(0,1)<7)){f.css({top:"20px","margin-top":"0"})}}return b("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var g=b(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");b(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85))})};a().click(function(){b("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});b("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+b(this).attr("title"));return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false});b('#install-plugins .action-links .install-now').click(function(){return confirm( plugininstallL10n.ays);});});
|
|
@ -362,10 +362,11 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20090520' );
|
||||
$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20100402' );
|
||||
$scripts->add_data( 'plugin-install', 'group', 1 );
|
||||
$scripts->localize( 'plugin-install', 'plugininstallL10n', array(
|
||||
'plugin_information' => __('Plugin Information:'),
|
||||
'ays' => __('Are you sure you want to install this plugin?'),
|
||||
'l10n_print_after' => 'try{convertEntities(plugininstallL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue