Skip to content

Commit

Permalink
Minor improvements to the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
fmfernandes committed Mar 23, 2024
1 parent 6893df0 commit 04ff609
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions .github/workflows/make-plugin-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.get-changed-folders.outputs.matrix != '[]' }}
strategy:
matrix:
matrix:
files: ${{ fromJSON( needs.get-changed-folders.outputs.matrix ) }}
max-parallel: 4
fail-fast: false
Expand Down Expand Up @@ -59,4 +59,4 @@ jobs:
body_path: ${{ matrix.files }}/CHANGELOG.md

permissions:
contents: write
contents: write
8 changes: 6 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# WP Special Projects - All Blocks

All namespacing should use `wpsp` as the value.
All namespacing should use `wpsp` as the value.

Genericize your blocks, do not include site names or data as part of the block markup or content.

Your plugin *must* contain a `CHANGELOG.md` file.

Your plugin must have an entrypoint with the same name as the folder, i.e. `hello-world/hello-world.php`.

Creating a new block.

```console
npx @wordpress/create-block
```
```
8 changes: 4 additions & 4 deletions special-projects-blocks-monorepo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
/**
* Plugin Name: Dynamic Table of Contents
* Description: Creates a table of contents that's dynamically (PHP) rendered.
Expand All @@ -22,14 +22,14 @@
*
* Example: /dynamic-table-of-contents/dynamic-table-of-contents.php
*/
function load_add_downloaded_blocks(){
function load_add_downloaded_blocks(){
$dirs = glob( dirname( __FILE__ ) . '/*', GLOB_ONLYDIR );

foreach ( $dirs as $dir ) {
if ( file_exists( $dir . DIRECTORY_SEPARATOR . basename( $dir ) . '.php' ) ) {
require $dir . DIRECTORY_SEPARATOR . basename( $dir ) . '.php';
}
}
}
}

add_action('init', 'load_add_downloaded_blocks');
add_action( 'init', 'load_add_downloaded_blocks' );

0 comments on commit 04ff609

Please sign in to comment.