selected

SummerySummery

Outputs the html selected attribute.

Syntax

selected( mixed $selected, mixed $current = true, bool $echo = true )

DescriptionDescription

Compares the first two arguments and if identical marks as selected

ParametersParameters

$selected

(mixed) (Required) One of the values to compare

$current

(mixed) (Optional) (true) The other value to compare if not just true

Default value: true

$echo

(bool) (Optional) Whether to echo or just return the string

Default value: true

ReturnReturn

(string) html attribute or empty string

SourceSource

File: wp-includes/general-template.php


			

ChangelogChangelog

Changelog
Version Description
1.0.0 Introduced.
Scroll to Top