array( 'type' => 'string' ), 'key' => array( 'type' => 'string' ), 'key_location' => array( 'type' => 'string' ), ); } /** * Deliberately empty. 'confirm' must not be schema-required — see * Base_Rank_Math_Ability::ability(). A required confirm would make an * unconfirmed call fail core schema validation before execute() runs, so the * caller would get a generic ability_invalid_input instead of * confirmation_required and the message naming the flag. */ protected function required_input(): array { return array(); } protected function annotations(): array { return array( 'readonly' => false, 'destructive' => true, 'idempotent' => true ); } /** * @param array $input * @return array|WP_Error */ protected function run( array $input ) { $result = Instant_Indexing_Repository::reset_key(); if ( is_wp_error( $result ) ) { return $result; } $result['message'] = sprintf( /* translators: %s: new key file URL */ __( 'Generated a new IndexNow key. Search engines must be able to fetch %s before submissions will be accepted.', 'acrossai-abilities-manager' ), $result['key_location'] ); return $result; } }