Noptin_Sidebar::forms_select( int $selected )

Outputs a form select field


Parameters Parameters

$selected

(int) (Required) the currently selected form.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-noptin-sidebar.php

	public function forms_select( $selected ) {

		// Get all widget forms.
		$forms = $this->get_forms();

		// Create <option> tags for each form.
		foreach ( $forms as $form ) {

			// Fetch the form title.
			$name = esc_html( get_the_title( $form ) );

			// Is it selected?
			$_selected = selected( $form, $selected, true );

			echo "<option value='$form' $_selected>$name</option>";
		}
	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.5Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation