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