Jump to content

Problems hook


subzeros

Recommended Posts

Hello,

 

I create a table named 'mod_wizardpanelsettings', and so I have wanted to retrieve the table information from my hook

 

<?php
add_hook('ClientAreaHeaderOutput', 1, function ($vars) 
{
$data = Illuminate\Database\Capsule\Manager::connection()->select('select * from mod_wizardpanelsettings');

foreach($data as $datas)
{
	$header_return = json_decode(json_encode($datas), true);
}

$header_return = array(
	'favicon' => $header_return['favicon'],
);

return $header_return;
});
?>

 

And so in my header I want to show I did so favicon {$favicon} but his return me an array.

 

print_r($header_return); me return

 

Array
(
   [id] => 1
   [favicon] => teste url favicon
   [active_facebook] => 1
   [url_facebook] => 
   [active_twitter] => 1
   [url_twitter] => 
   [active_youtube] => 1
   [url_youtube] => 
   [active_googleplus] => 1
   [url_googleplus] => 
   [active_linekedin] => 1
   [url_linekedin] => 
   [active_livechat] => 0
   [active_langage] => 0
)

 

Sorry for my english I'm french, I would recover how favicon for example?

 

 

Thank you for your future responses.

 

cordially

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated