Skip to content

Commit

Permalink
Merge pull request #46 from Codeinwp/feat/add_sdk
Browse files Browse the repository at this point in the history
feat: add themeisle SDK
  • Loading branch information
preda-bogdan authored Jun 21, 2023
2 parents 02dc6cc + 240a85e commit 935d895
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ tsconfig.json
lint-staged.config.js
.stylelintrc.json
phpstan.neon
.gitkeep
.gitkeep
assets/js/src
assets/css/src
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"autoload": {
"psr-4": {
"NeveFSE\\": "inc/"
}
},
"files": [
"vendor/codeinwp/themeisle-sdk/load.php"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -30,7 +33,9 @@
"extra": {
"installer-disable": "true"
},
"require": {},
"require": {
"codeinwp/themeisle-sdk": "^3.3"
},
"require-dev": {
"codeinwp/phpcs-ruleset": "dev-main",
"phpunit/phpunit": "^6.5",
Expand Down
45 changes: 43 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function bootstrap() {

maybe_add_notices();

load_sdk();

load_dependencies();

run();
Expand Down Expand Up @@ -134,6 +136,22 @@ function () {
);
}

/**
* Load SDK.
*
* @return void
*/
function load_sdk() {
add_filter(
'themeisle_sdk_products',
function ( $products ) {
$products[] = NEVE_FSE_DIR . 'style.css';

return $products;
}
);
}

/**
* Load composer dependencies.
*
Expand Down

0 comments on commit 935d895

Please sign in to comment.