Include text string in shortcode
-
I am attempting to pass a text string into my shortcode:
[tooltip screen="Test link" popup="Does this test actually work?"]This is in my functions.php:
function wp_tooltip($atts) { extract(shortcode_atts(array( "screen" => '', "popup" => '' ), $atts)); return '<abbr style="border-bottom: black 1px dashed; cursor: pointer;" title=' . $popup . '>' . $screen . '</abbr>'; } if ( function_exists('add_shortcode') ) add_shortcode('tooltip', 'wp_tooltip');But it doesn’t work because of the spaces in the text string. Any ideas?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Include text string in shortcode’ is closed to new replies.