Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ trim_trailing_whitespace = true
indent_style = tab
indent_size = 4

[*.{yml,json}]
[*.yml]
indent_style = space
indent_size = 2

Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
vendor
build
wordpress
!.*.js
4 changes: 3 additions & 1 deletion .github/workflows/lint-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
run: npm run lint

- name: Run PHP linter
run: npm run lint:php
run: |
npm run wp-env start
npm run lint:php

tests:
name: Tests
Expand Down
1 change: 0 additions & 1 deletion .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build
node_modules
vendor
wordpress
4 changes: 1 addition & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"extends": "stylelint-config-wordpress",
"extends": "@wordpress/stylelint-config",
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
"comment-empty-line-before": null,
"declaration-property-unit-whitelist": null,
"font-weight-notation": null,
"max-line-length": null,
"no-descending-specificity": null,
"no-duplicate-selectors": null,
"rule-empty-line-before": null,
"selector-class-pattern": null,
"value-keyword-case": null
Expand Down
14 changes: 9 additions & 5 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"core": "https://wordpress.org/wordpress-5.6-RC1.zip",
"plugins": [ "." ],
"mappings": {
"wp-content/plugins/wp-bootstrap-blocks-test-plugins": "./e2e-tests/plugins"
}
"core": "https://wordpress.org/wordpress-5.7-RC1.zip",
"plugins": [ "." ],
"env": {
"tests": {
"mappings": {
"wp-content/plugins/wp-bootstrap-blocks-test-plugins": "./e2e-tests/plugins"
}
}
}
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ You can copy the original template from `wp-bootstrap-blocks/src/templates/<bloc

## PHP Filters

The plugin provides the following PHP filters.
Please visit the following page to get more information about PHP filters: <https://developer.wordpress.org/reference/functions/add_filter/>.

### wp_bootstrap_blocks_template_path

Changes the default theme directory name (`wp-bootstrap-blocks/`).
Expand Down Expand Up @@ -436,6 +439,22 @@ function my_after_plugin_update( $new_version, $old_version ) {

## JavaScript Filters

The plugin provides the following JavaScript filters.
They can be used by enqueuing a custom JavaScript file which implements those filters.

Example:

If you have a script called `block-filters.js` inside your theme root you can enqueue it by adding the following code to your `functions.php` file.

```php
function mytheme_enqueue_block_editor_assets() {
wp_enqueue_script( 'block-filters', get_stylesheet_directory_uri() . '/block-filters.js', array( 'wp-hooks' ), '1.0.0', true );
}
add_action( 'enqueue_block_editor_assets', 'mytheme_enqueue_block_editor_assets' );
```

Please visit the following page to get further instructions on how to use JavaScript filters: <https://developer.wordpress.org/block-editor/developers/filters/block-filters/>.

### wpBootstrapBlocks.button.styleOptions

Modify available button styles.
Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '5080490999c31af29f092309d5e5ba51');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '3a27ed384c3dcb99453d681ff5156a5b');
9 changes: 3 additions & 6 deletions build/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/settings.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0b18bb470230f9532065a7cacf482637');
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '17a3d0912e3f28b66ec90f712d14db46');
1 change: 0 additions & 1 deletion build/settings.css
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#wp-bootstrap-blocks_settings .constant-notice{font-weight:600}

1 change: 0 additions & 1 deletion build/style-index.css
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.wp-bootstrap-blocks-row.row.alignfull{margin-left:0;margin-right:0}

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
"wp-coding-standards/wpcs": "^2.3",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"wp-phpunit/wp-phpunit": "^5.5"
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"wp-phpunit/wp-phpunit": "^5.6"
},
"scripts": {
"lint": "phpcs --standard=phpcs.xml"
Expand Down
55 changes: 37 additions & 18 deletions composer.lock

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

6 changes: 3 additions & 3 deletions e2e-tests/row/row-block.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe( 'row block', () => {
await page.click(
'.wp-bootstrap-blocks-template-selector-button > button[aria-label="3 Columns (1:1:1)"]'
);
await page.waitFor( 1000 );
await page.waitForTimeout( 1000 );
expect(
await page.$$(
'.block-editor-block-list__block[data-type="wp-bootstrap-blocks/column"][data-size-md="4"]'
Expand Down Expand Up @@ -126,13 +126,13 @@ describe( 'row block', () => {
);
expect(
await page.$(
'.wp-block-wp-bootstrap-blocks-row > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender'
'.wp-block-wp-bootstrap-blocks-row > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender > button'
)
).not.toBeNull();

// Add column block by clicking the block list appender
await page.click(
'.wp-block-wp-bootstrap-blocks-row > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender'
'.wp-block-wp-bootstrap-blocks-row > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender > button'
);
const numberOfColumnBlocks = (
await page.$$(
Expand Down
Loading