Skip to content

Update/fixing post documentation - #168

Merged
amerk-sitecrafting merged 9 commits into
mainfrom
update/fixing-post-documentation
Oct 6, 2026
Merged

amerk-sitecrafting merged 9 commits into
mainfrom
update/fixing-post-documentation

Conversation

@amerk-sitecrafting

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread readme.txt Outdated
Comment thread docs/posts.md Outdated
Comment thread docs/posts.md Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Deploying conifer-plugin with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1ab5b83
Status:⚡️  Build in progress...

View logs

@rbhensley rbhensley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirm the recommendation when registering a post type, otherwise looks good.

Comment thread docs/posts.md Outdated
// ...

// Register post type via static function
Robot::register_type();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this correct? My understanding is that we should be doing it the way that was removed with the add_action('init', {...})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, fixed!

@amerk-sitecrafting
amerk-sitecrafting merged commit 1ab5b83 into main Oct 6, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants