From 0c0a90bfc1d825649f32481f4e898ee735bebd0c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 2 Dec 2013 18:57:32 +0000 Subject: [PATCH] For the current theme, display all available actions, as dictated by the admin menu. Restores 3.7 behavior. This could include things like Header and Background as well as theme options pages. see #25948. git-svn-id: https://develop.svn.wordpress.org/trunk@26531 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/themes.php | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index d07258a1d8..3007be7219 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -81,9 +81,9 @@ if ( current_user_can( 'edit_theme_options' ) ) { } // edit_theme_options get_current_screen()->set_help_sidebar( - '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Using Themes' ) . '

' . - '

' . __( 'Support Forums' ) . '

' + '

' . __( 'For more information:' ) . '

' . + '

' . __( 'Documentation on Using Themes' ) . '

' . + '

' . __( 'Support Forums' ) . '

' ); if ( current_user_can( 'switch_themes' ) ) { @@ -145,10 +145,10 @@ if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_th // Certain error codes are less fatal than others. We can still display theme information in most cases. if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) && in_array( $ct->errors()->get_error_code(), array( 'theme_no_parent', 'theme_parent_invalid', 'theme_no_index' ) ) ) ) : ?> +*/ - errors() || ( 1 == count( $ct->errors()->get_error_codes() ) $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)) - $options[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; else - $options[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else if ( current_user_can($item[1]) ) { $menu_file = $item[2]; if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) $menu_file = substr( $menu_file, 0, $pos ); if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { - $options[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else { - $options[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } } } -*/ + ?>
@@ -270,7 +270,7 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_ <# } #>

{{{ data.name }}}

- + <# if ( data.hasUpdate ) { #>

@@ -278,11 +278,11 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_
<# } #>

{{{ data.description }}}

- + <# if ( data.parent ) { #>

{{{ data.parent }}}' ); ?>

<# } #> - + <# if ( data.tags ) { #>

@@ -295,12 +295,7 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_

- - - - - - +
<# if ( data.actions.activate ) { #> @@ -308,7 +303,7 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_ <# } #>
- + <# if ( ! data.active && data.actions.delete ) { #> <# } #>