-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
How can I pass a CSS when using Jigsaw in a child theme?
The function creates the file URL with the get_template_directory_uri() which always retrieves the parent theme location instead of the child theme.
Any way to get around it?
static function add_admin_js_or_css( $file, $function = 'wp_enqueue_style' ) {
if ( !is_admin() ) {
return;
}
if ( !file_exists( ABSPATH.$file ) ) {
$file = trailingslashit( get_template_directory_uri() ).$file;
}
add_action( 'admin_enqueue_scripts', function() use ( $file, $function ) {
$function( sanitize_title( $file ), $file );
} );
}
Metadata
Metadata
Assignees
Labels
No labels