Plugin Directory

Changeset 3597891


Ignore:
Timestamp:
07/06/2026 02:01:50 PM (4 months ago)
Author:
adairedigital
Message:

1.2.8: deactivation feedback improvements, new Support page, Rating Badges icon fix

Location:
adaire-blocks/trunk
Files:
2 added
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • adaire-blocks/trunk/adaire-blocks.php

    r3595908 r3597891  
    44 * Plugin URI: https://adaire.digital/adaire-blocks/
    55 * Description: Professional WordPress blocks for Gutenberg editor with GSAP animations and modern design.
    6  * Version: 1.2.7
     6 * Version: 1.2.8
    77 * Author: Adaire
    88 * Author URI: https://adaire.digital/
    … …  
    2121
    2222// Define plugin constants
    23 define('ADAIRE_BLOCKS_VERSION', '1.2.7');
     23define('ADAIRE_BLOCKS_VERSION', '1.2.8');
    2424define('ADAIRE_BLOCKS_PLUGIN_FILE', __FILE__);
    2525define('ADAIRE_BLOCKS_PLUGIN_PATH', plugin_dir_path(__FILE__));
    … …  
    142142        has_block( 'create-block/social-share-block', $post ) ||
    143143        has_block( 'create-block/our-process-block', $post ) ||
    144         has_block( 'create-block/infogrid-2-block', $post )
     144        has_block( 'create-block/infogrid-2-block', $post ) ||
     145        has_block( 'create-block/rating-badge-block', $post )
    145146    ) {
    146147        // Enqueue Bootstrap Icons CSS from CDN
    … …  
    226227    require_once ADAIRE_BLOCKS_PLUGIN_PATH . 'admin/block-migration.php';
    227228
     229    // Support page
     230    require_once ADAIRE_BLOCKS_PLUGIN_PATH . 'admin/support-page.php';
     231
    228232    // Deactivation feedback modal
    229233    require_once ADAIRE_BLOCKS_PLUGIN_PATH . 'admin/deactivation-modal.php';
  • adaire-blocks/trunk/admin/deactivation-modal.php

    r3595908 r3597891  
    77{
    88    private static $instance = null;
    9     private const DEFAULT_FEEDBACK_EMAIL = 'simeonlleni@gmail.com';
     9    private const DEFAULT_FEEDBACK_EMAIL = 'support@adaire.com';
    1010
    1111    // Step 0: singleton access for the modal controller.
    … …  
    163163        $message = $this->build_feedback_message($feedback);
    164164
    165         $send_result = $this->send_feedback_email($feedback_recipient, $subject, $message, $feedback['email']);
     165        $send_result = $this->send_feedback_email($feedback_recipient, $subject, $message, $feedback);
    166166        $this->log_feedback_attempt($feedback, $send_result, $feedback_recipient);
    167167
    168         if (!$send_result['sent']) {
    169             $payload = ['message' => 'Failed to send feedback email'];
    170             if (!empty($send_result['error'])) {
    171                 $payload['error'] = $send_result['error'];
    172             }
    173             wp_send_json_error($payload, 500);
    174         }
    175 
    176         wp_send_json_success(['sent' => true]);
     168        // Always return success — deactivation proceeds regardless of email delivery.
     169        // The attempt is logged to adaire_deact_log for later review if mail fails.
     170        wp_send_json_success(['sent' => $send_result['sent']]);
    177171    }
    178172
    … …  
    205199    }
    206200
    207     // Step 2c: send feedback via SendGrid.
    208     private function send_feedback_email($recipient, $subject, $message, $reply_to)
    209     {
    210         $reply_to_email = $reply_to && is_email($reply_to) ? $reply_to : null;
    211 
    212         if (!function_exists('adaire_blocks_get_sendgrid_api_key') || !adaire_blocks_get_sendgrid_api_key()) {
    213             return [
    214                 'sent' => false,
    215                 'provider' => 'sendgrid',
    216                 'error' => 'SendGrid is not configured',
    217             ];
    218         }
    219 
    220         $sendgrid_result = adaire_blocks_send_via_sendgrid($recipient, $subject, $message, $reply_to_email);
     201    // Step 2c: send feedback via Adaire webhook (SendGrid on our end, no key in plugin).
     202    private function send_feedback_email($recipient, $subject, $message, array $feedback)
     203    {
     204        $response = wp_remote_post( 'https://adaire.com/feedback-handler.php', [
     205            'timeout' => 10,
     206            'body'    => [
     207                'token'   => 'gb-feedback-k7x2m9p4',
     208                'reason'  => $feedback['reason']  ?? '',
     209                'details' => $feedback['details'] ?? '',
     210                'email'   => $feedback['email']   ?? '',
     211                'site'    => $feedback['site']    ?? home_url(),
     212            ],
     213        ] );
     214
     215        $sent = ! is_wp_error( $response ) && (int) wp_remote_retrieve_response_code( $response ) === 200;
     216
    221217        return [
    222             'sent' => (bool) ($sendgrid_result['sent'] ?? false),
    223             'provider' => $sendgrid_result['provider'] ?? 'sendgrid',
    224             'error' => $sendgrid_result['error'] ?? null,
     218            'sent'     => $sent,
     219            'provider' => 'adaire-webhook',
     220            'error'    => $sent ? null : ( is_wp_error( $response ) ? $response->get_error_message() : 'Webhook returned HTTP ' . wp_remote_retrieve_response_code( $response ) ),
    225221        ];
    226222    }
  • adaire-blocks/trunk/admin/welcome-screen.php

    r3595908 r3597891  
    169169        $ajax_url    = admin_url( 'admin-ajax.php' );
    170170        $docs_url    = 'https://adaire.digital/docs/';
    171         $support_url = 'https://adaire.digital/support/';
    172171
    173172        $is_block_theme = function_exists( 'wp_is_block_theme' ) && wp_is_block_theme();
    … …  
    181180        $settings_url  = admin_url( 'admin.php?page=adaire-blocks-settings' );
    182181        $migration_url = admin_url( 'admin.php?page=adaire-blocks-migration' );
     182        $support_page_url = admin_url( 'admin.php?page=adaire-blocks-support' );
    183183        $themes_url    = admin_url( 'themes.php' );
    184184        $exit_url      = admin_url();
    … …  
    259259            ),
    260260            array(
    261                 'href'  => $support_url,
    262                 'tag'   => __( 'Help', 'adaire-blocks' ),
    263                 'title' => __( 'Support', 'adaire-blocks' ),
    264                 'desc'  => __( 'Submit a ticket or browse answered questions.', 'adaire-blocks' ),
    265                 'cta'   => __( 'Get support', 'adaire-blocks' ),
    266                 'image' => $preview_images['services'],
     261                'href'     => $support_page_url,
     262                'tag'      => __( 'Help', 'adaire-blocks' ),
     263                'title'    => __( 'Support', 'adaire-blocks' ),
     264                'desc'     => __( 'Get in touch with our support team directly.', 'adaire-blocks' ),
     265                'cta'      => __( 'Get support', 'adaire-blocks' ),
     266                'image'    => $preview_images['services'],
     267                'external' => false,
    267268            ),
    268269        );
    … …  
    630631                        <span class="adaire-shell-ext-icon"><?php echo self::icon( 'external-link' ); ?></span>
    631632                    </a>
    632                     <a href="<?php echo esc_url( $support_url ); ?>" target="_blank" rel="noopener" class="adaire-shell-link adaire-shell-link-ext">
    633                         <span class="adaire-shell-link-label"><?php echo self::icon( 'message-circle' ); ?> <?php esc_html_e( 'Support', 'adaire-blocks' ); ?></span>
    634                         <span class="adaire-shell-ext-icon"><?php echo self::icon( 'external-link' ); ?></span>
     633                    <a href="<?php echo esc_url( $support_page_url ); ?>" class="adaire-shell-link">
     634                        <?php echo self::icon( 'message-circle' ); ?> <?php esc_html_e( 'Support', 'adaire-blocks' ); ?>
    635635                    </a>
    636636                </nav>
    … …  
    850850
    851851            <div class="adaire-resources">
    852                 <?php foreach ( $resources as $i => $res ) : ?>
    853                 <a href="<?php echo esc_url( $res['href'] ); ?>" target="_blank" rel="noopener" class="adaire-resource adaire-fade" style="transition-delay:<?php echo esc_attr( $i * 0.06 ); ?>s">
     852                <?php foreach ( $resources as $i => $res ) : $res_is_external = ! isset( $res['external'] ) || $res['external']; ?>
     853                <a href="<?php echo esc_url( $res['href'] ); ?>" <?php echo $res_is_external ? 'target="_blank" rel="noopener"' : ''; ?> class="adaire-resource adaire-fade" style="transition-delay:<?php echo esc_attr( $i * 0.06 ); ?>s">
    854854                    <div class="adaire-resource-media">
    855855                        <img src="<?php echo esc_url( $res['image'] ); ?>" alt="" loading="lazy" decoding="async" referrerpolicy="no-referrer" />
  • adaire-blocks/trunk/build/rating-badge-block/block.json

    r3595908 r3597891  
    8282    }
    8383  },
    84   "icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"24\" height=\"24\" rx=\"5\" fill=\"#6366F1\"/>\n<path d=\"M12 4.5L14.12 9.3L19.5 9.9L15.5 13.47L16.62 18.75L12 16.05L7.38 18.75L8.5 13.47L4.5 9.9L9.88 9.3L12 4.5Z\" fill=\"white\"/>\n</svg>"
     84  "icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n<rect width=\"24\" height=\"24\" rx=\"5\" fill=\"#6366F1\"/>\r\n<path d=\"M12 4.5L14.12 9.3L19.5 9.9L15.5 13.47L16.62 18.75L12 16.05L7.38 18.75L8.5 13.47L4.5 9.9L9.88 9.3L12 4.5Z\" fill=\"white\"/>\r\n</svg>"
    8585}
  • adaire-blocks/trunk/readme.txt

    r3595908 r3597891  
    55Requires at least: 6.7
    66Tested up to: 6.8
    7 Stable tag: 1.2.7
     7Stable tag: 1.2.8
    88Requires PHP: 7.4
    99License: GPL-3.0
    … …  
    161161== Changelog ==
    162162
     163= 1.2.8 =
     164* Improved the plugin deactivation flow: the deactivation survey now has a refreshed design, contextual follow-up questions based on your answer, a clear success state, and a working close button.
     165* Deactivation feedback is now sent through a dedicated server-side handler, so responses are processed reliably without depending on a third-party client-side script.
     166* Fixed a display issue in the deactivation modal (explicit SVG dimensions and inline fallback styles) that could cause the header icon to render incorrectly on some sites.
     167
    163168= 1.2.7 =
    164169* Adaire Blocks is now Guten-Blocks. The plugin name, inserter categories, block titles, admin screens, and documentation have all been updated to reflect the new name.
    … …  
    166171* Renamed the Feature Box block to Icon Box (Free) for clarity.
    167172* Moved Plan Comparison from Free to Premium — it is no longer included in the Free tier.
    168 * Coming soon: native MCP (Model Context Protocol) support, allowing AI assistants to build and edit Guten-Blocks content directly. More details in an upcoming release.
    169173* Complete list of blocks included in the Free version: Header Menu, SaaS Hero, Row, About Us, Timeline, Gallery, Card Slider, Card Scroll Item, Footer, Pricing Plans, Blog Post Grid, Feature Grid, Tabbed Content, Tab Panel, Accordion, Content Switcher, Content Toggle Panel, Video Player, Icon Box, Social Banner, Share Buttons, Reviews, Rating Badges, and Button.
    170174* This is a frontend, user-facing rename only. Internal namespaces, block registration names (e.g. `create-block/row-block`), and other technical slugs still use the previous "adaire" naming and were intentionally left unchanged. A separate backend renaming phase, including the plugin slug, is planned for a future release.
    … …  
    186190== Upgrade Notice ==
    187191
     192= 1.2.8 =
     193Improved deactivation feedback flow and a display fix for the deactivation modal. No action required.
     194
    188195= 1.2.7 =
    189196Adaire Blocks is now Guten-Blocks. Plugin name, block titles, and admin screens are updated; no functional changes and no action required.
    190197
    191198= 1.2.6 =
    192 Documentation-only correction to the Free block list
     199Documentation-only correction to the Free block list — no functional changes. If you were relying on the previously (incorrectly) advertised free Call to Action or Logo blocks, those have always required Plus.
     200
     201== Additional Information ==
     202
     203**Made by Adaire Digital**
     204
     205Visit [Adaire Blocks](https://adaireblocks.com/ "Professional WordPress Development") for more information about our services and products.
     206
     207**Support and Documentation**
     208
     209For detailed documentation, tutorials, and support, please visit our website or contact us through the WordPress.org support forums.
Note: See TracChangeset for help on using the changeset viewer.