media_frame_title = __( 'Upload or select audio from your WordPress media library', 'wp-data-access' ); $this->media_frame_remove = __( 'Remove audio', 'wp-data-access' ); $this->media_types = 'audio'; } protected function show_item_media() { if ( 'number' === esc_attr( $this->data_type ) ) { // Column supports only one media file $url = wp_get_attachment_url( esc_attr( $this->item_value ) ); if ( false !== $url ) { $url = wp_get_attachment_url( esc_attr( $this->item_value ) ); $this->create_item_audio( $url ); } } else { // Column supports multiple media files if ( null !== $this->item_value && '' !== $this->item_value ) { $media_ids = explode( ',', $this->item_value );//phpcs:ignore - 8.1 proof foreach ( $media_ids as $media_id ) { $url = wp_get_attachment_url( esc_attr( $media_id ) ); if ( false !== $url ) { $this->create_item_audio( $url ); } } } } } private function create_item_audio( $url ) { ?>