bps_get_request (美元的类型,美元的形式)
描述
源
文件:bp-search / bp-search-functions.php
函数bps_get_request($type, $form = 0) {$current = bps_current_page();$ hidden_filters = bps_get_hidden_filters ();$cookie = apply_filters('bps_cookie_name', 'bps_request');$request = isset ($_REQUEST['bps_form']) ?$ _REQUEST:数组();if (empty ($request) && isset ($_COOKIE[$cookie])) {parse_str(stripslashes($_COOKIE[$cookie]), $request); / / $请求} switch ($type) {case 'form': if (isset ($request['bps_form']) && $request['bps_form'] != $form) {$request = array();}打破;Case 'filters': if (isset ($request['bps_directory']) && $request['bps_directory'] != $current) {$request = array();} foreach ($hidden_filters as $key => $value) {unset ($request[$key]); } break; case 'search': if ( isset ( $request['bps_directory'] ) && $request['bps_directory'] != $current ) { $request = array(); } foreach ( $hidden_filters as $key => $value ) { $request[ $key ] = $value; } break; } return apply_filters( 'bps_request', $request, $type, $form ); }