前言介紹
- 這款 WordPress 外掛「Hikari Tools Framework」是 2010-10-21 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2010-10-22,距離現在已有 5309 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.8.0 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
tool | framework | dependancy | HkToolsOptions |
內容簡介
ith the options and let Hikari Tools Framework build the whole options page for you. This significantly reduces development time for plugins, particularly when it comes to building options pages.
Aside from this, Hikari Tools Framework also offers great features like options detection and reset. By simply using a simple array, a table is printed at the bottom of the options page, showing all the different types of options that the plugin creates, whether it be wp_options, comment meta, post meta, network-wide options or user specific options (usermeta).
The framework makes it easy and practical for users to reset any data created by the plugin. It provides a clear list of all kinds of data stored in the database, together with each option's key, which enables users to search for them easily. What's more, users can reset all data using a user-friendly command, which totally cleans their database of any data created by the plugin.
Features
There are a plethora of features available, with the most commonly used ones listed below:
DRY (Don’t Repeat Yourself): Features are only developed once in the framework and are then used anywhere you want. When the framework is updated, the update is automatically replicated to all plugins that use it.
Object Oriented: The framework provides 2 classes that you can expand to implement your code, and then call parent methods to use Framework's features. Additionally, you can overwrite specific methods to add special features to a specific method.
Automatic 'plugins_loaded' and 'init' actions: It follows WordPress standards and runs the least code possible during plugin load time. Each object is instantiated and runs its construct() method during 'plugins_loaded' action, and its startup() method during 'init' action.
Data dump: This feature is great for debugging purposes. You can use the HkTools::dump() method to pass any type of data and have it dumped, with a title above it, anywhere you want. Additionally, you can use the HkTools::formatCode() method to receive a string and print it using formatting plugins if available, or pre HTML element if needed.
Strings search: You can use the hasNeedle($haystack,$needle) and hasNeedleInsensitive($haystack,$needle) methods to search inside strings. They use PHP's stripos() to do the search, but instead of returning numbers that are rarely used, they return ready-to-use boolean values to say whether $needle was or wasn't found. Furthermore, $needle can even be an array if you want to search many strings at once.
Version checks: The Framework tests PHP and WordPress versions and doesn't load itself if requirements aren't fit. Plugins that consume it follow a standard of testing the Framework version too.
Paths to plugin files: For each plugin that consumes the Framework, it provides 2 variables for local path and URL for plugins root folder.
Full featured options page builder: Hikari Tools Framework offers a complete options data and options page building solution. The HkToolsOptions class handles all your options data and options page building, including resetting data to default. The features of HkToolsOptions are so many they deserve their own list:
Instead of having a complete HTML page in each plugin to facilitate config set up for your users, just create an array with the options and let Hikari Tools Framework build the page.
原文外掛簡介
Hikari Tools Framework isn’t a plugin with features for the end user. It’s a development framework with tools to be used by other plugins, so that they don’t need to duplicate the same code over and over again.
It deeply decreases plugins development time, specially in building options pages. For that, instead of building the whole HTML for each plugin, we can just prepare an array and it’s used to build the whole page.
Another great feature this framework offers is options detection and reset. With the use of another simple array, in the bottom of options page it prints a table showing to plugin’s users all kinds of options the plugins creates, being it wp_options, comment meta, post meta, and even network-wide options and user specific options (usermeta).
Every kind of data your plugin stores in database is shown in a clear way, with its key so that users can easly search for them in database. But they don’t need to, because together with each option it informs if there’s any data of that type stored, and provides user-friendly command to reset them all, totally cleaning the user’s database from any data created by the plugin. Very easy and practical to use, and instantly available to any plugin that consumes Hikari Tools Framework!
Features
There are really a bunch of features available, here are the most used ones.
DRY: Using the Don’t Repeat Yourself principle, features are developed only once in the framework and are used anywhere you want! And once the framework is updated, the update is automatically replicated to all plugins that use it!
Object Oriented: it provides 2 classes, which you can expand to implement your code, and then call parent methods anywhere to use Framework’s features. Also, if you wanna add special features to a specific method, just overwrite it in your class!
Automatic ‘plugins_loaded’ and ‘init’ actions: follows WordPress standards and runs the least code possible during plugins load time. Each object is instantiated and runs its construct() method during ‘plugins_loaded’ action, and its startup() method during ‘init’ action
Data dump: great for debugging, you can use the HkTools::dump() method to pass any kind of data and have it dumped, with a title above it, anywhere you want! And there’s also the HkTools::formatCode() that receives a string and prints it using formatting plugins if available, or pre HTML element if needed.
Strings search: use hasNeedle($haystack,$needle) and hasNeedleInsensitive($haystack,$needle) methods to search inside strings. They use PHP’s stripos() to do the search, but instead of returning numbers that are rarely used it returns ready-to-use boolean values to say if $needle was or wasn’t found, and $needle can even be an array if you wanna search many strings at once!
Version checks: the Framework tests PHP and WordPress versions and doesn’t load itself if requirements aren’t fit, and plugins that consume it follow a standard of testing the Framework version too.
Paths to plugin files: it provides 2 variables for local path and URL for plugins root folder, for each plugin that consumes the Framework!
Full featured options page builder: This one deserves its own features list, so many they are! The HkToolsOptions class handles all your options data and options page building, including reseting data to default:
Instead of having in each of your plugins a complete HTML page to allow your users to setup configs, just create an array with your options data and everything will be handled by the Framework, including handling default values and registering the options page and its menu item!
Many types of data are supported: text, textarea, select, radiobox, checkbox, and if neither of those are enough you can also specify custom areas where your special options (ex: complex data that requires custom HTML, JavaScript, etc) can be placed!
Store multiple settings in a single option using arrays: forget those dumb plugins that add dozens of wp_options rows, now you can use a single array to store all those settings, and place them all in a single options variable. And you don’t have to deal with the complexity of setting them to use array, because the Framework handles it to you!
Use multiple sections: Does your plugin use so many settings that it becomes messy? Don’t worry, create visually separated sections to organize your settings, each of them having a title and help text to explain what the section refers to. And multiple sections are still stored in a unique array’ed wp_options row!
Store your options in multiple places: aside from the most known wp_options (which is specific for each site), you can also store Multisite / network-wide options (that are shared by all sites in a MultiSite network) and user specific options (which are stored together to current user and are valid only to him).
Too many storage places make it hard for plugins users to delete them all when they are uninstalling the plugin? No! Hikari Tools Framework easily resets them!: it provides an uninstall form which is added in the bottom of default options page, listing all kinds of options (wp_options, sitemeta, usermeta, postmeta, commentmeta, …) your plugin uses, informs for each of them if there’s any data stored ATM, and provides a command to delete them all from database, followed by a command to directly uninstall the plugin! This feature can also be used to reset options to default.
Default options aren’t stored: many plugins use to add default options to database when they find none, therefore storing data that didn’t need to be there and blocking users from deleting those data before deactivating the plugin. With Hikari Tools Framework plugins that doesn’t happen, because it doesn’t save data automatically and uses default settings when options data isn’t found in database. And that’s totally transparent for you while handling options in your code!
Special debug feature: There’s a property named HkTools::debug that’s set to false by default. In your plugin you can develop debugging code that will only be run if $this->debug is set to true. Then, it’s just a matter of setting it in your extended class and all of a sudden all debug will be available to you! BTW, options pages have “hidden” debug code, and when HkToolsOptions::debug is set to true they are automatically shown without you having to worry with anything!
Automatic options loading: Always load your options object first, because its HkTools::loadAllOptions() method automatically loads your options and stores them in HkTools::optionsDBValue, regardless if it was indeed loaded from database or was built from options defaults. The class by default handles a single wp_options variable, but you can create more objects and overwrite loadAllOptions() to load and provide them all.
Options page customization: if some part of default page doesn’t fit your needs, you can change it by overwriting a HkToolsOptions method, instead of having to throw the whole class away and go back building full pages again.
HkToolsOptions extends HkTools: of course, all features available in HkTools are also available in HkToolsOptions to be used for handling your options.
Reset and uninstall commands use JavaScript to alert user about data lost and ask confirmation before deleting
I dedicate Hikari Tools Framework to Ju, my beloved frient ^-^
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Hikari Tools Framework」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Core Framework 》總結:Core Framework是一個簡單易用、樂趣滿滿的WordPress外掛,如同你的CSS瑞士軍刀,幫助你輕鬆打造完美網站。, , 問題與答案:, - Core Framework是什麼...。
Elements For Elementor 》Elements For Elementor, 這個外掛為Elementor Page Builder加入了一些實用的元素。所有元件都是完全響應式且具備視網膜級別的畫質。。
Gantry 5 Framework 》Gantry 5是一個全面的建構模組集,可協助快速將設計實現為具有彈性和功能強大的網站主題。, , 請訪問http://gantry.org以下載免費的WordPress Gantry 5預設主...。
Gantry 4 Framework 》, Gantry 5 現已推出 WordPress 外掛!請造訪 Gantry 5 的外掛頁面,以獲得更多資訊。, , Gantry 4 是專為建立靈活強大的網站主題而設計的一套全面的建構元件...。
Kopa Framework 》「Kopa Framework」外掛是一種簡單的方式,讓您在 WordPress 網站上設置主題選項、側邊欄管理器、版面管理器和自訂版面功能。。
WooCommerce Custom Product Data Fields 》WooCommerce Custom Product Data Fields 是一個簡單的外掛程式,可以幫助您輕鬆建立額外的產品資料欄位,例如次要產品標題、供應商資訊、個別產品的自訂訊息...。
WordPress Plugin Framework Reloaded 》這是一個專為 WordPress 外掛開發者所製作的外掛程式。僅當某些其他外掛需要時,使用者才需要安裝它。因此,我們必須對 WordPress Plugin Framework Reloaded...。
Proper Pagination 》此外掛主要針對主題開發人員,旨在簡化 WordPress 列表頁面(如存檔、作者、分類、搜尋、標籤列表等)的語義化、可用性分割控制器的建立。, 受到「The Loop」...。
Funtionalities for Alpus theme 》總結:這個外掛為Alpus主題增加了許多高級功能,如Elementor頁面構建元素、標題構建元素和主題選項,以擴展該主題的功能。, , 問題與答案:, 1. 這個外掛為哪...。
LAPDI Easy Dev 》Let A Pro Do IT!(LAPDI)的 Easy Dev 是 WordPress 插件開發的框架,以下是一些特點。Easy Dev 讓面向對象設計再次熱門,並且它是 Let A Pro Do IT!! 創建...。
Framework Mobilede 》現在,您可以輕鬆地使用一個框架在您的網站上顯示Mobile.de的車輛清單。, 網站: https://domisiding.de。
Basticom Framework 》Basticom 框架外掛可以讓您修改 WordPress 的某些核心功能,以及微調一些額外的設置。此外,這個框架還提供了一組易於在主題中使用的 PHP 函數(指令)。。
Feather 》Feather 是一個由 WPBandit 所開發的輕量且功能強大的 WordPress 主題框架。透過單一配置檔案即可輕鬆配置您的主題。造訪 Feather 的 網站 以瞭解更多資訊。。
Premium Addons for KingComposer 》使用「Premium Addons for KingComposer」可幫助您創建網頁,而不需要觸碰任何代碼。, 它還擁有許多其他功能,協助您打造更好的網站:, , 切換元素選擇, 自動...。
Elastic Theme Editor 》Elastic是WordPress的主題引擎和交互主題編輯器。, 重要提示, Elastic仍在開發中,我們不建議您在實際網站上使用Elastic主題。我們盡力使Elastic盡可能少出現...。