|
@@ 2873-2877 (lines=5) @@
|
| 2870 |
|
break; |
| 2871 |
|
default: |
| 2872 |
|
// These option are just stored as plain WordPress options. |
| 2873 |
|
foreach ( $options as $key => $value ) { |
| 2874 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 2875 |
|
$current_value = get_option( $key, $default_value ); |
| 2876 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 2877 |
|
} |
| 2878 |
|
} |
| 2879 |
|
// At this point some options have current_value not set because they're options |
| 2880 |
|
// that only get written on update, so we set current_value to the default one. |
|
@@ 2857-2861 (lines=5) @@
|
| 2854 |
|
$options = self::split_options( $options, $sharer->get_global_options() ); |
| 2855 |
|
$options['sharing_services']['current_value'] = $sharer->get_blog_services(); |
| 2856 |
|
$other_sharedaddy_options = array( 'jetpack-twitter-cards-site-tag', 'sharedaddy_disable_resources', 'sharing_delete_service' ); |
| 2857 |
|
foreach ( $other_sharedaddy_options as $key ) { |
| 2858 |
|
$default_value = isset( $options[ $key ]['default'] ) ? $options[ $key ]['default'] : ''; |
| 2859 |
|
$current_value = get_option( $key, $default_value ); |
| 2860 |
|
$options[ $key ]['current_value'] = self::cast_value( $current_value, $options[ $key ] ); |
| 2861 |
|
} |
| 2862 |
|
break; |
| 2863 |
|
|
| 2864 |
|
case 'stats': |