WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#23271 closed defect (bug) (invalid)

show_option_none_value is not used when using wp_dropdown_pages

Reported by: titan21 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: WordPress.org site Keywords:
Focuses: Cc:

Description

According to the document ion at http://codex.wordpress.org/Function_Reference/wp_dropdown_pages. We should be able to specify use the following:

		wp_dropdown_pages(array(
				"post_type"=>"page",
				"show_option_none" => "--Not Selected--",
				"show_option_none_value" => "notselected"				));

When the html is output, we should expect that the <option> with the text "--Not Selected--" should have a value attribute of "notselected". The value attribute is output but not the value:

<option value="">--Not Selected--</option>

I have tried this with pages and a custom post type which results in the same issue.

Could someone confirm this is a valid bug?

Change History (2)

comment:1 kovshenin15 months ago

  • Cc kovshenin added
  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This is not a bug. The argument name is option_none_value, not show_option_none_value. I updated the codex to reflect that.

comment:2 ocean9015 months ago

  • Component changed from General to WordPress.org site
  • Version 3.5 deleted

See [10069].

Note: See TracTickets for help on using tickets.