inline-js 0.2 — wordpress plugin

留个关于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

CODE:
  1. <?php
  2. /*
  3. Plugin Name: Inline Javascript Plugin
  4. Plugin URI: http://www.ooso.net/
  5. Feed URI:
  6. Description: Plugin that insert inline javascript in Posts/Pages
  7. Version: 0.2
  8. Author: Volcano
  9. Author URI: http://www.ooso.net
  10. */
  11.  
  12. function inline_javascript($content){
  13.     $str = preg_replace('/<inline>(.*?)<\/inline>/is', '$1', $content);
  14.     if($str != $content) {
  15.         echo $str;
  16.         $str = '';
  17.     }
  18.     return $str;
  19. }
  20.  
  21. add_filter('the_content', 'inline_javascript', 0);
  22. ?>

Download

latest inline-js plugin

作者: Volcano 发表于January 8, 2006 at 11:07 pm

版权信息: 可以任意转载, 转载时请务必以超链接形式标明文章原始出处作者信息及此声明

Tags: ,,

1 条评论 »

  1. springcity 于 2008-04-26 @ 23:40:45 留言

    支持国产,虽然同类插件很多,却没找到一个好用的,试试你的。谢谢博主。

RSS 为此帖反馈评论 · 反向跟踪 网站

留条评论