WordPress.org

Ready to get started?Download WordPress

Forums

WP-Markdown
Enqueueing Prettify (3 posts)

  1. Dustin Lammiman
    Member
    Posted 1 year ago #

    First off, thank you for making this fantastic plugin.

    Could I just make one small request for the next version of this plugin? When you enqueue prettify could you use 'prettify' as the handle rather than 'markdown_pretty' which you are using now? The reason is that I am using a theme that has prettify support built in, so enabling prettify support in your plugin causes the prettify script to get loaded twice. I think this could be an issue for other people who use similar themes or plugins which also reference this library. If we all used a common handle (my suggestion is 'prettify'), WordPress would only include it once.

    http://wordpress.org/extend/plugins/wp-markdown/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dustin,

    Actually, I named it markdown_pretty *because* of potential clashes (i.e. another plug-in enqueuing a (not necessarily the same) script with handle 'prettify').

    But this definitely needs sorting. Perhaps filtering the handle to allow it to be changed.

    That said, prettify seems a pretty stable script - and its not very likely that another plug-in will use that handle for something that isn't prettify or is a really old version. So maybe I'm being over cautious.

    I'll have a think...

  3. Dustin Lammiman
    Member
    Posted 1 year ago #

    Yeah, I realized that after I started this topic. Nifty little script to make WordPress play nice with prettify. Perhaps the little custom piece should move to a separate script, but then you'd have an extra request for just that tiny piece of code... I see your dilemma.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.