Skip to content

Commit 2327dd4

Browse files
committed
Theme install style tweaks, see WordPress#8652
git-svn-id: https://develop.svn.wordpress.org/trunk@10788 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6cbdd69 commit 2327dd4

7 files changed

Lines changed: 48 additions & 29 deletions

File tree

wp-admin/css/theme-install.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,26 @@ div.star img {
7474
.theme-listing br.line {
7575
border-bottom: thin solid #ccc;
7676
margin-bottom: 3px;
77-
}
77+
}
78+
79+
#search-field {
80+
padding: 1px;
81+
}
82+
83+
p.popular-tags {
84+
line-height: 1.8em;
85+
}
86+
87+
.available-theme {
88+
text-align: center;
89+
}
90+
91+
#theme-information .available-theme a.screenshot {
92+
border: 0 none;
93+
display: inline;
94+
}
95+
96+
#theme-information .available-theme h3 {
97+
margin: 1em 0;
98+
}
99+

wp-admin/includes/plugin-install.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,7 @@ function install_dashboard() {
125125
<p><?php _e('Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> or upload a plugin in .zip format via this page.') ?></p>
126126

127127
<h4><?php _e('Search') ?></h4>
128-
<?php install_search_form('<a href="' . add_query_arg('show-help', !isset($_REQUEST['show-help'])) .'" onclick="jQuery(\'#search-help\').toggle(); return false;">' . __('[need help?]') . '</a>') ?>
129-
<div id="search-help" style="display: <?php echo isset($_REQUEST['show-help']) ? 'block' : 'none'; ?>;">
130-
<p> <?php _e('You may search based on 3 criteria:') ?><br />
131-
<?php _e('<strong>Term:</strong> Searches plugins names and descriptions for the specified term') ?><br />
132-
<?php _e('<strong>Tag:</strong> Searches for plugins tagged as such') ?><br />
133-
<?php _e('<strong>Author:</strong> Searches for plugins created by the Author, or which the Author contributed to.') ?></p>
134-
</div>
128+
<?php install_search_form(); ?>
135129

136130
<h4><?php _e('Install a plugin in .zip format') ?></h4>
137131
<p><?php _e('If you have a plugin in a .zip format, You may install it by uploading it here.') ?></p>

wp-admin/includes/template.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3380,7 +3380,17 @@ function screen_meta($screen) {
33803380
break;
33813381
case 'options-general':
33823382
if ( !isset($_wp_contextual_help['options-general']) )
3383-
$_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>');
3383+
$_wp_contextual_help['options-general'] = __('<a href="http://codex.wordpress.org/Settings_General_SubPanel" target="_blank">General Settings</a>');
3384+
break;
3385+
case 'theme-install':
3386+
case 'plugin-install':
3387+
if ( !isset($_GET['tab']) || 'dashboard' == $_GET['tab'] )
3388+
$_wp_contextual_help[$screen] = '
3389+
<p><strong>' . __('Search help') . '</strong></p>' .
3390+
'<p>' . __('You may search based on 3 criteria:') . '<br />' .
3391+
__('<strong>Term:</strong> Searches theme names and descriptions for the specified term') . '<br />' .
3392+
__('<strong>Tag:</strong> Searches for themes tagged as such') . '<br />' .
3393+
__('<strong>Author:</strong> Searches for themes created by the Author, or which the Author contributed to.') . "</p>\n";
33843394
break;
33853395
}
33863396

@@ -3448,7 +3458,6 @@ function drag_drop_help() {
34483458
';
34493459
}
34503460

3451-
34523461
function screen_layout($screen) {
34533462
global $screen_layout_columns;
34543463

wp-admin/includes/theme-install.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,7 @@ function install_themes_dashboard() {
142142
?>
143143
<p><?php _e('Search for themes by keyword, author, or tag.') ?></p>
144144

145-
<?php install_theme_search_form('<a href="' . add_query_arg('show-help', !isset($_REQUEST['show-help'])) .'" onclick="jQuery(\'#search-help\').toggle(); return false;">' . __('[need help?]') . '</a>') ?>
146-
<div id="search-help" style="display: <?php echo isset($_REQUEST['show-help']) ? 'block' : 'none'; ?>;">
147-
<p><?php _e('You may search based on 3 criteria:') ?><br />
148-
<?php _e('<strong>Term:</strong> Searches theme names and descriptions for the specified term') ?><br />
149-
<?php _e('<strong>Tag:</strong> Searches for themes tagged as such') ?><br />
150-
<?php _e('<strong>Author:</strong> Searches for themes created by the Author, or which the Author contributed to.') ?></p>
151-
</div>
145+
<?php install_theme_search_form(); ?>
152146

153147
<h4><?php _e('Advanced Search') ?></h4>
154148
<p><?php _e('Tag filter goes here') ?></p>
@@ -168,7 +162,7 @@ function install_themes_dashboard() {
168162
'id' => sanitize_title_with_dashes($tag['name']),
169163
'count' => $tag['count'] );
170164
}
171-
echo '<p>';
165+
echo '<p class="popular-tags">';
172166
echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%d theme'), 'multiple_text' => __('%d themes') ) );
173167
echo '</p><br class="clear" />';
174168
}
@@ -305,7 +299,7 @@ function display_theme($theme, $actions = null, $show_details = true) {
305299
<p><?php echo $desc ?></p>
306300
<?php if ( $show_details ) { ?>
307301
<a href="#theme_detail" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
308-
<div id="themedetaildiv" class="hide-if-js">
302+
<div class="themedetaildiv hide-if-js">
309303
<p><strong><?php _e('Version:') ?></strong> <?php echo wp_kses($theme->version, $themes_allowedtags) ?></p>
310304
<p><strong><?php _e('Author:') ?></strong> <?php echo wp_kses($theme->author, $themes_allowedtags) ?></p>
311305
<?php if ( ! empty($theme->last_updated) ) : ?>

wp-admin/js/theme-preview.dev.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ jQuery(document).ready(function($) {
2424

2525
thickDims()
2626
.click( function() {
27-
var alink = $(this).parents('.available-theme').find('.activatelink'), url = alink.attr('href'), text = alink.html();
27+
var alink = $(this).parents('.available-theme').find('.activatelink'), url = '', text = '';
2828

29-
if ( null == text ) text = '';
29+
if ( alink.length ) {
30+
url = alink.attr('href') || '';
31+
text = alink.html() || '';
32+
}
33+
3034
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
3135
$('#TB_closeAjaxWindow').css({'float':'left'});
3236
$('#TB_ajaxWindowTitle').css({'float':'right'})
@@ -40,11 +44,7 @@ jQuery(document).ready(function($) {
4044

4145
// Theme details disclosure
4246
$('.theme-detail').click(function () {
43-
if ($(this).parents('.available-theme').find('#themedetaildiv').is(":hidden")) {
44-
$(this).parents('.available-theme').find('#themedetaildiv').slideDown("normal");
45-
$(this).hide();
46-
}
47-
47+
$(this).siblings('.themedetaildiv').toggle();
4848
return false;
4949
});
5050
});

wp-admin/js/theme-preview.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wp-includes/script-loader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ function mce_version() {
353353
'l10n_print_after' => 'try{convertEntities(wpGearsL10n);}catch(e){};'
354354
));
355355

356-
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090225' );
356+
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090314' );
357357
$scripts->add_data( 'theme-preview', 'group', 1 );
358358

359359
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery-form', 'suggest' ), '20090125' );
@@ -446,7 +446,7 @@ function wp_default_styles( &$styles ) {
446446
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20081210' );
447447
$styles->add( 'login', '/wp-admin/css/login.css', array(), '20081210' );
448448
$styles->add( 'plugin-install', '/wp-admin/css/plugin-install.css', array(), '20081210' );
449-
$styles->add( 'theme-install', '/wp-admin/css/theme-install.css', array(), '20090227' );
449+
$styles->add( 'theme-install', '/wp-admin/css/theme-install.css', array(), '20090314' );
450450
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
451451

452452
foreach ( $rtl_styles as $rtl_style )

0 commit comments

Comments
 (0)