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

Move block server-side logic into same directory as client-side logic #2014

Merged
merged 4 commits into from
Jul 31, 2017
Merged
Show file tree
Hide file tree
Changes from 3 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 bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mv gutenberg.tmp.php gutenberg.php
zip -r gutenberg.zip \
gutenberg.php \
lib/*.php \
lib/blocks/*.php \
blocks/library/*/*.php \
post-content.js \
$vendor_scripts \
blocks/build/*.{js,map} \
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
require_once dirname( __FILE__ ) . '/lib/parser.php';
require_once dirname( __FILE__ ) . '/lib/register.php';

// Register server-side code for individual blocks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we preserve this comment?

require_once dirname( __FILE__ ) . '/lib/blocks/latest-posts.php';
foreach ( glob( dirname( __FILE__ ) . '/blocks/library/*/index.php' ) as $block_logic ) {
require_once $block_logic;
}
}
1 change: 1 addition & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<file>gutenberg.php</file>
<file>./lib</file>
<file>./blocks/library</file>
<exclude-pattern>./lib/parser.php</exclude-pattern>
<file>./phpunit</file>
<file>./bin</file>
Expand Down