|
@@ 1084-1090 (lines=7) @@
|
| 1081 |
|
if ( null === $this->strings ) { |
| 1082 |
|
$this->strings = (array) $this->args['text']; |
| 1083 |
|
|
| 1084 |
|
if ( is_callable( $this->args['text_cb'] ) ) { |
| 1085 |
|
$strings = call_user_func( $this->args['text_cb'], $this ); |
| 1086 |
|
|
| 1087 |
|
if ( $strings && is_array( $strings ) ) { |
| 1088 |
|
$this->strings += $strings; |
| 1089 |
|
} |
| 1090 |
|
} |
| 1091 |
|
} |
| 1092 |
|
|
| 1093 |
|
// If we have that string value, send it back. |
|
@@ 1121-1127 (lines=7) @@
|
| 1118 |
|
|
| 1119 |
|
$this->field_options = (array) $this->args['options']; |
| 1120 |
|
|
| 1121 |
|
if ( is_callable( $this->args['options_cb'] ) ) { |
| 1122 |
|
$options = call_user_func( $this->args['options_cb'], $this ); |
| 1123 |
|
|
| 1124 |
|
if ( $options && is_array( $options ) ) { |
| 1125 |
|
$this->field_options = $options + $this->field_options; |
| 1126 |
|
} |
| 1127 |
|
} |
| 1128 |
|
|
| 1129 |
|
if ( $key ) { |
| 1130 |
|
return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false; |