Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
This pull request adds Matchbox CPT, a must-use plugin for registering the custom post types.
Purpose
Reason for must-use plugin vs registering in the theme
According to WordPress documentation, It is considered better to register custom post types in a plugin rather than a theme for several reasons:
Overall, registering custom post types in a plugin provides greater flexibility, portability, and security than registering them in a theme.
Autoloader
This code includes the file matchbox-cpt.php located in the mu-plugins directory. It is required because plugin directories inside the mu-plugin directory will not be loaded automatically by WordPress.
Matchbox CPT plugin
This code registers the plugin and its basic functionality.
Features:
post-types
directory of the plugin.$exclude_post_types array
variable to specify post types to exclude from registration.FAQs post type
This code registers a custom post type for Frequently Asked Questions (FAQs) along with a Categories taxonomy for the FAQs post type. The custom post type allows users to organize and manage FAQs.
Features:
Pre-submit checklist
As the author of this pull request, I verify that:
master
.Testing
How to test the changes in this pull request
Follow the steps below to test the changes in this PR.
dev
environment.Functional tests
As the functional tester for this pull request, I verify that:
Once testing is complete, notify the author of failed tests and move the task to "Kick back" in Asana. If all tests pass, move the task to "Ready for Code Review" in Asana and tag a team member for code review.
Code review
As the code reviewer for this pull request, I verify that:
Once testing is complete, notify the author of any failed tests and move the task to "Kick back" in Asana or continue with the "merging" steps below.
Merging
As the individual merging this pull request, I verify that: