自由切換 WordPress CLI theme

在 ijliao 那邊 看到CLI” 這個 WordPress theme,第一個感覺也是有個衝動想馬上換上去。

WP-CLI-Snap_P

這個模仿 Command line interface所製作的主題還有很多要改善的地方,例如我會很自然地按「上下鍵」想要叫出之前所下過的指令,按「Tab」鍵想要 auto-completed,還會打 「logout」…..

- priv 說,在 DreamHost 上因為關掉了 URL access ,所以沒辦法顯示那畫龍點睛的綠色灰階圖。沒關係,DreamHost 有提供 curl,用這個 patch 可以達到同樣的效果:

patch interpret.php cli_theme_on_dreamhost.diff

至於要如何在GUI及CLI之間切換,作者的作法

To get two themes with the same blog, I did this:

* Copy the blog directory, i.e. cp -R rod rodcli
* Edit rodcli/wp-settings.php like so:

//define(‘TEMPLATEPATH’, get_template_directory());
define(‘TEMPLATEPATH’, ‘wp-content/themes/cli’);

Note that this isn’t perfect: your /rodcli/wp-admin/ won’t work. Luckily, you still have the original blog for making posts with. With some cleverness, one could probably use symlinks to minimize the amount of code duplication.

這太麻煩了,我又不想要裝 ThemeSwitcher,所以乾脆寫了個plugin,攔截所有連到 [site_url]/cli的人,切換到 CLI mode。

舉例來說,這是 GUI 模式這是 CLI模式,多美好啊!!

這個plugin 可以在 這裡下載,解開後放到 WordPress 的plugin 目錄下啟動即可。

延伸閱讀

更多閱讀選擇

文章資訊

 

9 Responses to 自由切換 WordPress CLI theme

  1. Pingback: - priv - » Blog Archive » wp cli theme

  2. Pingback: =.= 街喵人生

  3. Pingback: BlueCat is sleepy» Blog Archive » Wordpress Plugin: PL-alternative_theme

  4. Pingback: 超酷的 Wordpress theme - CLI - 安裝成功 at Dennys’ blog

  5. Pingback: JoeCen’s 小猫窝 » Blog Archive » 好玩的CLI theme

  6. kukukuan says:

    按照你的介绍,我写了一个新的插件,呵呵!
    能够自动查找CLI目录,添加配置菜单,且支持最新的CLI 2.3

    http://wordpress.org/extend/plugins/cli-switch/
    http://blog.gmap2.net/2007/04/09/wordpress-plugin-cli-switch/
    都可以找到

    谢谢你介绍这个有趣的皮肤

  7. Pingback: 終極邊疆BLOG » 自由切換 WordPress CLI theme

  8. Pingback: 狗爺語錄 » Entry » CLI theme alternative plugin superseded

  9. Pingback: 狗爺語錄 » Entry » 能夠和 CLI theme 共存了

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>