core-audio.php
28 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plan checks for uploading audio files to core/audio. |
| 4 | * |
| 5 | * @package automattic/jetpack |
| 6 | **/ |
| 7 | |
| 8 | // Populate the available extensions with core/audio. |
| 9 | add_filter( |
| 10 | 'jetpack_set_available_extensions', |
| 11 | function ( $extensions ) { |
| 12 | return array_merge( |
| 13 | $extensions, |
| 14 | array( |
| 15 | 'core/audio', |
| 16 | ) |
| 17 | ); |
| 18 | } |
| 19 | ); |
| 20 | |
| 21 | // Set the core/audio block availability, depending on the site plan. |
| 22 | add_action( |
| 23 | 'jetpack_register_gutenberg_extensions', |
| 24 | function () { |
| 25 | \Jetpack_Gutenberg::set_availability_for_plan( 'core/audio' ); |
| 26 | } |
| 27 | ); |
| 28 |