@@ -58,10 +58,10 @@ function wp_is_connector_registered( string $id ): bool {
5858 * @type array $plugin {
5959 * Optional. Plugin data for install/activate UI.
6060 *
61- * @type string $file The plugin's main file path relative to the plugins
62- * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php').
61+ * @type string $file The plugin's main file path relative to the plugins
62+ * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php').
6363 * @type callable $is_active Optional callback to determine whether the plugin
64- * is active. Receives no arguments and must return bool.
64+ * is active. Receives no arguments and must return bool.
6565 * }
6666 * }
6767 * @phpstan-return ?array{
@@ -122,10 +122,10 @@ function wp_get_connector( string $id ): ?array {
122122 * @type array $plugin {
123123 * Optional. Plugin data for install/activate UI.
124124 *
125- * @type string $file The plugin's main file path relative to the plugins
126- * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php').
125+ * @type string $file The plugin's main file path relative to the plugins
126+ * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php').
127127 * @type callable $is_active Optional callback to determine whether the plugin
128- * is active. Receives no arguments and must return bool.
128+ * is active. Receives no arguments and must return bool.
129129 * }
130130 * }
131131 * }
@@ -710,11 +710,7 @@ function _wp_connectors_get_connector_script_module_data( array $data ): array {
710710 $ is_activated = is_plugin_active ( $ file );
711711 }
712712
713- if ( $ is_activated ) {
714- $ is_installed = true ;
715- } else {
716- $ is_installed = file_exists ( WP_PLUGIN_DIR . '/ ' . $ file );
717- }
713+ $ is_installed = $ is_activated || file_exists ( WP_PLUGIN_DIR . '/ ' . $ file );
718714
719715 $ connector_out ['plugin ' ] = array (
720716 'file ' => $ file ,
0 commit comments