*/ protected function input_properties(): array { return array( 'from_email' => array( 'type' => 'string', 'description' => __( 'Address the site sends from.', 'acrossai-abilities-manager' ) ), 'from_name' => array( 'type' => 'string', 'description' => __( 'Name the site sends as.', 'acrossai-abilities-manager' ) ), 'from_email_force' => array( 'type' => 'boolean', 'description' => __( 'Force this address over what individual plugins ask for.', 'acrossai-abilities-manager' ) ), 'from_name_force' => array( 'type' => 'boolean', 'description' => __( 'Force this name over what individual plugins ask for.', 'acrossai-abilities-manager' ) ), ); } /** * @since 0.0.34 * @return array */ protected function required_input(): array { return array(); } /** * @since 0.0.34 * @return array */ protected function output_properties(): array { return array( 'settings' => array( 'type' => 'object', 'additionalProperties' => true ), ); } /** * @since 0.0.34 * @return array */ protected function annotations(): array { return array( 'readonly' => false, 'destructive' => false, 'idempotent' => true, ); } /** * @since 0.0.34 * @param array $input Input. * @return array|WP_Error */ protected function run( array $input ) { return Email_Repository::update_settings( $input ); } }