|
@@ 1059-1065 (lines=7) @@
|
| 1056 |
|
if ( null === $this->strings ) { |
| 1057 |
|
$this->strings = (array) $this->args['text']; |
| 1058 |
|
|
| 1059 |
|
if ( is_callable( $this->args['text_cb'] ) ) { |
| 1060 |
|
$strings = call_user_func( $this->args['text_cb'], $this ); |
| 1061 |
|
|
| 1062 |
|
if ( $strings && is_array( $strings ) ) { |
| 1063 |
|
$this->strings += $strings; |
| 1064 |
|
} |
| 1065 |
|
} |
| 1066 |
|
} |
| 1067 |
|
|
| 1068 |
|
// If we have that string value, send it back. |
|
@@ 1096-1102 (lines=7) @@
|
| 1093 |
|
|
| 1094 |
|
$this->field_options = (array) $this->args['options']; |
| 1095 |
|
|
| 1096 |
|
if ( is_callable( $this->args['options_cb'] ) ) { |
| 1097 |
|
$options = call_user_func( $this->args['options_cb'], $this ); |
| 1098 |
|
|
| 1099 |
|
if ( $options && is_array( $options ) ) { |
| 1100 |
|
$this->field_options = $options + $this->field_options; |
| 1101 |
|
} |
| 1102 |
|
} |
| 1103 |
|
|
| 1104 |
|
if ( $key ) { |
| 1105 |
|
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false; |