|
@@ 1052-1054 (lines=3) @@
|
| 1049 |
|
$options = self::get_module_available_options(); |
| 1050 |
|
|
| 1051 |
|
// If option is invalid, don't go any further. |
| 1052 |
|
if ( ! in_array( $option, array_keys( $options ) ) ) { |
| 1053 |
|
return new WP_Error( 'invalid_param', esc_html( sprintf( __( 'The option %s is invalid for this module.', 'jetpack' ), $option ) ), array( 'status' => 404 ) ); |
| 1054 |
|
} |
| 1055 |
|
|
| 1056 |
|
// Used if response is successful. The message can be overwritten and additional data can be added here. |
| 1057 |
|
$response = array( |
|
@@ 2587-2589 (lines=3) @@
|
| 2584 |
|
|
| 2585 |
|
$plugin = stripslashes( $data['plugin'] ); |
| 2586 |
|
|
| 2587 |
|
if ( ! in_array( $plugin, array_keys( $plugins ) ) ) { |
| 2588 |
|
return new WP_Error( 'plugin_not_found', esc_html( sprintf( __( 'Plugin %s is not installed.', 'jetpack' ), $plugin ) ), array( 'status' => 404 ) ); |
| 2589 |
|
} |
| 2590 |
|
|
| 2591 |
|
$plugin_data = $plugins[ $plugin ]; |
| 2592 |
|
|