This code:
if( get_theme_mod('enable_content_background_color') && empty( get_theme_mod('content_background_image') ) ) {
$custom .= " .site-content {
background-image: none;
}"."
";
Triggers this error:
Can't use function return value in write context in /home3/*******/public_html/*******/wp-content/themes/outliner/includes/styles.php on line 41
I wonder why?
The issue here is that the empty()
function only supports variables. If you look at the PHP.net Doc for the empty method you'll see;
Note: Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.
You'll need to do something like;
$contentBgImage = get_theme_mod('content_background_image');
if( get_theme_mod('enable_content_background_color') && empty($contentBgImage ) ) {
//code
}