|
@@ 3019-3023 (lines=5) @@
|
| 3016 |
|
$options = self::split_options( $options, $sharer->get_global_options() ); |
| 3017 |
|
$options['sharing_services']['current_value'] = $sharer->get_blog_services(); |
| 3018 |
|
$other_sharedaddy_options = array( 'jetpack-twitter-cards-site-tag', 'sharedaddy_disable_resources', 'sharing_delete_service' ); |
| 3019 |
|
foreach ( $other_sharedaddy_options as $key ) { |
| 3020 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 3021 |
|
$current_value = get_option( $key, $default_value ); |
| 3022 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 3023 |
|
} |
| 3024 |
|
break; |
| 3025 |
|
|
| 3026 |
|
case 'stats': |
|
@@ 3035-3039 (lines=5) @@
|
| 3032 |
|
break; |
| 3033 |
|
default: |
| 3034 |
|
// These option are just stored as plain WordPress options. |
| 3035 |
|
foreach ( $options as $key => $value ) { |
| 3036 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 3037 |
|
$current_value = get_option( $key, $default_value ); |
| 3038 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 3039 |
|
} |
| 3040 |
|
} |
| 3041 |
|
// At this point some options have current_value not set because they're options |
| 3042 |
|
// that only get written on update, so we set current_value to the default one. |