|
@@ 974-980 (lines=7) @@
|
| 971 |
|
if ( null === $this->strings ) { |
| 972 |
|
$this->strings = (array) $this->args['text']; |
| 973 |
|
|
| 974 |
|
if ( is_callable( $this->args['text_cb'] ) ) { |
| 975 |
|
$strings = call_user_func( $this->args['text_cb'], $this ); |
| 976 |
|
|
| 977 |
|
if ( $strings && is_array( $strings ) ) { |
| 978 |
|
$this->strings += $strings; |
| 979 |
|
} |
| 980 |
|
} |
| 981 |
|
} |
| 982 |
|
|
| 983 |
|
// If we have that string value, send it back. |
|
@@ 1011-1017 (lines=7) @@
|
| 1008 |
|
|
| 1009 |
|
$this->field_options = (array) $this->args['options']; |
| 1010 |
|
|
| 1011 |
|
if ( is_callable( $this->args['options_cb'] ) ) { |
| 1012 |
|
$options = call_user_func( $this->args['options_cb'], $this ); |
| 1013 |
|
|
| 1014 |
|
if ( $options && is_array( $options ) ) { |
| 1015 |
|
$this->field_options = $options + $this->field_options; |
| 1016 |
|
} |
| 1017 |
|
} |
| 1018 |
|
|
| 1019 |
|
if ( $key ) { |
| 1020 |
|
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false; |