Skip to content

Commit

Permalink
Fix stylesheet enqueue problem
Browse files Browse the repository at this point in the history
Enqueue the contact info stylesheet on widgets.php using the
'admin_enqueue_scripts' hook since widgets.php is an admin page.
  • Loading branch information
kbrown9 committed Aug 16, 2019
1 parent 1f643d6 commit 04cf9ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/widgets/contact-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ function __construct() {
);
$this->alt_option_name = 'widget_contact_info';

if ( is_customize_preview() || 'widgets.php' === $pagenow ) {
if ( is_customize_preview() ) {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
} elseif ( 'widgets.php' === $pagenow ) {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
}

add_action( 'wp_ajax_customize-contact-info-api-key', array( $this, 'ajax_check_api_key' ) );
Expand Down

0 comments on commit 04cf9ac

Please sign in to comment.