mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +00:00
Replace current_theme() and current_theme_url() calls
This commit is contained in:
parent
3213715b60
commit
fde3d6f870
9 changed files with 22 additions and 19 deletions
|
@ -228,14 +228,15 @@ class Addon
|
|||
/**
|
||||
* @brief Calls a single hook.
|
||||
*
|
||||
* @param string $name of the hook to call
|
||||
* @param array $hook Hook data
|
||||
* @param string|array &$data to transmit to the callback handler
|
||||
* @param \Friendica\App $a
|
||||
* @param string $name of the hook to call
|
||||
* @param array $hook Hook data
|
||||
* @param string|array &$data to transmit to the callback handler
|
||||
*/
|
||||
public static function callSingleHook($a, $name, $hook, &$data = null)
|
||||
public static function callSingleHook(\Friendica\App $a, $name, $hook, &$data = null)
|
||||
{
|
||||
// Don't run a theme's hook if the user isn't using the theme
|
||||
if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/'.current_theme()) === false) {
|
||||
if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . $a->getCurrentTheme()) === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue