| @@ 642-652 (lines=11) @@ | ||
| 639 | * @param $needle string |
|
| 640 | * @param $echo bool |
|
| 641 | */ |
|
| 642 | public function checked( $haystack = false, $needle = '', $echo = true ) { |
|
| 643 | $return = $this->itemd( $haystack,$needle, 'checked' ); |
|
| 644 | ||
| 645 | if ( '' !== $return ) { |
|
| 646 | if ( true === $echo ) { |
|
| 647 | echo wp_kses_post( $return ); |
|
| 648 | } else { |
|
| 649 | return $return; |
|
| 650 | } |
|
| 651 | } |
|
| 652 | } |
|
| 653 | ||
| 654 | /** |
|
| 655 | * Checks to see if an item is checked. |
|
| @@ 661-671 (lines=11) @@ | ||
| 658 | * @param $needle string |
|
| 659 | * @param $echo bool |
|
| 660 | */ |
|
| 661 | public function selected( $haystack = false, $needle = '', $echo = true ) { |
|
| 662 | $return = $this->itemd( $haystack, $needle, 'selected' ); |
|
| 663 | ||
| 664 | if ( '' !== $return ) { |
|
| 665 | if ( true === $echo ) { |
|
| 666 | echo wp_kses_post( $return ); |
|
| 667 | } else { |
|
| 668 | return $return; |
|
| 669 | } |
|
| 670 | } |
|
| 671 | } |
|
| 672 | ||
| 673 | /** |
|
| 674 | * Checks to see if an item is selected. If $echo is false, it will return the $type if conditions are true. |
|