Support for wp-subtitle
-
Hi, this is not really a support request, but some advice for those who would like to suppport subtitles.
The Subheading plugin hasn’t been updated for three years. hmmm. But subtitle is up-to-date.
Soooo. If you’d like the opengraph plugin to use subtitles generated by the wp-subtitle plugin, add the following to your themes’ function.php (or write a plugin!).
/* hack for subtitles */
/* make sure the function doesn’t exist */
if ( ! function_exists( ‘get_the_subheading’ ) ){/* we only need the class as a dummy */
class SubHeading {
function __construct() {
print “In BaseClass constructor\n”;
}
}
/* use the subtitle plugin */function get_the_subheading() {
$subtitle = apply_filters( ‘plugins/wp_subtitle/get_subtitle’, ”, array(
‘before’ => ”,
‘after’ => ”,
‘post_id’ => get_the_ID()
) );
return $subtitle;
}
}Now you can configure the 3rd party extension in open graph
- The topic ‘Support for wp-subtitle’ is closed to new replies.