diff --git a/.eslintignore b/.eslintignore index 9ff18ee4212b..4cc301654cc5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,7 +4,6 @@ **/dist-module/** **/dist-types/** **/assets/js/*.js -**/packages/imgareaselect/src/index.js **/packages/migration/scripts/module.js bin/build/* build/* diff --git a/.phpstorm.config.js b/.phpstorm.config.js index bd7964ed8b48..c7d58d456d74 100644 --- a/.phpstorm.config.js +++ b/.phpstorm.config.js @@ -51,7 +51,6 @@ System.config({ '@web-stories-wp/e2e-test-utils': './packages/e2e-test-utils/src', '@web-stories-wp/eslint-import-resolver': './packages/eslint-import-resolver/src', '@web-stories-wp/glider': './packages/glider/src', - '@web-stories-wp/imgareaselect': './packages/imgareaselect/src', '@web-stories-wp/jest-amp': './packages/jest-amp/src', '@web-stories-wp/jest-puppeteer-amp': './packages/jest-puppeteer-amp/src', '@web-stories-wp/jest-resolver': './packages/jest-resolver/src', diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 49ea6f20532c..39e408e405c7 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -34,7 +34,6 @@ 'integrations.sitekit' => \Google\Web_Stories\Integrations\Site_Kit::class, 'integrations.themes_support' => \Google\Web_Stories\Integrations\Core_Themes_Support::class, 'integrations.shortpixel' => \Google\Web_Stories\Integrations\ShortPixel::class, - 'imgareaselect_patch' => \Google\Web_Stories\Admin\ImgAreaSelect_Patch::class, 'kses' => \Google\Web_Stories\KSES::class, 'media.base_color' => \Google\Web_Stories\Media\Base_Color::class, 'media.blurhash' => \Google\Web_Stories\Media\Blurhash::class, diff --git a/includes/Admin/ImgAreaSelect_Patch.php b/includes/Admin/ImgAreaSelect_Patch.php deleted file mode 100644 index c744be7ef970..000000000000 --- a/includes/Admin/ImgAreaSelect_Patch.php +++ /dev/null @@ -1,120 +0,0 @@ -assets = $assets; - $this->context = $context; - } - - /** - * Check whether the conditional object is currently needed. - * - * @since 1.10.0 - * - * @return bool Whether the conditional object is needed. - */ - public static function is_needed(): bool { - // TODO, make this service conditional on WordPress version once core is fixed. - return is_admin() && ! wp_doing_ajax(); - } - - /** - * Runs on instantiation. - * - * @since 1.10.0 - */ - public function register(): void { - add_filter( 'script_loader_tag', [ $this, 'script_loader_tag' ], 10, 3 ); - } - - /** - * Filters the HTML script tag of an enqueued script. - * - * @since 1.10.0 - * - * @param string|mixed $tag The `'; - - $results = $this->instance->script_loader_tag( $tag, Testee::SCRIPT_HANDLE, 'http://www.example.com/foo.js' ); - - $this->assertIsString( $results ); - $this->assertStringContainsString( '9.9.9', $results ); - $this->assertStringContainsString( 'http://www.google.com/foo.js', $results ); - $this->assertStringNotContainsString( 'http://www.example.com/foo.js', $results ); - } - - /** - * @covers ::script_loader_tag - */ - public function test_script_loader_tag_wrong_handle(): void { - $tag = ''; - $results = $this->instance->script_loader_tag( $tag, 'wrong-handle', 'http://www.example.com/foo.js' ); - $this->assertSame( $tag, $results ); - } - - /** - * @covers ::script_loader_tag - */ - public function test_script_loader_tag_not_editor(): void { - $tag = ''; - $results = $this->instance->script_loader_tag( $tag, Testee::SCRIPT_HANDLE, 'http://www.example.com/foo.js' ); - $this->assertSame( $tag, $results ); - } -} diff --git a/webpack.config.cjs b/webpack.config.cjs index 87677a689ea2..4951cd18f7bb 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -486,20 +486,6 @@ const storiesMCEButton = { ].filter(Boolean), }; -const storiesImgareaselect = { - ...sharedConfig, - entry: { - imgareaselect: './packages/imgareaselect/src/index.js', - }, - plugins: [ - ...sharedConfig.plugins, - new WebpackBar({ - name: 'WP ImgAreaSelect Patch', - color: '#7D02F1', - }), - ].filter(Boolean), -}; - module.exports = [ editorAndDashboard, activationNotice, @@ -507,5 +493,4 @@ module.exports = [ webStoriesScripts, widgetScript, storiesMCEButton, - storiesImgareaselect, ];