<?php

if ( ! function_exists( 'cevian_select_get_hide_dep_for_breadcrumbs_title_meta_boxes' ) ) {
	function cevian_select_get_hide_dep_for_breadcrumbs_title_meta_boxes() {
		$hide_dep_options = apply_filters( 'cevian_select_filter_breadcrumbs_title_hide_meta_boxes', $hide_dep_options = array() );
		
		return $hide_dep_options;
	}
}

if ( ! function_exists( 'cevian_select_breadcrumbs_title_type_options_meta_boxes' ) ) {
	function cevian_select_breadcrumbs_title_type_options_meta_boxes( $show_title_area_meta_container ) {
	    $hide_dep_options = cevian_select_get_hide_dep_for_breadcrumbs_title_meta_boxes();
		
		cevian_select_create_meta_box_field(
			array(
				'name'        => 'qodef_breadcrumbs_color_meta',
				'type'        => 'color',
				'label'       => esc_html__( 'Breadcrumbs Color', 'cevian' ),
				'description' => esc_html__( 'Choose a color for breadcrumbs text', 'cevian' ),
				'parent'      => $show_title_area_meta_container,
                'dependency'  => array(
                    'hide' => array(
                        'qodef_title_area_type_meta' => $hide_dep_options
                    )
                )
			)
		);
	}
	
	add_action( 'cevian_select_action_additional_title_area_meta_boxes', 'cevian_select_breadcrumbs_title_type_options_meta_boxes' );
}