Astra_Ext_White_Label_Markup::branding_key_to_constant( String $product, String $key )

Convert brainding key to a constant.


Description

Adds a prefix of ‘AST_WL_’ to all the constants followed by uppercase of the product and uppercased key. Agency Name will be converted to AST_WL_ASTRA_AGENCY_NAME


Parameters

$product

(String) (Required) Product Slug for which whitelabel value is to be received.

$key

(String) (Required) whitelabel key to be received from the database.


Return

(String) constantified whitelabel key.


Source

File: classes/class-astra-ext-white-label-markup.php

		public static function branding_key_to_constant( $product, $key ) {
			return 'AST_WL_' . strtoupper( str_replace( '-', '_', $product ) . '_' . str_replace( '-', '_', $key ) );
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.