Change script location in PushUpTheWeb plugin (2 posts)

  1. seezee
    Posted 3 years ago #

    I need to change the pushup.js that this plugin loads to use my customized version located in my child theme's directory, e.g.,


    I've modified the plugin's supplied .js for now, but obviously that will be overwritten whenever the plugin gets updated.

    I read elsewhere that add_filter() can be used for this sort of thing, but I can't make heads nor tails of the documentation. Can someone post an example of how this might be done (preferably w/ comment lines to help less experienced coders?)

    Here's the relevant section of pushuptheweb-wordpress.php:

    function putw_wp_head() {
    	global $putwpath, $post;
    	echo "<link rel='stylesheet' type='text/css' href='$putwpath/pushuptheweb/css/pushup.css' />\n";
    	echo "<script type='text/javascript' src='$putwpath/pushuptheweb/js/pushup.js'></script>\n";
  2. bcworkz
    Posted 3 years ago #

    You can only use add_filter() when a developer intends you to do so by his using of apply_filters() in his code. Since the pushup developer did not do this, you cannot use add_filter() in this situation.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.