White Labeling

The module was built to be used foremost internally by the Deep Web Solutions development team, but we tried to include white-labeling functionality for all potential customer-facing strings.

Basically, in order to replace our name with yours, all you have to do is define the constants you want to overwrite before loading the Composer autoload file. For example:

<?php
/**
 * Plugin Name:       My Test Plugin
 * Version:           1.0.0
 * Requires at least: 5.7
 * Requires PHP:      8.0
 */
 
 // Define white-labeling constants.
 \define( 'DeepWebSolutions\Framework\DWS_WP_FRAMEWORK_WHITELABEL_NAME', 'My Awesome Company Name' );
 
 // Load the Composer autoloader.
 \is_file( __DIR__ . '/vendor/autoload.php' ) && require_once __DIR__ . '/vendor/autoload.php';
 

The supported white-label strings are located in the bootstrap-whitelabel.php file.

You have to define the constant together with the appropriate namespace. If you're using dependency scoping (like you should), your namespace will be different than the one showed in the example above.

Last updated