Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 19
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Plan checks for uploading video files to core/video.
4 *
5 * @package automattic/jetpack
6 **/
7
8if ( ! defined( 'ABSPATH' ) ) {
9    exit( 0 );
10}
11
12// Populate the available extensions with core/video.
13add_filter(
14    'jetpack_set_available_extensions',
15    function ( $extensions ) {
16        return array_merge(
17            (array) $extensions,
18            array(
19                'core/video',
20            )
21        );
22    }
23);
24
25// Set the core/video block availability, depending on the site plan.
26add_action(
27    'jetpack_register_gutenberg_extensions',
28    function () {
29        \Jetpack_Gutenberg::set_availability_for_plan( 'core/video' );
30    }
31);