Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

White label Envira

Would you like to white label Envira Gallery? You can easily do this by installing a custom plugin on your site! Simply create a plugin file to change all instances of “Envira Gallery” to simply say “Gallery” and remove the Envira banner and branding.

This tutorial is a bit more technical than our other docs, but we’ll walk you through the process step by step. In order to white label Envira, we’ll need to create and upload a basic WordPress plugin.

To white label Envira, just add the following code to a new file at wp-content/plugins/envira-whitelabel.php.

<?php
/**
 * Plugin Name: Envira Gallery - Whitelabel Envira
 * Plugin URI:  https://enviragallery.com
 * Description: Plugin that removes Envira Branding
 * Author:      Envira Gallery Team
 * Author URI:  https://enviragallery.com
 * Version:     1.0
 * Text Domain: envira-whitelabel
 * Domain Path: languages
 */

add_filter( 'envira_whitelabel', '__return_true' );

if ( apply_filters('envira_whitelabel', false )  ):

	add_filter( 'envira_whitelabel_name',			'example_envira_whitelabel_name' );
	add_filter( 'envira_whitelabel_name_singular',	'example_envira_whitelabel_name' );
	add_filter( 'envira_whitelabel_name_plural',	'example_envira_whitelabel_name_plural' );
	function example_envira_whitelabel_name() {
		return 'Gallery';
	}
	function example_envira_whitelabel_name_plural() {
		return 'Galleries';
	}

	// actions (Envira):
	// envira_whitelabel_header_logo
	// envira_whitelabel_default_display
	// envira_whitelabel_tab_text_images
	// envira_whitelabel_tab_text_config
	// envira_whitelabel_tab_text_lightbox
	// envira_whitelabel_tab_text_mobile
	// envira_whitelabel_tab_text_misc

	// filters (Albums):
	add_filter( 'envira_album_whitelabel_name', 			'example_envira_album_whitelabel_name' );
	add_filter( 'envira_album_whitelabel_name_singular', 	'example_envira_album_whitelabel_name' );
	add_filter( 'envira_album_whitelabel_name_plural', 		'example_envira_album_whitelabel_name_plural' );
	function example_envira_album_whitelabel_name() {
		return 'Album';
	}
	function example_envira_album_whitelabel_name_plural() {
		return 'Albums';
	}

	// actions (Albums):
	// envira_album_whitelabel_text_available_galleries
	// envira_album_whitelabel_text_settings
	// envira_album_whitelabel_lightbox_settings

	// actions (Standalone):
	// envira_standalone_whitelabel_tab_helptext

	// actions (Addons):
	// envira_instagram_whitelabel_tab_helptext
	// envira_watermarking_whitelabel_tab_helptext
	// envira_tags_whitelabel_tab_helptext
	// envira_social_whitelabel_tab_helptext
	// envira_social_lightbox_whitelabel_tab_helptext

	// Example:
	function example_envira_instagram_whitelabel_tab_helptext() {
		echo 'custom text here';
	}	
	add_action( 'envira_instagram_whitelabel_tab_helptext',	'example_envira_instagram_whitelabel_tab_helptext' );

	// filters (Misc):

	// this filter controls if you want the addon menu displayed in WordPress backend (default false)
	add_filter( 'envira_whitelabel_addon_screen',	'example_envira_whitelabel_addon_screen' );
	function example_envira_whitelabel_addon_screen() {
		return true; // make this true if you want to show the addon screen when whitelabel is active
	}

endif;

If you’re unsure how to create a plugin file, follow these steps below:

  1. Open a text file and make sure that it is a plain text document. You can use a plain text editor like Notepad or a code editor of your choice.
  2. Next, copy and paste the code shown above into the file and save the file as envira-whitelabel.php
  3. Once you’ve saved the file you can easily upload this directly to your /plugins directory on your server using FTP or you can right-click on the text document and zip (or compress).
  4. Finally, log in to your WordPress dashboard and go to Plugins » Add New » Upload Plugin and upload the .zip file you just created in the previous step.

Your next step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Envira Gallery – Whitelabel Envira plugin.

Activate the custom plugin to white label Envira gallery

That’s it! You’ve white labeled Envira Gallery. Would you like to extend Envira further? Take a look at our tutorial on How to Set Captions as Image Filenames.


A: That logo is not included in the filter we use in the plugin and can’t be removed.