← All changes
|
includes/blocks/class-convertkit-block-form-trigger.php
+17
-1
3.3.1
→
3.4.3
View file →
| @@ -26,8 +26,11 @@ | ||
| 26 | 26 | |
| 27 | 27 | // Register this as a Gutenberg block in the ConvertKit Plugin. |
| 28 | 28 | add_filter( 'convertkit_blocks', array( $this, 'register' ) ); |
| 29 | 29 | |
| 30 | + // Register this block's MCP abilities. | |
| 31 | + add_filter( 'convertkit_abilities', array( $this, 'register_abilities' ) ); | |
| 32 | + | |
| 30 | 33 | // Enqueue scripts and styles for this Gutenberg Block in the editor and frontend views. |
| 31 | 34 | add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) ); |
| 32 | 35 | |
| 33 | 36 | } |
| @@ -73,8 +76,21 @@ | ||
| 73 | 76 | |
| 74 | 77 | } |
| 75 | 78 | |
| 76 | 79 | /** |
| 80 | + * Returns this block's plural title. | |
| 81 | + * | |
| 82 | + * @since 3.4.0 | |
| 83 | + * | |
| 84 | + * @return string | |
| 85 | + */ | |
| 86 | + public function get_title_plural() { | |
| 87 | + | |
| 88 | + return __( 'Kit Form Triggers', 'convertkit' ); | |
| 89 | + | |
| 90 | + } | |
| 91 | + | |
| 92 | + /** | |
| 77 | 93 | * Returns this block's icon. |
| 78 | 94 | * |
| 79 | 95 | * @since 3.1.1 |
| 80 | 96 | */ |
| @@ -361,9 +377,9 @@ | ||
| 361 | 377 | $this->get_css_styles( $atts ), |
| 362 | 378 | $this->is_block_editor_request() |
| 363 | 379 | ); |
| 364 | 380 | |
| 365 | - // Bail if an error occured. | |
| 381 | + // Bail if an error occurred. | |
| 366 | 382 | if ( is_wp_error( $html ) ) { |
| 367 | 383 | if ( $settings->debug_enabled() ) { |
| 368 | 384 | return '<!-- ' . $html->get_error_message() . ' -->'; |
| 369 | 385 | } |