Skip to content
16 changes: 16 additions & 0 deletions includes/blocks/class-convertkit-block-broadcasts.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function __construct() {
// Register this as a Gutenberg block in the ConvertKit Plugin.
add_filter( 'convertkit_blocks', array( $this, 'register' ) );

// Register this block's MCP abilities.
add_filter( 'convertkit_abilities', array( $this, 'register_abilities' ) );

// Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
Expand Down Expand Up @@ -171,6 +174,19 @@ public function get_title() {

}

/**
* Returns this block's plural title.
*
* @since 3.4.0
*
* @return string
*/
public function get_title_plural() {

return __( 'Kit Broadcasts', 'convertkit' );

}

/**
* Returns this block's icon.
*
Expand Down
16 changes: 16 additions & 0 deletions includes/blocks/class-convertkit-block-form-trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function __construct() {
// Register this as a Gutenberg block in the ConvertKit Plugin.
add_filter( 'convertkit_blocks', array( $this, 'register' ) );

// Register this block's MCP abilities.
add_filter( 'convertkit_abilities', array( $this, 'register_abilities' ) );

// Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );

Expand Down Expand Up @@ -73,6 +76,19 @@ public function get_title() {

}

/**
* Returns this block's plural title.
*
* @since 3.4.0
*
* @return string
*/
public function get_title_plural() {

return __( 'Kit Form Triggers', 'convertkit' );

}

/**
* Returns this block's icon.
*
Expand Down
16 changes: 16 additions & 0 deletions includes/blocks/class-convertkit-block-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function __construct() {
// Register this as a Gutenberg block in the ConvertKit Plugin.
add_filter( 'convertkit_blocks', array( $this, 'register' ) );

// Register this block's MCP abilities.
add_filter( 'convertkit_abilities', array( $this, 'register_abilities' ) );

// Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views.
add_action( 'convertkit_gutenberg_enqueue_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) );
add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) );
Expand Down Expand Up @@ -95,6 +98,19 @@ public function get_title() {

}

/**
* Returns this block's plural title.
*
* @since 3.4.0
*
* @return string
*/
public function get_title_plural() {

return __( 'Kit Products', 'convertkit' );

}

/**
* Returns this block's icon.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ private function get_input_schema_property_type( $field ) {

switch ( $type ) {
case 'resource':
case 'text':
case 'color':
case 'select':
return 'string';

case 'number':
Expand All @@ -174,7 +177,8 @@ private function get_input_schema_property_type( $field ) {
return 'boolean';

default:
return $type;
// Unknown field type — fall back to string.
return 'string';
}

}
Expand Down
Loading