Skip to content

Commit

Permalink
fix: wp gloabl var not loaded properly in custom page
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Jun 21, 2018
1 parent fb57380 commit a1ab438
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions includes/class-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function enqueue_admin_scripts( $hook ) {
wp_enqueue_style( 'dokan-admin-css' );
wp_enqueue_script( 'underscore' );
wp_enqueue_media();


wp_enqueue_script( 'dokan-tooltip' );
wp_enqueue_script( 'dokan-admin' );

Expand All @@ -80,6 +82,14 @@ public function enqueue_admin_scripts( $hook ) {
wp_enqueue_script( 'dokan-vue-admin' );
}

if ( 'dokan_page_dokan-modules' === $hook ) {
wp_enqueue_style( 'dokan-admin-css' );
wp_enqueue_script( 'underscore' );
wp_enqueue_media();
wp_enqueue_script( 'dokan-tooltip' );
wp_enqueue_script( 'dokan-admin' );
}

if ( get_post_type( $post ) == 'dokan_slider' ) {
wp_enqueue_script( 'media-upload' );
wp_enqueue_script( 'thickbox' );
Expand Down

0 comments on commit a1ab438

Please sign in to comment.