Plugin Directory

Changeset 3789170


Ignore:
Timestamp:
11/07/2026 08:14:52 AM (less than one hour ago)
Author:
WPZOOM
Message:

Update to version 0.8.0 from GitHub

Location:
wpzoom-ai-connect
Files:
2 added
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpzoom-ai-connect/tags/0.8.0/includes/abilities-site.php

    r3787541 r3789170  
    22/**
    33 * Registers the third wave of wpzoom/* abilities, picked from what WPZOOM support answers most:
    4  * the older Theme Options panel, available updates, and editing existing Recipe Card recipes.
     4 * Additional CSS, the older Theme Options panel, available updates, and editing existing Recipe Card recipes.
    55 *
    66 * @package WPZOOM_AI_Connect
    … …  
    4242                return array( 'type' => 'array', 'items' => array( 'type' => 'string' ), 'description' => $description );
    4343        };
     44
     45        /* ----- Additional CSS ----- */
     46
     47        wp_register_ability( 'wpzoom/get-custom-css', array(
     48                'label'               => 'Read the Additional CSS',
     49                'description'         => 'The site\'s Additional CSS (Customizer, or Site Editor styles on block themes): the full text, where it is edited, and the labels of changes the AI added earlier.',
     50                'category'            => 'wpzoom',
     51                'input_schema'        => $input( array() ),
     52                'output_schema'       => $object,
     53                'execute_callback'    => static function () {
     54                        return WPZOOM_AI_CSS::get();
     55                },
     56                'permission_callback' => $can( 'edit_theme_options' ),
     57                'meta'                => $meta( true, true ),
     58        ) );
     59
     60        wp_register_ability( 'wpzoom/add-custom-css', array(
     61                'label'               => 'Add Additional CSS',
     62                'description'         => 'Adds CSS to the site\'s Additional CSS under a short label, for small visual changes no theme setting covers (hover colors, spacing, hiding an element). Saving again with the same label replaces that change; empty "css" with a label removes it. CSS a person wrote is not touched, WordPress keeps a revision, and CSS the Customizer would reject (markup, a closing style tag, @import, unbalanced braces) is refused. Live immediately: prefer a theme setting when one exists, check selectors on the real page first, and confirm with the user. Needs WordPress\'s edit_css permission; the site owner can switch this off on the AI Connect screen.',
     63                'category'            => 'wpzoom',
     64                'input_schema'        => $input(
     65                        array(
     66                                'label' => $str( 'Short name for this change, e.g. "Menu hover color"', array( 'maxLength' => 80 ) ),
     67                                'css'   => $str( 'The CSS rules to add (empty to remove the change with this label)' ),
     68                        ),
     69                        array( 'label', 'css' )
     70                ),
     71                'output_schema'       => $object,
     72                'execute_callback'    => static function ( $in ) {
     73                        return WPZOOM_AI_CSS::add( (array) $in );
     74                },
     75                'permission_callback' => $can( 'edit_css' ),
     76                'meta'                => $meta( false, true, true ),
     77        ) );
    4478
    4579        /* ----- WPZOOM → Theme Options ----- */
  • wpzoom-ai-connect/tags/0.8.0/includes/class-wpzoom-ai-admin.php

    r3787541 r3789170  
    3030                add_action( 'admin_init', array( __CLASS__, 'maybe_redirect' ) );
    3131                add_action( 'admin_post_wpzoom_ai_disconnect', array( __CLASS__, 'handle_disconnect' ) );
     32                add_action( 'admin_post_wpzoom_ai_css_setting', array( __CLASS__, 'handle_css_setting' ) );
    3233                add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue' ) );
    3334                add_filter( 'plugin_action_links_' . plugin_basename( WPZOOM_AI_CONNECT_FILE ), array( __CLASS__, 'action_links' ) );
    … …  
    133134                }
    134135                wp_safe_redirect( self::url( array( 'wzai_disconnected' => 1 ) ) );
     136                exit;
     137        }
     138
     139        /** Lets the site owner allow or stop the connection editing Additional CSS. */
     140        public static function handle_css_setting(): void {
     141                check_admin_referer( 'wpzoom_ai_css_setting' );
     142                if ( ! current_user_can( 'manage_options' ) ) {
     143                        wp_die( esc_html__( 'You are not allowed to change this setting.', 'wpzoom-ai-connect' ) );
     144                }
     145                update_option( WPZOOM_AI_CSS::OPTION, empty( $_POST['allow_css'] ) ? '0' : '1', false );
     146                wp_safe_redirect( self::url( array( 'wzai_css_saved' => 1 ) ) . '#wzai-start' );
    135147                exit;
    136148        }
    … …  
    383395                                                self::notice( 'info', esc_html__( 'Disconnected. Your AI can no longer reach this site until you connect again.', 'wpzoom-ai-connect' ) );
    384396                                        }
     397                                        if ( isset( $_GET['wzai_css_saved'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     398                                                self::notice( 'ok', WPZOOM_AI_CSS::allowed_for_connection()
     399                                                        ? esc_html__( 'Saved. Your AI may add Additional CSS on this site.', 'wpzoom-ai-connect' )
     400                                                        : esc_html__( 'Saved. Your AI can no longer change Additional CSS on this site.', 'wpzoom-ai-connect' ) );
     401                                        }
    385402                                        if ( ! $s['has_api'] ) {
    386403                                                self::notice( 'warn', esc_html__( 'This plugin needs WordPress 6.9 or newer. Update WordPress from Dashboard → Updates, then come back.', 'wpzoom-ai-connect' ) );
    … …  
    467484                                                                        </div>
    468485                                                                        <div class="wzai-card__actions"><a class="wzai-btn wzai-btn--secondary wzai-btn--block" href="<?php echo esc_url( $s['connect_url'] ); ?>"><?php esc_html_e( 'Connect another account', 'wpzoom-ai-connect' ); ?></a></div>
    469                                                                         <div class="wzai-card__foot"><?php esc_html_e( 'Your AI acts as the connected user, limited to content, design settings and the abilities below. It can never install or remove plugins and themes, manage users, change Settings or add code.', 'wpzoom-ai-connect' ); ?></div>
     486                                                                        <div class="wzai-card__foot"><?php esc_html_e( 'Your AI acts as the connected user, limited to content, design settings and the abilities below. It can never install or remove plugins and themes, manage users, change Settings or add scripts.', 'wpzoom-ai-connect' ); ?></div>
     487                                                                        <?php if ( current_user_can( 'manage_options' ) ) : ?>
     488                                                                                <form class="wzai-card__foot" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
     489                                                                                        <?php wp_nonce_field( 'wpzoom_ai_css_setting' ); ?>
     490                                                                                        <input type="hidden" name="action" value="wpzoom_ai_css_setting">
     491                                                                                        <label><input type="checkbox" name="allow_css" value="1" <?php checked( WPZOOM_AI_CSS::allowed_for_connection() ); ?> onchange="this.form.submit()"> <?php esc_html_e( 'Let your AI add Additional CSS (labelled, with a revision for every change)', 'wpzoom-ai-connect' ); ?></label>
     492                                                                                        <noscript><button type="submit" class="wzai-btn wzai-btn--ghost wzai-btn--sm"><?php esc_html_e( 'Save', 'wpzoom-ai-connect' ); ?></button></noscript>
     493                                                                                </form>
     494                                                                        <?php endif; ?>
    470495                                                                <?php else : ?>
    471496                                                                        <p class="wzai-card__about"><?php esc_html_e( 'Sign in with your email, approve the connection on this site, and you are back here. Connecting lets the WPZOOM connector act on this site as you, limited to content, design settings and this plugin\'s abilities, until you disconnect.', 'wpzoom-ai-connect' ); ?></p>
  • wpzoom-ai-connect/tags/0.8.0/includes/class-wpzoom-ai-scope.php

    r3787541 r3789170  
    1111 *   - change site options (the Settings screens), languages, privacy tools or multisite settings;
    1212 *   - edit theme or plugin files, or save unfiltered HTML and uploads (content goes through the same filters as
    13  *     an editor's);
     13 *     an editor's). Additional CSS is the one exception: allowed unless the site owner switches it off on the
     14 *     AI Connect screen, and still subject to WordPress's own edit_css rules;
    1415 *   - reach REST routes outside WordPress core (wp/v2), the Abilities API and oEmbed, or use XML-RPC.
    1516 * The user's own sessions and their other application passwords are not affected.
    … …  
    5152                'unfiltered_html',
    5253                'unfiltered_upload',
    53                 'edit_css',
    5454                'import',
    5555                'manage_privacy_options',
    … …  
    128128                        return $caps;
    129129                }
    130                 $caps   = (array) $caps;
     130                $caps = (array) $caps;
     131                if ( 'edit_css' === $cap ) {
     132                        // Additional CSS: WordPress maps edit_css to the unfiltered_html primitive, which the connection never has
     133                        // for posts. The site owner decides for CSS (AI Connect screen, on by default); core's own rules still
     134                        // apply (DISALLOW_UNFILTERED_HTML, super admins only on multisite) because the mapped caps are kept.
     135                        if ( ! WPZOOM_AI_CSS::allowed_for_connection() && ! in_array( 'do_not_allow', $caps, true ) ) {
     136                                $caps[] = 'do_not_allow';
     137                        }
     138                        return $caps;
     139                }
    131140                $denied = in_array( $cap, self::DENIED_CAPS, true ) || in_array( $cap, self::DENIED_USER_CAPS, true ) || array_intersect( $caps, self::DENIED_CAPS );
    132141                if ( ! $denied && ! self::is_read_request() ) {
  • wpzoom-ai-connect/tags/0.8.0/readme.txt

    r3787541 r3789170  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.7.3
     7Stable tag: 0.8.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2626* List and change theme settings: colors, global palette, header and footer layout, fonts, slider, and the rest of the Customizer.
    2727* List and change the options in WPZOOM → Theme Options on older WPZOOM themes (Tribune, Indigo, Foodica, Academica and more): homepage sections, featured categories, banners.
     28* Read and add Additional CSS for small visual changes no setting covers (a hover color, spacing, hiding an element). Each change is a labelled block it can replace or remove, CSS you wrote is never touched, WordPress keeps a revision, and you can switch this off on the AI Connect screen.
    2829* List the theme's design sections (hero, services, pricing, FAQ, team, testimonials, contact…) and add them to a page, or create a draft page from one.
    2930* Edit pages built with Elementor: read a page's widgets (Elementor, Elementor Pro and WPZOOM Elementor Addons) and change their texts, links, images and lists, such as team members or pricing features, saved through Elementor with a revision.
    … …  
    5657= Does the AI get full access to my site? =
    5758
    58 No. The connection is an application password named "WPZOOM AI Connect" for the WordPress user who approved it, and this plugin gives requests made with it a reduced copy of that user's permissions. Through it the AI can work on content (posts, pages, media, menus), the theme's design settings and the abilities listed on the status page. It can never install, update, activate or delete plugins and themes, switch themes, create, edit or delete users, add or remove application passwords, change the Settings screens, edit theme or plugin files, save unfiltered HTML or use XML-RPC, and it reaches only WordPress core's REST API, the Abilities API and oEmbed. Writes default to drafts where possible, and nothing is deleted. Your own sessions and your other application passwords are not affected. Disconnect any time from the AI Connect screen or under Users → Profile → Application Passwords.
     59No. The connection is an application password named "WPZOOM AI Connect" for the WordPress user who approved it, and this plugin gives requests made with it a reduced copy of that user's permissions. Through it the AI can work on content (posts, pages, media, menus), the theme's design settings and the abilities listed on the status page. It can never install, update, activate or delete plugins and themes, switch themes, create, edit or delete users, add or remove application passwords, change the Settings screens, edit theme or plugin files, save unfiltered HTML or scripts or use XML-RPC, and it reaches only WordPress core's REST API, the Abilities API and oEmbed. The one kind of code it may add is Additional CSS, under WordPress's own edit_css permission, and you can switch that off on the AI Connect screen. Writes default to drafts where possible, and nothing is deleted. Your own sessions and your other application passwords are not affected. Disconnect any time from the AI Connect screen or under Users → Profile → Application Passwords.
    5960
    6061= Can the AI install, update or remove plugins and themes? =
    6162
    62 No. The plugin has no ability that installs, updates, activates, deactivates or deletes plugins or themes, imports demo content, manages users or saves code (CSS, JavaScript or PHP), and the connection's permissions exclude all of that even when the connected user is an administrator. The AI can list which updates are available and which starter sites fit; you install updates in Dashboard → Updates and import a starter site in Inspiro Starter Sites.
     63No. The plugin has no ability that installs, updates, activates, deactivates or deletes plugins or themes, imports demo content, manages users or saves JavaScript or PHP, and the connection's permissions exclude all of that even when the connected user is an administrator. The AI can list which updates are available and which starter sites fit; you install updates in Dashboard → Updates and import a starter site in Inspiro Starter Sites.
    6364
    6465= Does this send my content to WPZOOM? =
    … …  
    8485
    8586== Changelog ==
     87
     88= 0.8.0 =
     89* New: read and add Additional CSS (Customizer, or Site Editor styles on block themes). The AI adds small changes as labelled blocks it can replace or remove; CSS you wrote is not touched and WordPress keeps a revision of every change.
     90* CSS the Customizer would reject is refused, as are markup and @import. Writing needs WordPress's edit_css permission (administrators on a single site; nobody when DISALLOW_UNFILTERED_HTML is set).
     91* New: a switch on the AI Connect screen to stop the WPZOOM AI Connect connection changing Additional CSS. It is on by default.
    8692
    8793= 0.7.3 =
  • wpzoom-ai-connect/tags/0.8.0/wpzoom-ai-connect.php

    r3787541 r3789170  
    44 * Plugin URI: https://www.wpzoom.com/ai-connect/
    55 * Description: Lets AI assistants (Claude, ChatGPT, Cursor and any MCP client) understand and change your WPZOOM theme: theme settings, color palettes, design patterns and pages, through the WordPress Abilities API.
    6  * Version: 0.7.3
     6 * Version: 0.8.0
    77 * Requires at least: 6.9
    88 * Requires PHP: 7.4
    … …  
    2020}
    2121
    22 define( 'WPZOOM_AI_CONNECT_VERSION', '0.7.3' );
     22define( 'WPZOOM_AI_CONNECT_VERSION', '0.8.0' );
    2323define( 'WPZOOM_AI_CONNECT_FILE', __FILE__ );
    2424define( 'WPZOOM_AI_CONNECT_DIR', plugin_dir_path( __FILE__ ) );
    25 
    26 // Present only in the zip served from wpzoom.com (see README.md, "Releases"); the WordPress.org build has no updater folder.
    27 if ( file_exists( WPZOOM_AI_CONNECT_DIR . 'updater/updater.php' ) ) {
    28         require_once WPZOOM_AI_CONNECT_DIR . 'updater/updater.php';
    29 }
    3025
    3126require_once WPZOOM_AI_CONNECT_DIR . 'includes/auth-fallback.php';
    … …  
    3732require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-content.php';
    3833require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-diagnostics.php';
     34require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-css.php';
    3935require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-theme-options.php';
    4036require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-recipes.php';
  • wpzoom-ai-connect/trunk/includes/abilities-site.php

    r3787541 r3789170  
    22/**
    33 * Registers the third wave of wpzoom/* abilities, picked from what WPZOOM support answers most:
    4  * the older Theme Options panel, available updates, and editing existing Recipe Card recipes.
     4 * Additional CSS, the older Theme Options panel, available updates, and editing existing Recipe Card recipes.
    55 *
    66 * @package WPZOOM_AI_Connect
    … …  
    4242                return array( 'type' => 'array', 'items' => array( 'type' => 'string' ), 'description' => $description );
    4343        };
     44
     45        /* ----- Additional CSS ----- */
     46
     47        wp_register_ability( 'wpzoom/get-custom-css', array(
     48                'label'               => 'Read the Additional CSS',
     49                'description'         => 'The site\'s Additional CSS (Customizer, or Site Editor styles on block themes): the full text, where it is edited, and the labels of changes the AI added earlier.',
     50                'category'            => 'wpzoom',
     51                'input_schema'        => $input( array() ),
     52                'output_schema'       => $object,
     53                'execute_callback'    => static function () {
     54                        return WPZOOM_AI_CSS::get();
     55                },
     56                'permission_callback' => $can( 'edit_theme_options' ),
     57                'meta'                => $meta( true, true ),
     58        ) );
     59
     60        wp_register_ability( 'wpzoom/add-custom-css', array(
     61                'label'               => 'Add Additional CSS',
     62                'description'         => 'Adds CSS to the site\'s Additional CSS under a short label, for small visual changes no theme setting covers (hover colors, spacing, hiding an element). Saving again with the same label replaces that change; empty "css" with a label removes it. CSS a person wrote is not touched, WordPress keeps a revision, and CSS the Customizer would reject (markup, a closing style tag, @import, unbalanced braces) is refused. Live immediately: prefer a theme setting when one exists, check selectors on the real page first, and confirm with the user. Needs WordPress\'s edit_css permission; the site owner can switch this off on the AI Connect screen.',
     63                'category'            => 'wpzoom',
     64                'input_schema'        => $input(
     65                        array(
     66                                'label' => $str( 'Short name for this change, e.g. "Menu hover color"', array( 'maxLength' => 80 ) ),
     67                                'css'   => $str( 'The CSS rules to add (empty to remove the change with this label)' ),
     68                        ),
     69                        array( 'label', 'css' )
     70                ),
     71                'output_schema'       => $object,
     72                'execute_callback'    => static function ( $in ) {
     73                        return WPZOOM_AI_CSS::add( (array) $in );
     74                },
     75                'permission_callback' => $can( 'edit_css' ),
     76                'meta'                => $meta( false, true, true ),
     77        ) );
    4478
    4579        /* ----- WPZOOM → Theme Options ----- */
  • wpzoom-ai-connect/trunk/includes/class-wpzoom-ai-admin.php

    r3787541 r3789170  
    3030                add_action( 'admin_init', array( __CLASS__, 'maybe_redirect' ) );
    3131                add_action( 'admin_post_wpzoom_ai_disconnect', array( __CLASS__, 'handle_disconnect' ) );
     32                add_action( 'admin_post_wpzoom_ai_css_setting', array( __CLASS__, 'handle_css_setting' ) );
    3233                add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue' ) );
    3334                add_filter( 'plugin_action_links_' . plugin_basename( WPZOOM_AI_CONNECT_FILE ), array( __CLASS__, 'action_links' ) );
    … …  
    133134                }
    134135                wp_safe_redirect( self::url( array( 'wzai_disconnected' => 1 ) ) );
     136                exit;
     137        }
     138
     139        /** Lets the site owner allow or stop the connection editing Additional CSS. */
     140        public static function handle_css_setting(): void {
     141                check_admin_referer( 'wpzoom_ai_css_setting' );
     142                if ( ! current_user_can( 'manage_options' ) ) {
     143                        wp_die( esc_html__( 'You are not allowed to change this setting.', 'wpzoom-ai-connect' ) );
     144                }
     145                update_option( WPZOOM_AI_CSS::OPTION, empty( $_POST['allow_css'] ) ? '0' : '1', false );
     146                wp_safe_redirect( self::url( array( 'wzai_css_saved' => 1 ) ) . '#wzai-start' );
    135147                exit;
    136148        }
    … …  
    383395                                                self::notice( 'info', esc_html__( 'Disconnected. Your AI can no longer reach this site until you connect again.', 'wpzoom-ai-connect' ) );
    384396                                        }
     397                                        if ( isset( $_GET['wzai_css_saved'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     398                                                self::notice( 'ok', WPZOOM_AI_CSS::allowed_for_connection()
     399                                                        ? esc_html__( 'Saved. Your AI may add Additional CSS on this site.', 'wpzoom-ai-connect' )
     400                                                        : esc_html__( 'Saved. Your AI can no longer change Additional CSS on this site.', 'wpzoom-ai-connect' ) );
     401                                        }
    385402                                        if ( ! $s['has_api'] ) {
    386403                                                self::notice( 'warn', esc_html__( 'This plugin needs WordPress 6.9 or newer. Update WordPress from Dashboard → Updates, then come back.', 'wpzoom-ai-connect' ) );
    … …  
    467484                                                                        </div>
    468485                                                                        <div class="wzai-card__actions"><a class="wzai-btn wzai-btn--secondary wzai-btn--block" href="<?php echo esc_url( $s['connect_url'] ); ?>"><?php esc_html_e( 'Connect another account', 'wpzoom-ai-connect' ); ?></a></div>
    469                                                                         <div class="wzai-card__foot"><?php esc_html_e( 'Your AI acts as the connected user, limited to content, design settings and the abilities below. It can never install or remove plugins and themes, manage users, change Settings or add code.', 'wpzoom-ai-connect' ); ?></div>
     486                                                                        <div class="wzai-card__foot"><?php esc_html_e( 'Your AI acts as the connected user, limited to content, design settings and the abilities below. It can never install or remove plugins and themes, manage users, change Settings or add scripts.', 'wpzoom-ai-connect' ); ?></div>
     487                                                                        <?php if ( current_user_can( 'manage_options' ) ) : ?>
     488                                                                                <form class="wzai-card__foot" method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
     489                                                                                        <?php wp_nonce_field( 'wpzoom_ai_css_setting' ); ?>
     490                                                                                        <input type="hidden" name="action" value="wpzoom_ai_css_setting">
     491                                                                                        <label><input type="checkbox" name="allow_css" value="1" <?php checked( WPZOOM_AI_CSS::allowed_for_connection() ); ?> onchange="this.form.submit()"> <?php esc_html_e( 'Let your AI add Additional CSS (labelled, with a revision for every change)', 'wpzoom-ai-connect' ); ?></label>
     492                                                                                        <noscript><button type="submit" class="wzai-btn wzai-btn--ghost wzai-btn--sm"><?php esc_html_e( 'Save', 'wpzoom-ai-connect' ); ?></button></noscript>
     493                                                                                </form>
     494                                                                        <?php endif; ?>
    470495                                                                <?php else : ?>
    471496                                                                        <p class="wzai-card__about"><?php esc_html_e( 'Sign in with your email, approve the connection on this site, and you are back here. Connecting lets the WPZOOM connector act on this site as you, limited to content, design settings and this plugin\'s abilities, until you disconnect.', 'wpzoom-ai-connect' ); ?></p>
  • wpzoom-ai-connect/trunk/includes/class-wpzoom-ai-scope.php

    r3787541 r3789170  
    1111 *   - change site options (the Settings screens), languages, privacy tools or multisite settings;
    1212 *   - edit theme or plugin files, or save unfiltered HTML and uploads (content goes through the same filters as
    13  *     an editor's);
     13 *     an editor's). Additional CSS is the one exception: allowed unless the site owner switches it off on the
     14 *     AI Connect screen, and still subject to WordPress's own edit_css rules;
    1415 *   - reach REST routes outside WordPress core (wp/v2), the Abilities API and oEmbed, or use XML-RPC.
    1516 * The user's own sessions and their other application passwords are not affected.
    … …  
    5152                'unfiltered_html',
    5253                'unfiltered_upload',
    53                 'edit_css',
    5454                'import',
    5555                'manage_privacy_options',
    … …  
    128128                        return $caps;
    129129                }
    130                 $caps   = (array) $caps;
     130                $caps = (array) $caps;
     131                if ( 'edit_css' === $cap ) {
     132                        // Additional CSS: WordPress maps edit_css to the unfiltered_html primitive, which the connection never has
     133                        // for posts. The site owner decides for CSS (AI Connect screen, on by default); core's own rules still
     134                        // apply (DISALLOW_UNFILTERED_HTML, super admins only on multisite) because the mapped caps are kept.
     135                        if ( ! WPZOOM_AI_CSS::allowed_for_connection() && ! in_array( 'do_not_allow', $caps, true ) ) {
     136                                $caps[] = 'do_not_allow';
     137                        }
     138                        return $caps;
     139                }
    131140                $denied = in_array( $cap, self::DENIED_CAPS, true ) || in_array( $cap, self::DENIED_USER_CAPS, true ) || array_intersect( $caps, self::DENIED_CAPS );
    132141                if ( ! $denied && ! self::is_read_request() ) {
  • wpzoom-ai-connect/trunk/readme.txt

    r3787541 r3789170  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.7.3
     7Stable tag: 0.8.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2626* List and change theme settings: colors, global palette, header and footer layout, fonts, slider, and the rest of the Customizer.
    2727* List and change the options in WPZOOM → Theme Options on older WPZOOM themes (Tribune, Indigo, Foodica, Academica and more): homepage sections, featured categories, banners.
     28* Read and add Additional CSS for small visual changes no setting covers (a hover color, spacing, hiding an element). Each change is a labelled block it can replace or remove, CSS you wrote is never touched, WordPress keeps a revision, and you can switch this off on the AI Connect screen.
    2829* List the theme's design sections (hero, services, pricing, FAQ, team, testimonials, contact…) and add them to a page, or create a draft page from one.
    2930* Edit pages built with Elementor: read a page's widgets (Elementor, Elementor Pro and WPZOOM Elementor Addons) and change their texts, links, images and lists, such as team members or pricing features, saved through Elementor with a revision.
    … …  
    5657= Does the AI get full access to my site? =
    5758
    58 No. The connection is an application password named "WPZOOM AI Connect" for the WordPress user who approved it, and this plugin gives requests made with it a reduced copy of that user's permissions. Through it the AI can work on content (posts, pages, media, menus), the theme's design settings and the abilities listed on the status page. It can never install, update, activate or delete plugins and themes, switch themes, create, edit or delete users, add or remove application passwords, change the Settings screens, edit theme or plugin files, save unfiltered HTML or use XML-RPC, and it reaches only WordPress core's REST API, the Abilities API and oEmbed. Writes default to drafts where possible, and nothing is deleted. Your own sessions and your other application passwords are not affected. Disconnect any time from the AI Connect screen or under Users → Profile → Application Passwords.
     59No. The connection is an application password named "WPZOOM AI Connect" for the WordPress user who approved it, and this plugin gives requests made with it a reduced copy of that user's permissions. Through it the AI can work on content (posts, pages, media, menus), the theme's design settings and the abilities listed on the status page. It can never install, update, activate or delete plugins and themes, switch themes, create, edit or delete users, add or remove application passwords, change the Settings screens, edit theme or plugin files, save unfiltered HTML or scripts or use XML-RPC, and it reaches only WordPress core's REST API, the Abilities API and oEmbed. The one kind of code it may add is Additional CSS, under WordPress's own edit_css permission, and you can switch that off on the AI Connect screen. Writes default to drafts where possible, and nothing is deleted. Your own sessions and your other application passwords are not affected. Disconnect any time from the AI Connect screen or under Users → Profile → Application Passwords.
    5960
    6061= Can the AI install, update or remove plugins and themes? =
    6162
    62 No. The plugin has no ability that installs, updates, activates, deactivates or deletes plugins or themes, imports demo content, manages users or saves code (CSS, JavaScript or PHP), and the connection's permissions exclude all of that even when the connected user is an administrator. The AI can list which updates are available and which starter sites fit; you install updates in Dashboard → Updates and import a starter site in Inspiro Starter Sites.
     63No. The plugin has no ability that installs, updates, activates, deactivates or deletes plugins or themes, imports demo content, manages users or saves JavaScript or PHP, and the connection's permissions exclude all of that even when the connected user is an administrator. The AI can list which updates are available and which starter sites fit; you install updates in Dashboard → Updates and import a starter site in Inspiro Starter Sites.
    6364
    6465= Does this send my content to WPZOOM? =
    … …  
    8485
    8586== Changelog ==
     87
     88= 0.8.0 =
     89* New: read and add Additional CSS (Customizer, or Site Editor styles on block themes). The AI adds small changes as labelled blocks it can replace or remove; CSS you wrote is not touched and WordPress keeps a revision of every change.
     90* CSS the Customizer would reject is refused, as are markup and @import. Writing needs WordPress's edit_css permission (administrators on a single site; nobody when DISALLOW_UNFILTERED_HTML is set).
     91* New: a switch on the AI Connect screen to stop the WPZOOM AI Connect connection changing Additional CSS. It is on by default.
    8692
    8793= 0.7.3 =
  • wpzoom-ai-connect/trunk/wpzoom-ai-connect.php

    r3787541 r3789170  
    44 * Plugin URI: https://www.wpzoom.com/ai-connect/
    55 * Description: Lets AI assistants (Claude, ChatGPT, Cursor and any MCP client) understand and change your WPZOOM theme: theme settings, color palettes, design patterns and pages, through the WordPress Abilities API.
    6  * Version: 0.7.3
     6 * Version: 0.8.0
    77 * Requires at least: 6.9
    88 * Requires PHP: 7.4
    … …  
    2020}
    2121
    22 define( 'WPZOOM_AI_CONNECT_VERSION', '0.7.3' );
     22define( 'WPZOOM_AI_CONNECT_VERSION', '0.8.0' );
    2323define( 'WPZOOM_AI_CONNECT_FILE', __FILE__ );
    2424define( 'WPZOOM_AI_CONNECT_DIR', plugin_dir_path( __FILE__ ) );
    25 
    26 // Present only in the zip served from wpzoom.com (see README.md, "Releases"); the WordPress.org build has no updater folder.
    27 if ( file_exists( WPZOOM_AI_CONNECT_DIR . 'updater/updater.php' ) ) {
    28         require_once WPZOOM_AI_CONNECT_DIR . 'updater/updater.php';
    29 }
    3025
    3126require_once WPZOOM_AI_CONNECT_DIR . 'includes/auth-fallback.php';
    … …  
    3732require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-content.php';
    3833require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-diagnostics.php';
     34require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-css.php';
    3935require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-theme-options.php';
    4036require_once WPZOOM_AI_CONNECT_DIR . 'includes/class-wpzoom-ai-recipes.php';
Note: See TracChangeset for help on using the changeset viewer.