Aggiungere servizi S3 – Hook di filtro backwpup_s3_destination

Ab BackWPup Version 3.6.10 können neue S3-Dienste zur Standardliste über den Filter Hook backwpup_s3_destination hinzugefügt werden. Jeder Dienst, den wir hinzufügen wollen, kann über ein Array festgelegt werden, das die Bezeichnung, die Region und die URL des Dienstes angibt, den wir hinzufügen möchten. Hier ein Beispiel: add_filter( ‘backwpup_s3_destination’, function ( $destinations ) { return array_merge(…

Home Domande frequenti Aggiungere servizi S3 – Hook di filtro backwpup_s3_destination

A partire dalla versione 3.6.10 di BackWPup , è possibile aggiungere nuovi servizi S3 all’elenco predefinito tramite il filtro Hook backwpup_s3_destination vanno aggiunti.

Ogni servizio che vogliamo aggiungere può essere specificato tramite un array che indica il nome, la regione e l'URL del servizio che desideriamo aggiungere.
Ecco un esempio:

add_filter( 'backwpup_s3_destination', function ( $destinations ) {
        return array_merge( array(array(
                        'label'    => __( 'FirstServiceTest: AMS3', 'backwpup' ),
                        'region'   => 'ams3',
                        'base_url' => 'https://example.com',
                ),
                array(
                        'label'    => __( 'SecondServiceTest: AMS', 'backwpup' ),
                        'region'   => 'nl-ams',
                        'base_url' => 'https://example.com',
                )
        ), $destinations );
} );

In questo esempio definiamo due array, uno per FirstServiceTest e uno per SecondServiceTest.
Questi nuovi servizi sono ora disponibili nell'elenco dei servizi S3 per i relativi lavori.

Proteggete il vostro sito web WordPress

Garantite ai dati del vostro sito web la protezione che meritano – con BackWPup Pro .