Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
60.00% |
3 / 5 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| WPCOM_REST_API_V3_Endpoint_VideoPress_Playlists | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Playlist routes for WordPress.com's REST plugin loader. |
| 4 | * |
| 5 | * @package automattic/jetpack-videopress |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\VideoPress; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit( 0 ); |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Registers the `wpcom/v3/videopress/playlists` routes on WordPress.com, where |
| 16 | * the dashboard reaches them through the public API. Jetpack and Atomic sites |
| 17 | * register the same routes from Rest_Controller. |
| 18 | * |
| 19 | * @phan-constructor-used-for-side-effects |
| 20 | */ |
| 21 | class WPCOM_REST_API_V3_Endpoint_VideoPress_Playlists { |
| 22 | |
| 23 | /** |
| 24 | * Constructor. |
| 25 | */ |
| 26 | public function __construct() { |
| 27 | add_action( 'rest_api_init', array( Playlist_Manager::class, 'register_rest_routes' ) ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 32 | wpcom_rest_api_v2_load_plugin( __NAMESPACE__ . '\\WPCOM_REST_API_V3_Endpoint_VideoPress_Playlists' ); |
| 33 | } |