← All changes
|
includes/blocks/class-convertkit-block-form-trigger.php
+17
-0
3.3.8
→
3.4.4
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 | } |
| @@ -55,8 +58,9 @@ | ||
| 55 | 58 | |
| 56 | 59 | /** |
| 57 | 60 | * This will register as: |
| 58 | 61 | * - a shortcode, with the name [convertkit_formtrigger]. |
| 62 | + * - a shortcode, with the name [kit_formtrigger]. | |
| 59 | 63 | * - a Gutenberg block, with the name convertkit/formtrigger. |
| 60 | 64 | */ |
| 61 | 65 | return 'formtrigger'; |
| 62 | 66 | |
| @@ -69,8 +73,21 @@ | ||
| 69 | 73 | */ |
| 70 | 74 | public function get_title() { |
| 71 | 75 | |
| 72 | 76 | return __( 'Kit Form Trigger', 'convertkit' ); |
| 77 | + | |
| 78 | + } | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * Returns this block's plural title. | |
| 82 | + * | |
| 83 | + * @since 3.4.0 | |
| 84 | + * | |
| 85 | + * @return string | |
| 86 | + */ | |
| 87 | + public function get_title_plural() { | |
| 88 | + | |
| 89 | + return __( 'Kit Form Triggers', 'convertkit' ); | |
| 73 | 90 | |
| 74 | 91 | } |
| 75 | 92 | |
| 76 | 93 | /** |