Habari\Posts::filter_posts_get_all_presets PHP Метод

filter_posts_get_all_presets() публичный статический Метод

Provide some default presets
public static filter_posts_get_all_presets ( array $presets ) : array
$presets array List of presets that other classes might provide
Результат array List of presets this class provides
    public static function filter_posts_get_all_presets($presets)
    {
        // Presets used for navigation.
        $presets['page_list'] = array('content_type' => 'page', 'status' => 'published', 'nolimit' => true);
        $presets['asides'] = array('vocabulary' => array('tags:term' => 'aside'), 'limit' => 5);
        // Flow is the base preset all other presets should build on top of.
        $presets['flow'] = array('content_type' => Post::type('entry'), 'status' => Post::status('published'), 'limit' => Options::get('pagination', 5), 'orderby' => 'pubdate DESC');
        // This is used only for a site's home page.
        $presets['home'] = array('preset' => 'flow');
        // All pages that follow use this one:
        $presets['page'] = array('preset' => 'flow');
        // Provide presets for all other pages, just to allow plugins to play with them.
        $presets['tag'] = array('preset' => 'page');
        $presets['date'] = array('preset' => 'page');
        $presets['search'] = array('preset' => 'page');
        // Preset for default admin post lists
        $presets['admin'] = array('limit' => 20, 'user_id' => 0, 'orderby' => 'pubdate DESC');
        return $presets;
    }