Skip to content

Handle restricted filesystem permissions and allow for disabling block editor support#243

Merged
mlwilkerson merged 37 commits intomainfrom
handle-restricted-filesystem-permissions
May 23, 2025
Merged

Handle restricted filesystem permissions and allow for disabling block editor support#243
mlwilkerson merged 37 commits intomainfrom
handle-restricted-filesystem-permissions

Conversation

@mlwilkerson
Copy link
Copy Markdown
Member

@mlwilkerson mlwilkerson commented Feb 28, 2025

closes #242

  1. Make it a warning, not a fatal error, when we can't fetch SVG support styles.
  2. In the warning, show what's expected so users can possibly manually intervene.
  3. Add a font_awesome_disable_block_editor_support filter to disable the block editor support entirely.
  4. When checking for the presence of the SVG stylesheet, use filesystem access first. If that fails for lack of permissions, attempt to fetch it via wp_remote_head().
  5. Change Classic Editor support code to be more compatible with other third-party plugins. See here and here.

Using the New Filter

Add the following to your themes functions.php or equivalent:

add_filter( 'font_awesome_disable_block_editor_support', '__return_true' );

TODO

  • add test coverage for the new configuration and failure cases
  • revisit whether we need the try/catch in activate()

@mlwilkerson mlwilkerson merged commit 1b8c459 into main May 23, 2025
8 checks passed
@mlwilkerson mlwilkerson deleted the handle-restricted-filesystem-permissions branch July 22, 2025 20:07
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.

Failed to initialize filesystem usage - after upgrade to 5.0.1

1 participant