use OC\Util; $currentTheme = Util::getTheme(); echo "Current theme: $currentTheme";
use OC\Util; $currentTheme = Util::getTheme(); $isCustom = strpos($currentTheme, 'custom_') === 0; if ($isCustom) { echo "You are using a custom theme!"; } else { echo "You are using a built-in theme."; }This code snippet checks if the current theme name starts with "custom_". If it does, it is assumed to be a custom theme. In conclusion, the OC_Util getTheme function is a part of the ownCloud Core package library, and it is used to retrieve the current theme name. The above code examples demonstrate how the function can be used to check whether a custom theme is being used, and what the current theme name is.