Resolve remaining WordPress.org review findings - #126
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89bb5a7654
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -129,7 +129,6 @@ function plugin_instance() { | |||
|
|
|||
| if ( ! $plugin instanceof \ContentControl\Plugin\Core ) { | |||
| require_once __DIR__ . '/inc/functions.php'; | |||
There was a problem hiding this comment.
Preserve legacy APIs until the next major release
On sites with extensions or custom snippets that still call jp_content_control(), JP\CC\Is, or the jp_cc_* hooks, omitting this loader causes fatal undefined-function/class errors or silently disables their restriction callbacks. These APIs were explicitly retained as compatibility shims, and the repository advertises SemVer while the plugin metadata remains at 2.7.3, so they should remain available until a major release.
Useful? React with 👍 / 👎.
| // Overload the globals so conditionals work properly. | ||
| $cc_term = get_term( $term_id ); | ||
| // Set the global term object (forward compatibility). | ||
| set_global( 'term', $cc_term ); | ||
| set_global( 'term', get_term( $term_id ) ); |
There was a problem hiding this comment.
Continue synchronizing the deprecated term global
When a term restriction is evaluated, integrations that inspect the legacy $cc_term global now see it unset or stale because only the managed term value is updated. That compatibility global predates the managed service and was deprecated only in 2.7.1, so removing its synchronization in the still-2.7.x plugin can make existing term-related callbacks evaluate the wrong term; keep both values synchronized until a major release.
Useful? React with 👍 / 👎.
Summary
content-controltext domain for requirement notices$cc_termcompatibility globalValidation
composer lintcomposer phpstanThe local PHPUnit harness currently fails on unrelated PHPUnit 12 compatibility issues, including ignored docblock data providers.