Text
Last updated
Was this helpful?
Last updated
Was this helpful?
/**
* @param {string} [label] - Component label.
* @param {string} [help] - Component description.
* @param {string} [type] - Input type: text, email, url, number, date.
* @param {string} metaKey - Registered meta key from register_post_meta().
*/
register_post_meta( 'post_type_name', 'test_text', array(
'type' => 'string',
'default' => '',
'single' => true,
'show_in_rest' => true,
) );
import {
TwebMetaTextControl,
} from '@tigriweb/components/meta';
<TwebMetaTextControl
label={ __('Text Label', 'your-theme-name') }
help={ __('Text Description', 'your-theme-name') }
metaKey="test_text"
/>