'; break; case 'xhtml': $gen .= "\n" . ''; break; } return $gen; } /** * Add body classes for EVF pages. * * @param array $classes * * @return array */ function evf_body_class( $classes ) { $classes = (array) $classes; return array_unique( $classes ); } /** * Outputs hidden form inputs for each query string variable. * @since 1.0.0 * * @param array $values Name value pairs. * @param array $exclude Keys to exclude. * @param string $current_key Current key we are outputting. * @param bool $return * * @return string */ function evf_query_string_form_fields( $values = null, $exclude = array(), $current_key = '', $return = false ) { if ( is_null( $values ) ) { $values = $_GET; } $html = ''; foreach ( $values as $key => $value ) { if ( in_array( $key, $exclude, true ) ) { continue; } if ( $current_key ) { $key = $current_key . '[' . $key . ']'; } if ( is_array( $value ) ) { $html .= evf_query_string_form_fields( $value, $exclude, $key, true ); } else { $html .= ''; } } if ( $return ) { return $html; } else { echo $html; } }