wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 15 forks source link

Load wp-cli-stubs with scanFiles: #209

Closed szepeviktor closed 3 years ago

szepeviktor commented 3 years ago

Description

Answer to https://github.com/wearerequired/traduttore/pull/124#issuecomment-853866115

szepeviktor commented 3 years ago

@ocean90 Is it okay for you?

kép

szepeviktor commented 3 years ago

To resolve those

                /** @var \WP_Filesystem_Base|null $wp_filesystem */
                global $wp_filesystem;

                if ( ! $wp_filesystem instanceof \WP_Filesystem_Base ) {

(a simple ! is for boolean variables unless your friend is called type juggling)

ocean90 commented 3 years ago

In master the messages are already ignored but we can also use a stricter check as a follow-up.

So the solution is using scanFiles instead of bootstrapFiles? @swissspidy feel free to merge with your branch if it looks good to you too.

swissspidy commented 3 years ago

Let's give it a try 👍