|
@@ 584-586 (lines=3) @@
|
| 581 |
|
* @return bool|WP_Error |
| 582 |
|
*/ |
| 583 |
|
public static function validate_setup_wizard_questionnaire( $value, $request, $param ) { |
| 584 |
|
if ( ! is_array( $value ) ) { |
| 585 |
|
/* translators: Name of a parameter that must be an object */ |
| 586 |
|
return new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be an object.', 'jetpack' ), $param ) ); |
| 587 |
|
} |
| 588 |
|
|
| 589 |
|
foreach ( $value as $answer_key => $answer ) { |
|
@@ 2698-2700 (lines=3) @@
|
| 2695 |
|
* @return bool|WP_Error |
| 2696 |
|
*/ |
| 2697 |
|
public static function validate_module_list( $value = '', $request, $param ) { |
| 2698 |
|
if ( ! is_array( $value ) ) { |
| 2699 |
|
return new WP_Error( 'invalid_param_value', sprintf( esc_html__( '%s must be an array', 'jetpack' ), $param ) ); |
| 2700 |
|
} |
| 2701 |
|
|
| 2702 |
|
$modules = Jetpack::get_available_modules(); |
| 2703 |
|
|