[wp-hackers] Let's make Buttonsnap fully obsolete

Stephen Rider wp-hackers at striderweb.com
Wed Apr 2 14:40:52 GMT 2008

On Apr 2, 2008, at 3:34 AM, Ozh wrote:
>> One solution would be to do quicktags.js -> quicktags.js.php and  
>> make it
>> dynamically generated (i.e. hooks and filters), but then we may run  
>> into
>> caching issues (although no-cache headers would fix that). Another
> solution
>> would be one similar to how Buttonsnap works and just manually add
> buttons
>> to the container.
> I think that would be really pretty cool.
> First option (quicktag.js.php) gives two options:
> - external <script src="quicktag.js.php"> :
> This means that both the Write page and the quicktag file will require
> wp-config.php, which will double all the SQL queries and plugin  
> loading
> and stuff.
> - inline quicktag javascript:
> wp-config.php is included only once, but it adds nearly 10kb to the  
> Write
> page.
> I think the second option is better. Thoughts?

I have a plugin that passes parameters from the database to a  
static .js file.

The way I do it is to use PHP to write a JS function call into the  
page header with the parameters in the call.  It works quite well.

Pretty straightforward, but you can see it here:


Stephen Rider

More information about the wp-hackers mailing list