_registry->get( 'model.settings-view' ); $action_list = array_keys( $settings_view->get_all() ); foreach ( $action_list as $action ) { $action_list[] = 'ai1ec_' . $action; } if ( null === $default_action ) { $default_action = $settings_view->get_default(); } $this->add_rule( 'action', false, 'string', $default_action, $action_list ); $this->add_rule( 'page_offset', false, 'int', 0, false ); $this->add_rule( 'month_offset', false, 'int', 0, false ); $this->add_rule( 'oneday_offset', false, 'int', 0, false ); $this->add_rule( 'week_offset', false, 'int', 0, false ); $this->add_rule( 'time_limit', false, 'int', 0, false ); $this->add_rule( 'cat_ids', false, 'int', null, ',' ); $this->add_rule( 'tag_ids', false, 'int', null, ',' ); $this->add_rule( 'post_ids', false, 'int', null, ',' ); $this->add_rule( 'instance_ids', false, 'int', null, ',' ); $this->add_rule( 'auth_ids', false, 'int', null, ',' ); $this->add_rule( 'term_ids', false, 'int', null, ',' ); $this->add_rule( 'exact_date', false, 'string', null, false ); // This is the type of the request: Standard, json or jsonp $this->add_rule( 'request_type', false, 'string', 'html', false ); // This is the format of the request. $this->add_rule( 'request_format',false, 'string', 'html', false ); // The callback function for jsonp calls $this->add_rule( 'callback', false, 'string', null, false ); // Whether to include navigation controls $this->add_rule( 'no_navigation' ,false, 'string', false, false ); // whether to display the filter bar in the super widget $this->add_rule( 'display_filters' ,false, 'string', false, false ); $this->add_rule( 'applying_filters' ,false, 'string', false, false ); $this->add_rule( 'shortcode' ,false, 'string', false, false ); $this->add_rule( 'events_limit', false, 'int', null, false ); do_action( 'ai1ec_request_parser_rules_added', $this ); } /** * Get query argument name prefix. * * Inherited from parent class. Method is used to detect query name * prefix, that is used to "namespace" own (private) query variables. * * @return string Query prefix 'ai1ec_' */ protected function _get_prefix() { return 'ai1ec_'; } }