PHP code example of kodansha / wack-cloudinary

1. Go to this page and download the library: Download kodansha/wack-cloudinary library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kodansha / wack-cloudinary example snippets


define('WACK_CLOUDINARY_SETTINGS', [
    // Optional: The type of the Cloudinary media access. Possible values are 'authenticated', 'upload', 'private'
    // Default: 'upload'
    'type' => 'private',

    // Optional: The Cloudinary root folder to upload the media files.
    // Default: none
    'root_folder' => 'my-root-folder',

    // Optional: The notification URL endpoint to receive the Cloudinary notifications.
    // Default: none
    'notification_url' => 'https://example.com/cloudinary-notification',

    // Optional: The username and password for the basic authentication.
    // If your WordPress is behind the basic authentication, you need to set this to work the async requests.
    // Default: none
    'basic_auth' => [
        'username' => 'example-user',
        'password' => 'example-password',
    ]
]);