There are four issues in the code shown in the question; two of them explain why the code doesn't work as expected.
theme_get_settings()
has been removed in Drupal 7; instead of that function, the code should use theme_get_setting()
$settings[toogle_logo]
is using a literal string without using the string delimiters; PHP will take toogle_logo
is a constant and, not founding its declaration, it will think its value is the literal string 'toogle_logo'
- As already said from tim.plunkett,
!$settings[toogle_logo] = 0
should really be !$settings[toogle_logo] == 0
; differently, the code is setting $settings[toogle_logo]
to 0
, and then checking its value isn't zero, which means the if()
statement will never be executed
- Instead of rendering an image by writing directly the HTML markup, the code should use the theming functions available in Drupal
The correct code should be similar to the following one.
if (theme_get_setting('toggle_logo')) {
$image = array(
'path' => theme_get_setting('logo'),
'alt' => 'my logo',
);
print theme('image', $image);
}
If you can avoid using the PHP filter, you really should. Consider creating a custom module that implements a block, or include the block implementation in an existing custom module you are already using for the site you developed.