Gets the arguments for an option for the screen.
Parameters
$option
stringrequired- Option name.
$key
string|falseoptional- Specific array key for when the option is an array.
Default:
false
Source
public function get_option( $option, $key = false ) {
if ( ! isset( $this->_options[ $option ] ) ) {
return null;
}
if ( $key ) {
if ( isset( $this->_options[ $option ][ $key ] ) ) {
return $this->_options[ $option ][ $key ];
}
return null;
}
return $this->_options[ $option ];
}
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.