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

Split functions.php into smaller files #545

Merged
merged 21 commits into from
Aug 27, 2023

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented Aug 12, 2023

This PR cleans up the patchwork mess in functions.php and splits functions into smaller files in inc folder. functions.php uses

require_once('inc/breadcrumb.php');
...

to include them.

Files have now deny direct access, which we should add to all php files step-by-step:

defined( 'ABSPATH' ) || exit;
  • Comments have been updated and follows the standard
  • Files have now a version to track each file changes

Tested and works fine. If this PR is accepted and merged, I'll do the same with wc-functions.php.

@justinkruit if you like it, merge it!

@crftwrk crftwrk marked this pull request as draft August 12, 2023 14:51
@crftwrk crftwrk mentioned this pull request Aug 14, 2023
27 tasks
@crftwrk crftwrk marked this pull request as ready for review August 14, 2023 08:35
@crftwrk crftwrk added the documentation Improvements or additions to documentation label Aug 14, 2023
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

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

Looks good!

Also, is there a reason we use the if() : endif; instead of {}?

@justinkruit justinkruit merged commit 7c4db00 into main Aug 27, 2023
@crftwrk crftwrk deleted the Split-functions.php-into-smaller-files branch August 30, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants