[wp-hackers] plugin developers invited for collaboration

Daiv Mowbray daiv at daivmowbray.com
Fri May 30 20:46:09 GMT 2008


Thanx Viper,
I was just reading that same page this afternoon.

If I understand correctly, in our case, shortcode would replace:
$content = preg_replace_callback( "/(<p>)?\[qt:([^]]+)](<\/p>)?/i",  
"my_embed", $content );

with the shortcode call:
add_shortcode('my-shortcode', 'my_shortcode_handler');

then called by the user with my quicktag button:
which could insert:
[my-shortcode foo="bar" baz="bing"]

which then will activate my_shortcode_handler.

Then the my_shortcode_handler will have an add_filter:
add_filter($tag,  $function_to_add,  $priority = 10,  $accepted_args =  
1);

Please correct me if I'm misunderstanding something here.


On May 30, 2008, at 5:52 PM, Viper007Bond wrote:

> You may want to check out this for the [superslider] bit:
> http://codex.wordpress.org/Shortcode_API
>
> On Fri, May 30, 2008 at 8:21 AM, Daiv Mowbray <daiv at daivmowbray.com>  
> wrote:
>
>>
>> Good day list.


----------
Daiv Mowbray
daiv at daivmowbray.com
----------




More information about the wp-hackers mailing list