Submit
Path:
~
/
home
/
getwphos
/
www
/
almajd14
/
wp-content
/
plugins
/
halstein-core
/
inc
/
general
/
dashboard
/
meta-box
/
File Content:
page-meta-box.php
<?php if ( ! function_exists( 'halstein_core_add_general_page_meta_box' ) ) { /** * Function that add general meta box options for this module * * @param object $page */ function halstein_core_add_general_page_meta_box( $page ) { $general_tab = $page->add_tab_element( array( 'name' => 'tab-page', 'icon' => 'fa fa-cog', 'title' => esc_html__( 'Page Settings', 'halstein-core' ), 'description' => esc_html__( 'General page layout settings', 'halstein-core' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_page_background_color', 'title' => esc_html__( 'Page Background Color', 'halstein-core' ), 'description' => esc_html__( 'Set background color', 'halstein-core' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_page_background_image', 'title' => esc_html__( 'Page Background Image', 'halstein-core' ), 'description' => esc_html__( 'Set background image', 'halstein-core' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_page_background_repeat', 'title' => esc_html__( 'Page Background Image Repeat', 'halstein-core' ), 'description' => esc_html__( 'Set background image repeat', 'halstein-core' ), 'options' => array( '' => esc_html__( 'Default', 'halstein-core' ), 'no-repeat' => esc_html__( 'No Repeat', 'halstein-core' ), 'repeat' => esc_html__( 'Repeat', 'halstein-core' ), 'repeat-x' => esc_html__( 'Repeat-x', 'halstein-core' ), 'repeat-y' => esc_html__( 'Repeat-y', 'halstein-core' ), ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_page_background_size', 'title' => esc_html__( 'Page Background Image Size', 'halstein-core' ), 'description' => esc_html__( 'Set background image size', 'halstein-core' ), 'options' => array( '' => esc_html__( 'Default', 'halstein-core' ), 'contain' => esc_html__( 'Contain', 'halstein-core' ), 'cover' => esc_html__( 'Cover', 'halstein-core' ), ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_page_background_attachment', 'title' => esc_html__( 'Page Background Image Attachment', 'halstein-core' ), 'description' => esc_html__( 'Set background image attachment', 'halstein-core' ), 'options' => array( '' => esc_html__( 'Default', 'halstein-core' ), 'fixed' => esc_html__( 'Fixed', 'halstein-core' ), 'scroll' => esc_html__( 'Scroll', 'halstein-core' ), ), ) ); $general_tab->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_page_content_padding', 'title' => esc_html__( 'Page Content Padding', 'halstein-core' ), 'description' => esc_html__( 'Set padding that will be applied for page content in format: top right bottom left (e.g. 10px 5px 10px 5px)', 'halstein-core' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_page_content_padding_mobile', 'title' => esc_html__( 'Page Content Padding Mobile', 'halstein-core' ), 'description' => esc_html__( 'Set padding that will be applied for page content on mobile screens (1024px and below) in format: top right bottom left (e.g. 10px 5px 10px 5px)', 'halstein-core' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_boxed', 'title' => esc_html__( 'Boxed Layout', 'halstein-core' ), 'description' => esc_html__( 'Set boxed layout', 'halstein-core' ), 'default_value' => '', 'options' => halstein_core_get_select_type_options_pool( 'yes_no' ), ) ); $boxed_section = $general_tab->add_section_element( array( 'name' => 'qodef_boxed_section', 'title' => esc_html__( 'Boxed Layout Section', 'halstein-core' ), 'dependency' => array( 'hide' => array( 'qodef_boxed' => array( 'values' => 'no', 'default_value' => '', ), ), ), ) ); $boxed_section->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_boxed_background_color', 'title' => esc_html__( 'Boxed Background Color', 'halstein-core' ), 'description' => esc_html__( 'Set boxed background color', 'halstein-core' ), ) ); $boxed_section->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_boxed_background_pattern', 'title' => esc_html__( 'Boxed Background Pattern', 'halstein-core' ), 'description' => esc_html__( 'Set boxed background pattern', 'halstein-core' ), ) ); $boxed_section->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_boxed_background_pattern_behavior', 'title' => esc_html__( 'Boxed Background Pattern Behavior', 'halstein-core' ), 'description' => esc_html__( 'Set boxed background pattern behavior', 'halstein-core' ), 'options' => array( '' => esc_html__( 'Default', 'halstein-core' ), 'fixed' => esc_html__( 'Fixed', 'halstein-core' ), 'scroll' => esc_html__( 'Scroll', 'halstein-core' ), ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_passepartout', 'title' => esc_html__( 'Passepartout', 'halstein-core' ), 'description' => esc_html__( 'Enabling this option will display a passepartout around website content', 'halstein-core' ), 'default_value' => '', 'options' => halstein_core_get_select_type_options_pool( 'yes_no' ), ) ); $passepartout_section = $general_tab->add_section_element( array( 'name' => 'qodef_passepartout_section', 'dependency' => array( 'hide' => array( 'qodef_passepartout' => array( 'values' => 'no', 'default_value' => '', ), ), ), ) ); $passepartout_section->add_field_element( array( 'field_type' => 'color', 'name' => 'qodef_passepartout_color', 'title' => esc_html__( 'Passepartout Color', 'halstein-core' ), 'description' => esc_html__( 'Choose background color for passepartout', 'halstein-core' ), ) ); $passepartout_section->add_field_element( array( 'field_type' => 'image', 'name' => 'qodef_passepartout_image', 'title' => esc_html__( 'Passepartout Background Image', 'halstein-core' ), 'description' => esc_html__( 'Set background image for passepartout', 'halstein-core' ), ) ); $passepartout_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_passepartout_size', 'title' => esc_html__( 'Passepartout Size', 'halstein-core' ), 'description' => esc_html__( 'Enter size amount for passepartout', 'halstein-core' ), 'args' => array( 'suffix' => esc_html__( 'px or %', 'halstein-core' ), ), ) ); $passepartout_section->add_field_element( array( 'field_type' => 'text', 'name' => 'qodef_passepartout_size_responsive', 'title' => esc_html__( 'Passepartout Responsive Size', 'halstein-core' ), 'description' => esc_html__( 'Enter size amount for passepartout for smaller screens (1024px and below)', 'halstein-core' ), 'args' => array( 'suffix' => esc_html__( 'px or %', 'halstein-core' ), ), ) ); $general_tab->add_field_element( array( 'field_type' => 'select', 'name' => 'qodef_content_width', 'title' => esc_html__( 'Initial Width of Content', 'halstein-core' ), 'description' => esc_html__( 'Choose the initial width of content which is in grid (applies to pages set to "Default Template" and rows set to "In Grid")', 'halstein-core' ), 'options' => halstein_core_get_select_type_options_pool( 'content_width' ), ) ); $general_tab->add_field_element( array( 'field_type' => 'yesno', 'default_value' => 'no', 'name' => 'qodef_content_behind_header', 'title' => esc_html__( 'Always put content behind header', 'halstein-core' ), 'description' => esc_html__( 'Enabling this option will put page content behind page header', 'halstein-core' ), ) ); // Hook to include additional options after module options do_action( 'halstein_core_action_after_general_page_meta_box_map', $general_tab ); } add_action( 'halstein_core_action_after_general_meta_box_map', 'halstein_core_add_general_page_meta_box', 9 ); } if ( ! function_exists( 'halstein_core_add_general_page_meta_box_callback' ) ) { /** * Function that set current meta box callback as general callback functions * * @param array $callbacks * * @return array */ function halstein_core_add_general_page_meta_box_callback( $callbacks ) { $callbacks['page'] = 'halstein_core_add_general_page_meta_box'; return $callbacks; } add_filter( 'halstein_core_filter_general_meta_box_callbacks', 'halstein_core_add_general_page_meta_box_callback' ); }
Submit
FILE
FOLDER
Name
Size
Permission
Action
general-meta-box.php
826 bytes
0644
page-meta-box.php
9358 bytes
0644
N4ST4R_ID | Naxtarrr