Changeset 3843270
- Timestamp:
- 12/03/2026 07:51:33 PM (10 hours ago)
- Location:
- miyuru-ai-content-assistant
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/1.9.0 (copied) (copied from miyuru-ai-content-assistant/trunk )
-
tags/1.9.0/includes/class-sc-admin.php (modified) (2 diffs)
-
tags/1.9.0/includes/class-sc-brand.php (added)
-
tags/1.9.0/includes/class-sc-mcp-server.php (modified) (2 diffs)
-
tags/1.9.0/includes/class-sc-tools.php (modified) (1 diff)
-
tags/1.9.0/includes/class-sc-undo.php (modified) (4 diffs)
-
tags/1.9.0/includes/tools/class-sc-tools-commerce.php (modified) (1 diff)
-
tags/1.9.0/miyuru-ai-content-assistant.php (modified) (3 diffs)
-
tags/1.9.0/readme.txt (modified) (3 diffs)
-
trunk/includes/class-sc-admin.php (modified) (2 diffs)
-
trunk/includes/class-sc-brand.php (added)
-
trunk/includes/class-sc-mcp-server.php (modified) (2 diffs)
-
trunk/includes/class-sc-tools.php (modified) (1 diff)
-
trunk/includes/class-sc-undo.php (modified) (4 diffs)
-
trunk/includes/tools/class-sc-tools-commerce.php (modified) (1 diff)
-
trunk/miyuru-ai-content-assistant.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-admin.php
r3843226 r3843270 173 173 self::redirect( $r['sent'] ? 'Report sent to ' . $r['to'] . '.' : 'The e-mail could not be sent. Check the site\'s mail setup.', $r['sent'] ? 'success' : 'error' ); 174 174 break; 175 176 case 'brand_save': 177 $in = array(); 178 foreach ( array_keys( MIYURU_Brand::fields() ) as $k ) { 179 $in[ $k ] = isset( $_POST[ 'brand_' . $k ] ) ? sanitize_textarea_field( wp_unslash( $_POST[ 'brand_' . $k ] ) ) : ''; 180 } 181 MIYURU_Brand::save( $in ); 182 self::redirect( 'Brand guide saved. Every AI that connects will see it.' ); 183 break; 184 175 185 176 186 case 'clear_log': … … 517 527 518 528 529 <div class="sc-card" id="brand"> 530 <h2>Brand guide</h2> 531 <p class="sc-sub">Tell every AI once how your site should sound. It is shown to the AI when it connects, and it can check drafts against it (banned words, missing call to action, links to add).</p> 532 <?php $sc_brand = MIYURU_Brand::get(); ?> 533 <?php self::form_open( 'brand_save' ); ?> 534 <div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px"> 535 <?php 536 $sc_ph = array( 537 'voice' => 'Friendly and plain. Short sentences. Speak to the reader as "you".', 538 'audience' => 'Small business owners who are not technical.', 539 'do' => 'Use British spelling. Give one concrete example per section.', 540 'dont' => 'No hype, no exclamation marks, no prices in blog posts.', 541 'banned' => 'revolutionary, game-changer, delve, unlock', 542 'cta' => 'Book a free 15-minute call', 543 'links' => "pricing | https://example.com/pricing\nfree call | https://example.com/contact", 544 'notes' => 'Our product is called "Acme Cloud" (never "AcmeCloud").', 545 ); 546 foreach ( MIYURU_Brand::fields() as $k => $label ) : 547 ?> 548 <label><strong><?php echo esc_html( $label ); ?></strong><br> 549 <textarea name="brand_<?php echo esc_attr( $k ); ?>" rows="<?php echo in_array( $k, array( 'banned', 'cta' ), true ) ? 2 : 3; ?>" style="width:100%" placeholder="<?php echo esc_attr( $sc_ph[ $k ] ); ?>"><?php echo esc_textarea( $sc_brand[ $k ] ); ?></textarea> 550 </label> 551 <?php endforeach; ?> 552 </div> 553 <p><?php submit_button( 'Save brand guide', 'secondary', 'submit', false ); ?></p> 554 </form> 555 </div> 556 557 519 558 <div class="sc-card" id="report"> 520 559 <h2>Activity report</h2> -
miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-mcp-server.php
r3843226 r3843270 215 215 return implode( 216 216 "\n", 217 array (217 array_filter( array( 218 218 'You are connected to the WordPress site "' . get_bloginfo( 'name' ) . '" (' . home_url() . '). This connection only works for this one site.', 219 219 $scope, … … 223 223 'SEO: run seo_audit, then fix with bulk_set_seo, fix_image_alts, fix_content_image_alts, add_redirect.', 224 224 'Deletes go to the trash unless the site owner allowed permanent deletion. Confirm destructive actions with the user before calling them.', 225 ) 225 MIYURU_Brand::instructions(), 226 ) ) 226 227 ); 227 228 } -
miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-tools.php
r3843212 r3843270 53 53 MIYURU_Tools_Extras::register(); 54 54 MIYURU_Report::register_tools(); 55 MIYURU_Brand::register_tools(); 55 56 MIYURU_Tools_Design::register(); 56 57 MIYURU_Tools_Site::register(); -
miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-undo.php
r3843212 r3843270 22 22 'update_content', 'schedule_content', 'set_seo', 'update_elementor_element', 'update_shortcode_node', 23 23 'save_product', 'update_media', 'restore_revision', 'update_block', 'insert_block', 'delete_block', 24 'move_block', 'update_acf_fields', 'add_internal_link', 24 'move_block', 'update_acf_fields', 'add_internal_link', 'save_variation', 'save_coupon', 'save_product_category', 25 25 ); 26 26 } … … 28 28 /** Tools that create something; undo moves it to the trash. */ 29 29 private static function create_tools() { 30 return array( 'create_content', 'duplicate_content', 'create_translation' );30 return array( 'create_content', 'duplicate_content', 'create_translation', 'create_staged_copy' ); 31 31 } 32 32 … … 41 41 $id = (int) wp_get_post_parent_id( (int) $args['revision_id'] ); 42 42 } 43 if ( 'save_product' === $tool && ! $id ) { 43 if ( 'save_variation' === $tool ) { 44 $id = isset( $args['variation_id'] ) ? (int) $args['variation_id'] : 0; 45 } 46 if ( 'save_product_category' === $tool ) { 47 return null; 48 } 49 if ( in_array( $tool, array( 'save_product', 'save_coupon', 'save_variation' ), true ) && ! $id ) { 44 50 return array( 'kind' => 'create' ); 45 51 } … … 123 129 case 'set_robots_txt': 124 130 return array( 'miyuru_robots_extra' ); 131 case 'set_brand_guide': 132 return array( 'miyuru_brand' ); 125 133 case 'add_redirect': 126 134 case 'delete_redirect': -
miyuru-ai-content-assistant/tags/1.9.0/includes/tools/class-sc-tools-commerce.php
r3843212 r3843270 234 234 return array( 'message' => "Order #{$o->get_order_number()} is now $status." ); 235 235 } 236 236 237 } -
miyuru-ai-content-assistant/tags/1.9.0/miyuru-ai-content-assistant.php
r3843226 r3843270 3 3 * Plugin Name: Miyuru AI Content Assistant 4 4 * Description: Let any AI (Claude, ChatGPT, Cursor, n8n) work on your WordPress content, media and SEO through MCP or a REST API, with a separate key per AI, an activity log, undo and approval. 5 * Version: 1. 7.45 * Version: 1.9.0 6 6 * Requires at least: 6.2 7 7 * Requires PHP: 7.4 … … 20 20 21 21 define( 'MIYURU_LITE', true ); 22 define( 'MIYURU_VERSION', '1. 7.4' );22 define( 'MIYURU_VERSION', '1.9.0' ); 23 23 define( 'MIYURU_FILE', __FILE__ ); 24 24 define( 'MIYURU_DIR', plugin_dir_path( __FILE__ ) ); … … 34 34 require_once MIYURU_DIR . 'includes/class-sc-approval.php'; 35 35 require_once MIYURU_DIR . 'includes/class-sc-report.php'; 36 require_once MIYURU_DIR . 'includes/class-sc-brand.php'; 36 37 require_once MIYURU_DIR . 'includes/tools/class-sc-tools-content.php'; 37 38 require_once MIYURU_DIR . 'includes/tools/class-sc-tools-media.php'; -
miyuru-ai-content-assistant/tags/1.9.0/readme.txt
r3843226 r3843270 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 7.47 Stable tag: 1.9.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 * Create Polylang or WPML translations 27 27 * Check page speed and site health, clear caches 28 * Follow your brand guide: voice, audience, banned words, call to action and link targets, saved once for every AI 28 29 29 30 **What it does not do** … … 71 72 == Changelog == 72 73 74 = 1.8.0 = 75 * Brand guide: save your voice, audience, rules, banned words, call to action and link targets once. Every AI sees it when it connects and can check drafts against it. 76 73 77 = 1.7.4 = 74 78 * Settings page: information about the optional paid plugin, which can import this plugin's keys and settings. -
miyuru-ai-content-assistant/trunk/includes/class-sc-admin.php
r3843226 r3843270 173 173 self::redirect( $r['sent'] ? 'Report sent to ' . $r['to'] . '.' : 'The e-mail could not be sent. Check the site\'s mail setup.', $r['sent'] ? 'success' : 'error' ); 174 174 break; 175 176 case 'brand_save': 177 $in = array(); 178 foreach ( array_keys( MIYURU_Brand::fields() ) as $k ) { 179 $in[ $k ] = isset( $_POST[ 'brand_' . $k ] ) ? sanitize_textarea_field( wp_unslash( $_POST[ 'brand_' . $k ] ) ) : ''; 180 } 181 MIYURU_Brand::save( $in ); 182 self::redirect( 'Brand guide saved. Every AI that connects will see it.' ); 183 break; 184 175 185 176 186 case 'clear_log': … … 517 527 518 528 529 <div class="sc-card" id="brand"> 530 <h2>Brand guide</h2> 531 <p class="sc-sub">Tell every AI once how your site should sound. It is shown to the AI when it connects, and it can check drafts against it (banned words, missing call to action, links to add).</p> 532 <?php $sc_brand = MIYURU_Brand::get(); ?> 533 <?php self::form_open( 'brand_save' ); ?> 534 <div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px"> 535 <?php 536 $sc_ph = array( 537 'voice' => 'Friendly and plain. Short sentences. Speak to the reader as "you".', 538 'audience' => 'Small business owners who are not technical.', 539 'do' => 'Use British spelling. Give one concrete example per section.', 540 'dont' => 'No hype, no exclamation marks, no prices in blog posts.', 541 'banned' => 'revolutionary, game-changer, delve, unlock', 542 'cta' => 'Book a free 15-minute call', 543 'links' => "pricing | https://example.com/pricing\nfree call | https://example.com/contact", 544 'notes' => 'Our product is called "Acme Cloud" (never "AcmeCloud").', 545 ); 546 foreach ( MIYURU_Brand::fields() as $k => $label ) : 547 ?> 548 <label><strong><?php echo esc_html( $label ); ?></strong><br> 549 <textarea name="brand_<?php echo esc_attr( $k ); ?>" rows="<?php echo in_array( $k, array( 'banned', 'cta' ), true ) ? 2 : 3; ?>" style="width:100%" placeholder="<?php echo esc_attr( $sc_ph[ $k ] ); ?>"><?php echo esc_textarea( $sc_brand[ $k ] ); ?></textarea> 550 </label> 551 <?php endforeach; ?> 552 </div> 553 <p><?php submit_button( 'Save brand guide', 'secondary', 'submit', false ); ?></p> 554 </form> 555 </div> 556 557 519 558 <div class="sc-card" id="report"> 520 559 <h2>Activity report</h2> -
miyuru-ai-content-assistant/trunk/includes/class-sc-mcp-server.php
r3843226 r3843270 215 215 return implode( 216 216 "\n", 217 array (217 array_filter( array( 218 218 'You are connected to the WordPress site "' . get_bloginfo( 'name' ) . '" (' . home_url() . '). This connection only works for this one site.', 219 219 $scope, … … 223 223 'SEO: run seo_audit, then fix with bulk_set_seo, fix_image_alts, fix_content_image_alts, add_redirect.', 224 224 'Deletes go to the trash unless the site owner allowed permanent deletion. Confirm destructive actions with the user before calling them.', 225 ) 225 MIYURU_Brand::instructions(), 226 ) ) 226 227 ); 227 228 } -
miyuru-ai-content-assistant/trunk/includes/class-sc-tools.php
r3843212 r3843270 53 53 MIYURU_Tools_Extras::register(); 54 54 MIYURU_Report::register_tools(); 55 MIYURU_Brand::register_tools(); 55 56 MIYURU_Tools_Design::register(); 56 57 MIYURU_Tools_Site::register(); -
miyuru-ai-content-assistant/trunk/includes/class-sc-undo.php
r3843212 r3843270 22 22 'update_content', 'schedule_content', 'set_seo', 'update_elementor_element', 'update_shortcode_node', 23 23 'save_product', 'update_media', 'restore_revision', 'update_block', 'insert_block', 'delete_block', 24 'move_block', 'update_acf_fields', 'add_internal_link', 24 'move_block', 'update_acf_fields', 'add_internal_link', 'save_variation', 'save_coupon', 'save_product_category', 25 25 ); 26 26 } … … 28 28 /** Tools that create something; undo moves it to the trash. */ 29 29 private static function create_tools() { 30 return array( 'create_content', 'duplicate_content', 'create_translation' );30 return array( 'create_content', 'duplicate_content', 'create_translation', 'create_staged_copy' ); 31 31 } 32 32 … … 41 41 $id = (int) wp_get_post_parent_id( (int) $args['revision_id'] ); 42 42 } 43 if ( 'save_product' === $tool && ! $id ) { 43 if ( 'save_variation' === $tool ) { 44 $id = isset( $args['variation_id'] ) ? (int) $args['variation_id'] : 0; 45 } 46 if ( 'save_product_category' === $tool ) { 47 return null; 48 } 49 if ( in_array( $tool, array( 'save_product', 'save_coupon', 'save_variation' ), true ) && ! $id ) { 44 50 return array( 'kind' => 'create' ); 45 51 } … … 123 129 case 'set_robots_txt': 124 130 return array( 'miyuru_robots_extra' ); 131 case 'set_brand_guide': 132 return array( 'miyuru_brand' ); 125 133 case 'add_redirect': 126 134 case 'delete_redirect': -
miyuru-ai-content-assistant/trunk/includes/tools/class-sc-tools-commerce.php
r3843212 r3843270 234 234 return array( 'message' => "Order #{$o->get_order_number()} is now $status." ); 235 235 } 236 236 237 } -
miyuru-ai-content-assistant/trunk/miyuru-ai-content-assistant.php
r3843226 r3843270 3 3 * Plugin Name: Miyuru AI Content Assistant 4 4 * Description: Let any AI (Claude, ChatGPT, Cursor, n8n) work on your WordPress content, media and SEO through MCP or a REST API, with a separate key per AI, an activity log, undo and approval. 5 * Version: 1. 7.45 * Version: 1.9.0 6 6 * Requires at least: 6.2 7 7 * Requires PHP: 7.4 … … 20 20 21 21 define( 'MIYURU_LITE', true ); 22 define( 'MIYURU_VERSION', '1. 7.4' );22 define( 'MIYURU_VERSION', '1.9.0' ); 23 23 define( 'MIYURU_FILE', __FILE__ ); 24 24 define( 'MIYURU_DIR', plugin_dir_path( __FILE__ ) ); … … 34 34 require_once MIYURU_DIR . 'includes/class-sc-approval.php'; 35 35 require_once MIYURU_DIR . 'includes/class-sc-report.php'; 36 require_once MIYURU_DIR . 'includes/class-sc-brand.php'; 36 37 require_once MIYURU_DIR . 'includes/tools/class-sc-tools-content.php'; 37 38 require_once MIYURU_DIR . 'includes/tools/class-sc-tools-media.php'; -
miyuru-ai-content-assistant/trunk/readme.txt
r3843226 r3843270 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 7.47 Stable tag: 1.9.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 * Create Polylang or WPML translations 27 27 * Check page speed and site health, clear caches 28 * Follow your brand guide: voice, audience, banned words, call to action and link targets, saved once for every AI 28 29 29 30 **What it does not do** … … 71 72 == Changelog == 72 73 74 = 1.8.0 = 75 * Brand guide: save your voice, audience, rules, banned words, call to action and link targets once. Every AI sees it when it connects and can check drafts against it. 76 73 77 = 1.7.4 = 74 78 * Settings page: information about the optional paid plugin, which can import this plugin's keys and settings.
Note:
See TracChangeset
for help on using the changeset viewer.