Constants

A PHP constant is essentially a configuration variable that once defined cannot be changed. Instant Images uses constants in various places throughout the core plugin for storing configuration data.

API Keys

Use the following PHP constants in your wp-config.php or functions.php to set the provider API keys via backend code. Setting API keys via constants will remove the ability to modify the API keys via plugin settings.

// Unsplash
define( 'INSTANT_IMAGES_UNSPLASH_KEY', 'XXXXXXXXX-XXXXXXXXXX' );

// Pixabay
define( 'INSTANT_IMAGES_PIXABAY_KEY', 'XXXXXXXXX-XXXXXXXXXX' );

// Pexels
define( 'INSTANT_IMAGES_PEXELS_KEY', 'XXXXXXXXX-XXXXXXXXXX' );
PHP