wordpress-2.6.2

wordpress-2.6.2が2008/9/9リリースされていました。

wordpress プラグインtext2html-1.0.4を使って、正常に使用できるかどうかのテストを行いました。

特に問題なさそうでした。

ただ、text2htmlプラグインディレクトリを開いた時に表示されるサンプルには、javascript(jQuery)を利用したものがあり、

カレンダーの表示が正常に行われません。

jQueryの簡単なスクリプトを、ヘッダ内に埋め込みやすくする為の以下のプラグインを、text2html次回リリース時に追加します。

 /*

 Plugin Name: wp_javascript

 Plugin URI: http://www.tenman.info/

 Description: Enable javascript library

 Author:

 Version: 0.1

 Author URI: http://www.tenman.info

 Tags: jQuery, js, javascript

 */

 function wp_jquery() {

 $s= "\n<script type='text/javascript' src='/js/jquery.js'>";

 $s.= "\n</script><script type='text/javascript' src='/js/jquery.flatheights.js'></script>\n";

 $s .=< <<SCRIPT

 <script type="text/javascript">

 <!--

 (function($){

 jQuery(function(){jQuery('#calendar td').flatHeights();

 jQuery("#depo tr:odd,#table-table-1 tr:odd").addClass("odd");

 });})(jQuery);

 //-->

code:

 <style type="text/css">

 <!--

 #calendar{width:640px;}

 #calendar td{width:85px;float:left;list-style:none;border:1px solid #ccc;}

 #calendar td p{text-indent:0;border:1px solid #eef;margin:0;}

 #dayname{height:1.5em;}

 #depo {background:#eef;border:1px solid #aaf;}

 #depo tr{height:2em;vertical-aligm:middle;}

 #depo tr td{height:2em;text-indent:1em;}

 .odd{background:#ccf;}

 #table-table-1{border:1px solid #aaf;}

 //-->

 </style>

 SCRIPT;

 echo $s;

 }

 add_action('wp_head', 'wp_jquery', 1);

コメントは受け付けていません。