src/PageTypes/DatedUpdateHolderController.php
public function FilterDescription()
    {
        $params = $this->parseParams();

        $filters = array();
        if ($params['tag']) {
            $term = TaxonomyTerm::get_by_id(TaxonomyTerm::class, $params['tag']);
            if ($term) {
                $filters[] = _t(
                    'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_WITHIN',
                    'within'
                ) . ' "' . $term->Name . '"';
            }
        }

        if ($params['from'] || $params['to']) {
            if ($params['from']) {
                $from = strtotime($params['from']);
                if ($params['to']) {
                    $to = strtotime($params['to']);
                    $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_BETWEEN', 'between') . ' '
                        . date('j/m/Y', $from) . ' and ' . date('j/m/Y', $to);
                } else {
                    $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON', 'on')
                        . ' ' . date('j/m/Y', $from);
                }
            } else {
                $to = strtotime($params['to']);
                $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON', 'on')
                    . ' ' . date('j/m/Y', $to);
            }
        }

        if ($params['year'] && $params['month']) {
            $timestamp = mktime(1, 1, 1, $params['month'], 1, $params['year']);
            $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_IN', 'in')
                . ' ' . date('F', $timestamp) . ' ' . $params['year'];
        }

        if ($filters) {
            return $this->getUpdateName() . ' ' . implode(' ', $filters);
        }
    }
public function FilterDescription()
    {
        $params = $this->parseParams();

        $filters = array();
        if ($params['tag']) {
            $term = TaxonomyTerm::get_by_id(TaxonomyTerm::class, $params['tag']);
            if ($term) {
                $filters[] = _t(
                    'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_WITHIN',
                    'within'
                ) . ' "' . $term->Name . '"';
            }
        }

        if ($params['from'] || $params['to']) {
            if ($params['from']) {
                $from = strtotime($params['from']);
                if ($params['to']) {
                    $to = strtotime($params['to']);
                    $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_BETWEEN', 'between') . ' '
                        . date('j/m/Y', $from) . ' and ' . date('j/m/Y', $to);
                } else {
                    $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON', 'on')
                        . ' ' . date('j/m/Y', $from);
                }
            } else {
                $to = strtotime($params['to']);
                $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON', 'on')
                    . ' ' . date('j/m/Y', $to);
            }
        }

        if ($params['year'] && $params['month']) {
            $timestamp = mktime(1, 1, 1, $params['month'], 1, $params['year']);
            $filters[] = _t('CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_IN', 'in')
                . ' ' . date('F', $timestamp) . ' ' . $params['year'];
        }

        if ($filters) {
            return $this->getUpdateName() . ' ' . implode(' ', $filters);
        }
    }
public function FilterDescription ( ) { $ params = $ this -> parseParams ( ) ; $ filters = array ( ) ; if ( $ params [ 'tag' ] ) { $ term = TaxonomyTerm :: get_by_id ( TaxonomyTerm :: class , $ params [ 'tag' ] ) ; if ( $ term ) { $ filters [ ] = _t ( 'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_WITHIN' , 'within' ) . ' "' . $ term -> Name . '"' ; } } if ( $ params [ 'from' ] || $ params [ 'to' ] ) { if ( $ params [ 'from' ] ) { $ from = strtotime ( $ params [ 'from' ] ) ; if ( $ params [ 'to' ] ) { $ to = strtotime ( $ params [ 'to' ] ) ; $ filters [ ] = _t ( 'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_BETWEEN' , 'between' ) . ' ' . date ( 'j/m/Y' , $ from ) . ' and ' . date ( 'j/m/Y' , $ to ) ; } else { $ filters [ ] = _t ( 'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON' , 'on' ) . ' ' . date ( 'j/m/Y' , $ from ) ; } } else { $ to = strtotime ( $ params [ 'to' ] ) ; $ filters [ ] = _t ( 'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_ON' , 'on' ) . ' ' . date ( 'j/m/Y' , $ to ) ; } } if ( $ params [ 'year' ] && $ params [ 'month' ] ) { $ timestamp = mktime ( 1 , 1 , 1 , $ params [ 'month' ] , 1 , $ params [ 'year' ] ) ; $ filters [ ] = _t ( 'CWP\\CWP\\PageTypes\\DatedUpdateHolder.FILTER_IN' , 'in' ) . ' ' . date ( 'F' , $ timestamp ) . ' ' . $ params [ 'year' ] ; } if ( $ filters ) { return $ this -> getUpdateName ( ) . ' ' . implode ( ' ' , $ filters ) ; } }
Returns a description of the current filter

@return string
Returns a description of the current filter