Make WordPress Core

Changeset 13951


Ignore:
Timestamp:
04/02/2010 11:27:23 PM (14 years ago)
Author:
nacin
Message:

Add AYS to "Install Now" link in plugin installer. fixes #11050

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin-install.php

    r13950 r13951  
    364364                        case 'install':
    365365                            if ( $status['url'] )
    366                                 $action_links[] = '<a href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __('Install Now') . '</a>';
     366                                $action_links[] = '<a class="install-now" href="' . $status['url'] . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __('Install Now') . '</a>';
    367367                            break;
    368368                        case 'update_available':
  • trunk/wp-admin/js/plugin-install.dev.js

    r11422 r13951  
    3939        return false;
    4040    });
     41
     42    $('#install-plugins .action-links .install-now').click( function() {
     43        return confirm( plugininstallL10n.ays );
     44    });
    4145});
  • trunk/wp-admin/js/plugin-install.js

    r11422 r13951  
    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>&nbsp;"+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})});
     1jQuery(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>&nbsp;"+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);});});
  • trunk/wp-includes/script-loader.php

    r13940 r13951  
    363363        ) );
    364364
    365         $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20090520' );
     365        $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20100402' );
    366366        $scripts->add_data( 'plugin-install', 'group', 1 );
    367367        $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
    368368            'plugin_information' => __('Plugin Information:'),
     369            'ays' => __('Are you sure you want to install this plugin?'),
    369370            'l10n_print_after' => 'try{convertEntities(plugininstallL10n);}catch(e){};'
    370371        ) );
Note: See TracChangeset for help on using the changeset viewer.