Set up the filters to skip the loaded plugins
485176
private function setup_skip_plugins_filters() {
		$wp_cli_filter_active_plugins = function( $plugins ) {
			$skipped_plugins = WP_CLI::get_runner()->config['skip-plugins'];
			if ( true === $skipped_plugins ) {
				return array();
			}
			if ( ! is_array( $plugins ) ) {
				return $plugins;
			}
			foreach ( $plugins as $a => $b ) {
				// active_sitewide_plugins stores plugin name as the key.
				if ( false !== strpos( current_filter(), 'active_sitewide_plugins' ) && Utils\is_plugin_skipped( $a ) ) {
					unset( $plugins[ $a ] );
					// active_plugins stores plugin name as the value.
				} elseif ( false !== strpos( current_filter(), 'active_plugins' ) && Utils\is_plugin_skipped( $b ) ) {
					unset( $plugins[ $a ] );
				}
			}
			// Reindex because active_plugins expects a numeric index.
			if ( false !== strpos( current_filter(), 'active_plugins' ) ) {
				$plugins = array_values( $plugins );
			}
			return $plugins;
		};

		$hooks = array(
			'pre_site_option_active_sitewide_plugins',
			'site_option_active_sitewide_plugins',
			'pre_option_active_plugins',
			'option_active_plugins',
		);
		foreach ( $hooks as $hook ) {
			WP_CLI::add_wp_hook( $hook, $wp_cli_filter_active_plugins, 999 );
		}
		WP_CLI::add_wp_hook(
			'plugins_loaded',
			function() use ( $hooks, $wp_cli_filter_active_plugins ) {
				foreach ( $hooks as $hook ) {
					remove_filter( $hook, $wp_cli_filter_active_plugins, 999 );
				}
			},
			0
		);
	}
827821
def filter(self):
        '''
        
        '''

        if self.deprecated_filtering_enabled():
            print('warning: event filtering in sensu-plugin is deprecated,' +
                  'see http://bit.ly/sensu-plugin')
            self.filter_disabled()
            self.filter_silenced()
            self.filter_dependencies()

            if self.deprecated_occurrence_filtering():
                print('warning: occurrence filtering in sensu-plugin is' +
                      'deprecated, see http://bit.ly/sensu-plugin')
                self.filter_repeated()
752266
protected function addActivePluginsFilter()
    {
        // Add mu-plugins to active plugins
        add_filter('option_active_plugins', function ($plugins) {
            if ($this->isPluginsScreen()) {
                return $plugins;
            }

            if (empty($plugins)) {
                return $this->relativeFiles;
            }

            return array_unique(array_merge($plugins, $this->relativeFiles));
        });

        // Prevent active plugins to contain mu-plugins
        add_filter('pre_update_option_active_plugins', function ($plugins) {
            foreach ($plugins as $index => &$plugin) {
                if (strpos($plugin, $this->relativePath) === 0) {
                    unset($plugins[$index]);
                }
            }

            return array_unique(array_values($plugins)); // Fix array indices
        });
    }
1072745
def _init_filters(self):
        """"""
        self.filters = {}

        @self.template_filter()
        def format_ts(value, format_='%a, %b %d %Y %H:%M:%S'):
            """Formats the supplied timestamp using format_

            :param str value: The timestamp to be formatted
            :param str format_:  The format string
            :return: The correctly formatted timestamp as determined by format_
            :rtype: str
            """
            if format_ == '%s':
                return timestamp_to_sec(value)
            else:
                value = timestamp_to_datetime(value)
                return value.strftime(format_)

        @self.template_filter('urlsplit')
        def get_urlsplit(url):
            """Splits the supplied URL

            :param str url: The url to be split
            :return: The split url
            :rtype: urllib.parse.SplitResult
            """
            split = urlsplit(url)
            return split

        @self.template_filter()
        def tojson(obj):
            """Converts the supplied object/array/any to a JSON string if it can be JSONified

            :param any obj: The value to be converted to a JSON string
            :return: The JSON string representation of the supplied value
            :rtype: str
            """
            return json.dumps(obj)

        @self.template_filter()
        def tobool(bool_val):
            """Converts a python boolean to a JS "true" or "false" string
            :param any obj: A value to be evaluated as a boolean
            :return: The string "true" or "false" to be inserted into JS
            """

            return 'true' if bool_val else 'false'
648554
def load_filters(self):
        """"""
        for f in sorted(logdissect.filters.__filters__):
            self.filter_modules[f] = \
                __import__('logdissect.filters.' + f, globals(), \
                locals(), [logdissect]).FilterModule(args=self.filter_args)
1117124
function Plugin(options) {
    if (this.length) {
      if (options === 'reset') {
        $(document).trigger('resetStart.bui.filterable');
      } else {
        $(document).trigger('filter.bui.filterable');
      }

      this.each(function () {
        var data;
        var $this = $(this);

        data = $this.data('bui.filterable');
        if (!data) {
          data = new Filterable($this);
          $this.data('bui.filterable', data);
        }

        if (options === 'reset') {
          data.resetFilter();
        } else {
          data.filter(options);
        }
      });

      if (options === 'reset') {
        $(document).trigger('resetEnd.bui.filterable');
      } else {
        $(document).trigger('filtered.bui.filterable');
      }
    }

    return this;
  }
715266
function() {
			var self = this;
	
			self.loadedSearches = {};
			self.userOptions = {};
			self.renderCache = {};
			self.options = self.sifter.items = {};
			self.lastQuery = null;
			self.trigger('option_clear');
			self.clear();
		}
1148474
def run_plugins(plugins, url_data, stop_after_match=False, **kwargs):
    """"""
    for plugin in plugins:
        log.debug(LOG_PLUGIN, "Run plugin %s", plugin.__class__.__name__)
        if plugin.applies_to(url_data, **kwargs):
            plugin.check(url_data)
            if stop_after_match:
                break
801818
private void setUpClearAllAction() {
		/* if one or fewer of the filter menus are visible then we don't need the clear all menus button */
		int visibleMenus = 0;
		if (firstNameFilterMenu.isVisible()) {
			visibleMenus++;
		}
		if (lastNameFilterMenu.isVisible()) {
			visibleMenus++;
		}
		if (dobFilterMenu.isVisible()) {
			visibleMenus++;
		}
		clearAllFiltersButton.setVisible(visibleMenus > 1);

		/* enable/disable the clear all filters action:
* if we have not initialised the lists then we do not need the button (though in this case it will not be visible);
 * otherwise if the size of the full list is the same as the size of the filtered list then we have not filtered the
 *  list so we do not need to clear the filters and the button can be disabled;
 * otherwise enable the button because we have applied at least one filter.
		 */
		if (clearAllFiltersButton.isVisible()) {
			List<?> fullList = getFilterableTableModel().getFullBeanList();
			List<?> filteredList = getFilterableTableModel().getBeanList();
			clearAllFiltersButton.setDisabled(fullList == null || filteredList == null || fullList.
					size() == filteredList.size());
		}
	}
853298
def set_filters(self, can_filers=None):
        
        if self.__set_filters_has_been_called:
            logger.warn("using filters is not supported like this, see note on NicanBus")
        else:
            # allow the constructor to call this without causing a warning
            self.__set_filters_has_been_called = True
663552
public function unloadPlugins()
    {
        $this->resetTransientCache();

        $pluginsLoaded = $this->getLoadedPlugins();
        foreach ($pluginsLoaded as $plugin) {
            $this->unloadPlugin($plugin);
        }
    }
292426
def plugins(flags=None):
        
        XExporter.init()
        
        plugs = XExporter._plugins[:]
        if flags is not None:
            return filter(lambda x: x.testFlag(flags), plugs)
        return plugs
291639
function (plugin) {
                var plugins = [], self = this, isString = typeof plugin === 'string';
                util.each(self.get('plugins'), function (p) {
                    var keep = 0, pluginId;
                    if (plugin) {
                        if (isString) {
                            // user defined takes priority
                            pluginId = p.get && p.get('pluginId') || p.pluginId;
                            if (pluginId !== plugin) {
                                plugins.push(p);
                                keep = 1;
                            }
                        } else {
                            if (p !== plugin) {
                                plugins.push(p);
                                keep = 1;
                            }
                        }
                    }
                    if (!keep) {
                        p.pluginDestructor(self);
                    }
                });
                self.setInternal('plugins', plugins);
                return self;
            }
710699
def Filter(self, match=None, **_):
    """"""
    arg = self.stack.pop(-1)

    # Filters can be specified as a comma separated list.
    for filter_name in match.group(1).split(","):
      filter_object = ConfigFilter.classes_by_name.get(filter_name)
      if filter_object is None:
        raise FilterError("Unknown filter function %r" % filter_name)

      if not filter_object.sensitive_arg:
        logging.debug("Applying filter %s for %s.", filter_name, arg)
      arg = filter_object().Filter(arg)
      precondition.AssertType(arg, Text)

    self.stack[-1] += arg
867744
function loadPlugins(deps) {
  let pluginsList = deps;
  if (!Array.isArray(pluginsList)) {
    if (typeof pluginsList !== 'object') {
      return;
    }
    pluginsList = Object.keys(pluginsList);
  }
  pluginsList.filter(moduleName => /@gilt-tech\/swig-(?!util)/.test(moduleName))
    .forEach(load);
}
235490
private function filters() {
            // Override request for plugin information
            add_filter( 'plugins_api', array( &$this, 'plugins_api_filter' ), 10, 3 );

            $this->add_transient_filters();

            /**
             * If user has the premium plugin's code but do NOT have an active license,
             * encourage him to upgrade by showing that there's a new release, but instead
             * of showing an update link, show upgrade link to the pricing page.
             *
             * @since 1.1.6
             *
             */
            // WP 2.9+
            add_action( "after_plugin_row_{$this->_fs->get_plugin_basename()}", array(
                &$this,
                'catch_plugin_update_row'
            ), 9 );
            add_action( "after_plugin_row_{$this->_fs->get_plugin_basename()}", array(
                &$this,
                'edit_and_echo_plugin_update_row'
            ), 11, 2 );

            add_action( 'admin_head', array( &$this, 'catch_plugin_information_dialog_contents' ) );

            if ( ! WP_FS__IS_PRODUCTION_MODE ) {
                add_filter( 'http_request_host_is_external', array(
                    $this,
                    'http_request_host_is_external_filter'
                ), 10, 3 );
            }

            if ( $this->_fs->is_premium() ) {
                if ( ! $this->is_correct_folder_name() ) {
                    add_filter( 'upgrader_post_install', array( &$this, '_maybe_update_folder_name' ), 10, 3 );
                }

                add_filter( 'upgrader_pre_install', array( 'FS_Plugin_Updater', '_store_basename_for_source_adjustment' ), 1, 2 );
                add_filter( 'upgrader_source_selection', array( 'FS_Plugin_Updater', '_maybe_adjust_source_dir' ), 1, 3 );

                if ( ! $this->_fs->has_any_active_valid_license() ) {
                    add_filter( 'wp_prepare_themes_for_js', array( &$this, 'change_theme_update_info_html' ), 10, 1 );
                }
            }
        }
970411
function filterIgnored(files, ignore, fn) {
  fn(null, files.filter(function(file) {
    // TODO make more robust
    return !~ignore.indexOf(file) && !~ignore.indexOf(file + '/');
  }));
}