We'll create fresh WordPress site with Hello Dolly For Your Song installed. You have 20 minutes to test the plugin after that site we'll be deleted.
This simple plugin is an extended version of the famous hello dolly plugin by Matt Mullenweg. Every human being has a special relationship to a particular song. And because of that, Hello Dolly For Your Song brings the lyric of your favourite song in the blog. But of course it can be used for any text. 😉
Widgets
[hdfys]
hello_dolly_for_your_song()
get_hello_dolly_for_your_song()
http://yourblogdomain/wp-json/restful-hello-dolly-for-your-song/text
hdfys_new_song
This Action wil be fired, if a new text was maintained in the settings.
You can use the following code.
function hdfys_do_anything() {
// Add your code to execute here
}
add_action( 'hdfys_new_song', 'hdfys_do_anything', 10, 3 );
hdfys_output_filter
The filter will be applied before output of the gutenberg block, template tag and shortcode.
You can use the following code.
function hdfys_output_manipulate( $output ) {
// Add your filter code here
// Example: $output=strtolower( $output );
return $output;
}
add_filter( 'hdfys_output_filter', 'hdfys_output_manipulate', 10, 1 );