Hello,
I'm writing a plugin that requires a unique identifier if a post contains more than one instance of the shortcode.
Here's a shortcode function for example:
function foo() {
$i = 0;
$i++;
return $i;
}
add_shortcode('foo','foo');
If I enter the shortcode twice in a post like this...
[foo]
[foo]
it will return this...
1 1
But I would like it to return...
1 2
Any ideas?