Skip to content

Commit 5e34454

Browse files
fix: use SDK for Blocks CSS
1 parent d31e516 commit 5e34454

File tree

5 files changed

+117
-1
lines changed

5 files changed

+117
-1
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ updates:
103103
interval: monthly
104104
open-pull-requests-limit: 10
105105
target-branch: development
106+
- package-ecosystem: composer
107+
directory: "/plugins/blocks-css"
108+
schedule:
109+
interval: monthly
110+
open-pull-requests-limit: 10
111+
target-branch: development

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"format:php": "wp-env run --env-cwd='wp-content/plugins/otter-blocks' cli composer run-script format",
4545
"wp-env": "wp-env",
4646
"build:makepot": "docker run --user root --rm --volume \"$(pwd):/var/www/html/otter-blocks\" wordpress:cli bash -c 'php -d memory_limit=512M \"$(which wp)\" --version --allow-root && wp i18n make-pot otter-blocks ./otter-blocks/languages/otter-pro.pot --include=\"otter-pro,build/pro,inc\" --allow-root --domain=otter-pro --headers={\\\"Last-Translator\\\":\\\"[email protected]\\\"\\,\\\"Report-Msgid-Bugs-To\\\":\\\"https://github.com/Codeinwp/otter-blocks/issues\\\"\\,\\\"Project-Id-Version\\\":\\\"Otter-Blocks\\\"\\,\\\"POT-Creation-Date\\\":\\\"\\\"}'",
47-
"plugins:sdk:update": "composer require codeinwp/themeisle-sdk --update-with-dependencies --no-install --working-dir=./plugins/blocks-animation"
47+
"plugins:sdk:update": "composer require codeinwp/themeisle-sdk --update-with-dependencies --no-install --working-dir=./plugins/blocks-animation && composer require codeinwp/themeisle-sdk --update-with-dependencies --no-install --working-dir=./plugins/blocks-css"
4848
},
4949
"repository": {
5050
"type": "git",

plugins/blocks-css/blocks-css.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@
3030
define( 'BLOCKS_CSS_PATH', __DIR__ );
3131
define( 'BLOCKS_CSS_PRODUCT_SLUG', basename( BLOCKS_CSS_PATH ) );
3232

33+
$vendor_file = BLOCKS_CSS_PATH . '/vendor/autoload.php';
34+
35+
if ( is_readable( $vendor_file ) ) {
36+
require_once $vendor_file;
37+
}
38+
39+
add_filter(
40+
'themeisle_sdk_products',
41+
function ( $products ) {
42+
$products[] = __FILE__;
43+
44+
return $products;
45+
}
46+
);
47+
3348
add_action(
3449
'plugins_loaded',
3550
function () {

plugins/blocks-css/composer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "codeinwp/blocks-css",
3+
"description": "Blocks CSS: It allows you add custom CSS to your Blocks straight from the Block Editor (Gutenberg)",
4+
"type": "wordpress-plugin",
5+
"version": "2.6.13",
6+
"license": "GPL-2.0+",
7+
"authors": [
8+
{
9+
"name": "ThemeIsle Team",
10+
"email": "[email protected]"
11+
}
12+
],
13+
"prefer-stable": true,
14+
"config": {
15+
"optimize-autoloader": true,
16+
"platform": {
17+
"php": "7.4"
18+
}
19+
},
20+
"extra": {
21+
"installer-disable": "true"
22+
},
23+
"autoload": {
24+
"files": [
25+
"vendor/codeinwp/themeisle-sdk/load.php"
26+
]
27+
},
28+
"minimum-stability": "dev",
29+
"require": {
30+
"codeinwp/themeisle-sdk": "^3.3"
31+
}
32+
}

plugins/blocks-css/composer.lock

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)