| @@ 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 ] ) { |
|
| @@ 95-99 (lines=5) @@ | ||
| 92 | protected function result() { |
|
| 93 | $args = $this->query_args(); |
|
| 94 | ||
| 95 | if ( isset( $args['columns'] ) ) { |
|
| 96 | $columns = array_map( 'trim', explode( ',', $args['columns'] ) ); |
|
| 97 | } else { |
|
| 98 | $columns = null; // go with defaults |
|
| 99 | } |
|
| 100 | ||
| 101 | require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-wp-replicastore.php'; |
|
| 102 | $store = new Jetpack_Sync_WP_Replicastore(); |
|
| @@ 2254-2256 (lines=3) @@ | ||
| 2251 | if ( ! empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
| 2252 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
| 2253 | ||
| 2254 | if ( ! empty( $attributes['values'] ) && is_string( $attributes['values'] ) ) { |
|
| 2255 | $attributes['values'] = array_map( 'trim', explode( ',', $attributes['values'] ) ); |
|
| 2256 | } |
|
| 2257 | } |
|
| 2258 | ||
| 2259 | if ( $form ) { |
|