← All changes
|
includes/blocks/class-convertkit-block-broadcasts.php
+17
-0
3.3.3
→
3.4.5
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_scripts_editor_and_frontend', array( $this, 'enqueue_scripts' ) ); |
| 32 | 35 | add_action( 'convertkit_gutenberg_enqueue_styles_editor_and_frontend', array( $this, 'enqueue_styles' ) ); |
| 33 | 36 | |
| @@ -153,8 +156,9 @@ | ||
| 153 | 156 | |
| 154 | 157 | /** |
| 155 | 158 | * This will register as: |
| 156 | 159 | * - a shortcode, with the name [convertkit_broadcasts]. |
| 160 | + * - a shortcode, with the name [kit_broadcasts]. | |
| 157 | 161 | * - a Gutenberg block, with the name convertkit/broadcasts. |
| 158 | 162 | */ |
| 159 | 163 | return 'broadcasts'; |
| 160 | 164 | |
| @@ -165,8 +169,21 @@ | ||
| 165 | 169 | * |
| 166 | 170 | * @since 3.1.1 |
| 167 | 171 | */ |
| 168 | 172 | public function get_title() { |
| 173 | + | |
| 174 | + return __( 'Kit Broadcasts', 'convertkit' ); | |
| 175 | + | |
| 176 | + } | |
| 177 | + | |
| 178 | + /** | |
| 179 | + * Returns this block's plural title. | |
| 180 | + * | |
| 181 | + * @since 3.4.0 | |
| 182 | + * | |
| 183 | + * @return string | |
| 184 | + */ | |
| 185 | + public function get_title_plural() { | |
| 169 | 186 | |
| 170 | 187 | return __( 'Kit Broadcasts', 'convertkit' ); |
| 171 | 188 | |
| 172 | 189 | } |