?AlkantarClanX12
| Current Path : /home/rankinh/villavanille/wp-content/plugins/drew-core/inc/title/dashboard/admin/ |
| Current File : /home/rankinh/villavanille/wp-content/plugins/drew-core/inc/title/dashboard/admin/title-options.php |
<?php
if ( ! function_exists( 'drew_core_add_page_title_options' ) ) {
/**
* Function that add general options for this module
*/
function drew_core_add_page_title_options() {
$qode_framework = qode_framework_get_framework_root();
$page = $qode_framework->add_options_page(
array(
'scope' => DREW_CORE_OPTIONS_NAME,
'type' => 'admin',
'slug' => 'title',
'icon' => 'fa fa-cog',
'title' => esc_html__( 'Title', 'drew-core' ),
'description' => esc_html__( 'Global Title Options', 'drew-core' ),
)
);
if ( $page ) {
$page->add_field_element(
array(
'field_type' => 'yesno',
'name' => 'qodef_enable_page_title',
'title' => esc_html__( 'Enable Page Title', 'drew-core' ),
'description' => esc_html__( 'Use this option to enable/disable page title', 'drew-core' ),
'default_value' => 'yes',
)
);
$page_title_section = $page->add_section_element(
array(
'name' => 'qodef_page_title_section',
'title' => esc_html__( 'Title Area', 'drew-core' ),
'dependency' => array(
'hide' => array(
'qodef_enable_page_title' => array(
'values' => 'no',
'default_value' => '',
),
),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'select',
'name' => 'qodef_title_layout',
'title' => esc_html__( 'Title Layout', 'drew-core' ),
'description' => esc_html__( 'Choose a title layout', 'drew-core' ),
'options' => apply_filters( 'drew_core_filter_title_layout_options', array() ),
'default_value' => 'standard',
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'yesno',
'name' => 'qodef_set_page_title_area_in_grid',
'title' => esc_html__( 'Page Title In Grid', 'drew-core' ),
'description' => esc_html__( 'Enabling this option will set page title area to be in grid', 'drew-core' ),
'default_value' => 'yes',
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'text',
'name' => 'qodef_page_title_height',
'title' => esc_html__( 'Height', 'drew-core' ),
'description' => esc_html__( 'Enter title height', 'drew-core' ),
'args' => array(
'suffix' => esc_html__( 'px', 'drew-core' ),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'text',
'name' => 'qodef_page_title_height_on_smaller_screens',
'title' => esc_html__( 'Height on Smaller Screens', 'drew-core' ),
'description' => esc_html__( 'Enter title height to be displayed on smaller screens with active mobile header', 'drew-core' ),
'args' => array(
'suffix' => esc_html__( 'px', 'drew-core' ),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'color',
'name' => 'qodef_page_title_background_color',
'title' => esc_html__( 'Background Color', 'drew-core' ),
'description' => esc_html__( 'Enter page title area background color', 'drew-core' ),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'image',
'name' => 'qodef_page_title_background_image',
'title' => esc_html__( 'Background Image', 'drew-core' ),
'description' => esc_html__( 'Enter page title area background image', 'drew-core' ),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'select',
'name' => 'qodef_page_title_background_image_behavior',
'title' => esc_html__( 'Background Image Behavior', 'drew-core' ),
'options' => array(
'' => esc_html__( 'Default', 'drew-core' ),
'responsive' => esc_html__( 'Set Responsive Image', 'drew-core' ),
'parallax' => esc_html__( 'Set Parallax Image', 'drew-core' ),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'image',
'name' => 'qodef_page_title_decoration_image',
'title' => esc_html__( 'Decoration Image', 'drew-core' ),
'description' => esc_html__( 'Enter page title area decoration image', 'drew-core' ),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'text',
'name' => 'qodef_page_title_decoration_image_bottom_offset',
'title' => esc_html__( 'Decoration Image Bottom Offset', 'drew-core' ),
'description' => esc_html__( 'Enter bottom edge offset for decoration image location', 'drew-core' ),
'args' => array(
'suffix' => esc_html__( 'px or %', 'drew-core' ),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'text',
'name' => 'qodef_page_title_decoration_image_right_offset',
'title' => esc_html__( 'Decoration Image Right Offset', 'drew-core' ),
'description' => esc_html__( 'Enter right edge offset for decoration image location', 'drew-core' ),
'args' => array(
'suffix' => esc_html__( 'px or %', 'drew-core' ),
),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'color',
'name' => 'qodef_page_title_color',
'title' => esc_html__( 'Title Color', 'drew-core' ),
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'select',
'name' => 'qodef_page_title_tag',
'title' => esc_html__( 'Title Tag', 'drew-core' ),
'description' => esc_html__( 'Enabling this option will set title tag', 'drew-core' ),
'options' => drew_core_get_select_type_options_pool( 'title_tag', false, array(), array( 'div' => esc_attr__( 'Custom', 'drew-core' ) ) ),
'default_value' => 'div',
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'select',
'name' => 'qodef_page_title_text_alignment',
'title' => esc_html__( 'Text Alignment', 'drew-core' ),
'options' => array(
'left' => esc_html__( 'Left', 'drew-core' ),
'center' => esc_html__( 'Center', 'drew-core' ),
'right' => esc_html__( 'Right', 'drew-core' ),
),
'default_value' => 'left',
)
);
$page_title_section->add_field_element(
array(
'field_type' => 'select',
'name' => 'qodef_page_title_vertical_text_alignment',
'title' => esc_html__( 'Vertical Text Alignment', 'drew-core' ),
'options' => array(
'header-bottom' => esc_html__( 'From Bottom of Header', 'drew-core' ),
'window-top' => esc_html__( 'From Window Top', 'drew-core' ),
),
'default_value' => 'header-bottom',
)
);
// Hook to include additional options after module options
do_action( 'drew_core_action_after_page_title_options_map', $page_title_section );
}
}
add_action( 'drew_core_action_default_options_init', 'drew_core_add_page_title_options', drew_core_get_admin_options_map_position( 'title' ) );
}