Plugin Directory

Changeset 3337204


Ignore:
Timestamp:
07/31/2025 10:46:21 AM (7 months ago)
Author:
convertkit
Message:

Update to version 2.8.7 from GitHub

Location:
convertkit
Files:
6 deleted
40 edited
1 copied

Legend:

Unmodified
Added
Removed
  • convertkit/tags/2.8.7/CHANGELOG.md

    r3289504 r3337204  
     1### 2.8.7 2025-07-31
     2* Added: Blocks: Form: Margin, padding and background color options
     3* Added: Debug: Forms: `data-kit-source-post-id` attribute to scripts when Debugging enabled
     4* Added: JS: Emit `kit_subscriber_id_removed_from_url` event when the `ck_subscriber_id` is removed from a URL
     5* Fix: Debloat Plugin: Exclude Forms from Debloat's Defer and Delay JS
     6* Fix: Classic Widgets: Form: Uncaught error: Call to undefined method `ConvertKit_Resource_Forms::output_select_field_all`
     7* Fix: Blocks: Refactored and removed unnecessary duplicate render callback functions in the block editor
     8
     9### 2.8.6.1 2025-07-23
     10* Fix: Form Trigger: Revert running `script` tags through `wp_kses`, as WordPress.com strip the script tag
     11
     12### 2.8.6 2025-07-23
     13* Fix: Form Block: Correctly style "No Content" message when selecting a modal form
     14* Fix: Member Content: Display all Posts if filter = All content
     15
     16### 2.8.5 2025-07-17
     17* Fix: Broadcasts, Form Trigger and Product Blocks: Improve rendering accuracy between block editor and frontend site
     18* Fix: Sanitization and security enhancements
     19
     20### 2.8.4 2025-07-10
     21* Added: Broadcasts Block: Display order option
     22* Added: Broadcasts, Form Trigger and Product Blocks: Use `get_block_wrapper_attributes` for block `class` and `style` attributes
     23* Added: Broadcasts, Form Trigger and Product Blocks: Typography options
     24* Added: Broadcasts, Form Trigger and Product Blocks: Margin and padding options
     25
     26### 2.8.3 2025-07-03
     27* Added: Member Content: `All member-only content` option added to filter dropdown in Posts and Pages tables
     28* Fix: Member Content: Replace `Members only` with `member-only`
     29* Fix: Automatically refresh Access Token when expired
     30
     31### 2.8.2 2025-05-28
     32* Fix: Broadcasts: Remove emoijs from Permalink whem importing Broadcasts to WordPress Posts
     33* Fix: Coding Standards: Use `wp_doing_cron` function, instead of `DOING_CRON` constant
     34
    135### 2.8.1 2025-05-07
    236* Added: Member Content: Permits Apple, DuckDuckGo, OpenAI Search, Perplexity and Yandex to crawl Member Content if the Permit Search Engine Crawlers option is enabled
  • convertkit/tags/2.8.7/includes/blocks/class-convertkit-block-broadcasts.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
     
    3835        add_action( 'wp_ajax_nopriv_convertkit_broadcasts_render', array( $this, 'render_ajax' ) );
    3936        add_action( 'wp_ajax_convertkit_broadcasts_render', array( $this, 'render_ajax' ) );
    40 
    41     }
    42 
    43     /**
    44      * Enqueues scripts for this Gutenberg Block in the editor view.
    45      *
    46      * @since   2.0.1
    47      */
    48     public function enqueue_scripts_editor() {
    49 
    50         wp_enqueue_script( 'convertkit-gutenberg-block-broadcasts', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-broadcasts.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    5137
    5238    }
     
    118104
    119105        return array(
    120             'title'                             => __( 'Kit Broadcasts', 'convertkit' ),
    121             'description'                       => __( 'Displays a list of your Kit broadcasts.', 'convertkit' ),
    122             'icon'                              => 'resources/backend/images/block-icon-broadcasts.svg',
    123             'category'                          => 'convertkit',
    124             'keywords'                          => array(
     106            'title'                         => __( 'Kit Broadcasts', 'convertkit' ),
     107            'description'                   => __( 'Displays a list of your Kit broadcasts.', 'convertkit' ),
     108            'icon'                          => 'resources/backend/images/block-icon-broadcasts.svg',
     109            'category'                      => 'convertkit',
     110            'keywords'                      => array(
    125111                __( 'ConvertKit', 'convertkit' ),
    126112                __( 'Kit', 'convertkit' ),
     
    130116
    131117            // Function to call when rendering as a block or a shortcode on the frontend web site.
    132             'render_callback'                   => array( $this, 'render' ),
     118            'render_callback'               => array( $this, 'render' ),
    133119
    134120            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    135             'modal'                             => array(
     121            'modal'                         => array(
    136122                'width'  => 650,
    137123                'height' => 455,
     
    139125
    140126            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    141             'shortcode_include_closing_tag'     => false,
     127            'shortcode_include_closing_tag' => false,
    142128
    143129            // Gutenberg: Block Icon in Editor.
    144             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-broadcasts.svg' ),
     130            'gutenberg_icon'                => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-broadcasts.svg' ),
    145131
    146132            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    147             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-broadcasts.png',
     133            'gutenberg_example_image'       => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-broadcasts.png',
    148134
    149135            // Help descriptions, displayed when no Access Token / resources exist and this block/shortcode is added.
    150             'no_access_token'                   => array(
     136            'no_access_token'               => array(
    151137                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    152138                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    154140                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to configure broadcasts to display.', 'convertkit' ),
    155141            ),
    156             'no_resources'                      => array(
     142            'no_resources'                  => array(
    157143                'notice'           => __( 'No broadcasts exist in Kit.', 'convertkit' ),
    158144                'link'             => convertkit_get_new_broadcast_url(),
     
    161147            ),
    162148
    163             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    164             // If not defined, render_callback above will be used.
    165             'gutenberg_preview_render_callback' => 'convertKitGutenbergBroadcastsBlockRenderPreview',
    166 
    167149            // Whether an API Key exists in the Plugin, and are the required resources (broadcasts) available.
    168150            // If no API Key is specified in the Plugin's settings, render the "No API Key" output.
    169             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    170             'has_resources'                     => $posts->exist(),
     151            'has_access_token'              => $settings->has_access_and_refresh_token(),
     152            'has_resources'                 => $posts->exist(),
    171153        );
    172154
  • convertkit/tags/2.8.7/includes/blocks/class-convertkit-block-form-trigger.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
    35 
    36     }
    37 
    38     /**
    39      * Enqueues scripts for this Gutenberg Block in the editor view.
    40      *
    41      * @since   2.2.0
    42      */
    43     public function enqueue_scripts_editor() {
    44 
    45         wp_enqueue_script( 'convertkit-gutenberg-block-form-trigger', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-form-trigger.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    4632
    4733    }
     
    8874
    8975        return array(
    90             'title'                             => __( 'Kit Form Trigger', 'convertkit' ),
    91             'description'                       => __( 'Displays a modal, sticky bar or slide in form to display when the button is pressed.', 'convertkit' ),
    92             'icon'                              => 'resources/backend/images/block-icon-formtrigger.svg',
    93             'category'                          => 'convertkit',
    94             'keywords'                          => array(
     76            'title'                                => __( 'Kit Form Trigger', 'convertkit' ),
     77            'description'                          => __( 'Displays a modal, sticky bar or slide in form to display when the button is pressed.', 'convertkit' ),
     78            'icon'                                 => 'resources/backend/images/block-icon-formtrigger.svg',
     79            'category'                             => 'convertkit',
     80            'keywords'                             => array(
    9581                __( 'ConvertKit', 'convertkit' ),
    9682                __( 'Kit', 'convertkit' ),
     
    9985
    10086            // Function to call when rendering as a block or a shortcode on the frontend web site.
    101             'render_callback'                   => array( $this, 'render' ),
     87            'render_callback'                      => array( $this, 'render' ),
    10288
    10389            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    104             'modal'                             => array(
     90            'modal'                                => array(
    10591                'width'  => 500,
    10692                'height' => 282,
     
    10894
    10995            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    110             'shortcode_include_closing_tag'     => false,
     96            'shortcode_include_closing_tag'        => false,
    11197
    11298            // Gutenberg: Block Icon in Editor.
    113             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-formtrigger.svg' ),
     99            'gutenberg_icon'                       => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-formtrigger.svg' ),
    114100
    115101            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    116             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-formtrigger.png',
     102            'gutenberg_example_image'              => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-formtrigger.png',
    117103
    118104            // Help descriptions, displayed when no API key / resources exist and this block/shortcode is added.
    119             'no_access_token'                   => array(
     105            'no_access_token'                      => array(
    120106                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    121107                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    123109                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to select a form.', 'convertkit' ),
    124110            ),
    125             'no_resources'                      => array(
     111            'no_resources'                         => array(
    126112                'notice'           => __( 'No modal, sticky bar or slide in forms exist in Kit.', 'convertkit' ),
    127113                'link'             => convertkit_get_new_form_url(),
     
    129115                'instruction_text' => __( 'Add a non-inline form to your Kit account, and then refresh this page to select a form.', 'convertkit' ),
    130116            ),
    131             'gutenberg_help_description'        => __( 'Select a Form using the Form option in the Gutenberg sidebar.', 'convertkit' ),
    132 
    133             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    134             // If not defined, render_callback above will be used.
    135             'gutenberg_preview_render_callback' => 'convertKitGutenbergFormTriggerBlockRenderPreview',
     117
     118            // The attribute to check if a value exists when rendering the block in the editor,
     119            // and the message to display if no value exists.
     120            'gutenberg_help_description'           => __( 'Select a Form using the Form option in the Gutenberg sidebar.', 'convertkit' ),
     121            'gutenberg_help_description_attribute' => 'form',
    136122
    137123            // Whether an API Key exists in the Plugin, and are the required resources (non-inline forms) available.
    138124            // If no API Key is specified in the Plugin's settings, render the "No API Key" output.
    139             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    140             'has_resources'                     => $convertkit_forms->non_inline_exist(),
     125            'has_access_token'                     => $settings->has_access_and_refresh_token(),
     126            'has_resources'                        => $convertkit_forms->non_inline_exist(),
    141127        );
    142128
  • convertkit/tags/2.8.7/includes/blocks/class-convertkit-block-form.php

    r3227192 r3337204  
    187187            ),
    188188
     189            // get_supports() style, color and typography attributes.
     190            'style'                => array(
     191                'type' => 'object',
     192            ),
     193            'backgroundColor'      => array(
     194                'type' => 'string',
     195            ),
     196
    189197            // Always required for Gutenberg.
    190198            'is_gutenberg_example' => array(
    191199                'type'    => 'boolean',
    192200                'default' => false,
     201            ),
     202        );
     203
     204    }
     205
     206    /**
     207     * Returns this block's supported built-in Attributes.
     208     *
     209     * @since   1.9.7.4
     210     *
     211     * @return  array   Supports
     212     */
     213    public function get_supports() {
     214
     215        return array(
     216            'className' => true,
     217            'color'     => array(
     218                'link'       => false,
     219                'background' => true,
     220                'text'       => false,
     221            ),
     222            'spacing'   => array(
     223                'margin'  => true,
     224                'padding' => true,
    193225            ),
    194226        );
     
    292324    public function render( $atts ) {
    293325
     326        global $post;
     327
     328        $post_id = is_a( $post, 'WP_Post' ) ? $post->ID : 0;
     329
    294330        // Check if the Block Visibility Plugin permits displaying this block.
    295331        if ( ! $this->is_block_visible( $atts ) ) {
     
    329365        // Get Form HTML.
    330366        $forms = new ConvertKit_Resource_Forms( 'output_form' );
    331         $form  = $forms->get_html( $form_id );
     367        $form  = $forms->get_html( $form_id, $post_id );
    332368
    333369        // If an error occured, it might be that we're requesting a Form ID that exists in ConvertKit
     
    339375
    340376            // Get Form HTML again.
    341             $form = $forms->get_html( $form_id );
     377            $form = $forms->get_html( $form_id, $post_id );
    342378        }
    343379
     
    371407        }
    372408
     409        // Build HTML.
     410        // For the block editor, don't include compiled CSS classes and styles,
     411        // as the block editor will add these to the parent container.
     412        // Otherwise the block will render incorrectly with double padding, double margins etc.
     413        // If there's no Form HTML, it's a non-inline form, so don't render any output.
     414        if ( ! $this->is_block_editor_request() && ! empty( $form ) ) {
     415            $form = sprintf(
     416                '<div class="%s" style="%s">%s</div>',
     417                implode( ' ', map_deep( $this->get_css_classes(), 'sanitize_html_class' ) ),
     418                implode( ';', map_deep( $this->get_css_styles( $atts ), 'esc_attr' ) ),
     419                $form
     420            );
     421        }
     422
    373423        /**
    374424         * Filter the block's content immediately before it is output.
  • convertkit/tags/2.8.7/includes/blocks/class-convertkit-block-product.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
    3532        add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
    36 
    37     }
    38 
    39     /**
    40      * Enqueues scripts for this Gutenberg Block in the editor view.
    41      *
    42      * @since   1.9.8.5
    43      */
    44     public function enqueue_scripts_editor() {
    45 
    46         wp_enqueue_script( 'convertkit-gutenberg-block-product', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-product.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    4733
    4834    }
     
    11096
    11197        return array(
    112             'title'                             => __( 'Kit Product', 'convertkit' ),
    113             'description'                       => __( 'Displays a button to purchase a Kit product.', 'convertkit' ),
    114             'icon'                              => 'resources/backend/images/block-icon-product.svg',
    115             'category'                          => 'convertkit',
    116             'keywords'                          => array(
     98            'title'                                => __( 'Kit Product', 'convertkit' ),
     99            'description'                          => __( 'Displays a button to purchase a Kit product.', 'convertkit' ),
     100            'icon'                                 => 'resources/backend/images/block-icon-product.svg',
     101            'category'                             => 'convertkit',
     102            'keywords'                             => array(
    117103                __( 'ConvertKit', 'convertkit' ),
    118104                __( 'Kit', 'convertkit' ),
     
    121107
    122108            // Function to call when rendering as a block or a shortcode on the frontend web site.
    123             'render_callback'                   => array( $this, 'render' ),
     109            'render_callback'                      => array( $this, 'render' ),
    124110
    125111            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    126             'modal'                             => array(
     112            'modal'                                => array(
    127113                'width'  => 600,
    128114                'height' => 518,
     
    130116
    131117            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    132             'shortcode_include_closing_tag'     => false,
     118            'shortcode_include_closing_tag'        => false,
    133119
    134120            // Gutenberg: Block Icon in Editor.
    135             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-product.svg' ),
     121            'gutenberg_icon'                       => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-product.svg' ),
    136122
    137123            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    138             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-product.png',
     124            'gutenberg_example_image'              => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-product.png',
    139125
    140126            // Help descriptions, displayed when no Access Token / resources exist and this block/shortcode is added.
    141             'no_access_token'                   => array(
     127            'no_access_token'                      => array(
    142128                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    143129                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    145131                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to select a product.', 'convertkit' ),
    146132            ),
    147             'no_resources'                      => array(
     133            'no_resources'                         => array(
    148134                'notice'           => __( 'No products exist in Kit.', 'convertkit' ),
    149135                'link'             => convertkit_get_new_product_url(),
     
    152138            ),
    153139
    154             // Gutenberg: Help descriptions, displayed when no settings defined for a newly added Block.
    155             'gutenberg_help_description'        => __( 'Select a Product using the Product option in the Gutenberg sidebar.', 'convertkit' ),
    156 
    157             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    158             // If not defined, render_callback above will be used.
    159             'gutenberg_preview_render_callback' => 'convertKitGutenbergProductBlockRenderPreview',
     140            // Gutenberg: Help description, displayed when the defined attribute has not been set for the block.
     141            'gutenberg_help_description'           => __( 'Select a Product using the Product option in the Gutenberg sidebar.', 'convertkit' ),
     142            'gutenberg_help_description_attribute' => 'product',
    160143
    161144            // Whether an Access Token exists in the Plugin, and are the required resources (products) available.
    162145            // If no Access Token is specified in the Plugin's settings, render the "Not Connected" output.
    163             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    164             'has_resources'                     => $convertkit_products->exist(),
     146            'has_access_token'                     => $settings->has_access_and_refresh_token(),
     147            'has_resources'                        => $convertkit_products->exist(),
    165148        );
    166149
  • convertkit/tags/2.8.7/includes/blocks/class-convertkit-block.php

    r3329966 r3337204  
    261261     */
    262262    public function get_css_classes( $additional_classes = array() ) {
     263
     264        // To avoid errors in get_block_wrapper_attributes() in non-block themes using the shortcode,
     265        // tell WordPress that a block is being rendered.
     266        // The attributes don't matter, as we send them to the render() function.
     267        if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
     268            WP_Block_Supports::$block_to_render = array(
     269                'blockName'    => 'convertkit/' . $this->get_name(),
     270                'attrs'        => array(),
     271                'innerBlocks'  => array(),
     272                'innerHTML'    => '',
     273                'innerContent' => array(),
     274            );
     275        }
    263276
    264277        // Get the block wrapper attributes string.
     
    306319    public function get_css_styles( $atts ) {
    307320
     321        // To avoid errors in get_block_wrapper_attributes() in non-block themes using the shortcode,
     322        // tell WordPress that a block is being rendered.
     323        // The attributes don't matter, as we send them to the render() function.
     324        if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
     325            WP_Block_Supports::$block_to_render = array(
     326                'blockName'    => 'convertkit/' . $this->get_name(),
     327                'attrs'        => array(),
     328                'innerBlocks'  => array(),
     329                'innerHTML'    => '',
     330                'innerContent' => array(),
     331            );
     332        }
     333
    308334        $styles = array();
    309335
  • convertkit/tags/2.8.7/includes/blocks/form/block.json

    r3160977 r3337204  
    2424    },
    2525    "supports": {
    26         "className": true
     26        "className": true,
     27        "color": {
     28            "link": false,
     29            "background": true,
     30            "text": false
     31        },
     32        "spacing": {
     33            "margin": true,
     34            "padding": true
     35        }
    2736    },
    2837    "editorScript": "convertkit-gutenberg"
  • convertkit/tags/2.8.7/includes/class-convertkit-ajax.php

    r3251976 r3337204  
    4141     *
    4242     * Typically used when a refresh button in a block has been pressed when
    43      * convertKitGutenbergDisplayBlockNoticeWithLink() is called, because either
     43     * displayNoticeWithLink() is called, because either
    4444     * no Access Token is specified, or no resources exist in ConvertKit.
    4545     *
  • convertkit/tags/2.8.7/includes/class-convertkit-cache-plugins.php

    r3186945 r3337204  
    5353        add_filter( 'convertkit_resource_forms_output_script', array( $this, 'autoptimize_exclude_js_defer' ) );
    5454
     55        // Debloat: Exclude Forms from Delay Load JS.
     56        add_filter( 'debloat/defer_js_excludes', array( $this, 'exclude_hosts_from_minification' ) );
     57        add_filter( 'debloat/delay_js_excludes', array( $this, 'exclude_hosts_from_minification' ) );
     58
    5559        // Jetpack Boost: Exclude Forms from JS defer.
    5660        add_filter( 'convertkit_output_script_footer', array( $this, 'jetpack_boost_exclude_js_defer' ) );
  • convertkit/tags/2.8.7/includes/class-convertkit-output-restrict-content.php

    r3329966 r3337204  
    13241324                // Display the Form.
    13251325                $forms = new ConvertKit_Resource_Forms( 'restrict_content' );
    1326                 $form  = $forms->get_html( $this->resource_id );
     1326                $form  = $forms->get_html( $this->resource_id, $post_id );
    13271327
    13281328                // If scripts are enabled, output the email login form in a modal, which will be displayed
  • convertkit/tags/2.8.7/includes/class-convertkit-output.php

    r3333065 r3337204  
    312312
    313313        // Get Form HTML.
    314         $form = $this->forms->get_html( $form_id );
     314        $form = $this->forms->get_html( $form_id, $post_id );
    315315
    316316        // If an error occured, it could be because the specified Form ID for the Post either:
     
    336336
    337337            // Get Form HTML.
    338             $form = $this->forms->get_html( $form_id );
     338            $form = $this->forms->get_html( $form_id, $post_id );
    339339
    340340            // If an error occured again, the default form doesn't exist in this ConvertKit account.
  • convertkit/tags/2.8.7/includes/class-convertkit-resource-forms.php

    r3329966 r3337204  
    475475     * @since   1.9.6
    476476     *
    477      * @param   int $id     Form ID.
     477     * @param   int $id         Form ID.
     478     * @param   int $post_id    Post ID that requested the Form.
    478479     * @return  WP_Error|string
    479480     */
    480     public function get_html( $id ) {
     481    public function get_html( $id, $post_id = 0 ) {
    481482
    482483        // Cast ID to integer.
     
    500501        }
    501502
     503        // Initialize Settings.
     504        $settings = new ConvertKit_Settings();
     505
    502506        // If no uid is present in the Form API data, this is a legacy form that's served by directly fetching the HTML
    503507        // from forms.kit.com.
    504508        if ( ! isset( $this->resources[ $id ]['uid'] ) ) {
    505             // Initialize Settings.
    506             $settings = new ConvertKit_Settings();
    507 
    508509            // Bail if no Access Token is specified in the Plugin Settings.
    509510            if ( ! $settings->has_access_token() ) {
     
    537538            add_filter(
    538539                'convertkit_output_scripts_footer',
    539                 function ( $scripts ) use ( $id ) {
    540 
    541                     $scripts[] = array(
     540                function ( $scripts ) use ( $id, $post_id, $settings ) {
     541
     542                    // Build script.
     543                    $script = array(
    542544                        'async'    => true,
    543545                        'data-uid' => $this->resources[ $id ]['uid'],
    544546                        'src'      => $this->resources[ $id ]['embed_js'],
    545547                    );
     548
     549                    // If debugging is enabled, add the post ID to the script.
     550                    if ( $settings->debug_enabled() ) {
     551                        $script['data-kit-source-post-id'] = $post_id;
     552                    }
     553
     554                    // Add the script to the scripts array.
     555                    $scripts[] = $script;
    546556
    547557                    return $scripts;
     
    575585            'src'      => $this->resources[ $id ]['embed_js'],
    576586        );
     587
     588        // If debugging is enabled, add the post ID to the script.
     589        if ( $settings->debug_enabled() ) {
     590            $script['data-kit-source-post-id'] = $post_id;
     591        }
    577592
    578593        /**
  • convertkit/tags/2.8.7/includes/integrations/divi/class-convertkit-divi-module.php

    r3329966 r3337204  
    186186    public function render( $unprocessed_props, $content, $render_slug ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    187187
    188         // To avoid errors in get_block_wrapper_attributes(), tell WordPress that a block is being rendered.
    189         // The attributes don't matter, as we send them to the render() function.
    190         if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
    191             WP_Block_Supports::$block_to_render = array(
    192                 'blockName'    => 'convertkit/' . $this->block_name,
    193                 'attrs'        => array(),
    194                 'innerBlocks'  => array(),
    195                 'innerHTML'    => '',
    196                 'innerContent' => array(),
    197             );
    198         }
    199 
    200188        // Render using Block class' render() function.
    201189        // Output is already escaped in render() function.
  • convertkit/tags/2.8.7/includes/integrations/elementor/class-convertkit-elementor-widget.php

    r3329966 r3337204  
    261261        }
    262262
    263         // To avoid errors in get_block_wrapper_attributes(), tell WordPress that a block is being rendered.
    264         // The attributes don't matter, as we send them to the render() function.
    265         if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
    266             WP_Block_Supports::$block_to_render = array(
    267                 'blockName'    => 'convertkit/' . $this->get_block_name(),
    268                 'attrs'        => array(),
    269                 'innerBlocks'  => array(),
    270                 'innerHTML'    => '',
    271                 'innerContent' => array(),
    272             );
    273         }
    274 
    275263        // Render using Block class' render() function.
    276264        // Output is already escaped in render() function.
  • convertkit/tags/2.8.7/includes/widgets/class-ck-widget-form.php

    r3329966 r3337204  
    7979            <label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php esc_html_e( 'Form', 'convertkit' ); ?></label>
    8080            <?php
    81             $forms->output_select_field_all(
     81            echo $forms->get_select_field_all( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    8282                esc_attr( $this->get_field_name( 'form' ) ),
    8383                esc_attr( $this->get_field_id( 'form' ) ),
  • convertkit/tags/2.8.7/languages/convertkit.pot

    r3332639 r3337204  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Kit (formerly ConvertKit) 2.8.6\n"
     5"Project-Id-Version: Kit (formerly ConvertKit) 2.8.7\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/convertkit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-07-23T04:52:18+00:00\n"
     12"POT-Creation-Date: 2025-07-31T03:05:55+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    3737#: admin/class-convertkit-admin-settings.php:113
    3838#: admin/class-convertkit-admin-settings.php:132
    39 #: includes/blocks/class-convertkit-block-broadcasts.php:126
     39#: includes/blocks/class-convertkit-block-broadcasts.php:112
    4040#: includes/blocks/class-convertkit-block-content.php:63
    41 #: includes/blocks/class-convertkit-block-form-trigger.php:96
     41#: includes/blocks/class-convertkit-block-form-trigger.php:82
    4242#: includes/blocks/class-convertkit-block-form.php:112
    43 #: includes/blocks/class-convertkit-block-product.php:118
     43#: includes/blocks/class-convertkit-block-product.php:104
    4444#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:139
    4545#: includes/integrations/elementor/class-convertkit-elementor.php:70
     
    141141#: admin/section/class-convertkit-admin-section-broadcasts.php:33
    142142#: admin/section/class-convertkit-admin-section-broadcasts.php:202
    143 #: includes/blocks/class-convertkit-block-broadcasts.php:127
     143#: includes/blocks/class-convertkit-block-broadcasts.php:113
    144144msgid "Broadcasts"
    145145msgstr ""
     
    283283
    284284#: admin/section/class-convertkit-admin-section-general.php:58
    285 #: includes/blocks/class-convertkit-block-broadcasts.php:396
     285#: includes/blocks/class-convertkit-block-broadcasts.php:378
    286286#: includes/blocks/class-convertkit-block-content.php:147
    287 #: includes/blocks/class-convertkit-block-form-trigger.php:296
    288 #: includes/blocks/class-convertkit-block-form.php:259
    289 #: includes/blocks/class-convertkit-block-product.php:341
     287#: includes/blocks/class-convertkit-block-form-trigger.php:282
     288#: includes/blocks/class-convertkit-block-form.php:291
     289#: includes/blocks/class-convertkit-block-product.php:324
    290290msgid "General"
    291291msgstr ""
     
    809809
    810810#: includes/block-formatters/class-convertkit-block-formatter-form-link.php:77
    811 #: includes/blocks/class-convertkit-block-form-trigger.php:90
     811#: includes/blocks/class-convertkit-block-form-trigger.php:76
    812812msgid "Kit Form Trigger"
    813813msgstr ""
     
    818818
    819819#: includes/block-formatters/class-convertkit-block-formatter-form-link.php:143
    820 #: includes/blocks/class-convertkit-block-form-trigger.php:97
    821 #: includes/blocks/class-convertkit-block-form-trigger.php:252
     820#: includes/blocks/class-convertkit-block-form-trigger.php:83
     821#: includes/blocks/class-convertkit-block-form-trigger.php:238
    822822#: includes/blocks/class-convertkit-block-form.php:113
    823 #: includes/blocks/class-convertkit-block-form.php:228
     823#: includes/blocks/class-convertkit-block-form.php:260
    824824#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:86
    825825#: includes/integrations/forminator/class-convertkit-forminator-admin-section.php:73
     
    848848
    849849#: includes/block-formatters/class-convertkit-block-formatter-product-link.php:134
    850 #: includes/blocks/class-convertkit-block-product.php:119
    851 #: includes/blocks/class-convertkit-block-product.php:283
     850#: includes/blocks/class-convertkit-block-product.php:105
     851#: includes/blocks/class-convertkit-block-product.php:266
    852852#: views/backend/post/meta-box.php:203
    853853#: views/backend/setup-wizard/convertkit-restrict-content-setup/content-2.php:112
     
    859859msgstr ""
    860860
    861 #: includes/blocks/class-convertkit-block-broadcasts.php:120
     861#: includes/blocks/class-convertkit-block-broadcasts.php:106
    862862msgid "Kit Broadcasts"
    863863msgstr ""
    864864
    865 #: includes/blocks/class-convertkit-block-broadcasts.php:121
     865#: includes/blocks/class-convertkit-block-broadcasts.php:107
    866866msgid "Displays a list of your Kit broadcasts."
    867867msgstr ""
    868868
    869 #: includes/blocks/class-convertkit-block-broadcasts.php:125
     869#: includes/blocks/class-convertkit-block-broadcasts.php:111
    870870#: includes/blocks/class-convertkit-block-content.php:62
    871 #: includes/blocks/class-convertkit-block-form-trigger.php:95
     871#: includes/blocks/class-convertkit-block-form-trigger.php:81
    872872#: includes/blocks/class-convertkit-block-form.php:111
    873 #: includes/blocks/class-convertkit-block-product.php:117
     873#: includes/blocks/class-convertkit-block-product.php:103
    874874msgid "ConvertKit"
    875875msgstr ""
    876876
    877 #: includes/blocks/class-convertkit-block-broadcasts.php:128
     877#: includes/blocks/class-convertkit-block-broadcasts.php:114
    878878msgid "Posts"
    879879msgstr ""
    880880
    881 #: includes/blocks/class-convertkit-block-broadcasts.php:151
    882 #: includes/blocks/class-convertkit-block-form-trigger.php:120
     881#: includes/blocks/class-convertkit-block-broadcasts.php:137
     882#: includes/blocks/class-convertkit-block-form-trigger.php:106
    883883#: includes/blocks/class-convertkit-block-form.php:136
    884 #: includes/blocks/class-convertkit-block-product.php:142
     884#: includes/blocks/class-convertkit-block-product.php:128
    885885msgid "Not connected to Kit."
    886886msgstr ""
    887887
    888 #: includes/blocks/class-convertkit-block-broadcasts.php:153
    889 #: includes/blocks/class-convertkit-block-form-trigger.php:122
     888#: includes/blocks/class-convertkit-block-broadcasts.php:139
     889#: includes/blocks/class-convertkit-block-form-trigger.php:108
    890890#: includes/blocks/class-convertkit-block-form.php:138
    891 #: includes/blocks/class-convertkit-block-product.php:144
     891#: includes/blocks/class-convertkit-block-product.php:130
    892892msgid "Click here to connect your Kit account."
    893893msgstr ""
    894894
    895 #: includes/blocks/class-convertkit-block-broadcasts.php:154
     895#: includes/blocks/class-convertkit-block-broadcasts.php:140
    896896msgid "Connect your Kit account at Settings > Kit, and then refresh this page to configure broadcasts to display."
    897897msgstr ""
    898898
    899 #: includes/blocks/class-convertkit-block-broadcasts.php:157
     899#: includes/blocks/class-convertkit-block-broadcasts.php:143
    900900msgid "No broadcasts exist in Kit."
    901901msgstr ""
    902902
    903 #: includes/blocks/class-convertkit-block-broadcasts.php:159
     903#: includes/blocks/class-convertkit-block-broadcasts.php:145
    904904msgid "Click here to send your first broadcast."
    905905msgstr ""
    906906
    907 #: includes/blocks/class-convertkit-block-broadcasts.php:160
     907#: includes/blocks/class-convertkit-block-broadcasts.php:146
    908908msgid "Add a broadcast to your Kit account, and then refresh this page to configure broadcasts to display."
    909909msgstr ""
    910910
    911 #: includes/blocks/class-convertkit-block-broadcasts.php:300
     911#: includes/blocks/class-convertkit-block-broadcasts.php:282
    912912msgid "Display as grid"
    913913msgstr ""
    914914
    915 #: includes/blocks/class-convertkit-block-broadcasts.php:302
     915#: includes/blocks/class-convertkit-block-broadcasts.php:284
    916916msgid "If enabled, displays broadcasts in a grid, instead of a list."
    917917msgstr ""
    918918
     919#: includes/blocks/class-convertkit-block-broadcasts.php:287
     920msgid "Display order"
     921msgstr ""
     922
     923#: includes/blocks/class-convertkit-block-broadcasts.php:290
     924msgid "Date, Broadcast"
     925msgstr ""
     926
     927#: includes/blocks/class-convertkit-block-broadcasts.php:291
     928msgid "Broadcast, Date"
     929msgstr ""
     930
     931#: includes/blocks/class-convertkit-block-broadcasts.php:295
     932msgid "Date format"
     933msgstr ""
     934
    919935#: includes/blocks/class-convertkit-block-broadcasts.php:305
    920 msgid "Display order"
    921 msgstr ""
    922 
    923 #: includes/blocks/class-convertkit-block-broadcasts.php:308
    924 msgid "Date, Broadcast"
     936msgid "Display images"
    925937msgstr ""
    926938
    927939#: includes/blocks/class-convertkit-block-broadcasts.php:309
    928 msgid "Broadcast, Date"
     940msgid "Display descriptions"
    929941msgstr ""
    930942
    931943#: includes/blocks/class-convertkit-block-broadcasts.php:313
    932 msgid "Date format"
    933 msgstr ""
    934 
    935 #: includes/blocks/class-convertkit-block-broadcasts.php:323
    936 msgid "Display images"
    937 msgstr ""
    938 
    939 #: includes/blocks/class-convertkit-block-broadcasts.php:327
    940 msgid "Display descriptions"
     944msgid "Display read more links"
     945msgstr ""
     946
     947#: includes/blocks/class-convertkit-block-broadcasts.php:317
     948msgid "Read more label"
     949msgstr ""
     950
     951#: includes/blocks/class-convertkit-block-broadcasts.php:319
     952msgid "The label to display for the \"read more\" link below each broadcast."
     953msgstr ""
     954
     955#: includes/blocks/class-convertkit-block-broadcasts.php:322
     956msgid "Number of posts"
     957msgstr ""
     958
     959#: includes/blocks/class-convertkit-block-broadcasts.php:329
     960msgid "Display pagination"
    941961msgstr ""
    942962
    943963#: includes/blocks/class-convertkit-block-broadcasts.php:331
    944 msgid "Display read more links"
    945 msgstr ""
    946 
    947 #: includes/blocks/class-convertkit-block-broadcasts.php:335
    948 msgid "Read more label"
    949 msgstr ""
    950 
    951 #: includes/blocks/class-convertkit-block-broadcasts.php:337
    952 msgid "The label to display for the \"read more\" link below each broadcast."
    953 msgstr ""
    954 
    955 #: includes/blocks/class-convertkit-block-broadcasts.php:340
    956 msgid "Number of posts"
     964msgid "If the number of broadcasts exceeds the \"Number of posts\" settings above, previous/next pagination links will be displayed."
     965msgstr ""
     966
     967#: includes/blocks/class-convertkit-block-broadcasts.php:334
     968msgid "Newer posts label"
     969msgstr ""
     970
     971#: includes/blocks/class-convertkit-block-broadcasts.php:336
     972msgid "The label to display for the link to newer broadcasts."
     973msgstr ""
     974
     975#: includes/blocks/class-convertkit-block-broadcasts.php:339
     976msgid "Older posts label"
     977msgstr ""
     978
     979#: includes/blocks/class-convertkit-block-broadcasts.php:341
     980msgid "The label to display for the link to older broadcasts."
    957981msgstr ""
    958982
    959983#: includes/blocks/class-convertkit-block-broadcasts.php:347
    960 msgid "Display pagination"
    961 msgstr ""
    962 
    963 #: includes/blocks/class-convertkit-block-broadcasts.php:349
    964 msgid "If the number of broadcasts exceeds the \"Number of posts\" settings above, previous/next pagination links will be displayed."
    965 msgstr ""
    966 
    967 #: includes/blocks/class-convertkit-block-broadcasts.php:352
    968 msgid "Newer posts label"
    969 msgstr ""
    970 
    971 #: includes/blocks/class-convertkit-block-broadcasts.php:354
    972 msgid "The label to display for the link to newer broadcasts."
    973 msgstr ""
    974 
    975 #: includes/blocks/class-convertkit-block-broadcasts.php:357
    976 msgid "Older posts label"
    977 msgstr ""
    978 
    979 #: includes/blocks/class-convertkit-block-broadcasts.php:359
    980 msgid "The label to display for the link to older broadcasts."
    981 msgstr ""
    982 
    983 #: includes/blocks/class-convertkit-block-broadcasts.php:365
    984984msgid "Link color"
    985985msgstr ""
    986986
    987 #: includes/blocks/class-convertkit-block-broadcasts.php:369
    988 #: includes/blocks/class-convertkit-block-form-trigger.php:267
    989 #: includes/blocks/class-convertkit-block-product.php:312
     987#: includes/blocks/class-convertkit-block-broadcasts.php:351
     988#: includes/blocks/class-convertkit-block-form-trigger.php:253
     989#: includes/blocks/class-convertkit-block-product.php:295
    990990msgid "Background color"
    991991msgstr ""
    992992
    993 #: includes/blocks/class-convertkit-block-broadcasts.php:373
    994 #: includes/blocks/class-convertkit-block-form-trigger.php:271
    995 #: includes/blocks/class-convertkit-block-product.php:316
     993#: includes/blocks/class-convertkit-block-broadcasts.php:355
     994#: includes/blocks/class-convertkit-block-form-trigger.php:257
     995#: includes/blocks/class-convertkit-block-product.php:299
    996996msgid "Text color"
    997997msgstr ""
    998998
    999 #: includes/blocks/class-convertkit-block-broadcasts.php:408
     999#: includes/blocks/class-convertkit-block-broadcasts.php:390
    10001000msgid "Pagination"
    10011001msgstr ""
    10021002
    1003 #: includes/blocks/class-convertkit-block-broadcasts.php:417
     1003#: includes/blocks/class-convertkit-block-broadcasts.php:399
    10041004msgid "Styles"
    10051005msgstr ""
    10061006
    1007 #: includes/blocks/class-convertkit-block-broadcasts.php:444
     1007#: includes/blocks/class-convertkit-block-broadcasts.php:426
    10081008msgid "Read more"
    10091009msgstr ""
    10101010
    1011 #: includes/blocks/class-convertkit-block-broadcasts.php:447
     1011#: includes/blocks/class-convertkit-block-broadcasts.php:429
    10121012msgid "Previous"
    10131013msgstr ""
    10141014
    1015 #: includes/blocks/class-convertkit-block-broadcasts.php:448
     1015#: includes/blocks/class-convertkit-block-broadcasts.php:430
    10161016msgid "Next"
    10171017msgstr ""
    10181018
    1019 #: includes/blocks/class-convertkit-block-broadcasts.php:494
     1019#: includes/blocks/class-convertkit-block-broadcasts.php:476
    10201020msgid "No Broadcasts exist in Kit."
    10211021msgstr ""
     
    10441044msgstr ""
    10451045
    1046 #: includes/blocks/class-convertkit-block-form-trigger.php:91
     1046#: includes/blocks/class-convertkit-block-form-trigger.php:77
    10471047msgid "Displays a modal, sticky bar or slide in form to display when the button is pressed."
    10481048msgstr ""
    10491049
    1050 #: includes/blocks/class-convertkit-block-form-trigger.php:123
     1050#: includes/blocks/class-convertkit-block-form-trigger.php:109
    10511051#: includes/blocks/class-convertkit-block-form.php:139
    10521052msgid "Connect your Kit account at Settings > Kit, and then refresh this page to select a form."
    10531053msgstr ""
    10541054
    1055 #: includes/blocks/class-convertkit-block-form-trigger.php:126
     1055#: includes/blocks/class-convertkit-block-form-trigger.php:112
    10561056msgid "No modal, sticky bar or slide in forms exist in Kit."
    10571057msgstr ""
    10581058
    1059 #: includes/blocks/class-convertkit-block-form-trigger.php:128
     1059#: includes/blocks/class-convertkit-block-form-trigger.php:114
    10601060msgid "Click here to create a form."
    10611061msgstr ""
    10621062
    1063 #: includes/blocks/class-convertkit-block-form-trigger.php:129
     1063#: includes/blocks/class-convertkit-block-form-trigger.php:115
    10641064msgid "Add a non-inline form to your Kit account, and then refresh this page to select a form."
    10651065msgstr ""
    10661066
    1067 #: includes/blocks/class-convertkit-block-form-trigger.php:131
     1067#: includes/blocks/class-convertkit-block-form-trigger.php:120
    10681068#: includes/blocks/class-convertkit-block-form.php:149
    10691069msgid "Select a Form using the Form option in the Gutenberg sidebar."
    10701070msgstr ""
    10711071
    1072 #: includes/blocks/class-convertkit-block-form-trigger.php:256
     1072#: includes/blocks/class-convertkit-block-form-trigger.php:242
    10731073msgid "The modal, sticky bar or slide in form to display when the button is pressed. To embed a form, use the Kit Form block instead."
    10741074msgstr ""
    10751075
    1076 #: includes/blocks/class-convertkit-block-form-trigger.php:259
    1077 #: includes/blocks/class-convertkit-block-product.php:289
     1076#: includes/blocks/class-convertkit-block-form-trigger.php:245
     1077#: includes/blocks/class-convertkit-block-product.php:272
    10781078msgid "Button Text"
    10791079msgstr ""
    10801080
    1081 #: includes/blocks/class-convertkit-block-form-trigger.php:261
    1082 #: includes/blocks/class-convertkit-block-product.php:291
     1081#: includes/blocks/class-convertkit-block-form-trigger.php:247
     1082#: includes/blocks/class-convertkit-block-product.php:274
    10831083msgid "The text to display for the button."
    10841084msgstr ""
    10851085
    1086 #: includes/blocks/class-convertkit-block-form-trigger.php:319
     1086#: includes/blocks/class-convertkit-block-form-trigger.php:305
    10871087#: includes/class-convertkit-settings-restrict-content.php:229
    10881088#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:84
     
    10941094
    10951095#. translators: ConvertKit Form ID
    1096 #: includes/blocks/class-convertkit-block-form-trigger.php:419
    1097 #: includes/class-convertkit-resource-forms.php:496
     1096#: includes/blocks/class-convertkit-block-form-trigger.php:405
     1097#: includes/class-convertkit-resource-forms.php:497
    10981098msgid "Kit Form ID %s does not exist on Kit."
    10991099msgstr ""
    11001100
    11011101#. translators: ConvertKit Form ID
    1102 #: includes/blocks/class-convertkit-block-form-trigger.php:431
     1102#: includes/blocks/class-convertkit-block-form-trigger.php:417
    11031103msgid "Kit Form ID %s has no uid property."
    11041104msgstr ""
    11051105
    11061106#. translators: ConvertKit Form ID
    1107 #: includes/blocks/class-convertkit-block-form-trigger.php:441
     1107#: includes/blocks/class-convertkit-block-form-trigger.php:427
    11081108msgid "Kit Form ID %s has no embed_js property."
    11091109msgstr ""
     
    11461146msgstr ""
    11471147
    1148 #: includes/blocks/class-convertkit-block-product.php:112
     1148#: includes/blocks/class-convertkit-block-product.php:98
    11491149msgid "Kit Product"
    11501150msgstr ""
    11511151
    1152 #: includes/blocks/class-convertkit-block-product.php:113
     1152#: includes/blocks/class-convertkit-block-product.php:99
    11531153msgid "Displays a button to purchase a Kit product."
    11541154msgstr ""
    11551155
    1156 #: includes/blocks/class-convertkit-block-product.php:145
     1156#: includes/blocks/class-convertkit-block-product.php:131
    11571157msgid "Connect your Kit account at Settings > Kit, and then refresh this page to select a product."
    11581158msgstr ""
    11591159
    1160 #: includes/blocks/class-convertkit-block-product.php:148
     1160#: includes/blocks/class-convertkit-block-product.php:134
    11611161msgid "No products exist in Kit."
    11621162msgstr ""
    11631163
    1164 #: includes/blocks/class-convertkit-block-product.php:150
     1164#: includes/blocks/class-convertkit-block-product.php:136
    11651165msgid "Click here to create your first product."
    11661166msgstr ""
    11671167
    1168 #: includes/blocks/class-convertkit-block-product.php:151
     1168#: includes/blocks/class-convertkit-block-product.php:137
    11691169msgid "Add a product to your Kit account, and then refresh this page to select a product."
    11701170msgstr ""
    11711171
    1172 #: includes/blocks/class-convertkit-block-product.php:155
     1172#: includes/blocks/class-convertkit-block-product.php:141
    11731173msgid "Select a Product using the Product option in the Gutenberg sidebar."
    11741174msgstr ""
    11751175
    1176 #: includes/blocks/class-convertkit-block-product.php:294
     1176#: includes/blocks/class-convertkit-block-product.php:277
    11771177msgid "Discount Code"
    11781178msgstr ""
    11791179
    1180 #: includes/blocks/class-convertkit-block-product.php:296
     1180#: includes/blocks/class-convertkit-block-product.php:279
    11811181msgid "Optional: A discount code to include. Must be defined in the Kit Product."
    11821182msgstr ""
    11831183
    1184 #: includes/blocks/class-convertkit-block-product.php:299
     1184#: includes/blocks/class-convertkit-block-product.php:282
    11851185msgid "Load checkout step"
    11861186msgstr ""
    11871187
    1188 #: includes/blocks/class-convertkit-block-product.php:301
     1188#: includes/blocks/class-convertkit-block-product.php:284
    11891189msgid "If enabled, immediately loads the checkout screen, instead of the Kit Product description."
    11901190msgstr ""
    11911191
    1192 #: includes/blocks/class-convertkit-block-product.php:304
     1192#: includes/blocks/class-convertkit-block-product.php:287
    11931193msgid "Disable modal on mobile"
    11941194msgstr ""
    11951195
    1196 #: includes/blocks/class-convertkit-block-product.php:306
     1196#: includes/blocks/class-convertkit-block-product.php:289
    11971197msgid "Recommended if the Kit Product is a digital download being purchased on mobile, to ensure the subscriber can immediately download the PDF once purchased."
    11981198msgstr ""
    11991199
    1200 #: includes/blocks/class-convertkit-block-product.php:367
     1200#: includes/blocks/class-convertkit-block-product.php:350
    12011201msgid "Buy my product"
    12021202msgstr ""
     
    12761276msgstr ""
    12771277
    1278 #: includes/class-convertkit-resource-forms.php:512
     1278#: includes/class-convertkit-resource-forms.php:513
    12791279msgid "Kit Legacy Form could not be fetched as no Access Token specified in Plugin Settings"
    12801280msgstr ""
     
    14751475msgstr ""
    14761476
    1477 #: includes/integrations/elementor/class-convertkit-elementor-widget.php:295
     1477#: includes/integrations/elementor/class-convertkit-elementor-widget.php:283
    14781478msgid "No blocks are registered. Register blocks using the `convertkit_blocks` filter."
    14791479msgstr ""
    14801480
    14811481#. translators: %1$s: Block name, %2$s: Elementor Widget name
    1482 #: includes/integrations/elementor/class-convertkit-elementor-widget.php:304
     1482#: includes/integrations/elementor/class-convertkit-elementor-widget.php:292
    14831483msgid "Block %1$s is not registered. Register using the `convertkit_blocks` filter, and ensure the Elementor Widget for this block has its `slug` property set to %2$s."
    14841484msgstr ""
  • convertkit/tags/2.8.7/readme.txt

    r3333065 r3337204  
    66Tested up to: 6.8
    77Requires PHP: 7.1
    8 Stable tag: 2.8.6.1
     8Stable tag: 2.8.7
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    162162== Changelog ==
    163163
     164### 2.8.7 2025-07-31
     165* Added: Blocks: Form: Margin, padding and background color options
     166* Added: Debug: Forms: `data-kit-source-post-id` attribute to scripts when Debugging enabled
     167* Added: JS: Emit `kit_subscriber_id_removed_from_url` event when the `ck_subscriber_id` is removed from a URL
     168* Fix: Debloat Plugin: Exclude Forms from Debloat's Defer and Delay JS
     169* Fix: Classic Widgets: Form: Uncaught error: Call to undefined method `ConvertKit_Resource_Forms::output_select_field_all`
     170* Fix: Blocks: Refactored and removed unnecessary duplicate render callback functions in the block editor
     171
    164172### 2.8.6.1 2025-07-23
    165173* Fix: Form Trigger: Revert running `script` tags through `wp_kses`, as WordPress.com strip the script tag
  • convertkit/tags/2.8.7/resources/backend/js/gutenberg.js

    r3270754 r3337204  
    393393                // use the block's PHP's render() function.
    394394                preview = window[ block.gutenberg_preview_render_callback ]( block, props );
     395            } else {
     396                // If no settings have been defined for this block, return a prompt to tell the editor
     397                // what to do.
     398                if ( typeof block.gutenberg_help_description_attribute !== 'undefined' && props.attributes[ block.gutenberg_help_description_attribute ] === '' ) {
     399                    preview = convertKitGutenbergDisplayBlockNotice( block.name, block.gutenberg_help_description );
     400                } else {
     401                    // Use the block's PHP's render() function by calling the ServerSideRender component.
     402                    preview = wp.element.createElement(
     403                        wp.serverSideRender,
     404                        {
     405                            block: 'convertkit/' + block.name,
     406                            attributes: props.attributes,
     407
     408                            // This is only output in the Gutenberg editor, so must be slightly different from the inner class name used to
     409                            // apply styles with i.e. convertkit-block.name.
     410                            className: 'convertkit-ssr-' + block.name,
     411                        }
     412                    );
     413                }
    395414            }
    396415
  • convertkit/tags/2.8.7/resources/frontend/js/convertkit.js

    r3234366 r3337204  
    116116    window.history.replaceState( null, title, url_object.pathname + params + url_object.hash );
    117117
     118    // Emit custom event with the removed subscriber ID.
     119    convertKitEmitCustomEvent(
     120        'kit_subscriber_id_removed_from_url',
     121        {
     122            id: ck_subscriber_id
     123        }
     124    );
     125
    118126}
    119127
  • convertkit/tags/2.8.7/wp-convertkit.php

    r3333065 r3337204  
    1010 * Plugin URI: https://kit.com/
    1111 * Description: Display Kit (formerly ConvertKit) email subscription forms, landing pages, products, broadcasts and more.
    12  * Version: 2.8.6.1
     12 * Version: 2.8.7
    1313 * Author: Kit
    1414 * Author URI: https://kit.com/
     
    2828define( 'CONVERTKIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    2929define( 'CONVERTKIT_PLUGIN_PATH', __DIR__ );
    30 define( 'CONVERTKIT_PLUGIN_VERSION', '2.8.6.1' );
     30define( 'CONVERTKIT_PLUGIN_VERSION', '2.8.7' );
    3131define( 'CONVERTKIT_OAUTH_CLIENT_ID', 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y' );
    3232define( 'CONVERTKIT_OAUTH_CLIENT_REDIRECT_URI', 'https://app.kit.com/wordpress/redirect' );
  • convertkit/trunk/CHANGELOG.md

    r3289504 r3337204  
     1### 2.8.7 2025-07-31
     2* Added: Blocks: Form: Margin, padding and background color options
     3* Added: Debug: Forms: `data-kit-source-post-id` attribute to scripts when Debugging enabled
     4* Added: JS: Emit `kit_subscriber_id_removed_from_url` event when the `ck_subscriber_id` is removed from a URL
     5* Fix: Debloat Plugin: Exclude Forms from Debloat's Defer and Delay JS
     6* Fix: Classic Widgets: Form: Uncaught error: Call to undefined method `ConvertKit_Resource_Forms::output_select_field_all`
     7* Fix: Blocks: Refactored and removed unnecessary duplicate render callback functions in the block editor
     8
     9### 2.8.6.1 2025-07-23
     10* Fix: Form Trigger: Revert running `script` tags through `wp_kses`, as WordPress.com strip the script tag
     11
     12### 2.8.6 2025-07-23
     13* Fix: Form Block: Correctly style "No Content" message when selecting a modal form
     14* Fix: Member Content: Display all Posts if filter = All content
     15
     16### 2.8.5 2025-07-17
     17* Fix: Broadcasts, Form Trigger and Product Blocks: Improve rendering accuracy between block editor and frontend site
     18* Fix: Sanitization and security enhancements
     19
     20### 2.8.4 2025-07-10
     21* Added: Broadcasts Block: Display order option
     22* Added: Broadcasts, Form Trigger and Product Blocks: Use `get_block_wrapper_attributes` for block `class` and `style` attributes
     23* Added: Broadcasts, Form Trigger and Product Blocks: Typography options
     24* Added: Broadcasts, Form Trigger and Product Blocks: Margin and padding options
     25
     26### 2.8.3 2025-07-03
     27* Added: Member Content: `All member-only content` option added to filter dropdown in Posts and Pages tables
     28* Fix: Member Content: Replace `Members only` with `member-only`
     29* Fix: Automatically refresh Access Token when expired
     30
     31### 2.8.2 2025-05-28
     32* Fix: Broadcasts: Remove emoijs from Permalink whem importing Broadcasts to WordPress Posts
     33* Fix: Coding Standards: Use `wp_doing_cron` function, instead of `DOING_CRON` constant
     34
    135### 2.8.1 2025-05-07
    236* Added: Member Content: Permits Apple, DuckDuckGo, OpenAI Search, Perplexity and Yandex to crawl Member Content if the Permit Search Engine Crawlers option is enabled
  • convertkit/trunk/includes/blocks/class-convertkit-block-broadcasts.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
     
    3835        add_action( 'wp_ajax_nopriv_convertkit_broadcasts_render', array( $this, 'render_ajax' ) );
    3936        add_action( 'wp_ajax_convertkit_broadcasts_render', array( $this, 'render_ajax' ) );
    40 
    41     }
    42 
    43     /**
    44      * Enqueues scripts for this Gutenberg Block in the editor view.
    45      *
    46      * @since   2.0.1
    47      */
    48     public function enqueue_scripts_editor() {
    49 
    50         wp_enqueue_script( 'convertkit-gutenberg-block-broadcasts', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-broadcasts.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    5137
    5238    }
     
    118104
    119105        return array(
    120             'title'                             => __( 'Kit Broadcasts', 'convertkit' ),
    121             'description'                       => __( 'Displays a list of your Kit broadcasts.', 'convertkit' ),
    122             'icon'                              => 'resources/backend/images/block-icon-broadcasts.svg',
    123             'category'                          => 'convertkit',
    124             'keywords'                          => array(
     106            'title'                         => __( 'Kit Broadcasts', 'convertkit' ),
     107            'description'                   => __( 'Displays a list of your Kit broadcasts.', 'convertkit' ),
     108            'icon'                          => 'resources/backend/images/block-icon-broadcasts.svg',
     109            'category'                      => 'convertkit',
     110            'keywords'                      => array(
    125111                __( 'ConvertKit', 'convertkit' ),
    126112                __( 'Kit', 'convertkit' ),
     
    130116
    131117            // Function to call when rendering as a block or a shortcode on the frontend web site.
    132             'render_callback'                   => array( $this, 'render' ),
     118            'render_callback'               => array( $this, 'render' ),
    133119
    134120            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    135             'modal'                             => array(
     121            'modal'                         => array(
    136122                'width'  => 650,
    137123                'height' => 455,
     
    139125
    140126            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    141             'shortcode_include_closing_tag'     => false,
     127            'shortcode_include_closing_tag' => false,
    142128
    143129            // Gutenberg: Block Icon in Editor.
    144             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-broadcasts.svg' ),
     130            'gutenberg_icon'                => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-broadcasts.svg' ),
    145131
    146132            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    147             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-broadcasts.png',
     133            'gutenberg_example_image'       => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-broadcasts.png',
    148134
    149135            // Help descriptions, displayed when no Access Token / resources exist and this block/shortcode is added.
    150             'no_access_token'                   => array(
     136            'no_access_token'               => array(
    151137                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    152138                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    154140                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to configure broadcasts to display.', 'convertkit' ),
    155141            ),
    156             'no_resources'                      => array(
     142            'no_resources'                  => array(
    157143                'notice'           => __( 'No broadcasts exist in Kit.', 'convertkit' ),
    158144                'link'             => convertkit_get_new_broadcast_url(),
     
    161147            ),
    162148
    163             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    164             // If not defined, render_callback above will be used.
    165             'gutenberg_preview_render_callback' => 'convertKitGutenbergBroadcastsBlockRenderPreview',
    166 
    167149            // Whether an API Key exists in the Plugin, and are the required resources (broadcasts) available.
    168150            // If no API Key is specified in the Plugin's settings, render the "No API Key" output.
    169             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    170             'has_resources'                     => $posts->exist(),
     151            'has_access_token'              => $settings->has_access_and_refresh_token(),
     152            'has_resources'                 => $posts->exist(),
    171153        );
    172154
  • convertkit/trunk/includes/blocks/class-convertkit-block-form-trigger.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
    35 
    36     }
    37 
    38     /**
    39      * Enqueues scripts for this Gutenberg Block in the editor view.
    40      *
    41      * @since   2.2.0
    42      */
    43     public function enqueue_scripts_editor() {
    44 
    45         wp_enqueue_script( 'convertkit-gutenberg-block-form-trigger', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-form-trigger.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    4632
    4733    }
     
    8874
    8975        return array(
    90             'title'                             => __( 'Kit Form Trigger', 'convertkit' ),
    91             'description'                       => __( 'Displays a modal, sticky bar or slide in form to display when the button is pressed.', 'convertkit' ),
    92             'icon'                              => 'resources/backend/images/block-icon-formtrigger.svg',
    93             'category'                          => 'convertkit',
    94             'keywords'                          => array(
     76            'title'                                => __( 'Kit Form Trigger', 'convertkit' ),
     77            'description'                          => __( 'Displays a modal, sticky bar or slide in form to display when the button is pressed.', 'convertkit' ),
     78            'icon'                                 => 'resources/backend/images/block-icon-formtrigger.svg',
     79            'category'                             => 'convertkit',
     80            'keywords'                             => array(
    9581                __( 'ConvertKit', 'convertkit' ),
    9682                __( 'Kit', 'convertkit' ),
     
    9985
    10086            // Function to call when rendering as a block or a shortcode on the frontend web site.
    101             'render_callback'                   => array( $this, 'render' ),
     87            'render_callback'                      => array( $this, 'render' ),
    10288
    10389            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    104             'modal'                             => array(
     90            'modal'                                => array(
    10591                'width'  => 500,
    10692                'height' => 282,
     
    10894
    10995            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    110             'shortcode_include_closing_tag'     => false,
     96            'shortcode_include_closing_tag'        => false,
    11197
    11298            // Gutenberg: Block Icon in Editor.
    113             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-formtrigger.svg' ),
     99            'gutenberg_icon'                       => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-formtrigger.svg' ),
    114100
    115101            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    116             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-formtrigger.png',
     102            'gutenberg_example_image'              => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-formtrigger.png',
    117103
    118104            // Help descriptions, displayed when no API key / resources exist and this block/shortcode is added.
    119             'no_access_token'                   => array(
     105            'no_access_token'                      => array(
    120106                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    121107                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    123109                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to select a form.', 'convertkit' ),
    124110            ),
    125             'no_resources'                      => array(
     111            'no_resources'                         => array(
    126112                'notice'           => __( 'No modal, sticky bar or slide in forms exist in Kit.', 'convertkit' ),
    127113                'link'             => convertkit_get_new_form_url(),
     
    129115                'instruction_text' => __( 'Add a non-inline form to your Kit account, and then refresh this page to select a form.', 'convertkit' ),
    130116            ),
    131             'gutenberg_help_description'        => __( 'Select a Form using the Form option in the Gutenberg sidebar.', 'convertkit' ),
    132 
    133             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    134             // If not defined, render_callback above will be used.
    135             'gutenberg_preview_render_callback' => 'convertKitGutenbergFormTriggerBlockRenderPreview',
     117
     118            // The attribute to check if a value exists when rendering the block in the editor,
     119            // and the message to display if no value exists.
     120            'gutenberg_help_description'           => __( 'Select a Form using the Form option in the Gutenberg sidebar.', 'convertkit' ),
     121            'gutenberg_help_description_attribute' => 'form',
    136122
    137123            // Whether an API Key exists in the Plugin, and are the required resources (non-inline forms) available.
    138124            // If no API Key is specified in the Plugin's settings, render the "No API Key" output.
    139             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    140             'has_resources'                     => $convertkit_forms->non_inline_exist(),
     125            'has_access_token'                     => $settings->has_access_and_refresh_token(),
     126            'has_resources'                        => $convertkit_forms->non_inline_exist(),
    141127        );
    142128
  • convertkit/trunk/includes/blocks/class-convertkit-block-form.php

    r3227192 r3337204  
    187187            ),
    188188
     189            // get_supports() style, color and typography attributes.
     190            'style'                => array(
     191                'type' => 'object',
     192            ),
     193            'backgroundColor'      => array(
     194                'type' => 'string',
     195            ),
     196
    189197            // Always required for Gutenberg.
    190198            'is_gutenberg_example' => array(
    191199                'type'    => 'boolean',
    192200                'default' => false,
     201            ),
     202        );
     203
     204    }
     205
     206    /**
     207     * Returns this block's supported built-in Attributes.
     208     *
     209     * @since   1.9.7.4
     210     *
     211     * @return  array   Supports
     212     */
     213    public function get_supports() {
     214
     215        return array(
     216            'className' => true,
     217            'color'     => array(
     218                'link'       => false,
     219                'background' => true,
     220                'text'       => false,
     221            ),
     222            'spacing'   => array(
     223                'margin'  => true,
     224                'padding' => true,
    193225            ),
    194226        );
     
    292324    public function render( $atts ) {
    293325
     326        global $post;
     327
     328        $post_id = is_a( $post, 'WP_Post' ) ? $post->ID : 0;
     329
    294330        // Check if the Block Visibility Plugin permits displaying this block.
    295331        if ( ! $this->is_block_visible( $atts ) ) {
     
    329365        // Get Form HTML.
    330366        $forms = new ConvertKit_Resource_Forms( 'output_form' );
    331         $form  = $forms->get_html( $form_id );
     367        $form  = $forms->get_html( $form_id, $post_id );
    332368
    333369        // If an error occured, it might be that we're requesting a Form ID that exists in ConvertKit
     
    339375
    340376            // Get Form HTML again.
    341             $form = $forms->get_html( $form_id );
     377            $form = $forms->get_html( $form_id, $post_id );
    342378        }
    343379
     
    371407        }
    372408
     409        // Build HTML.
     410        // For the block editor, don't include compiled CSS classes and styles,
     411        // as the block editor will add these to the parent container.
     412        // Otherwise the block will render incorrectly with double padding, double margins etc.
     413        // If there's no Form HTML, it's a non-inline form, so don't render any output.
     414        if ( ! $this->is_block_editor_request() && ! empty( $form ) ) {
     415            $form = sprintf(
     416                '<div class="%s" style="%s">%s</div>',
     417                implode( ' ', map_deep( $this->get_css_classes(), 'sanitize_html_class' ) ),
     418                implode( ';', map_deep( $this->get_css_styles( $atts ), 'esc_attr' ) ),
     419                $form
     420            );
     421        }
     422
    373423        /**
    374424         * Filter the block's content immediately before it is output.
  • convertkit/trunk/includes/blocks/class-convertkit-block-product.php

    r3329966 r3337204  
    2828        add_filter( 'convertkit_blocks', array( $this, 'register' ) );
    2929
    30         // Enqueue scripts and styles for this Gutenberg Block in the editor view.
    31         add_action( 'convertkit_gutenberg_enqueue_scripts', array( $this, 'enqueue_scripts_editor' ) );
    32 
    3330        // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
    3431        add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
    3532        add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
    36 
    37     }
    38 
    39     /**
    40      * Enqueues scripts for this Gutenberg Block in the editor view.
    41      *
    42      * @since   1.9.8.5
    43      */
    44     public function enqueue_scripts_editor() {
    45 
    46         wp_enqueue_script( 'convertkit-gutenberg-block-product', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/gutenberg-block-product.js', array( 'convertkit-gutenberg' ), CONVERTKIT_PLUGIN_VERSION, true );
    4733
    4834    }
     
    11096
    11197        return array(
    112             'title'                             => __( 'Kit Product', 'convertkit' ),
    113             'description'                       => __( 'Displays a button to purchase a Kit product.', 'convertkit' ),
    114             'icon'                              => 'resources/backend/images/block-icon-product.svg',
    115             'category'                          => 'convertkit',
    116             'keywords'                          => array(
     98            'title'                                => __( 'Kit Product', 'convertkit' ),
     99            'description'                          => __( 'Displays a button to purchase a Kit product.', 'convertkit' ),
     100            'icon'                                 => 'resources/backend/images/block-icon-product.svg',
     101            'category'                             => 'convertkit',
     102            'keywords'                             => array(
    117103                __( 'ConvertKit', 'convertkit' ),
    118104                __( 'Kit', 'convertkit' ),
     
    121107
    122108            // Function to call when rendering as a block or a shortcode on the frontend web site.
    123             'render_callback'                   => array( $this, 'render' ),
     109            'render_callback'                      => array( $this, 'render' ),
    124110
    125111            // Shortcode: TinyMCE / QuickTags Modal Width and Height.
    126             'modal'                             => array(
     112            'modal'                                => array(
    127113                'width'  => 600,
    128114                'height' => 518,
     
    130116
    131117            // Shortcode: Include a closing [/shortcode] tag when using TinyMCE or QuickTag Modals.
    132             'shortcode_include_closing_tag'     => false,
     118            'shortcode_include_closing_tag'        => false,
    133119
    134120            // Gutenberg: Block Icon in Editor.
    135             'gutenberg_icon'                    => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-product.svg' ),
     121            'gutenberg_icon'                       => convertkit_get_file_contents( CONVERTKIT_PLUGIN_PATH . '/resources/backend/images/block-icon-product.svg' ),
    136122
    137123            // Gutenberg: Example image showing how this block looks when choosing it in Gutenberg.
    138             'gutenberg_example_image'           => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-product.png',
     124            'gutenberg_example_image'              => CONVERTKIT_PLUGIN_URL . 'resources/backend/images/block-example-product.png',
    139125
    140126            // Help descriptions, displayed when no Access Token / resources exist and this block/shortcode is added.
    141             'no_access_token'                   => array(
     127            'no_access_token'                      => array(
    142128                'notice'           => __( 'Not connected to Kit.', 'convertkit' ),
    143129                'link'             => convertkit_get_setup_wizard_plugin_link(),
     
    145131                'instruction_text' => __( 'Connect your Kit account at Settings > Kit, and then refresh this page to select a product.', 'convertkit' ),
    146132            ),
    147             'no_resources'                      => array(
     133            'no_resources'                         => array(
    148134                'notice'           => __( 'No products exist in Kit.', 'convertkit' ),
    149135                'link'             => convertkit_get_new_product_url(),
     
    152138            ),
    153139
    154             // Gutenberg: Help descriptions, displayed when no settings defined for a newly added Block.
    155             'gutenberg_help_description'        => __( 'Select a Product using the Product option in the Gutenberg sidebar.', 'convertkit' ),
    156 
    157             // Gutenberg: JS function to call when rendering the block preview in the Gutenberg editor.
    158             // If not defined, render_callback above will be used.
    159             'gutenberg_preview_render_callback' => 'convertKitGutenbergProductBlockRenderPreview',
     140            // Gutenberg: Help description, displayed when the defined attribute has not been set for the block.
     141            'gutenberg_help_description'           => __( 'Select a Product using the Product option in the Gutenberg sidebar.', 'convertkit' ),
     142            'gutenberg_help_description_attribute' => 'product',
    160143
    161144            // Whether an Access Token exists in the Plugin, and are the required resources (products) available.
    162145            // If no Access Token is specified in the Plugin's settings, render the "Not Connected" output.
    163             'has_access_token'                  => $settings->has_access_and_refresh_token(),
    164             'has_resources'                     => $convertkit_products->exist(),
     146            'has_access_token'                     => $settings->has_access_and_refresh_token(),
     147            'has_resources'                        => $convertkit_products->exist(),
    165148        );
    166149
  • convertkit/trunk/includes/blocks/class-convertkit-block.php

    r3329966 r3337204  
    261261     */
    262262    public function get_css_classes( $additional_classes = array() ) {
     263
     264        // To avoid errors in get_block_wrapper_attributes() in non-block themes using the shortcode,
     265        // tell WordPress that a block is being rendered.
     266        // The attributes don't matter, as we send them to the render() function.
     267        if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
     268            WP_Block_Supports::$block_to_render = array(
     269                'blockName'    => 'convertkit/' . $this->get_name(),
     270                'attrs'        => array(),
     271                'innerBlocks'  => array(),
     272                'innerHTML'    => '',
     273                'innerContent' => array(),
     274            );
     275        }
    263276
    264277        // Get the block wrapper attributes string.
     
    306319    public function get_css_styles( $atts ) {
    307320
     321        // To avoid errors in get_block_wrapper_attributes() in non-block themes using the shortcode,
     322        // tell WordPress that a block is being rendered.
     323        // The attributes don't matter, as we send them to the render() function.
     324        if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
     325            WP_Block_Supports::$block_to_render = array(
     326                'blockName'    => 'convertkit/' . $this->get_name(),
     327                'attrs'        => array(),
     328                'innerBlocks'  => array(),
     329                'innerHTML'    => '',
     330                'innerContent' => array(),
     331            );
     332        }
     333
    308334        $styles = array();
    309335
  • convertkit/trunk/includes/blocks/form/block.json

    r3160977 r3337204  
    2424    },
    2525    "supports": {
    26         "className": true
     26        "className": true,
     27        "color": {
     28            "link": false,
     29            "background": true,
     30            "text": false
     31        },
     32        "spacing": {
     33            "margin": true,
     34            "padding": true
     35        }
    2736    },
    2837    "editorScript": "convertkit-gutenberg"
  • convertkit/trunk/includes/class-convertkit-ajax.php

    r3251976 r3337204  
    4141     *
    4242     * Typically used when a refresh button in a block has been pressed when
    43      * convertKitGutenbergDisplayBlockNoticeWithLink() is called, because either
     43     * displayNoticeWithLink() is called, because either
    4444     * no Access Token is specified, or no resources exist in ConvertKit.
    4545     *
  • convertkit/trunk/includes/class-convertkit-cache-plugins.php

    r3186945 r3337204  
    5353        add_filter( 'convertkit_resource_forms_output_script', array( $this, 'autoptimize_exclude_js_defer' ) );
    5454
     55        // Debloat: Exclude Forms from Delay Load JS.
     56        add_filter( 'debloat/defer_js_excludes', array( $this, 'exclude_hosts_from_minification' ) );
     57        add_filter( 'debloat/delay_js_excludes', array( $this, 'exclude_hosts_from_minification' ) );
     58
    5559        // Jetpack Boost: Exclude Forms from JS defer.
    5660        add_filter( 'convertkit_output_script_footer', array( $this, 'jetpack_boost_exclude_js_defer' ) );
  • convertkit/trunk/includes/class-convertkit-output-restrict-content.php

    r3329966 r3337204  
    13241324                // Display the Form.
    13251325                $forms = new ConvertKit_Resource_Forms( 'restrict_content' );
    1326                 $form  = $forms->get_html( $this->resource_id );
     1326                $form  = $forms->get_html( $this->resource_id, $post_id );
    13271327
    13281328                // If scripts are enabled, output the email login form in a modal, which will be displayed
  • convertkit/trunk/includes/class-convertkit-output.php

    r3333065 r3337204  
    312312
    313313        // Get Form HTML.
    314         $form = $this->forms->get_html( $form_id );
     314        $form = $this->forms->get_html( $form_id, $post_id );
    315315
    316316        // If an error occured, it could be because the specified Form ID for the Post either:
     
    336336
    337337            // Get Form HTML.
    338             $form = $this->forms->get_html( $form_id );
     338            $form = $this->forms->get_html( $form_id, $post_id );
    339339
    340340            // If an error occured again, the default form doesn't exist in this ConvertKit account.
  • convertkit/trunk/includes/class-convertkit-resource-forms.php

    r3329966 r3337204  
    475475     * @since   1.9.6
    476476     *
    477      * @param   int $id     Form ID.
     477     * @param   int $id         Form ID.
     478     * @param   int $post_id    Post ID that requested the Form.
    478479     * @return  WP_Error|string
    479480     */
    480     public function get_html( $id ) {
     481    public function get_html( $id, $post_id = 0 ) {
    481482
    482483        // Cast ID to integer.
     
    500501        }
    501502
     503        // Initialize Settings.
     504        $settings = new ConvertKit_Settings();
     505
    502506        // If no uid is present in the Form API data, this is a legacy form that's served by directly fetching the HTML
    503507        // from forms.kit.com.
    504508        if ( ! isset( $this->resources[ $id ]['uid'] ) ) {
    505             // Initialize Settings.
    506             $settings = new ConvertKit_Settings();
    507 
    508509            // Bail if no Access Token is specified in the Plugin Settings.
    509510            if ( ! $settings->has_access_token() ) {
     
    537538            add_filter(
    538539                'convertkit_output_scripts_footer',
    539                 function ( $scripts ) use ( $id ) {
    540 
    541                     $scripts[] = array(
     540                function ( $scripts ) use ( $id, $post_id, $settings ) {
     541
     542                    // Build script.
     543                    $script = array(
    542544                        'async'    => true,
    543545                        'data-uid' => $this->resources[ $id ]['uid'],
    544546                        'src'      => $this->resources[ $id ]['embed_js'],
    545547                    );
     548
     549                    // If debugging is enabled, add the post ID to the script.
     550                    if ( $settings->debug_enabled() ) {
     551                        $script['data-kit-source-post-id'] = $post_id;
     552                    }
     553
     554                    // Add the script to the scripts array.
     555                    $scripts[] = $script;
    546556
    547557                    return $scripts;
     
    575585            'src'      => $this->resources[ $id ]['embed_js'],
    576586        );
     587
     588        // If debugging is enabled, add the post ID to the script.
     589        if ( $settings->debug_enabled() ) {
     590            $script['data-kit-source-post-id'] = $post_id;
     591        }
    577592
    578593        /**
  • convertkit/trunk/includes/integrations/divi/class-convertkit-divi-module.php

    r3329966 r3337204  
    186186    public function render( $unprocessed_props, $content, $render_slug ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
    187187
    188         // To avoid errors in get_block_wrapper_attributes(), tell WordPress that a block is being rendered.
    189         // The attributes don't matter, as we send them to the render() function.
    190         if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
    191             WP_Block_Supports::$block_to_render = array(
    192                 'blockName'    => 'convertkit/' . $this->block_name,
    193                 'attrs'        => array(),
    194                 'innerBlocks'  => array(),
    195                 'innerHTML'    => '',
    196                 'innerContent' => array(),
    197             );
    198         }
    199 
    200188        // Render using Block class' render() function.
    201189        // Output is already escaped in render() function.
  • convertkit/trunk/includes/integrations/elementor/class-convertkit-elementor-widget.php

    r3329966 r3337204  
    261261        }
    262262
    263         // To avoid errors in get_block_wrapper_attributes(), tell WordPress that a block is being rendered.
    264         // The attributes don't matter, as we send them to the render() function.
    265         if ( class_exists( 'WP_Block_Supports' ) && is_null( WP_Block_Supports::$block_to_render ) ) { // @phpstan-ignore-line
    266             WP_Block_Supports::$block_to_render = array(
    267                 'blockName'    => 'convertkit/' . $this->get_block_name(),
    268                 'attrs'        => array(),
    269                 'innerBlocks'  => array(),
    270                 'innerHTML'    => '',
    271                 'innerContent' => array(),
    272             );
    273         }
    274 
    275263        // Render using Block class' render() function.
    276264        // Output is already escaped in render() function.
  • convertkit/trunk/includes/widgets/class-ck-widget-form.php

    r3329966 r3337204  
    7979            <label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php esc_html_e( 'Form', 'convertkit' ); ?></label>
    8080            <?php
    81             $forms->output_select_field_all(
     81            echo $forms->get_select_field_all( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    8282                esc_attr( $this->get_field_name( 'form' ) ),
    8383                esc_attr( $this->get_field_id( 'form' ) ),
  • convertkit/trunk/languages/convertkit.pot

    r3332639 r3337204  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Kit (formerly ConvertKit) 2.8.6\n"
     5"Project-Id-Version: Kit (formerly ConvertKit) 2.8.7\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/convertkit\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-07-23T04:52:18+00:00\n"
     12"POT-Creation-Date: 2025-07-31T03:05:55+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    3737#: admin/class-convertkit-admin-settings.php:113
    3838#: admin/class-convertkit-admin-settings.php:132
    39 #: includes/blocks/class-convertkit-block-broadcasts.php:126
     39#: includes/blocks/class-convertkit-block-broadcasts.php:112
    4040#: includes/blocks/class-convertkit-block-content.php:63
    41 #: includes/blocks/class-convertkit-block-form-trigger.php:96
     41#: includes/blocks/class-convertkit-block-form-trigger.php:82
    4242#: includes/blocks/class-convertkit-block-form.php:112
    43 #: includes/blocks/class-convertkit-block-product.php:118
     43#: includes/blocks/class-convertkit-block-product.php:104
    4444#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:139
    4545#: includes/integrations/elementor/class-convertkit-elementor.php:70
     
    141141#: admin/section/class-convertkit-admin-section-broadcasts.php:33
    142142#: admin/section/class-convertkit-admin-section-broadcasts.php:202
    143 #: includes/blocks/class-convertkit-block-broadcasts.php:127
     143#: includes/blocks/class-convertkit-block-broadcasts.php:113
    144144msgid "Broadcasts"
    145145msgstr ""
     
    283283
    284284#: admin/section/class-convertkit-admin-section-general.php:58
    285 #: includes/blocks/class-convertkit-block-broadcasts.php:396
     285#: includes/blocks/class-convertkit-block-broadcasts.php:378
    286286#: includes/blocks/class-convertkit-block-content.php:147
    287 #: includes/blocks/class-convertkit-block-form-trigger.php:296
    288 #: includes/blocks/class-convertkit-block-form.php:259
    289 #: includes/blocks/class-convertkit-block-product.php:341
     287#: includes/blocks/class-convertkit-block-form-trigger.php:282
     288#: includes/blocks/class-convertkit-block-form.php:291
     289#: includes/blocks/class-convertkit-block-product.php:324
    290290msgid "General"
    291291msgstr ""
     
    809809
    810810#: includes/block-formatters/class-convertkit-block-formatter-form-link.php:77
    811 #: includes/blocks/class-convertkit-block-form-trigger.php:90
     811#: includes/blocks/class-convertkit-block-form-trigger.php:76
    812812msgid "Kit Form Trigger"
    813813msgstr ""
     
    818818
    819819#: includes/block-formatters/class-convertkit-block-formatter-form-link.php:143
    820 #: includes/blocks/class-convertkit-block-form-trigger.php:97
    821 #: includes/blocks/class-convertkit-block-form-trigger.php:252
     820#: includes/blocks/class-convertkit-block-form-trigger.php:83
     821#: includes/blocks/class-convertkit-block-form-trigger.php:238
    822822#: includes/blocks/class-convertkit-block-form.php:113
    823 #: includes/blocks/class-convertkit-block-form.php:228
     823#: includes/blocks/class-convertkit-block-form.php:260
    824824#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:86
    825825#: includes/integrations/forminator/class-convertkit-forminator-admin-section.php:73
     
    848848
    849849#: includes/block-formatters/class-convertkit-block-formatter-product-link.php:134
    850 #: includes/blocks/class-convertkit-block-product.php:119
    851 #: includes/blocks/class-convertkit-block-product.php:283
     850#: includes/blocks/class-convertkit-block-product.php:105
     851#: includes/blocks/class-convertkit-block-product.php:266
    852852#: views/backend/post/meta-box.php:203
    853853#: views/backend/setup-wizard/convertkit-restrict-content-setup/content-2.php:112
     
    859859msgstr ""
    860860
    861 #: includes/blocks/class-convertkit-block-broadcasts.php:120
     861#: includes/blocks/class-convertkit-block-broadcasts.php:106
    862862msgid "Kit Broadcasts"
    863863msgstr ""
    864864
    865 #: includes/blocks/class-convertkit-block-broadcasts.php:121
     865#: includes/blocks/class-convertkit-block-broadcasts.php:107
    866866msgid "Displays a list of your Kit broadcasts."
    867867msgstr ""
    868868
    869 #: includes/blocks/class-convertkit-block-broadcasts.php:125
     869#: includes/blocks/class-convertkit-block-broadcasts.php:111
    870870#: includes/blocks/class-convertkit-block-content.php:62
    871 #: includes/blocks/class-convertkit-block-form-trigger.php:95
     871#: includes/blocks/class-convertkit-block-form-trigger.php:81
    872872#: includes/blocks/class-convertkit-block-form.php:111
    873 #: includes/blocks/class-convertkit-block-product.php:117
     873#: includes/blocks/class-convertkit-block-product.php:103
    874874msgid "ConvertKit"
    875875msgstr ""
    876876
    877 #: includes/blocks/class-convertkit-block-broadcasts.php:128
     877#: includes/blocks/class-convertkit-block-broadcasts.php:114
    878878msgid "Posts"
    879879msgstr ""
    880880
    881 #: includes/blocks/class-convertkit-block-broadcasts.php:151
    882 #: includes/blocks/class-convertkit-block-form-trigger.php:120
     881#: includes/blocks/class-convertkit-block-broadcasts.php:137
     882#: includes/blocks/class-convertkit-block-form-trigger.php:106
    883883#: includes/blocks/class-convertkit-block-form.php:136
    884 #: includes/blocks/class-convertkit-block-product.php:142
     884#: includes/blocks/class-convertkit-block-product.php:128
    885885msgid "Not connected to Kit."
    886886msgstr ""
    887887
    888 #: includes/blocks/class-convertkit-block-broadcasts.php:153
    889 #: includes/blocks/class-convertkit-block-form-trigger.php:122
     888#: includes/blocks/class-convertkit-block-broadcasts.php:139
     889#: includes/blocks/class-convertkit-block-form-trigger.php:108
    890890#: includes/blocks/class-convertkit-block-form.php:138
    891 #: includes/blocks/class-convertkit-block-product.php:144
     891#: includes/blocks/class-convertkit-block-product.php:130
    892892msgid "Click here to connect your Kit account."
    893893msgstr ""
    894894
    895 #: includes/blocks/class-convertkit-block-broadcasts.php:154
     895#: includes/blocks/class-convertkit-block-broadcasts.php:140
    896896msgid "Connect your Kit account at Settings > Kit, and then refresh this page to configure broadcasts to display."
    897897msgstr ""
    898898
    899 #: includes/blocks/class-convertkit-block-broadcasts.php:157
     899#: includes/blocks/class-convertkit-block-broadcasts.php:143
    900900msgid "No broadcasts exist in Kit."
    901901msgstr ""
    902902
    903 #: includes/blocks/class-convertkit-block-broadcasts.php:159
     903#: includes/blocks/class-convertkit-block-broadcasts.php:145
    904904msgid "Click here to send your first broadcast."
    905905msgstr ""
    906906
    907 #: includes/blocks/class-convertkit-block-broadcasts.php:160
     907#: includes/blocks/class-convertkit-block-broadcasts.php:146
    908908msgid "Add a broadcast to your Kit account, and then refresh this page to configure broadcasts to display."
    909909msgstr ""
    910910
    911 #: includes/blocks/class-convertkit-block-broadcasts.php:300
     911#: includes/blocks/class-convertkit-block-broadcasts.php:282
    912912msgid "Display as grid"
    913913msgstr ""
    914914
    915 #: includes/blocks/class-convertkit-block-broadcasts.php:302
     915#: includes/blocks/class-convertkit-block-broadcasts.php:284
    916916msgid "If enabled, displays broadcasts in a grid, instead of a list."
    917917msgstr ""
    918918
     919#: includes/blocks/class-convertkit-block-broadcasts.php:287
     920msgid "Display order"
     921msgstr ""
     922
     923#: includes/blocks/class-convertkit-block-broadcasts.php:290
     924msgid "Date, Broadcast"
     925msgstr ""
     926
     927#: includes/blocks/class-convertkit-block-broadcasts.php:291
     928msgid "Broadcast, Date"
     929msgstr ""
     930
     931#: includes/blocks/class-convertkit-block-broadcasts.php:295
     932msgid "Date format"
     933msgstr ""
     934
    919935#: includes/blocks/class-convertkit-block-broadcasts.php:305
    920 msgid "Display order"
    921 msgstr ""
    922 
    923 #: includes/blocks/class-convertkit-block-broadcasts.php:308
    924 msgid "Date, Broadcast"
     936msgid "Display images"
    925937msgstr ""
    926938
    927939#: includes/blocks/class-convertkit-block-broadcasts.php:309
    928 msgid "Broadcast, Date"
     940msgid "Display descriptions"
    929941msgstr ""
    930942
    931943#: includes/blocks/class-convertkit-block-broadcasts.php:313
    932 msgid "Date format"
    933 msgstr ""
    934 
    935 #: includes/blocks/class-convertkit-block-broadcasts.php:323
    936 msgid "Display images"
    937 msgstr ""
    938 
    939 #: includes/blocks/class-convertkit-block-broadcasts.php:327
    940 msgid "Display descriptions"
     944msgid "Display read more links"
     945msgstr ""
     946
     947#: includes/blocks/class-convertkit-block-broadcasts.php:317
     948msgid "Read more label"
     949msgstr ""
     950
     951#: includes/blocks/class-convertkit-block-broadcasts.php:319
     952msgid "The label to display for the \"read more\" link below each broadcast."
     953msgstr ""
     954
     955#: includes/blocks/class-convertkit-block-broadcasts.php:322
     956msgid "Number of posts"
     957msgstr ""
     958
     959#: includes/blocks/class-convertkit-block-broadcasts.php:329
     960msgid "Display pagination"
    941961msgstr ""
    942962
    943963#: includes/blocks/class-convertkit-block-broadcasts.php:331
    944 msgid "Display read more links"
    945 msgstr ""
    946 
    947 #: includes/blocks/class-convertkit-block-broadcasts.php:335
    948 msgid "Read more label"
    949 msgstr ""
    950 
    951 #: includes/blocks/class-convertkit-block-broadcasts.php:337
    952 msgid "The label to display for the \"read more\" link below each broadcast."
    953 msgstr ""
    954 
    955 #: includes/blocks/class-convertkit-block-broadcasts.php:340
    956 msgid "Number of posts"
     964msgid "If the number of broadcasts exceeds the \"Number of posts\" settings above, previous/next pagination links will be displayed."
     965msgstr ""
     966
     967#: includes/blocks/class-convertkit-block-broadcasts.php:334
     968msgid "Newer posts label"
     969msgstr ""
     970
     971#: includes/blocks/class-convertkit-block-broadcasts.php:336
     972msgid "The label to display for the link to newer broadcasts."
     973msgstr ""
     974
     975#: includes/blocks/class-convertkit-block-broadcasts.php:339
     976msgid "Older posts label"
     977msgstr ""
     978
     979#: includes/blocks/class-convertkit-block-broadcasts.php:341
     980msgid "The label to display for the link to older broadcasts."
    957981msgstr ""
    958982
    959983#: includes/blocks/class-convertkit-block-broadcasts.php:347
    960 msgid "Display pagination"
    961 msgstr ""
    962 
    963 #: includes/blocks/class-convertkit-block-broadcasts.php:349
    964 msgid "If the number of broadcasts exceeds the \"Number of posts\" settings above, previous/next pagination links will be displayed."
    965 msgstr ""
    966 
    967 #: includes/blocks/class-convertkit-block-broadcasts.php:352
    968 msgid "Newer posts label"
    969 msgstr ""
    970 
    971 #: includes/blocks/class-convertkit-block-broadcasts.php:354
    972 msgid "The label to display for the link to newer broadcasts."
    973 msgstr ""
    974 
    975 #: includes/blocks/class-convertkit-block-broadcasts.php:357
    976 msgid "Older posts label"
    977 msgstr ""
    978 
    979 #: includes/blocks/class-convertkit-block-broadcasts.php:359
    980 msgid "The label to display for the link to older broadcasts."
    981 msgstr ""
    982 
    983 #: includes/blocks/class-convertkit-block-broadcasts.php:365
    984984msgid "Link color"
    985985msgstr ""
    986986
    987 #: includes/blocks/class-convertkit-block-broadcasts.php:369
    988 #: includes/blocks/class-convertkit-block-form-trigger.php:267
    989 #: includes/blocks/class-convertkit-block-product.php:312
     987#: includes/blocks/class-convertkit-block-broadcasts.php:351
     988#: includes/blocks/class-convertkit-block-form-trigger.php:253
     989#: includes/blocks/class-convertkit-block-product.php:295
    990990msgid "Background color"
    991991msgstr ""
    992992
    993 #: includes/blocks/class-convertkit-block-broadcasts.php:373
    994 #: includes/blocks/class-convertkit-block-form-trigger.php:271
    995 #: includes/blocks/class-convertkit-block-product.php:316
     993#: includes/blocks/class-convertkit-block-broadcasts.php:355
     994#: includes/blocks/class-convertkit-block-form-trigger.php:257
     995#: includes/blocks/class-convertkit-block-product.php:299
    996996msgid "Text color"
    997997msgstr ""
    998998
    999 #: includes/blocks/class-convertkit-block-broadcasts.php:408
     999#: includes/blocks/class-convertkit-block-broadcasts.php:390
    10001000msgid "Pagination"
    10011001msgstr ""
    10021002
    1003 #: includes/blocks/class-convertkit-block-broadcasts.php:417
     1003#: includes/blocks/class-convertkit-block-broadcasts.php:399
    10041004msgid "Styles"
    10051005msgstr ""
    10061006
    1007 #: includes/blocks/class-convertkit-block-broadcasts.php:444
     1007#: includes/blocks/class-convertkit-block-broadcasts.php:426
    10081008msgid "Read more"
    10091009msgstr ""
    10101010
    1011 #: includes/blocks/class-convertkit-block-broadcasts.php:447
     1011#: includes/blocks/class-convertkit-block-broadcasts.php:429
    10121012msgid "Previous"
    10131013msgstr ""
    10141014
    1015 #: includes/blocks/class-convertkit-block-broadcasts.php:448
     1015#: includes/blocks/class-convertkit-block-broadcasts.php:430
    10161016msgid "Next"
    10171017msgstr ""
    10181018
    1019 #: includes/blocks/class-convertkit-block-broadcasts.php:494
     1019#: includes/blocks/class-convertkit-block-broadcasts.php:476
    10201020msgid "No Broadcasts exist in Kit."
    10211021msgstr ""
     
    10441044msgstr ""
    10451045
    1046 #: includes/blocks/class-convertkit-block-form-trigger.php:91
     1046#: includes/blocks/class-convertkit-block-form-trigger.php:77
    10471047msgid "Displays a modal, sticky bar or slide in form to display when the button is pressed."
    10481048msgstr ""
    10491049
    1050 #: includes/blocks/class-convertkit-block-form-trigger.php:123
     1050#: includes/blocks/class-convertkit-block-form-trigger.php:109
    10511051#: includes/blocks/class-convertkit-block-form.php:139
    10521052msgid "Connect your Kit account at Settings > Kit, and then refresh this page to select a form."
    10531053msgstr ""
    10541054
    1055 #: includes/blocks/class-convertkit-block-form-trigger.php:126
     1055#: includes/blocks/class-convertkit-block-form-trigger.php:112
    10561056msgid "No modal, sticky bar or slide in forms exist in Kit."
    10571057msgstr ""
    10581058
    1059 #: includes/blocks/class-convertkit-block-form-trigger.php:128
     1059#: includes/blocks/class-convertkit-block-form-trigger.php:114
    10601060msgid "Click here to create a form."
    10611061msgstr ""
    10621062
    1063 #: includes/blocks/class-convertkit-block-form-trigger.php:129
     1063#: includes/blocks/class-convertkit-block-form-trigger.php:115
    10641064msgid "Add a non-inline form to your Kit account, and then refresh this page to select a form."
    10651065msgstr ""
    10661066
    1067 #: includes/blocks/class-convertkit-block-form-trigger.php:131
     1067#: includes/blocks/class-convertkit-block-form-trigger.php:120
    10681068#: includes/blocks/class-convertkit-block-form.php:149
    10691069msgid "Select a Form using the Form option in the Gutenberg sidebar."
    10701070msgstr ""
    10711071
    1072 #: includes/blocks/class-convertkit-block-form-trigger.php:256
     1072#: includes/blocks/class-convertkit-block-form-trigger.php:242
    10731073msgid "The modal, sticky bar or slide in form to display when the button is pressed. To embed a form, use the Kit Form block instead."
    10741074msgstr ""
    10751075
    1076 #: includes/blocks/class-convertkit-block-form-trigger.php:259
    1077 #: includes/blocks/class-convertkit-block-product.php:289
     1076#: includes/blocks/class-convertkit-block-form-trigger.php:245
     1077#: includes/blocks/class-convertkit-block-product.php:272
    10781078msgid "Button Text"
    10791079msgstr ""
    10801080
    1081 #: includes/blocks/class-convertkit-block-form-trigger.php:261
    1082 #: includes/blocks/class-convertkit-block-product.php:291
     1081#: includes/blocks/class-convertkit-block-form-trigger.php:247
     1082#: includes/blocks/class-convertkit-block-product.php:274
    10831083msgid "The text to display for the button."
    10841084msgstr ""
    10851085
    1086 #: includes/blocks/class-convertkit-block-form-trigger.php:319
     1086#: includes/blocks/class-convertkit-block-form-trigger.php:305
    10871087#: includes/class-convertkit-settings-restrict-content.php:229
    10881088#: includes/integrations/contactform7/class-convertkit-contactform7-admin-section.php:84
     
    10941094
    10951095#. translators: ConvertKit Form ID
    1096 #: includes/blocks/class-convertkit-block-form-trigger.php:419
    1097 #: includes/class-convertkit-resource-forms.php:496
     1096#: includes/blocks/class-convertkit-block-form-trigger.php:405
     1097#: includes/class-convertkit-resource-forms.php:497
    10981098msgid "Kit Form ID %s does not exist on Kit."
    10991099msgstr ""
    11001100
    11011101#. translators: ConvertKit Form ID
    1102 #: includes/blocks/class-convertkit-block-form-trigger.php:431
     1102#: includes/blocks/class-convertkit-block-form-trigger.php:417
    11031103msgid "Kit Form ID %s has no uid property."
    11041104msgstr ""
    11051105
    11061106#. translators: ConvertKit Form ID
    1107 #: includes/blocks/class-convertkit-block-form-trigger.php:441
     1107#: includes/blocks/class-convertkit-block-form-trigger.php:427
    11081108msgid "Kit Form ID %s has no embed_js property."
    11091109msgstr ""
     
    11461146msgstr ""
    11471147
    1148 #: includes/blocks/class-convertkit-block-product.php:112
     1148#: includes/blocks/class-convertkit-block-product.php:98
    11491149msgid "Kit Product"
    11501150msgstr ""
    11511151
    1152 #: includes/blocks/class-convertkit-block-product.php:113
     1152#: includes/blocks/class-convertkit-block-product.php:99
    11531153msgid "Displays a button to purchase a Kit product."
    11541154msgstr ""
    11551155
    1156 #: includes/blocks/class-convertkit-block-product.php:145
     1156#: includes/blocks/class-convertkit-block-product.php:131
    11571157msgid "Connect your Kit account at Settings > Kit, and then refresh this page to select a product."
    11581158msgstr ""
    11591159
    1160 #: includes/blocks/class-convertkit-block-product.php:148
     1160#: includes/blocks/class-convertkit-block-product.php:134
    11611161msgid "No products exist in Kit."
    11621162msgstr ""
    11631163
    1164 #: includes/blocks/class-convertkit-block-product.php:150
     1164#: includes/blocks/class-convertkit-block-product.php:136
    11651165msgid "Click here to create your first product."
    11661166msgstr ""
    11671167
    1168 #: includes/blocks/class-convertkit-block-product.php:151
     1168#: includes/blocks/class-convertkit-block-product.php:137
    11691169msgid "Add a product to your Kit account, and then refresh this page to select a product."
    11701170msgstr ""
    11711171
    1172 #: includes/blocks/class-convertkit-block-product.php:155
     1172#: includes/blocks/class-convertkit-block-product.php:141
    11731173msgid "Select a Product using the Product option in the Gutenberg sidebar."
    11741174msgstr ""
    11751175
    1176 #: includes/blocks/class-convertkit-block-product.php:294
     1176#: includes/blocks/class-convertkit-block-product.php:277
    11771177msgid "Discount Code"
    11781178msgstr ""
    11791179
    1180 #: includes/blocks/class-convertkit-block-product.php:296
     1180#: includes/blocks/class-convertkit-block-product.php:279
    11811181msgid "Optional: A discount code to include. Must be defined in the Kit Product."
    11821182msgstr ""
    11831183
    1184 #: includes/blocks/class-convertkit-block-product.php:299
     1184#: includes/blocks/class-convertkit-block-product.php:282
    11851185msgid "Load checkout step"
    11861186msgstr ""
    11871187
    1188 #: includes/blocks/class-convertkit-block-product.php:301
     1188#: includes/blocks/class-convertkit-block-product.php:284
    11891189msgid "If enabled, immediately loads the checkout screen, instead of the Kit Product description."
    11901190msgstr ""
    11911191
    1192 #: includes/blocks/class-convertkit-block-product.php:304
     1192#: includes/blocks/class-convertkit-block-product.php:287
    11931193msgid "Disable modal on mobile"
    11941194msgstr ""
    11951195
    1196 #: includes/blocks/class-convertkit-block-product.php:306
     1196#: includes/blocks/class-convertkit-block-product.php:289
    11971197msgid "Recommended if the Kit Product is a digital download being purchased on mobile, to ensure the subscriber can immediately download the PDF once purchased."
    11981198msgstr ""
    11991199
    1200 #: includes/blocks/class-convertkit-block-product.php:367
     1200#: includes/blocks/class-convertkit-block-product.php:350
    12011201msgid "Buy my product"
    12021202msgstr ""
     
    12761276msgstr ""
    12771277
    1278 #: includes/class-convertkit-resource-forms.php:512
     1278#: includes/class-convertkit-resource-forms.php:513
    12791279msgid "Kit Legacy Form could not be fetched as no Access Token specified in Plugin Settings"
    12801280msgstr ""
     
    14751475msgstr ""
    14761476
    1477 #: includes/integrations/elementor/class-convertkit-elementor-widget.php:295
     1477#: includes/integrations/elementor/class-convertkit-elementor-widget.php:283
    14781478msgid "No blocks are registered. Register blocks using the `convertkit_blocks` filter."
    14791479msgstr ""
    14801480
    14811481#. translators: %1$s: Block name, %2$s: Elementor Widget name
    1482 #: includes/integrations/elementor/class-convertkit-elementor-widget.php:304
     1482#: includes/integrations/elementor/class-convertkit-elementor-widget.php:292
    14831483msgid "Block %1$s is not registered. Register using the `convertkit_blocks` filter, and ensure the Elementor Widget for this block has its `slug` property set to %2$s."
    14841484msgstr ""
  • convertkit/trunk/readme.txt

    r3333065 r3337204  
    66Tested up to: 6.8
    77Requires PHP: 7.1
    8 Stable tag: 2.8.6.1
     8Stable tag: 2.8.7
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    162162== Changelog ==
    163163
     164### 2.8.7 2025-07-31
     165* Added: Blocks: Form: Margin, padding and background color options
     166* Added: Debug: Forms: `data-kit-source-post-id` attribute to scripts when Debugging enabled
     167* Added: JS: Emit `kit_subscriber_id_removed_from_url` event when the `ck_subscriber_id` is removed from a URL
     168* Fix: Debloat Plugin: Exclude Forms from Debloat's Defer and Delay JS
     169* Fix: Classic Widgets: Form: Uncaught error: Call to undefined method `ConvertKit_Resource_Forms::output_select_field_all`
     170* Fix: Blocks: Refactored and removed unnecessary duplicate render callback functions in the block editor
     171
    164172### 2.8.6.1 2025-07-23
    165173* Fix: Form Trigger: Revert running `script` tags through `wp_kses`, as WordPress.com strip the script tag
  • convertkit/trunk/resources/backend/js/gutenberg.js

    r3270754 r3337204  
    393393                // use the block's PHP's render() function.
    394394                preview = window[ block.gutenberg_preview_render_callback ]( block, props );
     395            } else {
     396                // If no settings have been defined for this block, return a prompt to tell the editor
     397                // what to do.
     398                if ( typeof block.gutenberg_help_description_attribute !== 'undefined' && props.attributes[ block.gutenberg_help_description_attribute ] === '' ) {
     399                    preview = convertKitGutenbergDisplayBlockNotice( block.name, block.gutenberg_help_description );
     400                } else {
     401                    // Use the block's PHP's render() function by calling the ServerSideRender component.
     402                    preview = wp.element.createElement(
     403                        wp.serverSideRender,
     404                        {
     405                            block: 'convertkit/' + block.name,
     406                            attributes: props.attributes,
     407
     408                            // This is only output in the Gutenberg editor, so must be slightly different from the inner class name used to
     409                            // apply styles with i.e. convertkit-block.name.
     410                            className: 'convertkit-ssr-' + block.name,
     411                        }
     412                    );
     413                }
    395414            }
    396415
  • convertkit/trunk/resources/frontend/js/convertkit.js

    r3234366 r3337204  
    116116    window.history.replaceState( null, title, url_object.pathname + params + url_object.hash );
    117117
     118    // Emit custom event with the removed subscriber ID.
     119    convertKitEmitCustomEvent(
     120        'kit_subscriber_id_removed_from_url',
     121        {
     122            id: ck_subscriber_id
     123        }
     124    );
     125
    118126}
    119127
  • convertkit/trunk/wp-convertkit.php

    r3333065 r3337204  
    1010 * Plugin URI: https://kit.com/
    1111 * Description: Display Kit (formerly ConvertKit) email subscription forms, landing pages, products, broadcasts and more.
    12  * Version: 2.8.6.1
     12 * Version: 2.8.7
    1313 * Author: Kit
    1414 * Author URI: https://kit.com/
     
    2828define( 'CONVERTKIT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    2929define( 'CONVERTKIT_PLUGIN_PATH', __DIR__ );
    30 define( 'CONVERTKIT_PLUGIN_VERSION', '2.8.6.1' );
     30define( 'CONVERTKIT_PLUGIN_VERSION', '2.8.7' );
    3131define( 'CONVERTKIT_OAUTH_CLIENT_ID', 'HXZlOCj-K5r0ufuWCtyoyo3f688VmMAYSsKg1eGvw0Y' );
    3232define( 'CONVERTKIT_OAUTH_CLIENT_REDIRECT_URI', 'https://app.kit.com/wordpress/redirect' );
Note: See TracChangeset for help on using the changeset viewer.