Noptin_Sidebar::forms_select( int $selected )

Outputs a form select field

Parameters Parameters


(int) (Required) the currently selected form.

Top ↑

Return Return


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


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