diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 62c124aaa9..e750cc7562 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -1013,6 +1013,10 @@ function wp_get_playlist( $attr, $type ) { $orderby = 'none'; } + if ( ! in_array( $style, array( 'light', 'dark' ), true ) ) { + $style = 'light'; + } + $args = array( 'post_status' => 'inherit', 'post_type' => 'attachment', @@ -1113,13 +1117,16 @@ function wp_get_playlist( $attr, $type ) { } $data['tracks'] = $tracks; + $safe_type = esc_attr( $safe_type ); + $safe_style = esc_attr( $style ); + ob_start(); if ( 1 === $instance ): wp_enqueue_style( 'wp-mediaelement' ); wp_enqueue_script( 'wp-playlist' ); ?> - + -