@@ 18-20 (lines=3) @@ | ||
15 | ||
16 | // convert list of modules in comma-delimited format into an array |
|
17 | // of "$modulename => true" |
|
18 | if ( isset( $args['modules'] ) && ! empty( $args['modules'] ) ) { |
|
19 | $modules = array_map( '__return_true', array_flip( array_map( 'trim', explode( ',', $args['modules'] ) ) ) ); |
|
20 | } |
|
21 | ||
22 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
23 | if ( 'users' === $module_name && isset( $args[ $module_name ] ) && 'initial' === $args[ $module_name ] ) { |
|
@@ 73-77 (lines=5) @@ | ||
70 | protected function result() { |
|
71 | $args = $this->query_args(); |
|
72 | ||
73 | if ( isset( $args['columns'] ) ) { |
|
74 | $columns = array_map( 'trim', explode( ',', $args['columns'] ) ); |
|
75 | } else { |
|
76 | $columns = null; // go with defaults |
|
77 | } |
|
78 | ||
79 | require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-wp-replicastore.php'; |
|
80 | $store = new Jetpack_Sync_WP_Replicastore(); |
@@ 631-637 (lines=7) @@ | ||
628 | Jetpack_Sync_Settings::update_settings( $sync_settings ); |
|
629 | ||
630 | // Convert comma-delimited string of modules to an array |
|
631 | if ( ! empty( $assoc_args['modules'] ) ) { |
|
632 | $modules = array_map( 'trim', explode( ',', $assoc_args['modules'] ) ); |
|
633 | ||
634 | // Convert the array so that the keys are the module name and the value is true to indicate |
|
635 | // that we want to sync the module |
|
636 | $modules = array_map( '__return_true', array_flip( $modules ) ); |
|
637 | } |
|
638 | ||
639 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
640 | if ( |
@@ 2395-2397 (lines=3) @@ | ||
2392 | if ( ! empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
2393 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
2394 | ||
2395 | if ( ! empty( $attributes['values'] ) && is_string( $attributes['values'] ) ) { |
|
2396 | $attributes['values'] = array_map( 'trim', explode( ',', $attributes['values'] ) ); |
|
2397 | } |
|
2398 | } |
|
2399 | ||
2400 | if ( $form ) { |