留个关于inline-js插件的更新记录
inline-js 0.2 —— wordpress plugin
本插件可在文章或页面中插入javascript或别的html等等不希望被wordperss本身重新格式化的内容。
Plugin Name: Inline Javascript Plugin
Plugin URI: http://www.ooso.net/index.php/inline-js/
Feed URI: http://www.ooso.net/index.php/feed/
Description: Plugin that insert inline javascript in Posts/Pages
Version: 0.2
Author: Volcano
Author URI: http://www.ooso.net
Usage
- Unzip
- Copy inline-js.php to direcotry wp-contents/plugin and activate it
- Use <inline> and </inline> tag around the javascript,and post it
- Ok
Source code
<?php
/*
Plugin Name: Inline Javascript Plugin
Plugin URI: http://www.ooso.net/
Feed URI:
Description: Plugin that insert inline javascript in Posts/Pages
Version: 0.2
Author: Volcano
Author URI: http://www.ooso.net
*/
function inline_javascript($content){
$str = preg_replace('/(.*?)<\/inline>/is', '$1', $content);
if($str != $content) {
echo $str;
$str = '';
}
return $str;
}
add_filter('the_content', 'inline_javascript', 0);
?>
One response to “inline-js 0.2 — wordpress plugin”
支持国产,虽然同类插件很多,却没找到一个好用的,试试你的。谢谢博主。