@@ 71-78 (lines=8) @@ | ||
68 | * @param Mixed $default a default value in case the option is not found. |
|
69 | * @return Mixed the option value or default if not found. |
|
70 | */ |
|
71 | protected function get_grouped_option( $group, $name, $default ) { |
|
72 | $options = get_option( $this->grouped_options[ $group ] ); |
|
73 | if ( is_array( $options ) && isset( $options[ $name ] ) ) { |
|
74 | return $options[ $name ]; |
|
75 | } |
|
76 | ||
77 | return $default; |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * Updates the single given option. Updates jetpack_options or jetpack_$name as appropriate. |
@@ 350-357 (lines=8) @@ | ||
347 | return $result; |
|
348 | } |
|
349 | ||
350 | private static function get_grouped_option( $group, $name, $default ) { |
|
351 | $options = get_option( self::$grouped_options[ $group ] ); |
|
352 | if ( is_array( $options ) && isset( $options[ $name ] ) ) { |
|
353 | return $options[ $name ]; |
|
354 | } |
|
355 | ||
356 | return $default; |
|
357 | } |
|
358 | ||
359 | private static function delete_grouped_option( $group, $names ) { |
|
360 | $options = get_option( self::$grouped_options[ $group ], array() ); |