Skip to content

Instantly share code, notes, and snippets.

@heyjoecampbell
Last active November 7, 2016 23:26
Show Gist options
  • Select an option

  • Save heyjoecampbell/ecd68c7447fa8c55a82ac8bfc83cdb93 to your computer and use it in GitHub Desktop.

Select an option

Save heyjoecampbell/ecd68c7447fa8c55a82ac8bfc83cdb93 to your computer and use it in GitHub Desktop.

Revisions

  1. heyjoecampbell revised this gist Nov 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion unset-scripts.php
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    // Unset unwanted Script - by name
    // Unset unwanted Scripts - by name
    $unset_script = array('k2');

    foreach($this->_scripts as $name=>$script)
  2. heyjoecampbell created this gist Nov 7, 2016.
    13 changes: 13 additions & 0 deletions unset-scripts.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    // Unset unwanted Script - by name
    $unset_script = array('k2');

    foreach($this->_scripts as $name=>$script)
    {
    foreach($unset_script as $script)
    {
    if (strpos($name,$script) !== false)
    {
    unset($this->_scripts[$name]);
    }
    }
    }