bp_blog_hidden_fields()

Output hidden fields to help with form submissions in Sites directory.


Description Description

This function detects whether ‘s’, ‘letter’, or ‘blogs_search’ requests are currently being made (as in a URL parameter), and creates corresponding hidden fields.


Source Source

File: bp-blogs/bp-blogs-template.php

function bp_blog_hidden_fields() {
	if ( isset( $_REQUEST['s'] ) )
		echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['s'] ). '" name="search_terms" />';

	if ( isset( $_REQUEST['letter'] ) )
		echo '<input type="hidden" id="selected_letter" value="' . esc_attr( $_REQUEST['letter'] ) . '" name="selected_letter" />';

	if ( isset( $_REQUEST['blogs_search'] ) )
		echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['blogs_search'] ) . '" name="search_terms" />';
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.