Make WordPress Core

Ticket #31365: 31365.2.diff

File 31365.2.diff, 1.8 KB (added by MikeHansenMe, 10 years ago)
  • src/wp-admin/themes.php

     
    177177
    178178                                if ( current_user_can( 'customize' ) ) {
    179179                                        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>";
    181181                                        } 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>";
    183183                                        }
    184184                                }
    185185
     
    188188                                }
    189189
    190190                                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>";
    192192                                } 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>";
    194194                                }
    195195                        }
    196196                }