回答:
logo_pathテーマの設定でテーマのデフォルトのロゴを上書きした場合にのみ設定されるようです。デフォルトのロゴを取得するには、を使用しますtheme_get_setting('logo')。
theme_get_setting('logo')が空の文字列になるのはなぜですか?カスタムロゴを設定しました/admin/appearance/setting
                    TOGGLE DISPLAY - Enable or disable the display of certain page elements.て   theme_get_setting('logo')いる場合、結果が得られないのはなぜですか。どうして ?
                    <a href="<?php echo theme_get_setting('logo');?>">PHPコードブロックで使用して、独自のブロックにロゴを表示します。
                    global $base_url;
drupal_theme_initialize();
if (!$logo = theme_get_setting('logo_path')) {
    $logo = theme_get_setting('logo');
}
if (!empty($logo)) {
  // [1]
  // Remove the base URL from the result returned by theme_get_setting('logo').
  // If you don't need the relative path, you can remove this code.
  if (strpos($logo, $base_url) === 0) {
    $logo = drupal_substr($logo, drupal_strlen($base_url));
  }
  // [1]
  // …
}
drupal_theme_initialize()の呼び出しは厳密には必要ありません$theme。グローバル変数がすでに初期化されている場合は何もしません。
から報告される値theme_get_setting('logo')は絶対パスであるため、コードはベースURLを削除しています。ファイルへのアクセスに相対パスが必要ない場合は、その間の部分を// [1]削除できます。
ロゴがテーマ設定で無効にされている場合、theme_get_setting('logo')何も返されません。
[1]と$logo = file_create_url($logo);(:// httpで)ロゴの完全なURLパスを取得するために。
                    
theme_get_setting('logo_path', 'THEME_NAME')あなたのテーマの名前でTHEME_NAMEを置き換え、?