@@ 3032-3034 (lines=3) @@ | ||
3029 | if ( ! empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
3030 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
3031 | ||
3032 | if ( ! empty( $attributes['values'] ) && is_string( $attributes['values'] ) ) { |
|
3033 | $attributes['values'] = array_map( 'trim', explode( ',', $attributes['values'] ) ); |
|
3034 | } |
|
3035 | } |
|
3036 | ||
3037 | if ( $form ) { |
@@ 19-21 (lines=3) @@ | ||
16 | ||
17 | // convert list of modules in comma-delimited format into an array |
|
18 | // of "$modulename => true" |
|
19 | if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
|
20 | $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
|
21 | } |
|
22 | ||
23 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
24 | if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
@@ 931-937 (lines=7) @@ | ||
928 | Jetpack_Sync_Settings::update_settings( $sync_settings ); |
|
929 | ||
930 | // Convert comma-delimited string of modules to an array |
|
931 | if ( ! empty( $assoc_args['modules'] ) ) { |
|
932 | $modules = array_map( 'trim', explode( ',', $assoc_args['modules'] ) ); |
|
933 | ||
934 | // Convert the array so that the keys are the module name and the value is true to indicate |
|
935 | // that we want to sync the module |
|
936 | $modules = array_map( '__return_true', array_flip( $modules ) ); |
|
937 | } |
|
938 | ||
939 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
940 | if ( |