Connectors: Replace plugin.slug with plugin.file#76909
Connectors: Replace plugin.slug with plugin.file#76909jorgefilipecosta merged 5 commits intotrunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.73 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 02a6150. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23809505354
|
| 'type' => 'ai_provider', | ||
| 'plugin' => array( | ||
| 'slug' => 'ai-provider-for-anthropic', | ||
| 'file' => 'ai-provider-for-anthropic/plugin.php', |
There was a problem hiding this comment.
Works for me, but this will require some additional documentation.
gziolo
left a comment
There was a problem hiding this comment.
Work as expected and makes it compatible also with custom local plugins 👍🏻
…ation Use the plugin's main file path (e.g. 'akismet/akismet.php') instead of just the slug. This lets the script module data function use file_exists() and is_plugin_active() directly, removing the get_plugins() slug-to-file map. The frontend derives the slug from the file path when needed. Also fixes _gutenberg_register_default_connector_settings() so that the class_exists guard for AiClient only blocks AI provider settings, not all connector settings (e.g. Akismet).
AiClient is always present in WP 7.0.
5e98fe3 to
02a6150
Compare
|
Thank you for the review @gziolo! |
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 0868adc |
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Gutenberg changelog: - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994)
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62209 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/trunk@62209 git-svn-id: http://core.svn.wordpress.org/trunk@61489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62212 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `0d133bf7e7437d65d68a06551f3d613a7d8e4361` to `e2970ba736edb99e08fb369d4fb0c378189468ee`. The following changes are included: - WordPress/gutenberg#76478 Boot: Fix black area below content when sidebar is taller than page c… (WordPress/gutenberg#76764) - Style Book: Fix missing styles for classic themes in stylebook route (WordPress/gutenberg#76843) - RTC: Fix stuck "Join" link in post list when lock expires (WordPress/gutenberg#76795) - Icon: Fix center alignment in the editor for classic themes (WordPress/gutenberg#76878) - RTC: Fix notes not syncing between collaborative editors (WordPress/gutenberg#76873) - Latest Comments: Fix v1 deprecated block missing supports (WordPress/gutenberg#76877) - Connectors: Add Akismet as a default connector (WordPress/gutenberg#76828) - Restore with compaction update (WordPress/gutenberg#76872) - Improve JSDoc for abilities API (WordPress/gutenberg#76824) - Connectors: Replace plugin.slug with plugin.file (WordPress/gutenberg#76909) - Block visibility badge: use canvas iframe for viewport detection (WordPress/gutenberg#76889) - Connectors: Update help text from 'reset' to 'manage' (WordPress/gutenberg#76963) - Connectors: Hide Akismet unless already installed (WordPress/gutenberg#76962) - Wrap sync update processing in try/catch (WordPress/gutenberg#76968) - Backport: Improve validation and permission checks for `WP_HTTP_Polling_Sync_Server` (WordPress/gutenberg#76987) - Connectors: account for mu-plugins when resolving plugin.file status (WordPress/gutenberg#76994) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/0d133bf7e7437d65d68a06551f3d613a7d8e4361…e2970ba736edb99e08fb369d4fb0c378189468ee. Log created with: git log --reverse --format="- %s" 0d133bf7e7437d65d68a06551f3d613a7d8e4361..e2970ba736edb99e08fb369d4fb0c378189468ee | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. Built from https://develop.svn.wordpress.org/branches/7.0@62212 git-svn-id: http://core.svn.wordpress.org/branches/7.0@61492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
Summary
plugin.slugwithplugin.file(the full plugin file path, e.g.akismet/akismet.php) in connector registrationsget_plugins()slug-to-file map, usefile_exists()andis_plugin_active()directlyisInstalledto the frontend plugin data; frontend derives slug from file pathTest plan