Topic: Hook is variable
Hello!
I'm trying to edit parser.php, and there's a hook
$return = ($hook = get_hook('ps_handle_img_tag_end')) ? eval($hook) : null;
And well, as far as i understand, whole content of <hook id="ps_handle_img_tag_end"> is signed to variable $result.
So I'm trying something like this
<hook id="ps_handle_img_tag_end"><![CDATA[
'<span class="postimg"><a rel="example_group" href="'.$url.'"><img src="'.$url.'" alt="'.forum_htmlencode($alt).'" /></a></span>';
]]></hook>
But it doesn't work.
I've also tried
<hook id="ps_handle_img_tag_end"><![CDATA[
if (!$is_signature && $forum_user['show_img'] != '0') {
$return = '<span class="postimg"><a rel="example_group" href="'.$url.'"><img src="'.$url.'" alt="'.forum_htmlencode($alt).'" /></a></span>';
}
]]></hook>
cause I need this conditional, but it also doesn't work. What I am doing wrong?
Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.