Skip to content

Commit

Permalink
Add check that add_action exists before initializing
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Feb 7, 2019
1 parent 4dd76ad commit fb6f7e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/BladeSvgSage.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public function svg($name = '', $class = '', $attrs = [])
/**
* Initialize BladeSvgSage
*/
add_action('after_setup_theme', function () {
return new BladeSvgSage;
}, 20);
if (function_exists('add_action')) {
add_action('after_setup_theme', function () {
return new BladeSvgSage;
}, 20);
}

0 comments on commit fb6f7e7

Please sign in to comment.