Set default post filters for all image classes.
This setting will be passed to a ResponsiveImageClass object when it is added by the addClass() method

@param \Imagine\Filter\FilterInterface $default_post_filter
@return ResponsiveImageHelper $this
335617
public function addDefaultPostFilter(FilterInterface $default_post_filter)
    {
        if ($this->classes_added) {
            throw new \LogicException('Defaults must be set before image classes are added.');
        }
        if (!$this->default_post_filters instanceof FilterChain) {
            $this->default_post_filters = new FilterChain();
        }
        $this->default_post_filters->add($default_post_filter);
        return $this;
    }
575961
public function setFilter($filter)
    {
        parent::setFilter($filter);

        $this->userOptions['value'] = $this->getOption('value') === '' ? null : $this->getOption('value');
    }
431486
public function display($defaultFilters = null) {

		$this->extend();

		$this->fillBuffer();

		// check whether pre-configured filters are already in place
		
		if(is_null($defaultFilters)) {

			// add default filters

			$this->defaultFilters = [
				new AnchorHref(),
				new ImageCache(),
				// new AssetsPath()
			];

			if(!$this->ignoreLocales) {
                $this->defaultFilters[] = new LocalizedPhrases();
			}

		}

		else {

		    $this->defaultFilters = $defaultFilters;

            if(!$this->ignoreLocales) {

                // check whether adding a localization filter is necessary

                $found = false;

                foreach($this->defaultFilters as $filter) {

                    if($filter instanceof LocalizedPhrases) {
                        $found = true;
                        break;
                    }

                }

                if(!$found) {
                    $this->defaultFilters[] = new LocalizedPhrases();
                }
            }

        }

        // add configured filters

        if($templatingConfig = Application::getInstance()->getConfig()->templating) {

            foreach($templatingConfig->filters as $id => $filter) {

                if(!in_array($id, $this->blockedFilters)) {

                    // load class file

                    $instance = new $filter['class']();

                    // check whether instance implements FilterInterface

                    if (!$instance instanceof SimpleTemplateFilterInterface) {
                        throw new SimpleTemplateException(sprintf("Template filter '%s' (class %s) does not implement the SimpleTemplateFilterInterface.", $id, $filter['class']));
                    }

                    $this->defaultFilters[] = $instance;

                }
            }
        }

        $this->applyFilters();

		return $this->contents;
	}
1180644
public function addFilter($filter)
    {
        // Resolve filter object from string/object or throw Ex.
        $filterObj = FilterResolver::instance($filter);

        // If filtersOverride is allowed we will override filter
        // with same alias/name if there is one with new resolved filter.
        if ($this->getFiltersOverride()) {
            if ($key = array_search($filterObj->getName(), $this->getFilters())) {
                $this->filters[$key] = $filterObj;
            } else {
                $this->filters[$filterObj->getName()] = $filterObj;
            }
        } else {
            // If filtersOverride is disabled and we found
            // equal alias defined we will throw Ex.
            if (array_key_exists($filterObj->getName(), $this->getFilters())) {
                $ex = new FilterAlreadyBindedException($filterObj->getName(), $this->getName());
                throw $ex;
            }

            // Filter with resolvedFilter alias/name doesn't exist
            // so we will bind it as new one to field.
            $this->filters[$filterObj->getName()] = $filterObj;
        }

        return $this;
    }
726972
public function addFilter(FilterInterface $filter)
    {
        if (! ($this->resource instanceof ImageFilterableInterface)) {
            throw new UnsupportedMethodException("This method is not supported by the ImageResource in use.");
        }

        $this->getFilterResolver()->addFilter($filter);

        return $this;
    }
605983
public function getFilters()
    {
        $filters = isset($this->requestParams[self::PARAM_FILTERS]) ?
            $this->requestParams[self::PARAM_FILTERS] : self::DEFAULT_FILTERS;

        return $filters;
    }
1288930
public function setFilterType($pFilterType = self::AUTOFILTER_FILTERTYPE_FILTER) {
		if (!in_array($pFilterType,self::$_filterTypes)) {
			throw new PHPExcel_Exception('Invalid filter type for column AutoFilter.');
		}

		$this->_filterType = $pFilterType;

		return $this;
	}
1075910
protected function getDefaultFunctionaryFilter()
    {
        $filter = new FunctionaryFilter();
        $filter->setInsideAssociationID($this->arguments[self::ARGUMENT_INSIDEASSOCIATIONID]);

        return $filter;
    }
627407
public static function post($name, $default = '') {
        $_POST = self::paramFilter($_POST);
        if (isset($_POST[$name])) {
            if (empty($_POST[$name])) {
                return $default;
            }
            return $_POST[$name];
        }
        return false;
    }
764817
public function images()
    {
        foreach($this->data as $post)
        {
            $post->images = Post::images($post->ID);
        }

        return $this;
    }
906438
public function addClass(ResponsiveImageClass $class)
    {
        $this->classes_added = true;
        if (array_key_exists($class->getName(), $this->classes)) {
            throw new \Exception(sprintf('A responsive image class with name "%s" is already registered', $class->getName()));
        }
        if ($this->default_filters instanceof FilterInterface) {
            $class->addFilter($this->default_filters);
        }
        if ($this->default_post_filters instanceof FilterInterface) {
            $class->addPostFilter($this->default_post_filters);
        }
        if ($this->default_scaling_algorithm != '') {
            $class->setScaleAlgorithm($this->default_scaling_algorithm);
        }
        if ($this->default_output_type_map instanceof OutputTypeMap) {
            $class->setOutputTypeMap($this->default_output_type_map);
        }
        $this->classes[$class->getName()] = $class;
    }
67709
public function postClass($classes = [])
    {
        $classes = !is_array($classes) ? explode(' ', $classes) : $classes;
        $classes[] = 'content-node';

        $classes = apply_filters('novusopress_view_post_classes', get_post_class($classes));
        $output = sprintf('class="%s"', implode(' ', $classes));

        return apply_filters('novusopress_view_post_class_output', $output);
    }
668768
public function setDefault($default)
    {
        $this->default = (string)$default;
        if ($this->default && !in_array($this->default, $this->values, true)) {
            $this->addValue($this->default);
        }
        return $this;
    }
607432
public function setDefaultImage($defaultImage = '')
    {
        if (empty($defaultImage)) {
            $image        = DataRepository::getData('config_image');
            $defaultImage = $image['default_image'];
        }
        $this->defaultImage = $defaultImage;

        return $this;
    }
43537
protected function getDefaultAnnouncementsFilter()
    {
        $filter = new AnnouncementsFilter();

        $filter->setInsideAssociationID($this->settings['associationID']);

        if ($this->settings['filterAnnouncements']['defaultValue']['startDate']) {
            $filter->setStartDate(new \DateTime('now'));
        }

        $filter->setChilds($this->settings['filterAnnouncements']['defaultValue']['childs']);

        return $filter;
    }
506570
protected function getFilterClassOptions()
    {
        // Create Options:
        
        $options = [];
        
        // Obtain Filter Subclasses:
        
        $filters = ClassInfo::subclassesFor(Filter::class);
        
        // Remove Abstract Superclass:
        
        array_shift($filters);
        
        // Define Options:
        
        foreach ($filters as $filter) {
            $options[$filter] = $filter::singleton()->getTitle();
        }
        
        // Sort Options, Ensuring Default Filter is First:
        
        uasort($options, function ($a, $b) {
            return ($a === DefaultFilter::singleton()->getTitle()) ? -1 : strcasecmp($a, $b);
        });
        
        // Answer Options:
        
        return $options;
    }
1103545
public function reset()
    {
        parent::reset();

        if ($this->image) {
            $this->image();
            $this->medium_querystring = [];
            $this->filter();
            $this->clearAlternatives();
        }

        $this->format = 'guess';
        $this->quality = $this->default_quality;

        $this->debug_watermarked = false;

        return $this;
    }