Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
add_panel(
'wallox_theme_opt',
array(
'title' => esc_html__( 'Wallox Options', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Theme options panel', 'wallox-addon' ),
'priority' => 220,
'capability' => 'edit_theme_options',
)
);
// General Settings
$wp_customize->add_section( 'wallox_theme_general', array(
'title' => __( 'General Settings', 'wallox-addon' ),
'description' => esc_html__( 'Wallox General Settings.', 'wallox-addon' ),
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Dark Mode?', 'wallox-addon' ),
'wallox_theme_general',
'wallox_dark_mode',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Boxed Mode?', 'wallox-addon' ),
'wallox_theme_general',
'wallox_boxed_mode',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Rtl Mode?', 'wallox-addon' ),
'wallox_theme_general',
'wallox_rtl_mode',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Custom Cursor', 'wallox-addon' ),
'wallox_theme_general',
'custom_cursor',
'yes',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Back to top?', 'wallox-addon' ),
'wallox_theme_general',
'scroll_to_top',
'yes',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Select Back to top text', 'wallox-addon' ),
'wallox_theme_general',
'scroll_to_top_text',
'back to top',
function () {
return ( get_theme_mod( 'scroll_to_top', 'no' ) == 'yes' ? true : false );
}
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Preloader?', 'wallox-addon' ),
'wallox_theme_general',
'preloader',
'yes',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_image(
$wp_customize,
esc_html__( 'Custom Preloader Image', 'wallox-addon' ),
'wallox_theme_general',
'preloader_image',
'',
function () {
return ( get_theme_mod( 'preloader', 'no' ) == 'yes' ? true : false );
}
);
$this->customize_type_image(
$wp_customize,
esc_html__( 'Page Header Image', 'wallox-addon' ),
'wallox_theme_general',
'page_header_bg_image'
);
// Color Settings
$wp_customize->add_section( 'wallox_theme_color', array(
'title' => __( 'Color Settings', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Color Settings.', 'wallox-addon' ),
'priority' => 10,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
wallox_source_color_meta( 'set_customizer', $wp_customize, $this );
// Blog Layout
$wp_customize->add_section( 'wallox_blog_layout_settings', array(
'title' => __( 'Blog Layout', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Blog Layout', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_select(
$wp_customize,
'Select Sidebar position',
'wallox_blog_layout_settings',
'wallox_blog_layout',
'right-align',
array(
'left-align' => esc_html__( 'Left Align', 'wallox-addon' ),
'right-align' => esc_html__( 'Right Align', 'wallox-addon' ),
'full-width' => esc_html__( 'Full Width', 'wallox-addon' ),
)
);
// Shop Layout
$wp_customize->add_section( 'wallox_shop_layout_settings', array(
'title' => __( 'Shop Layout', 'wallox-addon' ),
'description' => esc_html__( 'wallox Shop Layout', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_select(
$wp_customize,
'Select Shop Column',
'wallox_shop_layout_settings',
'wallox_shop_column',
'3',
array(
'2' => esc_html__( '2 Column', 'wallox-addon' ),
'3' => esc_html__( '3 Column', 'wallox-addon' ),
'4' => esc_html__( '4 Column', 'wallox-addon' ),
)
);
$this->customize_type_select(
$wp_customize,
'Select Shop Sidebar position',
'wallox_shop_layout_settings',
'wallox_shop_layout',
'left-align',
array(
'left-align' => esc_html__( 'Left Align', 'wallox-addon' ),
'right-align' => esc_html__( 'Right Align', 'wallox-addon' ),
'full-width' => esc_html__( 'Full Width', 'wallox-addon' ),
)
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Shop Product Per page', 'wallox-addon' ),
'wallox_shop_layout_settings',
'product_per_page',
esc_html( 12 )
);
// Header options
$wp_customize->add_section( 'wallox_theme_header', array(
'title' => __( 'Header Settings', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Header Settings', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_text(
$wp_customize,
esc_html__( 'Add Logo size in px', 'wallox-addon' ),
'wallox_theme_header',
'header_logo_width',
esc_html( 198 )
);
$this->customize_type_radio(
$wp_customize,
esc_html__( 'Enable Sticky Header?', 'wallox-addon' ),
'wallox_theme_header',
'header_sticky_menu',
'yes',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( ' Enable Breadcrumb?', 'wallox-addon' ),
'wallox_theme_header',
'breadcrumb_opt',
'yes',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_radio(
$wp_customize,
esc_html__( 'Enable Custom Header?', 'wallox-addon' ),
'wallox_theme_header',
'header_custom',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_select(
$wp_customize,
esc_html__( 'Select Header Type', 'wallox-addon' ),
'wallox_theme_header',
'header_custom_post',
'',
wallox_post_query( 'header' ),
function () {
return ( get_theme_mod( 'header_custom', 'no' ) == 'yes' ? true : false );
}
);
// Mobile Menu
$wp_customize->add_section( 'wallox_theme_mobile_menu', array(
'title' => esc_html__( 'Mobile Menu Settings', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Header Settings', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_text(
$wp_customize,
esc_html__( 'Mobile Menu Email', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'wallox_mobile_menu_email',
esc_html__( 'needhelp@wallox.com', 'wallox-addon' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Mobile Menu Phone', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'wallox_mobile_menu_phone',
esc_html__( '666 888 0000', 'wallox-addon' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Facebook url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'facebook_url',
esc_html( '#' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Twitter url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'twitter_url',
esc_html( '#' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Linkedin url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'linkedin_url',
esc_html( '#' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Pinterest url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'pinterest_url',
esc_html( '#' )
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Youtube url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'youtube_url',
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'dribbble url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'dribble_url',
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Instagram url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'instagram_url',
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Reddit url', 'wallox-addon' ),
'wallox_theme_mobile_menu',
'reddit_url',
);
// Footer options
$wp_customize->add_section( 'wallox_theme_footer', array(
'title' => esc_html__( 'Footer Settings', 'wallox-addon' ),
'description' => esc_html__( 'Wallox Footer Settings.', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_text(
$wp_customize,
esc_html__( 'Footer Text', 'wallox-addon' ),
'wallox_theme_footer',
'footer_copytext',
esc_html__( '© All right reserved', 'wallox' ),
function () {
return ( get_theme_mod( 'footer_custom', 'no' ) == 'yes' ? false : true );
}
);
$this->customize_type_radio(
$wp_customize,
esc_html__( 'Enable Custom Footer ?', 'wallox-addon' ),
'wallox_theme_footer',
'footer_custom',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_select(
$wp_customize,
esc_html__( 'Select Footer Type', 'wallox-addon' ),
'wallox_theme_footer',
'footer_custom_post',
'',
wallox_post_query( 'footer' ),
function () {
return ( get_theme_mod( 'footer_custom', 'no' ) == 'yes' ? true : false );
}
);
// register
$wp_customize->add_section( 'wallox_login_settings', array(
'title' => __( 'Login/Register Settings', 'wallox-addon' ),
'description' => esc_html__( 'Login/Register Settings', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_text(
$wp_customize,
esc_html__( 'Redirect url After Login', 'wallox-addon' ),
'wallox_login_settings',
'login_redirect_url',
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Redirect url After Registration', 'wallox-addon' ),
'wallox_login_settings',
'registration_redirect_url',
);
$this->customize_type_text(
$wp_customize,
esc_html__( 'Redirect url After Log Out', 'wallox-addon' ),
'wallox_login_settings',
'logout_redirect_url',
);
// error page
$wp_customize->add_section( 'wallox_error_page_settings', array(
'title' => __( '404 Settings', 'wallox-addon' ),
'description' => esc_html__( 'Change 404 Text', 'wallox-addon' ),
'priority' => 20,
'capability' => 'edit_theme_options',
'panel' => 'wallox_theme_opt'
) );
$this->customize_type_radio(
$wp_customize,
esc_html__( 'Enable Custom 404 ?', 'wallox-addon' ),
'wallox_error_page_settings',
'error_custom',
'no',
array(
'yes' => esc_html__( 'Yes', 'wallox-addon' ),
'no' => esc_html__( 'No', 'wallox-addon' ),
)
);
$this->customize_type_select(
$wp_customize,
esc_html__( 'Select 404 Page', 'wallox-addon' ),
'wallox_error_page_settings',
'error_custom_post',
'',
wallox_post_query( 'page' ),
function () {
return ( get_theme_mod( 'error_custom', 'no' ) == 'yes' ? true : false );
}
);
$this->customize_type_image(
$wp_customize,
esc_html__( '404 Page Title Image', 'wallox-addon' ),
'wallox_error_page_settings',
'404_page_title_image'
);
$this->customize_type_image(
$wp_customize,
esc_html__( 'Shape One Image', 'wallox-addon' ),
'wallox_error_page_settings',
'404_shape_one_image'
);
$this->customize_type_image(
$wp_customize,
esc_html__( 'Shape Two Image', 'wallox-addon' ),
'wallox_error_page_settings',
'404_shape_two_image'
);
$this->customize_type_image(
$wp_customize,
esc_html__( 'Shape Three Image', 'wallox-addon' ),
'wallox_error_page_settings',
'404_shape_three_image'
);
}
//type text
public function customize_type_text( $wp_customize, $label, $section_id, $name, $default = "", $callback = null ) {
// add settings
$wp_customize->add_setting( $name, array(
'default' => $default,
'type' => 'theme_mod'
) );
$wp_customize->add_control( new \WP_Customize_Control(
$wp_customize,
$name,
array(
"label" => $label,
"section" => $section_id,
"settings" => $name,
"type" => "text",
"active_callback" => $callback,
)
) );
}
//type color
//type color
public function customize_type_color( $wp_customize, $section_id, $name, $default = false ) {
$prefix_name = str_replace( "-", "_", $name );
// add settings
$wp_customize->add_setting( $prefix_name, array(
'default' => sanitize_hex_color( $default ),
'type' => 'theme_mod'
) );
// Add control
$wp_customize->add_control( new \WP_Customize_Color_Control( $wp_customize, $prefix_name, array(
'label' => ucwords( str_replace( "-", " ", $name ) ),
'section' => $section_id,
'setting' => $prefix_name,
'priority' => 1
) ) );
}
// type checkbox
public function customize_type_checkbox( $wp_customize, $label, $section_id, $name, $default, $callback = null ) {
$wp_customize->add_setting( $name, array(
"default" => $default,
"transport" => "refresh",
) );
$wp_customize->add_control( new \WP_Customize_Control(
$wp_customize,
$name,
array(
"label" => $label,
"section" => $section_id,
"settings" => $name,
"type" => "checkbox",
"active_callback" => $callback,
)
) );
}
// type Image
public function customize_type_image( $wp_customize, $label, $section_id, $name, $default = '', $callback = null ) {
$wp_customize->add_setting( $name, array(
"default" => $default,
"transport" => "refresh",
) );
$wp_customize->add_control( new \WP_Customize_Upload_Control( $wp_customize, $name, array(
'label' => $label,
'section' => $section_id,
'setting' => $name,
'priority' => 20,
"active_callback" => $callback,
) ) );
}
public function customize_type_select( $wp_customize, $label, $section_id, $name, $default, $select_value, $callback = null ) {
$wp_customize->add_setting( $name, array(
'default' => $default,
"transport" => "refresh",
) );
$wp_customize->add_control( new \WP_Customize_Control(
$wp_customize,
$name,
array(
"label" => $label,
"section" => $section_id,
"settings" => $name,
"type" => "select",
'choices' => $select_value,
"active_callback" => $callback,
)
) );
}
public function customize_type_radio( $wp_customize, $label, $section_id, $name, $default, $radio_value, $callback = null ) {
$wp_customize->add_setting( $name, array(
'default' => $default,
"transport" => "refresh",
) );
$wp_customize->add_control( new \WP_Customize_Control(
$wp_customize,
$name,
array(
"label" => $label,
"section" => $section_id,
"settings" => $name,
"type" => "radio",
'choices' => $radio_value,
"active_callback" => $callback,
)
) );
}
}