Repository navigation
Update/fixing post documentation - #168
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Conifer’s documentation and code formatting to align examples and APIs with Timber v2 conventions, while cleaning up a few outdated TODO notes.
Changes:
- Update docs/examples to prefer
Timber::context()/Timber::get_posts()patterns for Timber2 compliance. - Reformat several PHP classes/traits to a consistent brace/style layout (no behavioral changes intended).
- Minor cleanup in tests/docs (remove stale TODO comments; update changelog entry).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/Form/FormTest.php | Removes an outdated TODO from default field definitions. |
| readme.txt | Updates the front-page usage example to Timber2 patterns (currently contains a broken snippet that needs fixing). |
| lib/Conifer/Site.php | Style/formatting normalization (brace placement, spacing) across the Site class. |
| lib/Conifer/Post/Post.php | Style/formatting normalization and minor string formatting in a deprecation warning. |
| lib/Conifer/Post/HasTerms.php | Style/formatting normalization (brace placement, spacing) in the trait. |
| docs/posts.md | Updates post/CPT guidance for Timber2 + adds class map documentation (currently contains a few invalid PHP snippets/typos that need fixing). |
| docs/changelog/2026.md | Adds a v1.0.5 changelog section referencing the documentation updates. |
| docs/basics.md | Updates basics example to use Timber::context() rather than deprecated Conifer helpers. |
Comments suppressed due to low confidence (1)
docs/posts.md:343
- The WP_Query example has mismatched brackets/parentheses, so it won't parse. It should close the array with
]and both parentheses.
// Using a WP_Query instance.
$posts = Timber::get_posts( new WP_Query( [ 'post_type' => 'any' ) );
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rbhensley
requested changes
Oct 5, 2026
rbhensley
left a comment
Contributor
There was a problem hiding this comment.
Confirm the recommendation when registering a post type, otherwise looks good.
| // ... | ||
|
|
||
| // Register post type via static function | ||
| Robot::register_type(); |
Contributor
There was a problem hiding this comment.
Is this correct? My understanding is that we should be doing it the way that was removed with the add_action('init', {...})
Contributor
Author
There was a problem hiding this comment.
Whoops, fixed!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket: #
Issue
There were still some docs that were outdated with deprecated examples.
Solution
Update the documentation for Timber2 compliance.
Impact
None, docs only.
Usage Changes
Considerations
Testing