original_string: public function jquery_override_plugin($oldplugin, $newplugin) {
          if ($this->headdone) {
              debugging('Can not override jQuery plugins after starting page output!');
              return;
          }
          $this->jquerypluginoverrides[$oldplugin] = $newplugin;
      }
code: public function jquery_override_plugin($oldplugin, $newplugin) {
          if ($this->headdone) {
              debugging('Can not override jQuery plugins after starting page output!');
              return;
          }
          $this->jquerypluginoverrides[$oldplugin] = $newplugin;
      }
code_tokens: public function jquery_override_plugin ( $ oldplugin , $ newplugin ) { if ( $ this -> headdone ) { debugging ( 'Can not override jQuery plugins after starting page output!' ) ; return ; } $ this -> jquerypluginoverrides [ $ oldplugin ] = $ newplugin ; }
docstring: Request replacement of one jQuery plugin by another.
  
  This is useful when themes want to replace the jQuery UI theme,
  the problem is that theme can not prevent others from including the core ui-css plugin.
  
  Example:
  1/ generate new jQuery UI theme and place it into theme/yourtheme/jquery/
  2/ write theme/yourtheme/jquery/plugins.php
  3/ init jQuery from theme
  
  <code>
  // file theme/yourtheme/lib.php
  function theme_yourtheme_page_init($page) {
  $page->requires->jquery_plugin('yourtheme-ui-css', 'theme_yourtheme');
  $page->requires->jquery_override_plugin('ui-css', 'yourtheme-ui-css');
  }
  </code>
  
  This code prevents loading of standard 'ui-css' which my be requested by other plugins,
  the 'yourtheme-ui-css' gets loaded only if some other code requires jquery.
  
  {@see http://docs.moodle.org/dev/jQuery}
  
  @param string $oldplugin original plugin
  @param string $newplugin the replacement
docstring_tokens: Request replacement of one jQuery plugin by another .