Skip to content

Commit

Permalink
move exerpt generation out as a separate plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Sep 19, 2024
1 parent 02a55ef commit 40f464e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 162 deletions.
8 changes: 4 additions & 4 deletions includes/Classifai/Features/ExcerptGeneration.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ public function enqueue_editor_assets() {

// This script removes the core excerpt panel and replaces it with our own.
wp_enqueue_script(
'classifai-post-excerpt',
CLASSIFAI_PLUGIN_URL . 'dist/post-excerpt.js',
array_merge( get_asset_info( 'post-excerpt', 'dependencies' ), [ 'lodash' ] ),
get_asset_info( 'post-excerpt', 'version' ),
'classifai-plugin-excerpt-generation-js',
CLASSIFAI_PLUGIN_URL . 'dist/classifai-plugin-excerpt-generation.js',
array_merge( get_asset_info( 'classifai-plugin-excerpt-generation', 'dependencies' ), [ 'lodash' ] ),
get_asset_info( 'classifai-plugin-excerpt-generation', 'version' ),
true
);
}
Expand Down
156 changes: 0 additions & 156 deletions src/js/gutenberg-plugins/post-status-info.js

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { useState } from '@wordpress/element';
import apiFetch from '@wordpress/api-fetch';
import { DisableFeatureButton } from '../components';
import { DisableFeatureButton } from '../../components';

/**
* PostExcerpt component.
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = {
'recommended-content-block-frontend': [
'./includes/Classifai/Blocks/recommended-content-block/frontend.js',
],
'post-excerpt': [ './src/js/post-excerpt/index.js' ],
'media-modal': [ './src/js/media-modal/index.js' ],
'inserter-media-category': [
'./src/js/gutenberg-plugins/inserter-media-category.js',
Expand All @@ -42,6 +41,7 @@ module.exports = {
'classifai-plugin-text-to-speech': './src/js/plugins/text-to-speech/index.js',
'classifai-plugin-content-resizing': './src/js/plugins/content-resizing/index.js',
'classifai-plugin-title-generation': './src/js/plugins/title-generation/index.js',
'classifai-plugin-excerpt-generation': './src/js/plugins/excerpt-generation/index.js',
},
module: {
rules: [
Expand Down

0 comments on commit 40f464e

Please sign in to comment.