Retrieves the value of a specific module option.
Description
See also
Parameters
- $option
-
(string) (Required) Name of the option to retrieve.
- $default
-
(mixed) (Optional) Value to return if the option doesn't exist.
Default value: false
Return
(mixed) Value set for the option.
Source
File: src/modules/module.php
public function get_option( $option, $default = false ) { $options = $this->get_options(); if ( isset( $options[ $option ] ) ) { return $options[ $option ]; } return $default; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |