| @@ 2191-2193 (lines=3) @@ | ||
| 2188 | $attributes['required'] = false; |
|
| 2189 | ||
| 2190 | // parse out comma-separated options list (for selects, radios, and checkbox-multiples) |
|
| 2191 | if ( !empty( $attributes['options'] ) && is_string( $attributes['options'] ) ) { |
|
| 2192 | $attributes['options'] = array_map( 'trim', explode( ',', $attributes['options'] ) ); |
|
| 2193 | } |
|
| 2194 | ||
| 2195 | if ( $form ) { |
|
| 2196 | // make a unique field ID based on the label, with an incrementing number if needed to avoid clashes |
|
| @@ 14-16 (lines=3) @@ | ||
| 11 | ||
| 12 | // convert list of modules in comma-delimited format into an array |
|
| 13 | // of "$modulename => true" |
|
| 14 | if ( isset( $args['modules'] ) && !empty( $args['modules'] ) ) { |
|
| 15 | $modules = array_map( '__return_true', array_flip( array_map('trim', explode( ',', $args['modules'] ) ) ) ); |
|
| 16 | } |
|
| 17 | ||
| 18 | foreach ( array( 'posts', 'comments', 'users' ) as $module_name ) { |
|
| 19 | if ( isset( $args[ $module_name ] ) ) { |
|
| @@ 124-128 (lines=5) @@ | ||
| 121 | ||
| 122 | $args = $this->query_args(); |
|
| 123 | ||
| 124 | if ( isset( $args['columns'] ) ) { |
|
| 125 | $columns = array_map('trim', explode( ',', $args['columns'] ) ); |
|
| 126 | } else { |
|
| 127 | $columns = null; // go with defaults |
|
| 128 | } |
|
| 129 | ||
| 130 | require_once dirname(__FILE__) . '/../../sync/class.jetpack-sync-wp-replicastore.php'; |
|
| 131 | ||