<?php

if ( ! function_exists( 'ginevra_core_add_page_custom_cursor_meta_box' ) ) {
	/**
	 * Function that add general options for this module
	 */
	function ginevra_core_add_page_custom_cursor_meta_box( $general_tab ) {
		
		if ( $general_tab ) {
            $general_tab->add_field_element(
				array(
					'field_type'  => 'select',
					'name'        => 'qodef_custom_cursor',
                    'title'       => esc_html__( 'Enable Custom View Cursor', 'ginevra-core' ),
                    'description' => esc_html__( 'Option which allows you to show View cursor on custom shortcodes where is feature available', 'ginevra-core' ),
					'options'     => ginevra_core_get_select_type_options_pool( 'yes_no' )
				)
			);
            $general_tab->add_field_element(
                array(
                    'field_type'  => 'color',
                    'name'        => 'qodef_custom_cursor_color',
                    'title'       => esc_html__( 'Custom View Cursor Color', 'ginevra-core' ),
                    'description' => esc_html__( 'Set custom cursor color', 'ginevra-core' ),
                    'dependency'    => array(
                        'show' => array(
                            'qodef_custom_cursor' => array(
                                'values'        => 'yes',
                                'default_value' => ''
                            )
                        )
                    )
                )
            );
		}
	}
	
	add_action( 'ginevra_core_action_after_general_page_meta_box_map', 'ginevra_core_add_page_custom_cursor_meta_box' );
}