4c4 < /* Copyright 2017,2018,2019,2020 Tony Lewis (email : tlewis@exelana.com) --- > /* Copyright 2017,2018,2019,2020,2024 Tony Lewis (email: tlewis@exelana.com) 24,25c24,31 < * Debugging messages are enabled according to the contents of the file EXELANA_WORDPRESS. To < * enable debugging of WordPress sources include: --- > * Debugging messages are enabled according to the contents of the file EXELANA_WORDPRESS. > * > * Debugging flags are set by including the flag and its value. The following flags are > * supported: > * annotate include annotations in page content > * development treat the current machine as a development machine > * > * To enable debugging of WordPress sources include: 36a43,46 > * You can limit the effects to a particular website by including a site block: > * [site DOMAIN] such as "www.your-domain.com" > * such as "development: true" > * [/site] 81a92 > 'progress' => false, 95a107,108 > $site = array_key_exists('SERVER_NAME',$_SERVER) ? $_SERVER['SERVER_NAME'] : 'unknown'; > $site_match = ''; 98,100c111 < if (preg_match('/^([^:]*):\s*(\w+)\s*$/',$line,$matches)) < $exelana_wordpress['enable'][$matches[1]] = < strtolower($matches[2]) == 'true' ? true : false; --- > if ($site_match != '' && preg_match('/^\[\site\]/',$line)) 102,103c113,129 < $load = true; < $exelana_wordpress['enabled'] = true; --- > $site_match = ''; > } elseif ($site_match == '' && preg_match('/^\[site ([^\]]+)\]/',$line,$matches)) { > $site_match = $matches[1]; > } elseif ($site_match == '' || $site == $site_match) { > if (preg_match('/^([^:]*):\s*(\S+)\s*$/',$line,$matches)) > { > $load = true; > if ($matches[1] == 'progress') > { > $exelana_wordpress['progress'] = $matches[2]; > } elseif (strtolower($matches[2]) == 'true') { > $exelana_wordpress['enable'][$matches[1]] = true; > $exelana_wordpress['enabled'] = true; > } else { > $exelana_wordpress['enable'][$matches[1]] = false; > } > } 105,107d130 < if (preg_match('/^wp-content\/themes\//',$line) < && $exelana_wordpress['enable'][$matches[1]]) < $load = true;