How do I put a logo into a block? I have tried to put this code in custom block with input formated to PHP code:

$settings = theme_get_settings('my theme');
if (!$settings[toogle_logo] = 0) {
  print '&lt;img src="' . base_path() . $settings['logo_path'] . '" alt="my logo" /&gt;'; 
}


It doesn't work in Drupal 7.
theme_get_settings() was removed in Drupal 7. Instead, use theme_get_setting(). This works:

&lt;?php

if (theme_get_setting('toggle_logo')) {
  $image = array(
    'path' =&gt; theme_get_setting('logo'),
    'alt' =&gt; 'my logo',
  );
  print theme('image', $image); 
}

?&gt;


theme_get_setting() will get the current theme's setting, but if you want an arbitrary theme's setting, you can use the optional second parameter as described in the API docs. I used theme_image() to make it less fragile.

But if you can avoid the use of the PHP filter, you really should: consider creating a small custom module that creates a block with the code instead.