cmb2-conditionals icon indicating copy to clipboard operation
cmb2-conditionals copied to clipboard

Not working on theme options page

Open applesapples1 opened this issue 6 years ago • 2 comments

applesapples1 avatar Mar 16 '18 22:03 applesapples1

Conditional plugin is not working on theme options.

$cookie_options = new_cmb2_box( array( 'id' => $prefix . 'metabox', 'title' => esc_html__( 'Cookie Notice', 'microlise' ), 'object_types' => array( 'options-page' ), 'option_key' => 'microlise_cookies', 'menu_title' => esc_html__( 'Cookie Notice', 'microlise' ), 'parent_slug' => 'settings.php', 'admin_menu_hook' => 'network_admin_menu', 'save_button' => esc_html__( 'Save Changes', 'microlise' ), ) );

$cookie_options->add_field( array(
	'name' => __( 'More Info Link', 'microlise' ),
	'desc' => __( 'Enable Read more link.', 'microlise' ),
	'id'   => $prefix . 'more',
	'type' => 'checkbox',
) );

$cookie_options->add_field( array(
	'name' => __( ' ', 'microlise' ),
	'desc' => __( 'The text of the more info button.', 'microlise' ),
	'id'   => $prefix . 'more_text',
	'type' => 'text',
	'attributes' => array(
		'data-conditional-id' => $prefix . 'more',
		'data-conditional-value' => 'on',
	),
) );

moizsahil avatar May 08 '18 10:05 moizsahil

Answer here: #57

pogla avatar Jul 10 '18 11:07 pogla