When the value is set, it displays properly. But when I delete the value, std value doesn't work as expected. Please help.
/**
* Register Settings Pages
*/
add_filter( 'mb_settings_pages', 'prefix_options_pages' );
function prefix_options_pages( $settings_pages ) {
$settings_pages[] = array(
'id' => 'my-options',
'option_name' => 'my_options',
'menu_title' => __( 'Theme Options', 'textdomain' ),
'submenu_title' => __( 'General', 'textdomain' ),
);
}
/**
* Register Fields
*/
add_filter( 'rwmb_meta_boxes', 'prefix_options_meta_boxes' );
function prefix_options_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array(
'id' => 'general', // Metabox ID
'title' => __( 'General', 'textdomain' ), // Metabox Title
'settings_pages' => 'my-options', // Settings Page ID
'fields' => array(
array(
'id' => 'test', // Field ID
'name' => __( 'Test', 'liberstart' ), // Field Name
'type' => 'text', // Field Type
'clone' => false,
'std' => array( 'std test' ),
),
),
);
}