Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Radicle #81

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
"issues": "https://github.com/log1x/sage-directives/issues"
},
"autoload": {
"files": [
"src/Directives.php",
"src/Utilities.php"
]
"psr-4": {
"Log1x\\SageDirectives\\": "src/"
}
},
"require": {
"php": ">=7.1.3"
Expand All @@ -40,5 +39,12 @@
},
"suggest": {
"log1x/sage-svg": "Required to use the @svg directive (Sage 10)."
},
"extra": {
"acorn": {
"providers": [
"Log1x\\SageDirectives\\SageDirectivesServiceProvider"
]
}
}
}
11 changes: 4 additions & 7 deletions src/Directives.php → src/SageDirectivesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Log1x\SageDirectives;

class Directives
use Illuminate\Support\ServiceProvider;

class SageDirectivesServiceProvider extends ServiceProvider
{
/**
* Directives
Expand All @@ -27,7 +29,7 @@ class Directives
*
* @return void
*/
public function __construct()
public function boot()
{
add_action('after_setup_theme', function () {
$this->namespace = apply_filters('log1x/sage-directives/namespace', $this->namespace);
Expand Down Expand Up @@ -91,8 +93,3 @@ protected function blade()
}
}
}

// phpcs:disable
if (function_exists('add_action')) {
new Directives();
}
File renamed without changes.