textfield type to store a single line text field Create a
textfield type using
You appear to be a bot. Output may be restricted
bw_dtt( "_oikp_slug", "plugin folder name (e.g. oik)" ); bw_register_field( "_oikp_slug", "text", "Plugin slug", array( '#hint' => "_oikp_slug" ) ); bw_register_field_for_object_type( "_oikp_slug", "oik-plugins" );
Form displayWhen displayed in the Fields meta box or [bw_new] it appears like this.
bw_fields displayWhen displayed by [bw_fields] it appears like this.
NotesIn this example the #hint option is used to append the some text to the field label when displayed on the form. The text is only localized when required.
- bw_dtt() – Register some text for localization as deferred translatable text
- bw_form_field() – Display a field in a form for the user to enter/choose a value
- bw_theme_field_text() – Theme a field of type ‘text’
- oik-fields – requirements and implementation overview
- oik-fields – Field Types
- oik-fields – Field Attributes
- oik-fields – Implementing a new custom field
- oik-fields – unique features