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

Remove glob and just include necessary files #10147

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
2 participants
@mkaz
Member

mkaz commented Sep 24, 2018

Description

Remove the use of glob to require files, simply hard code the necessary files.
This improves performance and simplifies the code.

Fixes #10052

How has this been tested?

Confirmed block library includes still work as expected.

Types of changes

Removes the glob(*) in favor of hard coding.
You can confirm the proper files are included by checking the following directory paths which it was searching to include the files.

> ls -1 ./block-library/**/index.php
ls: cannot access './block-library/**/index.php': No such file or directory

> ls -1 ./packages/block-library/src/**/index.php
./packages/block-library/src/archives/index.php
./packages/block-library/src/block/index.php
./packages/block-library/src/categories/index.php
./packages/block-library/src/latest-comments/index.php
./packages/block-library/src/latest-posts/index.php
./packages/block-library/src/shortcode/index.php

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@mkaz mkaz requested a review from danielbachhuber Sep 24, 2018

@danielbachhuber danielbachhuber added this to the 4.0 milestone Sep 24, 2018

@mkaz mkaz merged commit 0a103bc into master Sep 25, 2018

2 checks passed

codecov/project 48.81% remains the same compared to 51f0174
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pento pento deleted the fix/glob/10052 branch Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment