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