mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 14:53:08 +02:00
Themes: Use Customizer deep-links inside the theme modal.
props DrewAPicture, ocean90. see #25569, #25571. fixes #30553. Built from https://develop.svn.wordpress.org/trunk@30793 git-svn-id: http://core.svn.wordpress.org/trunk@30783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
93078d7d9f
commit
332e0a7f82
@ -580,6 +580,12 @@ body.folded .theme-overlay .theme-wrap {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* Hide-if-customize for items we can't add classes to */
|
||||
.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],
|
||||
.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.broken-themes a.delete-theme,
|
||||
.theme-overlay .theme-actions .delete-theme {
|
||||
color: #a00;
|
||||
|
@ -580,6 +580,12 @@ body.folded .theme-overlay .theme-wrap {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* Hide-if-customize for items we can't add classes to */
|
||||
.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-header"],
|
||||
.customize-support .theme-overlay .theme-actions a[href="themes.php?page=custom-background"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.broken-themes a.delete-theme,
|
||||
.theme-overlay .theme-actions .delete-theme {
|
||||
color: #a00;
|
||||
|
2
wp-admin/css/wp-admin-rtl.min.css
vendored
2
wp-admin/css/wp-admin-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
2
wp-admin/css/wp-admin.min.css
vendored
2
wp-admin/css/wp-admin.min.css
vendored
File diff suppressed because one or more lines are too long
@ -164,22 +164,33 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
|
||||
continue;
|
||||
// 0 = name, 1 = capability, 2 = file
|
||||
if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) )
|
||||
$class = ' class="current"';
|
||||
$class = ' current';
|
||||
if ( !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook))
|
||||
$current_theme_actions[] = "<a class='button button-secondary' href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
$current_theme_actions[] = "<a class='button button-secondary$class' href='admin.php?page={$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
|
||||
else
|
||||
$current_theme_actions[] = "<a class='button button-secondary' href='{$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>";
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
$current_theme_actions[] = "<a class='button button-secondary$class' href='{$submenu[$item[2]][0][2]}'>{$item[0]}</a>";
|
||||
} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
|
||||
$menu_file = $item[2];
|
||||
if ( false !== ( $pos = strpos( $menu_file, '?' ) ) )
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
if ( 'custom-header' === $menu_file ) {
|
||||
$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=header_image'>{$item[0]}</a>";
|
||||
} elseif ( 'custom-background' === $menu_file ) {
|
||||
$current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='customize.php?autofocus[control]=background_image'>{$item[0]}</a>";
|
||||
}
|
||||
}
|
||||
|
||||
if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
|
||||
$menu_file = substr( $menu_file, 0, $pos );
|
||||
}
|
||||
|
||||
if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) {
|
||||
$current_theme_actions[] = "<a class='button button-secondary' href='{$item[2]}'$class>{$item[0]}</a>";
|
||||
$current_theme_actions[] = "<a class='button button-secondary$class' href='{$item[2]}'>{$item[0]}</a>";
|
||||
} else {
|
||||
$current_theme_actions[] = "<a class='button button-secondary' href='themes.php?page={$item[2]}'$class>{$item[0]}</a>";
|
||||
$current_theme_actions[] = "<a class='button button-secondary$class' href='themes.php?page={$item[2]}'$>{$item[0]}</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-beta2-30792';
|
||||
$wp_version = '4.1-beta2-30793';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user