
內容簡介
切換管理頁面上的人類和機器標籤(ID-s)。
僅供開發使用!
本外掛顯示幾乎所有表單字段的ID,包括類似於wp-admin/options.php的選擇框、複選框和單選按鈕。
它僅在WordPress設置API格式化的管理頁面上運作,而不一定是API生成的。例如:<input>元素不能包含在<span>中。
啟用
您可以在標準的“屏幕選項”(右上角)中找到插件的複選框。此複選框可能被寫得很差的插件覆蓋而隱藏。要將機器語言限制在某個管理頁面上,請將以下代碼複製到您的wp-config.php中:
define('MACHINE_LANGUAGE_HOOK','load-options-reading.php');
例如,這行只會在“設置/閱讀”上運行。
功能
基本上所有的輸入ID都顯示在標簽的位置,實際上是標籤的for屬性。
select顯示一個標題,顯示逗號分隔的所有選項值(將鼠標指向select)
option以“原始選項文本|value”形式追加值
單選按鈕標籤將顯示:“name | value”
描述(帶有“description”類的p和span)將被隱藏,這樣機器語言將清理所有管理頁面,通過CSS隱藏描述,因此沒有FOUC
其他說明
值為空的單選按鈕或複選框顯示為“空集”Unicode字符:?(例如在“設置/永久鏈接/默認”中)
值為空的select不會顯示
屏幕選項中的插件複選框立即生效
代碼被設計為必需使用的插件,因此沒有獨立的JavaScript或CSS文件
機器語言的狀態被保存為用戶選項,因此是每個使用者的設置
鏈接
在GitHub上進行開發。
外掛標籤
開發者團隊
原文外掛簡介
Toggles human and machine language (aka ID-s) on admin pages.
Only for development!
This plugin shows you the ID-s of almost all form fields including selects, checkboxes and radio buttons like in wp-admin/options.php.
It works only on WordPress Settings API-like formatted — not necessarily API generated — admin pages. E.g. elements cannot be wrapped in .
Activation
You can find the plugin’s checkbox in standard Screen Options (upper right corner). This checkbox could be overwritten — thus hidden — by poorly written plugins. To restrict Machine Language to a certain admin page, copy this to your wp-config.php:
define( 'MACHINE_LANGUAGE_HOOK', 'load-options-reading.php' );
For example this line causes to run only on Settings / Reading.
Features
Basically all input ID-s are displayed in place of labels, actually for attributes of labels
select-s get a title showing all option values comma separated (hover over select-s with your mouse)
option-s get values appended in the form of “original option text|value”
Radio button labels will show: “name|value”
Descriptions (p-s and span-s with “description” class) will be hidden, this way Machine Language will clean up all admin pages, descriptions are hidden by CSS, so there’s no FOUC
Other notes
select-s with empty values are not
The plugin’s checkbox in Screen Options is effective immediately
The code is designed as a must use plugin, so there is no separated Javascript or CSS file
State of Machine Language is saved as a user option so it is a per user setting
Links
Development goes on on GitHub.
