Skip to content

Specify the version refers to SCF in @since annotations #129

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

Merged
merged 3 commits into from
May 13, 2025

Conversation

priethor
Copy link
Contributor

@priethor priethor commented May 13, 2025

Fixes #6.

What

This PR changes all the @since annotations and comments to specify they refer to SCF (or ACF for older versions), not WordPress.

Why

This will help in two ways:

  • For future releases, avoid confusion between ACF and SCF versions.
  • For past releases, avoid LLMs mixing the version with a WordPress version. This is currently happening, and agents incorrectly assume @since 6.5 refers to WordPress 6.5.

Testing instructions

No specific testing needed, but if you are using AI agents, you can ask things like When was [function] introduced? and see the difference.

@cbravobernal cbravobernal merged commit 1eaef0c into trunk May 13, 2025
5 checks passed
priethor added a commit that referenced this pull request May 14, 2025
priethor added a commit that referenced this pull request May 14, 2025
@priethor priethor added this to the 6.5.0 milestone May 14, 2025
priethor added a commit that referenced this pull request May 14, 2025
* First attempt at adding command palette support

* Command polishing

* Add commands for registered CPTs

* Refactor

* Refactor to use wp.scf

* Refactor

* Refactor to pass the data in acf.data.customPostTypes

* Fix redirections

* Check capabilities before registering comands

Includes a refactor to divide commands between core and post-type based: core commands require admin permissions, whereas post-types are dynamic and depend on their own capabilities.

* Filter post types that don't enable the setting "show in UI"

* Redo webpack config linting

* Redo webpack linting

* Apply linting

* Polish

* Refactor

* Fix coding standards in comments

* Ensure we only register the commands when the palette is available

* Refactor to remove scf and acf prefixes, organizing files in folders similar to modules

* Optimize return early

* Remove unnecessary script registration

* Use the `scf` prefix in admin commands.

* Use `scf` prefix for CPT commands

* Only pass CPTs to the frontend when the array is not empty

* CPT commands: only add label as a keyword if not empty

* Polish

* Refactor the depencies to user import statements

* Optimize scripts loading and execution

- Defer the script loading (defer was introduced in WP 6.3)
- Defer script execution by using the priority queue (introduced in WP 5.0)

Since the scripts will only be registered in versions with Command API support, which is 6.3+, we can use both

* Update package-lock.json

* Slight refactor

* Assets: remove redundant registrations, prefix registered scritps

* Remove redundant admin check

* Remove unnecesary checking of `acf_get_acf_post_types`

* Change the priority queue to a simpler `requestIdleCallback`

* Update assets/src/js/commands/custom-post-type-commands.js

* Improved URL building

* Fix command labels for better i18n

* Simplify label calculation leveraging WP core functions

* Remove redundant client-side label calculation

* Fixed `@since` annotations to follow the steps of #129

* Switch to using the proper labels for the commands
@kraftbj kraftbj deleted the fix/specify-since-version-is-scf branch May 14, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version numbers from WPEngine's ACF plugin mixed into SCF plugin
2 participants