Open kylehotchkiss opened 1 year ago
Prevents issues where this code runs multiple times and prefixes the site name too much
if ($site_prefix) { function bubs_update_title_prefix() { global $site_prefix; $site_name = get_option('blogname'); $site_name = str_replace(['LOCAL: ', 'STAGING: '], '', $site_name); if (strpos($site_name, $site_prefix) === false) { update_option('blogname', $site_prefix . $site_name); } remove_action('admin_init', 'bubs_update_title_prefix'); } add_action('admin_init', 'bubs_update_title_prefix'); } ?>```
Prevents issues where this code runs multiple times and prefixes the site name too much