@@ 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 ) { |
@@ 21-23 (lines=3) @@ | ||
18 | ||
19 | // convert list of modules in comma-delimited format into an array |
|
20 | // of "$modulename => true" |
|
21 | if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
|
22 | $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
|
23 | } |
|
24 | ||
25 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
26 | if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
@@ 923-929 (lines=7) @@ | ||
920 | Jetpack_Sync_Settings::update_settings( $sync_settings ); |
|
921 | ||
922 | // Convert comma-delimited string of modules to an array |
|
923 | if ( ! empty( $assoc_args['modules'] ) ) { |
|
924 | $modules = array_map( 'trim', explode( ',', $assoc_args['modules'] ) ); |
|
925 | ||
926 | // Convert the array so that the keys are the module name and the value is true to indicate |
|
927 | // that we want to sync the module |
|
928 | $modules = array_map( '__return_true', array_flip( $modules ) ); |
|
929 | } |
|
930 | ||
931 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
932 | if ( |