iG:Syntax Hiliter をちょこっと修正
Posted in WordPress, plugins Monday March 24th, 2008 @ 6:49 pmコード表示に便利なプラグインのiG:Syntax Hiliter。
Canned !! — my Atropine » iG:Syntax Hiliter
ですが、WordPress 2.3.3 にアップグレードしてからどうも動作していませんでした。
ソースを確認すると
HTML
<script language="javascript" type="text/javascript" src="http://triumphalroman.net/wp-content/plugins/ig_syntax_hilite/js/syntax_hilite_js.js"></script>
になっている。
ん? triumphalroman.net/wp-content ??
インストールディレクトリを変更したので、triumphalroman.net/wp/wp-content じゃないとそりゃ動作しないわ。
ってことで原因を調査するとどうもここっぽい。
wp-content/plugins/syntax_hilite.php
PHP
$igsyntax_hiliter_path = get_settings('home')."/wp-content/plugins/ig_syntax_hilite"; //URL to the plugin directory
なので下記ページを参考にして…
get_settings - WordPress
PHP
$igsyntax_hiliter_path = get_settings('siteurl')."/wp-content/plugins/ig_syntax_hilite"; //URL to the plugin directory
こうしてアップロードしてみるとうまく動作しましたとさ。
ま、get_settings(’home’)のまんまでパスを “wp/wp-content…” としてもよかったんだけどね。




