Remove Plugins dashboard widget. fixes #19573
git-svn-id: http://svn.automattic.com/wordpress/trunk@19628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
301b9aed41
commit
40345f1d63
|
@ -1 +1 @@
|
||||||
body{direction:rtl;width:99.5%;}.rtl #adminmenuback{left:auto;right:0;background-image:none;}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px;}#plupload-upload-ui{zoom:1;}.post-com-count-wrapper a.post-com-count{float:none;}#adminmenu .wp-submenu ul{width:99%;}#adminmenu .wp-submenu .wp-submenu .wp-submenu-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf;}.folded #adminmenu .wp-submenu{right:30px;top:-4px;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px;}#adminmenu .wp-menu-arrow{display:none!important;}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px;}div.quicktags-toolbar input{min-width:0;}.inline-edit-row fieldset label span.title{float:right;}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;}p.search-box{float:left;}#bh{margin:7px 10px 0 0;float:left;}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%;}div#dashboard-widgets{padding-right:0;padding-left:1px;}#dashboard_quick_press h4{text-align:right;}.tagchecklist span a{margin:4px -9px 0 0;}.widefat th input{margin:0 5px 0 0;}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important;}#dashboard_plugins{direction:ltr;}#dashboard_plugins h3.hndle{direction:rtl;}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%;}#post-status-info{height:25px;}p.submit{height:22px;}.inner-sidebar{position:static;}form#widgets-filter{position:static;}.menu-item-depth-0{margin-left:0;}.menu-item-depth-1{margin-left:-30px;}.menu-item-depth-2{margin-left:-60px;}.menu-item-depth-3{margin-left:-90px;}.menu-item-depth-4{margin-left:-120px;}.menu-item-depth-5{margin-left:-150px;}.menu-item-depth-6{margin-left:-180px;}.menu-item-depth-7{margin-left:-210px;}.menu-item-depth-8{margin-left:-240px;}.menu-item-depth-9{margin-left:-270px;}.menu-item-depth-10{margin-left:-300px;}.menu-item-depth-11{margin-left:-330px;}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1;}.nav-menus-php label{max-width:90%!important;}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%;}.nav-menus-php .major-publishing-actions .publishing-action{float:none;}#wpbody #nav-menu-header label{float:none;}#nav-menu-header{margin-top:-10px;}#nav-menu-footer{margin-bottom:-20px;}#update-nav-menu .publishing-action{max-width:200px;}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left;}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px;}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important;}.auto-add-pages{clear:both;float:none;}#nav-menus-frame .open-label span{float:none;display:inline-block;}#nav-menus-frame .delete-action{float:none;}
|
body{direction:rtl;width:99.5%;}.rtl #adminmenuback{left:auto;right:0;background-image:none;}.rtl #adminmenuback,.rtl #adminmenuwrap{border-width:0 0 0 1px;}#plupload-upload-ui{zoom:1;}.post-com-count-wrapper a.post-com-count{float:none;}#adminmenu .wp-submenu ul{width:99%;}#adminmenu .wp-submenu .wp-submenu .wp-submenu-wrap,#adminmenu .wp-menu-open .wp-submenu .wp-submenu-wrap{border:1px solid #dfdfdf;}.folded #adminmenu .wp-submenu{right:30px;top:-4px;}#adminmenu .wp-submenu .wp-submenu-head{padding:6px 10px 6px 4px;}#adminmenu .wp-menu-arrow{display:none!important;}#wpcontent #adminmenu .wp-submenu li.wp-submenu-head{padding:3px 10px 4px 4px;}div.quicktags-toolbar input{min-width:0;}.inline-edit-row fieldset label span.title{float:right;}.inline-edit-row fieldset label span.input-text-wrap{margin-right:0;}p.search-box{float:left;}#bh{margin:7px 10px 0 0;float:left;}.postbox div.inside,.wp-editor-wrap .wp-editor-container .wp-editor-area,#nav-menu-theme-locations .howto select{width:97.5%;}div#dashboard-widgets{padding-right:0;padding-left:1px;}#dashboard_quick_press h4{text-align:right;}.tagchecklist span a{margin:4px -9px 0 0;}.widefat th input{margin:0 5px 0 0;}#TB_window{width:670px;position:absolute;top:50%;left:50%;margin-right:335px!important;}#dashboard_incoming_links ul li,#dashboard_secondary ul li,#dashboard_primary ul li,p.row-actions{width:100%;}#post-status-info{height:25px;}p.submit{height:22px;}.inner-sidebar{position:static;}form#widgets-filter{position:static;}.menu-item-depth-0{margin-left:0;}.menu-item-depth-1{margin-left:-30px;}.menu-item-depth-2{margin-left:-60px;}.menu-item-depth-3{margin-left:-90px;}.menu-item-depth-4{margin-left:-120px;}.menu-item-depth-5{margin-left:-150px;}.menu-item-depth-6{margin-left:-180px;}.menu-item-depth-7{margin-left:-210px;}.menu-item-depth-8{margin-left:-240px;}.menu-item-depth-9{margin-left:-270px;}.menu-item-depth-10{margin-left:-300px;}.menu-item-depth-11{margin-left:-330px;}#menu-management,.nav-menus-php .menu-edit,#nav-menu-header .submitbox{zoom:1;}.nav-menus-php label{max-width:90%!important;}p.button-controls,.nav-menus-php .tabs-panel{max-width:90%;}.nav-menus-php .major-publishing-actions .publishing-action{float:none;}#wpbody #nav-menu-header label{float:none;}#nav-menu-header{margin-top:-10px;}#nav-menu-footer{margin-bottom:-20px;}#update-nav-menu .publishing-action{max-width:200px;}#nav-menus-frame #update-nav-menu .delete-action{margin-top:-25px;float:left;}#menu-to-edit li{margin-top:-10px;margin-bottom:-10px;}.sortable-placeholder{margin-top:0!important;margin-left:0!important;margin-bottom:13px!important;padding:0!important;}.auto-add-pages{clear:both;float:none;}#nav-menus-frame .open-label span{float:none;display:inline-block;}#nav-menus-frame .delete-action{float:none;}
|
|
@ -103,14 +103,6 @@ div#dashboard-widgets {
|
||||||
margin-right: 335px !important;
|
margin-right: 335px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard_plugins {
|
|
||||||
direction: ltr;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_plugins h3.hndle {
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_incoming_links ul li,
|
#dashboard_incoming_links ul li,
|
||||||
#dashboard_secondary ul li,
|
#dashboard_secondary ul li,
|
||||||
#dashboard_primary ul li,
|
#dashboard_primary ul li,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1749,8 +1749,6 @@ ol.ol-decimal {
|
||||||
#dashboard_right_now p.sub,
|
#dashboard_right_now p.sub,
|
||||||
#dashboard-widgets h4,
|
#dashboard-widgets h4,
|
||||||
a.rsswidget,
|
a.rsswidget,
|
||||||
#dashboard_plugins h4,
|
|
||||||
#dashboard_plugins h5,
|
|
||||||
#dashboard_recent_comments .comment-meta .approve {
|
#dashboard_recent_comments .comment-meta .approve {
|
||||||
font-family: Tahoma, Arial;
|
font-family: Tahoma, Arial;
|
||||||
}
|
}
|
||||||
|
@ -1789,11 +1787,6 @@ a.rsswidget,
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dashboard_plugins .inside span {
|
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard-widgets h3 .postbox-title-action {
|
#dashboard-widgets h3 .postbox-title-action {
|
||||||
right: auto;
|
right: auto;
|
||||||
left: 30px;
|
left: 30px;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -683,7 +683,6 @@ div.error p {
|
||||||
|
|
||||||
div.sidebar-name h3,
|
div.sidebar-name h3,
|
||||||
#menu-management .nav-tab,
|
#menu-management .nav-tab,
|
||||||
#dashboard_plugins h5,
|
|
||||||
a.rsswidget,
|
a.rsswidget,
|
||||||
#dashboard_right_now td.b,
|
#dashboard_right_now td.b,
|
||||||
#dashboard-widgets h4,
|
#dashboard-widgets h4,
|
||||||
|
@ -5840,33 +5839,6 @@ a.rsswidget {
|
||||||
content: '\2014';
|
content: '\2014';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Plugins */
|
|
||||||
#dashboard_plugins h4 {
|
|
||||||
line-height: 1.7em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_plugins h5 {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 13px;
|
|
||||||
margin: 0;
|
|
||||||
display: inline;
|
|
||||||
line-height: 1.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_plugins h5 a {
|
|
||||||
line-height: 1.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_plugins .inside span {
|
|
||||||
font-size: 12px;
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#dashboard_plugins p {
|
|
||||||
margin: 0.3em 0 1.4em;
|
|
||||||
line-height: 1.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-comment-wrap {
|
.dashboard-comment-wrap {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
|
@ -70,10 +70,6 @@ function wp_dashboard_setup() {
|
||||||
wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );
|
wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// WP Plugins Widget
|
|
||||||
if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) )
|
|
||||||
wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' );
|
|
||||||
|
|
||||||
// QuickPress Widget
|
// QuickPress Widget
|
||||||
if ( is_blog_admin() && current_user_can('edit_posts') )
|
if ( is_blog_admin() && current_user_can('edit_posts') )
|
||||||
wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' );
|
wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' );
|
||||||
|
@ -934,95 +930,6 @@ function wp_dashboard_secondary_output() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_dashboard_plugins() {
|
|
||||||
wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(
|
|
||||||
'http://wordpress.org/extend/plugins/rss/browse/popular/',
|
|
||||||
'http://wordpress.org/extend/plugins/rss/browse/new/',
|
|
||||||
'http://wordpress.org/extend/plugins/rss/browse/updated/'
|
|
||||||
) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display plugins most popular, newest plugins, and recently updated widget text.
|
|
||||||
*
|
|
||||||
* @since 2.5.0
|
|
||||||
*/
|
|
||||||
function wp_dashboard_plugins_output() {
|
|
||||||
$popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' );
|
|
||||||
$new = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' );
|
|
||||||
$updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' );
|
|
||||||
|
|
||||||
if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
|
|
||||||
$plugin_slugs = array_keys( get_plugins() );
|
|
||||||
set_transient( 'plugin_slugs', $plugin_slugs, 86400 );
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) {
|
|
||||||
if ( is_wp_error($$feed) || !$$feed->get_item_quantity() )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
$items = $$feed->get_items(0, 5);
|
|
||||||
|
|
||||||
// Pick a random, non-installed plugin
|
|
||||||
while ( true ) {
|
|
||||||
// Abort this foreach loop iteration if there's no plugins left of this type
|
|
||||||
if ( 0 == count($items) )
|
|
||||||
continue 2;
|
|
||||||
|
|
||||||
$item_key = array_rand($items);
|
|
||||||
$item = $items[$item_key];
|
|
||||||
|
|
||||||
list($link, $frag) = explode( '#', $item->get_link() );
|
|
||||||
|
|
||||||
$link = esc_url($link);
|
|
||||||
if ( preg_match( '|/([^/]+?)/?$|', $link, $matches ) )
|
|
||||||
$slug = $matches[1];
|
|
||||||
else {
|
|
||||||
unset( $items[$item_key] );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Is this random plugin's slug already installed? If so, try again.
|
|
||||||
reset( $plugin_slugs );
|
|
||||||
foreach ( $plugin_slugs as $plugin_slug ) {
|
|
||||||
if ( $slug == substr( $plugin_slug, 0, strlen( $slug ) ) ) {
|
|
||||||
unset( $items[$item_key] );
|
|
||||||
continue 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we get to this point, then the random plugin isn't installed and we can stop the while().
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Eliminate some common badly formed plugin descriptions
|
|
||||||
while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
|
|
||||||
unset($items[$item_key]);
|
|
||||||
|
|
||||||
if ( !isset($items[$item_key]) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// current bbPress feed item titles are: user on "topic title"
|
|
||||||
if ( preg_match( '/"(.*)"/s', $item->get_title(), $matches ) )
|
|
||||||
$title = $matches[1];
|
|
||||||
else // but let's make it forward compatible if things change
|
|
||||||
$title = $item->get_title();
|
|
||||||
$title = esc_html( $title );
|
|
||||||
|
|
||||||
$description = esc_html( strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset'))) );
|
|
||||||
|
|
||||||
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) .
|
|
||||||
'&TB_iframe=true&width=600&height=800';
|
|
||||||
|
|
||||||
echo "<h4>$label</h4>\n";
|
|
||||||
echo "<h5><a href='$link'>$title</a></h5> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";
|
|
||||||
echo "<p>$description</p>\n";
|
|
||||||
|
|
||||||
$$feed->__destruct();
|
|
||||||
unset($$feed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks to see if all of the feed url in $check_urls are cached.
|
* Checks to see if all of the feed url in $check_urls are cached.
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,10 +31,6 @@ case 'dashboard_secondary' :
|
||||||
wp_dashboard_secondary();
|
wp_dashboard_secondary();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'dashboard_plugins' :
|
|
||||||
wp_dashboard_plugins();
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -33,7 +33,6 @@ jQuery(document).ready( function($) {
|
||||||
'dashboard_incoming_links',
|
'dashboard_incoming_links',
|
||||||
'dashboard_primary',
|
'dashboard_primary',
|
||||||
'dashboard_secondary',
|
'dashboard_secondary',
|
||||||
'dashboard_plugins'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
ajaxPopulateWidgets = function(el) {
|
ajaxPopulateWidgets = function(el) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(c){var d=c("#welcome-panel"),a=c("#wp_welcome_panel-hide"),b=function(e){c.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:c("#welcomepanelnonce").val()})};if(d.hasClass("hidden")&&a.prop("checked")){d.removeClass("hidden")}c(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(f){f.preventDefault();d.addClass("hidden");b(0);c("#wp_welcome_panel-hide").prop("checked",false)});a.click(function(){d.toggleClass("hidden",!this.checked);b(this.checked?1:0)});ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary","dashboard_plugins"];ajaxPopulateWidgets=function(f){function e(g,k){var j,h=c("#"+k+" div.inside:visible").find(".widget-loading");if(h.length){j=h.parent();setTimeout(function(){j.load(ajaxurl.replace("/admin-ajax.php","")+"/index-extra.php?jax="+k,"",function(){j.hide().slideDown("normal",function(){c(this).css("display","")})})},g*500)}}if(f){f=f.toString();if(c.inArray(f,ajaxWidgets)!=-1){e(0,f)}}else{c.each(ajaxWidgets,e)}};ajaxPopulateWidgets();postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",true);if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",false);c("#dashboard_quick_press ul").next("p").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();quickPressLoad()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};quickPressLoad()});
|
var ajaxWidgets,ajaxPopulateWidgets,quickPressLoad;jQuery(document).ready(function(c){var d=c("#welcome-panel"),a=c("#wp_welcome_panel-hide"),b=function(e){c.post(ajaxurl,{action:"update-welcome-panel",visible:e,welcomepanelnonce:c("#welcomepanelnonce").val()})};if(d.hasClass("hidden")&&a.prop("checked")){d.removeClass("hidden")}c(".welcome-panel-close, .welcome-panel-dismiss a",d).click(function(f){f.preventDefault();d.addClass("hidden");b(0);c("#wp_welcome_panel-hide").prop("checked",false)});a.click(function(){d.toggleClass("hidden",!this.checked);b(this.checked?1:0)});ajaxWidgets=["dashboard_incoming_links","dashboard_primary","dashboard_secondary",];ajaxPopulateWidgets=function(f){function e(g,k){var j,h=c("#"+k+" div.inside:visible").find(".widget-loading");if(h.length){j=h.parent();setTimeout(function(){j.load(ajaxurl.replace("/admin-ajax.php","")+"/index-extra.php?jax="+k,"",function(){j.hide().slideDown("normal",function(){c(this).css("display","")})})},g*500)}}if(f){f=f.toString();if(c.inArray(f,ajaxWidgets)!=-1){e(0,f)}}else{c.each(ajaxWidgets,e)}};ajaxPopulateWidgets();postboxes.add_postbox_toggles(pagenow,{pbshow:ajaxPopulateWidgets});quickPressLoad=function(){var e=c("#quickpost-action"),f;f=c("#quick-press").submit(function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","visible");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",true);if("post"==e.val()){e.val("post-quickpress-publish")}c("#dashboard_quick_press div.inside").load(f.attr("action"),f.serializeArray(),function(){c("#dashboard_quick_press #publishing-action img.waiting").css("visibility","hidden");c('#quick-press .submit input[type="submit"], #quick-press .submit input[type="reset"]').prop("disabled",false);c("#dashboard_quick_press ul").next("p").remove();c("#dashboard_quick_press ul").find("li").each(function(){c("#dashboard_recent_drafts ul").prepend(this)}).end().remove();quickPressLoad()});return false});c("#publish").click(function(){e.val("post-quickpress-publish")})};quickPressLoad()});
|
|
@ -27,7 +27,7 @@ jQuery(document).ready(function($) {
|
||||||
|
|
||||||
$(window).resize(function(){ tb_position(); });
|
$(window).resize(function(){ tb_position(); });
|
||||||
|
|
||||||
$('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function() {
|
$('.plugins a.thickbox').click( function() {
|
||||||
tb_click.call(this);
|
tb_click.call(this);
|
||||||
|
|
||||||
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
|
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var tb_position;jQuery(document).ready(function(a){tb_position=function(){var f=a("#TB_window"),e=a(window).width(),d=a(window).height(),c=(720<e)?720:e,b=0;if(a("body.admin-bar").length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a("#TB_iframeContent").width(c-50).height(d-75-b);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:20+b+"px","margin-top":"0"})}}return a("a.thickbox").each(function(){var g=a(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");a(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85-b))})};a(window).resize(function(){tb_position()});a("#dashboard_plugins a.thickbox, .plugins a.thickbox").click(function(){tb_click.call(this);a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+a(this).attr("title"));return false});a("#plugin-information #sidemenu a").click(function(){var b=a(this).attr("name");a("#plugin-information-header a.current").removeClass("current");a(this).addClass("current");a("#section-holder div.section").hide();a("#section-"+b).show();return false});a("a.install-now").click(function(){return confirm(plugininstallL10n.ays)})});
|
var tb_position;jQuery(document).ready(function(a){tb_position=function(){var f=a("#TB_window"),e=a(window).width(),d=a(window).height(),c=(720<e)?720:e,b=0;if(a("body.admin-bar").length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a("#TB_iframeContent").width(c-50).height(d-75-b);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:20+b+"px","margin-top":"0"})}}return a("a.thickbox").each(function(){var g=a(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");a(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85-b))})};a(window).resize(function(){tb_position()});a(".plugins a.thickbox").click(function(){tb_click.call(this);a("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});a("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong> "+a(this).attr("title"));return false});a("#plugin-information #sidemenu a").click(function(){var b=a(this).attr("name");a("#plugin-information-header a.current").removeClass("current");a(this).addClass("current");a("#section-holder div.section").hide();a("#section-"+b).show();return false});a("a.install-now").click(function(){return confirm(plugininstallL10n.ays)})});
|
Loading…
Reference in New Issue