|
@@ 3238-3242 (lines=5) @@
|
| 3235 |
|
$options = self::split_options( $options, $sharer->get_global_options() ); |
| 3236 |
|
$options['sharing_services']['current_value'] = $sharer->get_blog_services(); |
| 3237 |
|
$other_sharedaddy_options = array( 'jetpack-twitter-cards-site-tag', 'sharedaddy_disable_resources', 'sharing_delete_service' ); |
| 3238 |
|
foreach ( $other_sharedaddy_options as $key ) { |
| 3239 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 3240 |
|
$current_value = get_option( $key, $default_value ); |
| 3241 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 3242 |
|
} |
| 3243 |
|
break; |
| 3244 |
|
|
| 3245 |
|
case 'stats': |
|
@@ 3254-3258 (lines=5) @@
|
| 3251 |
|
break; |
| 3252 |
|
default: |
| 3253 |
|
// These option are just stored as plain WordPress options. |
| 3254 |
|
foreach ( $options as $key => $value ) { |
| 3255 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 3256 |
|
$current_value = get_option( $key, $default_value ); |
| 3257 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 3258 |
|
} |
| 3259 |
|
} |
| 3260 |
|
// At this point some options have current_value not set because they're options |
| 3261 |
|
// that only get written on update, so we set current_value to the default one. |