Šī spraudnis nav atjaunināts vairāk kā divus gadus. Varbūt, tas vairs netiek uzturēts, nesaņemt atbalstu un tam var būt saderības problēmas ar jaunākām WordPress versijām.

Machine Language

Apraksts

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. <input> elements cannot be wrapped in <span>.

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.

Iespējas

  • 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

  • Radio buttons or checkboxes with empty value are displayed with the “Empty Set” Unicode character: “ ” (U+2205) ( e.g. Settings / Permalinks / Default )
  • 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

Saites

Development goes on on GitHub.

Ekrānuzņēmumi

  • Setting / Reading with Machine Language turned on.

Uzstādīšana

This section describes how to install the plugin and get it working.

  1. Upload machine-language.php to the wp-content/mu-plugins/ or wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress (if you’ve chosen the plugins dir)

BUJ

How can I inspect form fields not altered?

Even if your admin page is not generated by the Setting API
you should output HTML like in WordPress Settings pages.

Should I use Machine Language in production?

No, you shouldn’t.

Atsauksmes

Par šo spraudni nav atsauksmju.

Autori un izstrādātāji

“Machine Language” ir atvērtā pirmkoda programmatūra. Šo spraudni ir veidojuši šādi cilvēki.

Līdzdalībnieki

Tulkot “Machine Language” savā valodā.

Vai jūs interesē attīstība?

Pārlūkojiet kodu, apmeklējiet SVN krātuvi vai abonējiet attīstības žurnālu, ko izveidojis RSS.

Izmaiņu žurnāls

0.3.2

  • Fixed checkbox handling
  • WP 4.4 compatibility

0.3.1

  • Code styling
  • WP 4.3 compatibility
  • Semver

0.3

  • Initial release
  • The original plugin was “Hide Descriptions”