@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * |
| 11 | 11 | * @param string $type Slug of the block. Will be prefixed with jetpack/. |
| 12 | 12 | * @param array $args Arguments that are passed into the register_block_type. |
| 13 | - * @param array $avalibility Arguments that tells us what kind of avalibility the block has |
|
| 13 | + * @param array $availability Arguments that tells us what kind of avalibility the block has |
|
| 14 | 14 | * |
| 15 | 15 | * @see register_block_type |
| 16 | 16 | * |
@@ -76,10 +76,16 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $preset |
|
| 81 | + */ |
|
| 79 | 82 | public static function preset_exists( $preset ) { |
| 80 | 83 | return file_exists( JETPACK__PLUGIN_DIR . '/_inc/blocks/' . $preset . '.json' ); |
| 81 | 84 | } |
| 82 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $preset |
|
| 88 | + */ |
|
| 83 | 89 | public static function get_preset( $preset ) { |
| 84 | 90 | return json_decode( file_get_contents( JETPACK__PLUGIN_DIR . '/_inc/blocks/' . $preset . '.json' ) ); |
| 85 | 91 | } |