Skip to content

Commit

Permalink
move extend media block script out to features
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Sep 21, 2024
1 parent 11891b3 commit 0f2bf9e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
8 changes: 0 additions & 8 deletions includes/Classifai/Features/ImageGeneration.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ public function enqueue_admin_scripts( string $hook_suffix = '' ) {
true
);

wp_enqueue_script(
'classifai-extend-image-blocks',
CLASSIFAI_PLUGIN_URL . 'dist/extend-image-blocks.js',
get_asset_info( 'extend-image-blocks', 'dependencies' ),
get_asset_info( 'extend-image-blocks', 'version' ),
true
);

/**
* Filter the default attribution added to generated images.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function addImageGenerationLink( Component ) {
{ ...rest }
mode="generate"
render={ ( { open } ) => (
<Button variant="tertiary" onClick={ open }>
<Button variant="secondary" onClick={ open }>
{ _nx(
'Generate image',
'Generate images',
Expand Down
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = {
'recommended-content-block-frontend': [
'./includes/Classifai/Blocks/recommended-content-block/frontend.js',
],
'extend-image-blocks': './src/js/extend-image-block-generate-image.js',

'classifai-plugin-commands': [ './src/js/features/commands.js' ],
'classifai-plugin-classification': './src/js/features/classification/index.js',

Check failure on line 22 in webpack.config.js

View workflow job for this annotation

GitHub Actions / eslint

Replace `·` with `⏎↹↹↹`
Expand All @@ -32,7 +31,10 @@ module.exports = {
'classifai-plugin-excerpt-generation': './src/js/features/excerpt-generation/index.js',

Check failure on line 31 in webpack.config.js

View workflow job for this annotation

GitHub Actions / eslint

Replace `·` with `⏎↹↹↹`
'classifai-plugin-classic-excerpt-generation': './src/js/features/excerpt-generation/classic/index.js',

Check failure on line 32 in webpack.config.js

View workflow job for this annotation

GitHub Actions / eslint

Replace `·` with `⏎↹↹↹`
'classifai-plugin-inserter-media-category': './src/js/features/image-generation/inserter-media-category.js',
'classifai-plugin-image-generation-media-modal': './src/js/features/image-generation/media-modal/index.js',
'classifai-plugin-image-generation-media-modal': [
'./src/js/features/image-generation/media-modal/index.js',
'./src/js/features/image-generation/extend-image-block-generate-image.js'
],
'classifai-plugin-image-generation-generate-image-media-upload': './src/js/features/image-generation/media-modal/views/generate-image-media-upload.js',
},
module: {
Expand Down

0 comments on commit 0f2bf9e

Please sign in to comment.