Connectors: Expose isFileModsDisabled to connector script module data#11779
Connectors: Expose isFileModsDisabled to connector script module data#11779jorgefilipecosta wants to merge 3 commits intoWordPress:trunkfrom
Conversation
Adds an `isFileModsDisabled` flag derived from `wp_is_file_mod_allowed( 'install_plugins' )` to the data exposed via the `script_module_data_options-connectors-wp-admin` filter so the UI can react when plugin installs are disabled.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
@jorgefilipecosta is there a trac ticket for this / is this targeted for 7.0? |
Hi @jeffpaul, yes it will go with 7.0 it is a backport of WordPress/gutenberg#77521. Ticket is available at https://core.trac.wordpress.org/ticket/65209. |
|
cc: @t-hamano, @westonruter as reviewers of WordPress/gutenberg#77521 would you be able to review / sign this one. Thank you in advance. |
|
Thank you @westonruter! |
Summary
isFileModsDisabled(derived fromwp_is_file_mod_allowed( 'install_plugins' )) to the data exposed through thescript_module_data_options-connectors-wp-adminfilter so the connectors UI can react when plugin installs are disabled.Ticket: https://core.trac.wordpress.org/ticket/65209
Test plan
isFileModsDisabledis present on the script module data with the expected value.define( 'DISALLOW_FILE_MODS', true )) and confirm the value flips totrue.