Ticket #31365: 31365.2.diff
File 31365.2.diff, 1.8 KB (added by , 10 years ago) |
---|
-
src/wp-admin/themes.php
177 177 178 178 if ( current_user_can( 'customize' ) ) { 179 179 if ( 'custom-header' === $menu_file ) { 180 $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href=' customize.php?autofocus[control]=header_image'>{$item[0]}</a>";180 $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='" . admin_url( add_query_arg( array( 'autofocus[control]' => 'header_image' ), 'customize.php' ) ) . "'>{$item[0]}</a>"; 181 181 } elseif ( 'custom-background' === $menu_file ) { 182 $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href=' customize.php?autofocus[control]=background_image'>{$item[0]}</a>";182 $current_theme_actions[] = "<a class='button button-secondary hide-if-no-customize$class' href='" . admin_url( add_query_arg( array( 'autofocus[control]' => 'background_image' ), 'customize.php' ) ) . "'>{$item[0]}</a>"; 183 183 } 184 184 } 185 185 … … 188 188 } 189 189 190 190 if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { 191 $current_theme_actions[] = "<a class='button button-secondary$class' href=' {$item[2]}'>{$item[0]}</a>";191 $current_theme_actions[] = "<a class='button button-secondary$class' href='" . admin_url( $item[2] ) . "'>{$item[0]}</a>"; 192 192 } else { 193 $current_theme_actions[] = "<a class='button button-secondary$class' href=' themes.php?page={$item[2]}'>{$item[0]}</a>";193 $current_theme_actions[] = "<a class='button button-secondary$class' href='" . admin_url( add_query_arg( array( 'page' => $item[2] ), 'themes.php' ) ) . "'>{$item[0]}</a>"; 194 194 } 195 195 } 196 196 }