Add Content Generation integration to WordPress Quick Draft widget#1012
Merged
Add Content Generation integration to WordPress Quick Draft widget#1012
Conversation
FILE: QuickDraftIntegration.php ----------------------------------------------------------------------------------------------- FOUND 7 ERRORS AND 9 WARNINGS AFFECTING 16 LINES ----------------------------------------------------------------------------------------------- 17 | ERROR | Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 70 | ERROR | Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 128 | ERROR | Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 164 | WARNING | Array double arrow not aligned correctly; expected 1 space(s) between "'sanitize_callback'" and double arrow, but found 2. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 165 | WARNING | Array double arrow not aligned correctly; expected 1 space(s) between "'validate_callback'" and double arrow, but found 2. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 166 | WARNING | Array double arrow not aligned correctly; expected 7 space(s) between "'description'" and double arrow, but found 8. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 179 | ERROR | Function closing brace must go on the next line following the body; found 1 blank lines before brace (PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose) 187 | WARNING | The method parameter $request is never used (Generic.CodeAnalysis.UnusedFunctionParameter.Found) 255 | ERROR | Opening parenthesis of a multi-line function call must be the last content on the line (PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket) 256 | WARNING | Array double arrow not aligned correctly; expected 2 space(s) between "'post_id'" and double arrow, but found 6. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 257 | WARNING | Array double arrow not aligned correctly; expected 1 space(s) between "'edit_url'" and double arrow, but found 5. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 258 | WARNING | Array double arrow not aligned correctly; expected 2 space(s) between "'content'" and double arrow, but found 6. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 259 | WARNING | Array double arrow not aligned correctly; expected 4 space(s) between "'title'" and double arrow, but found 8. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 260 | WARNING | Array double arrow not aligned correctly; expected 2 space(s) between "'success'" and double arrow, but found 6. (WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned) 261 | ERROR | Closing parenthesis of a multi-line function call must be on a line by itself (PEAR.Functions.FunctionCallSignature.CloseBracketLine) 264 | ERROR | The closing brace for the class must go on the next line after the body (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody) -----------------------------------------------------------------------------------------------
/home/runner/work/classifai/classifai/src/js/features/quick-draft/index.js Error: 11:56 error Insert `·` prettier/prettier Error: 17:3 error Unexpected console statement no-console Error: 21:2 error Unexpected console statement no-console Error: 24:46 error Insert `·` prettier/prettier Error: 35:9 error Variables should not be assigned until just prior its first reference. An early return statement may leave this variable unused @wordpress/no-unused-vars-before-return Error: 40:4 error Unexpected alert no-alert Error: 40:4 error 'alert' is not defined no-undef Error: 45:50 error Replace `·'classifai-generate-content'·` with `⏎↹↹↹'classifai-generate-content'⏎↹↹` prettier/prettier Error: 46:1 error Delete `↹↹` prettier/prettier Error: 49:26 error 'classifaiQuickDraft' is not defined no-undef Error: 51:3 error Unexpected console statement no-console Error: 58:5 error Expected property shorthand object-shorthand Error: 59:5 error Expected property shorthand object-shorthand Error: 61:6 error Replace `.then(·function` with `⏎↹↹↹.then(·function·` prettier/prettier Error: 62:4 error Replace `console.log(·'ClassifAI·Quick·Draft:·API·response·received',·response·);` with `↹console.log(⏎↹↹↹↹↹'ClassifAI·Quick·Draft:·API·response·received',⏎↹↹↹↹↹response` prettier/prettier Error: 62:4 error Unexpected console statement no-console Error: 63:4 error Insert `↹);⏎` prettier/prettier Error: 64:4 error Insert `↹` prettier/prettier Error: 65:5 error Insert `↹` prettier/prettier Error: 66:1 error Insert `↹` prettier/prettier Error: 67:5 error Insert `↹` prettier/prettier Error: 69:1 error Insert `↹` prettier/prettier Error: 70:5 error Insert `↹` prettier/prettier Error: 72:1 error Insert `↹` prettier/prettier Error: 73:1 error Insert `↹` prettier/prettier Error: 74:5 error Replace `setTimeout(·function` with `↹setTimeout(·function·` prettier/prettier Error: 75:1 error Insert `↹` prettier/prettier Error: 75:6 error 'location' is not defined no-undef Error: 76:5 error Insert `↹` prettier/prettier Error: 77:4 error Insert `↹` prettier/prettier Error: 78:1 error Replace `↹↹↹↹throw·new·Error(·response.message·||·classifaiQuickDraft.error·` with `↹↹↹↹↹throw·new·Error(⏎↹↹↹↹↹↹response.message·||·classifaiQuickDraft.error⏎↹↹↹↹↹` prettier/prettier Error: 78:42 error 'classifaiQuickDraft' is not defined no-undef Error: 79:1 error Insert `↹` prettier/prettier Error: 80:3 error Replace `}·).catch(·function` with `↹}·)⏎↹↹↹.catch(·function·` prettier/prettier Error: 81:1 error Insert `↹` prettier/prettier Error: 81:4 error Unexpected console statement no-console Error: 82:1 error Insert `↹` prettier/prettier Error: 82:4 error Unexpected alert no-alert Error: 82:4 error 'alert' is not defined no-undef Error: 82:28 error 'classifaiQuickDraft' is not defined no-undef Error: 83:3 error Replace `}·).finally(·function` with `↹}·)⏎↹↹↹.finally(·function·` prettier/prettier Error: 84:1 error Insert `↹` prettier/prettier Error: 85:1 error Insert `↹` prettier/prettier Error: 86:4 error Insert `↹` prettier/prettier Error: 86:27 error 'classifaiQuickDraft' is not defined no-undef Error: 87:1 error Insert `↹` prettier/prettier Error: 114:53 error Insert `·` prettier/prettier Error: 120:23 error Insert `·` prettier/prettier
dkotter
requested changes
Sep 24, 2025
Member
|
Punting to 3.9.0 so we can wrap up other efforts targeted for 3.8.0 and come back to wrap this up in a bit for the next major release. |
…te the JS to translate strings, use domReady and add the create button
…that is no longer needed. Minor coding improvements to match what we do elsewhere
…ered properly. Don't automatically hide notices or refresh the page
…if a post can't be created. Remove JS variables we don't need. Ensure post type is available in the REST API
dkotter
previously approved these changes
Feb 10, 2026
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
dkotter
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
This PR integrates ClassifAI's Content Generation feature with WordPress's native Quick Draft widget on the admin dashboard. Users can now generate AI-powered content directly from the Quick Draft interface, creating new draft posts with AI-generated content based on their prompts.
Key Features:
Closes #989.
How to test the Change
Enable Content Generation:
Test Quick Draft Integration:
Changelog Entry
Credits
Props @jeffpaul @faisal-alvi
Checklist: