Plugin Directory

Changeset 3843270


Ignore:
Timestamp:
12/03/2026 07:51:33 PM (10 hours ago)
Author:
miyuru2u
Message:

Update to version 1.9.0 from GitHub

Location:
miyuru-ai-content-assistant
Files:
2 added
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-admin.php

    r3843226 r3843270  
    173173                                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' );
    174174                                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
    175185
    176186                        case 'clear_log':
    … …  
    517527
    518528
     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
    519558                        <div class="sc-card" id="report">
    520559                                <h2>Activity report</h2>
  • miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-mcp-server.php

    r3843226 r3843270  
    215215                return implode(
    216216                        "\n",
    217                         array(
     217                        array_filter( array(
    218218                                'You are connected to the WordPress site "' . get_bloginfo( 'name' ) . '" (' . home_url() . '). This connection only works for this one site.',
    219219                                $scope,
    … …  
    223223                                'SEO: run seo_audit, then fix with bulk_set_seo, fix_image_alts, fix_content_image_alts, add_redirect.',
    224224                                '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                        ) )
    226227                );
    227228        }
  • miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-tools.php

    r3843212 r3843270  
    5353                        MIYURU_Tools_Extras::register();
    5454                        MIYURU_Report::register_tools();
     55                        MIYURU_Brand::register_tools();
    5556                        MIYURU_Tools_Design::register();
    5657                        MIYURU_Tools_Site::register();
  • miyuru-ai-content-assistant/tags/1.9.0/includes/class-sc-undo.php

    r3843212 r3843270  
    2222                        'update_content', 'schedule_content', 'set_seo', 'update_elementor_element', 'update_shortcode_node',
    2323                        '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',
    2525                );
    2626        }
    … …  
    2828        /** Tools that create something; undo moves it to the trash. */
    2929        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' );
    3131        }
    3232
    … …  
    4141                                        $id = (int) wp_get_post_parent_id( (int) $args['revision_id'] );
    4242                                }
    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 ) {
    4450                                        return array( 'kind' => 'create' );
    4551                                }
    … …  
    123129                        case 'set_robots_txt':
    124130                                return array( 'miyuru_robots_extra' );
     131                        case 'set_brand_guide':
     132                                return array( 'miyuru_brand' );
    125133                        case 'add_redirect':
    126134                        case 'delete_redirect':
  • miyuru-ai-content-assistant/tags/1.9.0/includes/tools/class-sc-tools-commerce.php

    r3843212 r3843270  
    234234                return array( 'message' => "Order #{$o->get_order_number()} is now $status." );
    235235        }
     236
    236237}
  • miyuru-ai-content-assistant/tags/1.9.0/miyuru-ai-content-assistant.php

    r3843226 r3843270  
    33 * Plugin Name:       Miyuru AI Content Assistant
    44 * 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.4
     5 * Version:           1.9.0
    66 * Requires at least: 6.2
    77 * Requires PHP:      7.4
    … …  
    2020
    2121define( 'MIYURU_LITE', true );
    22 define( 'MIYURU_VERSION', '1.7.4' );
     22define( 'MIYURU_VERSION', '1.9.0' );
    2323define( 'MIYURU_FILE', __FILE__ );
    2424define( 'MIYURU_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    3434require_once MIYURU_DIR . 'includes/class-sc-approval.php';
    3535require_once MIYURU_DIR . 'includes/class-sc-report.php';
     36require_once MIYURU_DIR . 'includes/class-sc-brand.php';
    3637require_once MIYURU_DIR . 'includes/tools/class-sc-tools-content.php';
    3738require_once MIYURU_DIR . 'includes/tools/class-sc-tools-media.php';
  • miyuru-ai-content-assistant/tags/1.9.0/readme.txt

    r3843226 r3843270  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.7.4
     7Stable tag: 1.9.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2626* Create Polylang or WPML translations
    2727* 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
    2829
    2930**What it does not do**
    … …  
    7172== Changelog ==
    7273
     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
    7377= 1.7.4 =
    7478* 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  
    173173                                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' );
    174174                                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
    175185
    176186                        case 'clear_log':
    … …  
    517527
    518528
     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
    519558                        <div class="sc-card" id="report">
    520559                                <h2>Activity report</h2>
  • miyuru-ai-content-assistant/trunk/includes/class-sc-mcp-server.php

    r3843226 r3843270  
    215215                return implode(
    216216                        "\n",
    217                         array(
     217                        array_filter( array(
    218218                                'You are connected to the WordPress site "' . get_bloginfo( 'name' ) . '" (' . home_url() . '). This connection only works for this one site.',
    219219                                $scope,
    … …  
    223223                                'SEO: run seo_audit, then fix with bulk_set_seo, fix_image_alts, fix_content_image_alts, add_redirect.',
    224224                                '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                        ) )
    226227                );
    227228        }
  • miyuru-ai-content-assistant/trunk/includes/class-sc-tools.php

    r3843212 r3843270  
    5353                        MIYURU_Tools_Extras::register();
    5454                        MIYURU_Report::register_tools();
     55                        MIYURU_Brand::register_tools();
    5556                        MIYURU_Tools_Design::register();
    5657                        MIYURU_Tools_Site::register();
  • miyuru-ai-content-assistant/trunk/includes/class-sc-undo.php

    r3843212 r3843270  
    2222                        'update_content', 'schedule_content', 'set_seo', 'update_elementor_element', 'update_shortcode_node',
    2323                        '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',
    2525                );
    2626        }
    … …  
    2828        /** Tools that create something; undo moves it to the trash. */
    2929        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' );
    3131        }
    3232
    … …  
    4141                                        $id = (int) wp_get_post_parent_id( (int) $args['revision_id'] );
    4242                                }
    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 ) {
    4450                                        return array( 'kind' => 'create' );
    4551                                }
    … …  
    123129                        case 'set_robots_txt':
    124130                                return array( 'miyuru_robots_extra' );
     131                        case 'set_brand_guide':
     132                                return array( 'miyuru_brand' );
    125133                        case 'add_redirect':
    126134                        case 'delete_redirect':
  • miyuru-ai-content-assistant/trunk/includes/tools/class-sc-tools-commerce.php

    r3843212 r3843270  
    234234                return array( 'message' => "Order #{$o->get_order_number()} is now $status." );
    235235        }
     236
    236237}
  • miyuru-ai-content-assistant/trunk/miyuru-ai-content-assistant.php

    r3843226 r3843270  
    33 * Plugin Name:       Miyuru AI Content Assistant
    44 * 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.4
     5 * Version:           1.9.0
    66 * Requires at least: 6.2
    77 * Requires PHP:      7.4
    … …  
    2020
    2121define( 'MIYURU_LITE', true );
    22 define( 'MIYURU_VERSION', '1.7.4' );
     22define( 'MIYURU_VERSION', '1.9.0' );
    2323define( 'MIYURU_FILE', __FILE__ );
    2424define( 'MIYURU_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    3434require_once MIYURU_DIR . 'includes/class-sc-approval.php';
    3535require_once MIYURU_DIR . 'includes/class-sc-report.php';
     36require_once MIYURU_DIR . 'includes/class-sc-brand.php';
    3637require_once MIYURU_DIR . 'includes/tools/class-sc-tools-content.php';
    3738require_once MIYURU_DIR . 'includes/tools/class-sc-tools-media.php';
  • miyuru-ai-content-assistant/trunk/readme.txt

    r3843226 r3843270  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.7.4
     7Stable tag: 1.9.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2626* Create Polylang or WPML translations
    2727* 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
    2829
    2930**What it does not do**
    … …  
    7172== Changelog ==
    7273
     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
    7377= 1.7.4 =
    7478* 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.