Forums

[resolved] replace a JS with a modified script (3 posts)

  1. skarck
    Member
    Posted 1 year ago #

    Hi!

    I'm trying to modify the behavior of the image edit tool and need to do a few changes to a JS in admin/js/ ...
    is there a way to tell a plugin to dequeue a core-script and call a custom script instead???

    i don't want to mess with the files again after every update...

    thx in advance!

  2. Mark / t31os
    Moderator
    Posted 1 year ago #

    wp_deregister_script - sorry couldn't find a codex page for it

    http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/functions.wp-scripts.php#L80

    Unregister the existing one, then register your own with the same name (that way you won't cause any enqueued scripts that have dependancies on that file to fail).

  3. skarck
    Member
    Posted 1 year ago #

    this is perfect, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic