這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Hikari Krumo

描述

Krumo is a debugging tool equivalent to print_r() and var_dump(), with the advantage of collapsing array and object values so that it takes less space and let us see only what we really need from complex data.

Hikari Krumo ports it to a WordPress plugin, so that Krumo becomes easily available in any WordPress page. Original Krumo has a few bugs fixed and has its options available in an admin page instead of requiring krumo.ini file edited directly.

Features

  • The simplicity of print_r() with the details of var_dump()
  • Show any data, including its data type
  • For arrays and objects, internal data are collapsed, so that it takes less space and you can expand to see only those values you really wanna see, spending much less space
  • Works anywhere in WordPress, backend and frontend
  • Hide it from visitors and only those who really need to see dump be able to see it
  • Automatically shows PHP file and line where dump happened, a great tool for debugging

螢幕截圖

  • Krumo as it’s presented when page loads, collapsed and using very little space
  • Main variable expanded, showing all object’s fields
  • $post->post_content was still collapsed because it’s a large text, now it was also expanded and you can see how a big string/blob of text is shown
  • here you see the result of krumo(debug_backtrace())

安裝

Hikari Krumo requires at least WordPress 2.8 and PHP5 to work.

You can use the built in installer and upgrader, or you can install the plugin manually.

  1. Download the zip file, upload it to your server and extract all its content to your /wp-content/plugins folder. Make sure the plugin has its own folder (for exemple /wp-content/plugins/hikari-krumo/).
  2. Activate the plugin through the ‘Plugins’ menu in WordPress admin page.
  3. Go to Hikari Krumo settings page and set who should see it
  4. That’s it! Now you can use Krumo anywhere in your site, being it in a WordPress Core file, a plugin or a theme, just by calling krumo($data) and passing the data you wanna debug to it!

Upgrading

If you have to upgrade manually, simply delete hikari-krumo folder and follow installation steps again.

Uninstalling

If you go to plugins list page and deactivate the plugin, it’s config stored in database will remain stored and won’t be deleted.

If you want to fully uninstall the plugin and clean up database, go to its options page and use its uninstall feature. This feature deletes all stored options, restoring them to default (which can also be used if you want defaults restored back), and then gives you direct link to securely deactive the plugin so that no database data remains stored.

常見問題

What’s the difference of original Krumo to Hikari Krumo?

Full Krumo is included in the plugin, it’s ported to WordPress so that we can use Krumo anywhere inside WordPress without having to bother of including it before the use.

Krumo is also adapted so that it’s configured from a WordPress plugin admin page instead of original krumo.ini, making it much easier to config. You can also configure who should see krumo output, so that you use it in frontend while your visitors see your site without even guessing Krumo is in place there.

Also, a few Krumo bugs I’ve seen were fixed.

I wanna design a new skin, will you help me?

Well I’m not webdesigner, but I can debug it and add to my plugin if you want.

Just provide me the skin files, and make sure to use schablon.com as a basis because it’s the one I’ve tested further. Also make sure to use my plugin’s files as basis, because they have some bug fixes over original ones.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Hikari Krumo” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Hikari Krumo 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.02

  • First public release.