@@ 25-27 (lines=3) @@ | ||
22 | ||
23 | // convert list of modules in comma-delimited format into an array |
|
24 | // of "$modulename => true" |
|
25 | if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
|
26 | $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
|
27 | } |
|
28 | ||
29 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
30 | if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
@@ 925-931 (lines=7) @@ | ||
922 | Settings::update_settings( $sync_settings ); |
|
923 | ||
924 | // Convert comma-delimited string of modules to an array |
|
925 | if ( ! empty( $assoc_args['modules'] ) ) { |
|
926 | $modules = array_map( 'trim', explode( ',', $assoc_args['modules'] ) ); |
|
927 | ||
928 | // Convert the array so that the keys are the module name and the value is true to indicate |
|
929 | // that we want to sync the module |
|
930 | $modules = array_map( '__return_true', array_flip( $modules ) ); |
|
931 | } |
|
932 | ||
933 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
934 | if ( |
@@ 3036-3038 (lines=3) @@ | ||
3033 | if ( ! empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
3034 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
3035 | ||
3036 | if ( ! empty( $attributes['values'] ) && is_string( $attributes['values'] ) ) { |
|
3037 | $attributes['values'] = array_map( 'trim', explode( ',', $attributes['values'] ) ); |
|
3038 | } |
|
3039 | } |
|
3040 | ||
3041 | if ( $form ) { |