Subtitles v2.0.0 Released

Subtitles v2.0.0 is now available in the WordPress.org repository. The primary change in this version is how front-end CSS is handled. It was previously output via a call to a separate enqueued stylesheet but that wasn’t very sound for performance. In this version styling is sent via wp_head to avoid the additional CSS file mucking things up.

The reason for the version bump is because ditching styling is now done differently from how it was done in v1.0.0+. Previously it was handled in the following manner:

function ditch_subtitle_styling() {
	wp_dequeue_style( 'subtitles-style' );
}
add_action( 'wp_enqueue_scripts', 'ditch_subtitle_styling' );

It’s now handled like this:

if ( class_exists( 'Subtitles' ) &&  method_exists( 'Subtitles', 'subtitle_styling' ) ) {
	remove_action( 'wp_head', array( Subtitles::getInstance(), 'subtitle_styling' ) );
}

Download your copy of Subtitles today. Pretty soon here I’ll be adding in a way to remove all subtitles from a site, as there’s currently no way to easily do that.

Author: Philip Arthur Moore

CEO at We Cobble. We build digital products for people.™