Skip to content

Commit

Permalink
Add 'Manage in Customizer' button for Settings. See #516.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinSainton committed May 23, 2016
1 parent 434173c commit 6d42149
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ wp-config.php
.DS_Store
node_modules
.svn
.git
.git
release.sh
14 changes: 13 additions & 1 deletion wpsc-admin/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,18 @@ public function display() {
<div id="icon_card" class="icon32"></div>
<h2 id="wpsc-settings-page-title">
<?php esc_html_e( 'Store Settings', 'wp-e-commerce' ); ?>
<?php
if ( current_user_can( 'customize' ) ) :
printf(
' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
esc_url( add_query_arg( array(
array( 'autofocus' => array( 'panel' => 'wpsc' ) ),
'return' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
), admin_url( 'customize.php' ) ) ),
__( 'Manage in Customizer' )
);
endif;
?>
<img src="<?php echo esc_url( wpsc_get_ajax_spinner() ); ?>" class="ajax-feedback" title="" alt="" />
</h2>
<?php $this->output_tabs(); ?>
Expand Down Expand Up @@ -726,4 +738,4 @@ function _wpsc_action_after_settings_tab() {
<input type='hidden' name='wpsc_admin_action' value='submit_options' />
<?php
wp_nonce_field( 'update-options', 'wpsc-update-options' );
}
}

0 comments on commit 6d42149

Please sign in to comment.