| @@ 11-17 (lines=7) @@ | ||
| 8 | * @param string $key The setting name. |
|
| 9 | * @param string $value The setting value. |
|
| 10 | */ |
|
| 11 | function wl_configuration_set( $settings, $key, $value ) { |
|
| 12 | ||
| 13 | $options = get_option( $settings ); |
|
| 14 | $options = isset( $options ) ? $options : array(); |
|
| 15 | $options[ $key ] = $value; |
|
| 16 | update_option( $settings, $options ); |
|
| 17 | } |
|
| 18 | ||
| 19 | ||
| 20 | /** |
|
| @@ 134-141 (lines=8) @@ | ||
| 131 | * @param string $key The value key. |
|
| 132 | * @param mixed $value The value. |
|
| 133 | */ |
|
| 134 | private function set( $option, $key, $value ) { |
|
| 135 | ||
| 136 | $values = get_option( $option ); |
|
| 137 | $values = isset( $values ) ? $values : array(); |
|
| 138 | $values[ $key ] = $value; |
|
| 139 | update_option( $option, $values ); |
|
| 140 | ||
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * Get the entity base path, by default 'entity'. |
|