| @@ 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 | /** |
|
| @@ 127-134 (lines=8) @@ | ||
| 124 | * @param string $key The value key. |
|
| 125 | * @param mixed $value The value. |
|
| 126 | */ |
|
| 127 | private function set( $option, $key, $value ) { |
|
| 128 | ||
| 129 | $values = get_option( $option ); |
|
| 130 | $values = isset( $values ) ? $values : array(); |
|
| 131 | $values[ $key ] = $value; |
|
| 132 | update_option( $option, $values ); |
|
| 133 | ||
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * Get the entity base path, by default 'entity'. |
|