Skip to content

Commit

Permalink
Livewire assets helper
Browse files Browse the repository at this point in the history
  • Loading branch information
as247 committed May 5, 2023
1 parent 0391dea commit 5c199aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/WpStarter/Wordpress/Facades/Livewire.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use WpStarter\Support\Facades\Facade;

/**
* @method static enqueue()
* @method static boolean enqueue($styleOptions=[],$scriptOptions=[])
*/
class Livewire extends Facade
{
Expand Down
11 changes: 11 additions & 0 deletions src/WpStarter/Wordpress/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,14 @@ function ws_admin_notice($message=null,$type='success'){
return ws_app('wp.admin.notice')->notify($message,$type);
}
}

if(!function_exists('ws_enqueue_livewire')){
/**
* @param $styleOptions
* @param $scriptOptions
* @return boolean
*/
function ws_enqueue_livewire($styleOptions=[],$scriptOptions=[]){
return ws_app('wp.livewire')->enqueue($styleOptions,$scriptOptions);
}
}

0 comments on commit 5c199aa

Please sign in to comment.