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

Andrew Ozz admin at laptoptips.ca
Wed Apr 2 09:58:37 GMT 2008


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?

Keeping it a .js file allows it to be cached in the browser and various 
network caches, so after the first loading it is a lot faster.

Perhaps it can be extended a bit by adding a js hook for additional 
buttons. These buttons could be either in inline js or separate js files.


More information about the wp-hackers mailing list