I have a simple shortcode like this….
function myshortcode( $attributes, $content = null ) {
extract( shortcode_atts( array(
'class' => ''
), $attributes ) );
return 'This is the content : ' . $content . ';
}
add_shortcode('my_shortcode', 'myshortcode');
This works great and if I use the following in a post…
[my_shortcode]This is the content that I want to display[/my_shortcode]
But what I want to do now is vary the font size of the content for example…
[my_shortcode]This is the [25px]content[/25px] that I want to display[/my_shortcode]
I want this to change the word ‘content’ to 25px font size.
Anyone know a way, maybe str_replace?