wordpress define constant if not defined code example
Example: wordpress define constant if not defined
<?php
define("AMOUNT_OF_APPLES", 12);
if(defined("AMOUNT_OF_APPLES")){
//here you go
echo AMOUNT_OF_APPLES;
}
//output: 12
?>
<?php
define("AMOUNT_OF_APPLES", 12);
if(defined("AMOUNT_OF_APPLES")){
//here you go
echo AMOUNT_OF_APPLES;
}
//output: 12
?>