Submit
Path:
~
/
home
/
getwphos
/
www
/
almajd14
/
wp-content
/
plugins
/
halstein-core
/
inc
/
header
/
dashboard
/
meta-box
/
File Content:
logo-meta-box.php
<?php if ( ! function_exists( 'halstein_core_add_page_logo_meta_box' ) ) { /** * Function that add general meta box options for this module * * @param object $page */ function halstein_core_add_page_logo_meta_box( $page ) { if ( $page ) { $logo_tab = $page->add_tab_element( array( 'name' => 'tab-logo', 'icon' => 'fa fa-cog', 'title' => esc_html__( 'Logo Settings', 'halstein-core' ), 'description' => esc_html__( 'Logo settings', 'halstein-core' ), ) ); $header_logo_section = $logo_tab->add_section_element( array( 'name' => 'qodef_header_logo_section', 'title' => esc_html__( 'Header Logo Options', 'halstein-core' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_height', 'title' => esc_html__( 'Logo Height', 'halstein-core' ), 'description' => esc_html__( 'Enter logo height', 'halstein-core' ), 'args' => array( 'suffix' => esc_html__( 'px', 'halstein-core' ), ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_enable_independent_height', 'title' => esc_html__( 'Enable Logo Independent Height', 'halstein-core' ), 'description' => esc_html__( 'Enabling this option will make Logo have independant height regardless of the holder height', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'no_yes' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_enable_height_for_sticky', 'title' => esc_html__( 'Enable Logo Height For Sticky Header', 'halstein-core' ), 'description' => esc_html__( 'Enabling this option will apply logo height value to the sticky header logo', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'no_yes' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_padding', 'title' => esc_html__( 'Logo Padding', 'halstein-core' ), 'description' => esc_html__( 'Enter logo padding value (top right bottom left)', 'halstein-core' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_responsive_padding', 'title' => esc_html__( 'Logo Responsive Padding', 'halstein-core' ), 'description' => esc_html__( 'Enter logo padding value (top right bottom left) for screens under 1440', 'halstein-core' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_enable_padding_for_sticky', 'title' => esc_html__( 'Enable Logo Padding For Sticky Header', 'halstein-core' ), 'description' => esc_html__( 'Enabling this option will apply logo padding values to the sticky header logo', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'no_yes' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_logo_background_color', 'title' => esc_html__( 'Logo Background Color', 'halstein-core' ), 'description' => esc_html__( 'Choose logo background color)', 'halstein-core' ), ) ); $header_logo_section->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_source', 'title' => esc_html__( 'Logo Source', 'halstein-core' ), 'options' => array( '' => esc_html__( 'Default', 'halstein-core' ), 'image' => esc_html__( 'Image', 'halstein-core' ), 'svg-path' => esc_html__( 'SVG Path', 'halstein-core' ), 'textual' => esc_html__( 'Textual', 'halstein-core' ), ), 'default_value' => '', ) ); $logo_image_section = $header_logo_section->add_section_element( array( 'title' => esc_html__( 'Image settings', 'halstein-core' ), 'name' => 'qodef_logo_image_section', 'dependency' => array( 'show' => array( 'qodef_logo_source' => array( 'values' => 'image', 'default_value' => '', ), ), ), ) ); $logo_image_section->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_logo_main', 'title' => esc_html__( 'Logo - Main', 'halstein-core' ), 'description' => esc_html__( 'Choose main logo image', 'halstein-core' ), 'multiple' => 'no', ) ); $logo_image_section->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_logo_dark', 'title' => esc_html__( 'Logo - Dark', 'halstein-core' ), 'description' => esc_html__( 'Choose dark logo image', 'halstein-core' ), 'multiple' => 'no', ) ); $logo_image_section->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_logo_light', 'title' => esc_html__( 'Logo - Light', 'halstein-core' ), 'description' => esc_html__( 'Choose light logo image', 'halstein-core' ), 'multiple' => 'no', ) ); // Hook to include additional options after section part do_action( 'halstein_core_action_after_header_logo_image_section_meta_map', $logo_tab, $header_logo_section, $logo_image_section ); $logo_svg_path_section = $header_logo_section->add_section_element( array( 'title' => esc_html__( 'SVG settings', 'halstein-core' ), 'name' => 'qodef_logo_svg_path_section', 'dependency' => array( 'show' => array( 'qodef_logo_source' => array( 'values' => 'svg-path', 'default_value' => '', ), ), ), ) ); $logo_svg_path_section->add_field_element( array( 'field_type' => 'textarea', 'name' => 'qodef_logo_svg_path', 'title' => esc_html__( 'Logo SVG Path', 'halstein-core' ), 'description' => esc_html__( 'Enter your logo icon SVG path here. Please remove version and id attributes from your SVG path because of HTML validation', 'halstein-core' ), ) ); // Hook to include additional options before section part do_action( 'halstein_core_action_before_header_logo_svg_path_section_meta_map', $logo_tab, $header_logo_section, $logo_svg_path_section ); $logo_svg_path_section_row = $logo_svg_path_section->add_row_element( array( 'name' => 'qodef_logo_svg_path_section_row', 'title' => esc_html__( 'SVG Styles', 'halstein-core' ), ) ); $logo_svg_path_section_row->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_logo_svg_path_color', 'title' => esc_html__( 'Color', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_svg_path_section_row->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_logo_svg_path_hover_color', 'title' => esc_html__( 'Hover Color', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_svg_path_section_row->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_svg_path_size', 'title' => esc_html__( 'SVG Icon Size', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); // Hook to include additional options after section part do_action( 'halstein_core_action_after_header_logo_svg_path_section_meta_map', $logo_tab, $header_logo_section, $logo_svg_path_section ); $logo_textual_section = $header_logo_section->add_section_element( array( 'title' => esc_html__( 'Textual settings', 'halstein-core' ), 'name' => 'qodef_logo_textual_section', 'dependency' => array( 'show' => array( 'qodef_logo_source' => array( 'values' => 'textual', 'default_value' => '', ), ), ), ) ); $logo_textual_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_text', 'title' => esc_html__( 'Logo Text', 'halstein-core' ), 'description' => esc_html__( 'Fill your text to be as Logo image', 'halstein-core' ), ) ); // Hook to include additional options before section part do_action( 'halstein_core_action_before_header_logo_textual_section_meta_map', $logo_tab, $header_logo_section, $logo_textual_section ); $logo_textual_section_row = $logo_textual_section->add_row_element( array( 'name' => 'qodef_logo_textual_section_row', 'title' => esc_html__( 'Typography Styles', 'halstein-core' ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_logo_text_color', 'title' => esc_html__( 'Color', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_logo_text_hover_color', 'title' => esc_html__( 'Hover Color', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'font', 'name' => 'qodef_logo_text_font_family', 'title' => esc_html__( 'Font Family', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_text_font_size', 'title' => esc_html__( 'Font Size', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_text_line_height', 'title' => esc_html__( 'Line Height', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_logo_text_letter_spacing', 'title' => esc_html__( 'Letter Spacing', 'halstein-core' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_text_font_weight', 'title' => esc_html__( 'Font Weight', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'font_weight' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_text_text_transform', 'title' => esc_html__( 'Text Transform', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'text_transform' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_text_font_style', 'title' => esc_html__( 'Font Style', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'font_style' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_text_text_decoration', 'title' => esc_html__( 'Text Decoration', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'text_decoration' ), 'args' => array( 'col_width' => 3, ), ) ); $logo_textual_section_row->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_logo_text_hover_text_decoration', 'title' => esc_html__( 'Hover Text Decoration', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'text_decoration' ), 'args' => array( 'col_width' => 3, ), ) ); // Hook to include additional options after section part do_action( 'halstein_core_action_after_header_logo_textual_section_meta_map', $logo_tab, $header_logo_section, $logo_textual_section ); // Hook to include additional options after module options do_action( 'halstein_core_action_after_page_logo_meta_map', $logo_tab, $header_logo_section ); } } add_action( 'halstein_core_action_after_general_meta_box_map', 'halstein_core_add_page_logo_meta_box' ); } if ( ! function_exists( 'halstein_core_add_general_logo_meta_box_callback' ) ) { /** * Function that set current meta box callback as general callback functions * * @param array $callbacks * * @return array */ function halstein_core_add_general_logo_meta_box_callback( $callbacks ) { $callbacks['logo'] = 'halstein_core_add_page_logo_meta_box'; return $callbacks; } add_filter( 'halstein_core_filter_general_meta_box_callbacks', 'halstein_core_add_general_logo_meta_box_callback' ); }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
header-meta-box.php
4686 bytes
0644
logo-meta-box.php
13460 bytes
0644
N4ST4R_ID | Naxtarrr