ap_get_current_list_filters( string|null $filter = null )
Description #
Get active list filter by filter key.
Parameters #
- $filterstring | null (Optional) Filter key. Default value: null
Source #
File: includes/functions.php
function ap_get_current_list_filters( $filter = null ) { $get_filters = array(); $filters = array_keys( ap_get_list_filters() ); if ( in_array( 'order_by', $filters, true ) ) { $get_filters['order_by'] = ap_opt( 'question_order_by' ); } if ( empty( $filters ) || ! is_array( $filters ) ) { $filters = array(); } foreach ( (array) $filters as $k ) { $val = ap_isset_post_value( $k ); if ( ! empty( $val ) ) { $get_filters[ $k ] = $val; } } if ( null !== $filter ) { return ! isset( $get_filters[ $filter ] ) ? null : $get_filters[ $filter ]; } return $get_filters; }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:1145
Add your comment