|
@@ 606-608 (lines=3) @@
|
| 603 |
|
* @return bool|WP_Error |
| 604 |
|
*/ |
| 605 |
|
public static function validate_setup_wizard_questionnaire( $value, $request, $param ) { |
| 606 |
|
if ( ! is_array( $value ) ) { |
| 607 |
|
/* translators: Name of a parameter that must be an object */ |
| 608 |
|
return new WP_Error( 'invalid_param', sprintf( esc_html__( '%s must be an object.', 'jetpack' ), $param ) ); |
| 609 |
|
} |
| 610 |
|
|
| 611 |
|
foreach ( $value as $answer_key => $answer ) { |
|
@@ 2705-2707 (lines=3) @@
|
| 2702 |
|
* @return bool|WP_Error |
| 2703 |
|
*/ |
| 2704 |
|
public static function validate_module_list( $value = '', $request, $param ) { |
| 2705 |
|
if ( ! is_array( $value ) ) { |
| 2706 |
|
return new WP_Error( 'invalid_param_value', sprintf( esc_html__( '%s must be an array', 'jetpack' ), $param ) ); |
| 2707 |
|
} |
| 2708 |
|
|
| 2709 |
|
$modules = Jetpack::get_available_modules(); |
| 2710 |
|
|