Making a ShortCode Plugin
Shortcode Plugin Framework
/** * Plugin Name: ReadTheExcerpt * Description: A plugin that creates a shortcode to read the post excerpt. * Author: Me * Version: 0.0.0 * * [ReadTheExcerpt a1="value" a2="value"] **/ function readTheExcerpt() ( $atts, $content='' ) { extract(shortcode_atts(array( 'a1'=>'value', 'a2'=>'value' ), $atts)); // get the excerpt and create a link that will speak it return $content; } add_shortcode('ReadTheExcerpt', 'readTheExcerpt'); ?>
Adding Voice to WordPress
Presented to VoiceLunch/US, March 25, 2022