403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.148.221.78
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/themes/open-shop/customizer/section/woo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/themes/open-shop/customizer/section/woo/single-product.php
<?php
/**
 * Register WooCommerce Single Product Page
 */

if ( ! class_exists( 'WooCommerce' ) ){
    return;
}

/******************************/
// Up Sell Product
/******************************/
$wp_customize->add_setting('open_shop_single_upsell_product_divide', array(
        'sanitize_callback' => 'open_shop_sanitize_text',
    ));
$wp_customize->add_control( new Open_Shop_Misc_Control( $wp_customize, 'open_shop_single_upsell_product_divide',
            array(
        'section'     => 'open-shop-woo-single-product',
        'type'        => 'custom_message',
        'description' => __('Up Sell Product','open-shop' ),
)));
// display upsell
$wp_customize->add_setting('open_shop_upsell_product_display', array(
                'default'               => true,
                'sanitize_callback'     => 'open_shop_sanitize_checkbox',
            ) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize,'open_shop_upsell_product_display', array(
                'label'         => __('Display up sell product', 'open-shop'),
                'type'          => 'checkbox',
                'section'       => 'open-shop-woo-single-product',
                'settings'      => 'open_shop_upsell_product_display',
            ) ) );
// up sell product column
if ( class_exists( 'Open_Shop_WP_Customizer_Range_Value_Control' ) ){
$wp_customize->add_setting(
            'open_shop_upsale_num_col_shw', array(
                'sanitize_callback' => 'open_shop_sanitize_range_value',
                'default' => '4',  
            )
        );
$wp_customize->add_control(
            new Open_Shop_WP_Customizer_Range_Value_Control(
                $wp_customize, 'open_shop_upsale_num_col_shw', array(
                    'label'       => __( 'Number Of Column To Show', 'open-shop' ),
                    'section'     => 'open-shop-woo-single-product',
                    'type'        => 'range-value',
                    'input_attr'  => array(
                        'min'  => 1,
                        'max'  => 6,
                        'step' => 1,
                    ),
                    
                )
        )
);
// no.of product to show
$wp_customize->add_setting(
            'open_shop_upsale_num_product_shw', array(
                'sanitize_callback' => 'open_shop_sanitize_range_value',
                'default' => '4',
                
                
            )
        );
$wp_customize->add_control(
            new Open_Shop_WP_Customizer_Range_Value_Control(
                $wp_customize, 'open_shop_upsale_num_product_shw', array(
                    'label'       => __( 'Number Of Product To Show', 'open-shop' ),
                    'section'     => 'open-shop-woo-single-product',
                    'type'        => 'range-value',
                    'input_attr'  => array(
                        'min'  => 1,
                        'max'  => 100,
                        'step' => 1,
                    ),
                    
                )
        )
);
}
/******************************/
// Related Product
/******************************/
$wp_customize->add_setting('open_shop_single_related_product_divide', array(
        'sanitize_callback' => 'open_shop_sanitize_text',
    ));
$wp_customize->add_control( new Open_Shop_Misc_Control( $wp_customize, 'open_shop_single_related_product_divide',
            array(
        'section'     => 'open-shop-woo-single-product',
        'type'        => 'custom_message',
        'description' => __('Related Product','open-shop' ),
)));
// display upsell
$wp_customize->add_setting('open_shop_related_product_display', array(
                'default'               => true,
                'sanitize_callback'     => 'open_shop_sanitize_checkbox',
            ) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize,'open_shop_related_product_display', array(
                'label'         => __('Display Related product', 'open-shop'),
                'type'          => 'checkbox',
                'section'       => 'open-shop-woo-single-product',
                'settings'      => 'open_shop_related_product_display',
            ) ) );
// up sell product column
if ( class_exists( 'Open_Shop_WP_Customizer_Range_Value_Control' ) ){
$wp_customize->add_setting(
            'open_shop_related_num_col_shw', array(
                'sanitize_callback' => 'open_shop_sanitize_range_value',
                'default' => '4',
                
                
            )
        );
$wp_customize->add_control(
            new Open_Shop_WP_Customizer_Range_Value_Control(
                $wp_customize, 'open_shop_related_num_col_shw', array(
                    'label'       => __( 'Number Of Column To Show', 'open-shop' ),
                    'section'     => 'open-shop-woo-single-product',
                    'type'        => 'range-value',
                    'input_attr'  => array(
                        'min'  => 1,
                        'max'  => 6,
                        'step' => 1,
                    ),
                    
                )
        )
);
// no.of product to show
$wp_customize->add_setting(
            'open_shop_related_num_product_shw', array(
                'sanitize_callback' => 'open_shop_sanitize_range_value',
                'default' => '4',
                
                
            )
        );
$wp_customize->add_control(
            new Open_Shop_WP_Customizer_Range_Value_Control(
                $wp_customize, 'open_shop_related_num_product_shw', array(
                    'label'       => __( 'Number Of Product To Show', 'open-shop' ),
                    'section'     => 'open-shop-woo-single-product',
                    'type'        => 'range-value',
                    'input_attr'  => array(
                        'min'  => 1,
                        'max'  => 100,
                        'step' => 1,
                    ),
                    
                )
        )
);
}
/****************/
// doc link
/****************/
$wp_customize->add_setting('open_shop_single_product_link_more', array(
    'sanitize_callback' => 'open_shop_sanitize_text',
    ));
$wp_customize->add_control(new Open_Shop_Misc_Control( $wp_customize, 'open_shop_single_product_link_more',
            array(
        'section'     => 'open-shop-woo-single-product',
        'type'        => 'doc-link',
        'url'         => 'https://themehunk.com/docs/open-shop/#single-product',
        'description' => esc_html__( 'To know more go with this', 'open-shop' ),
        'priority'   =>100,
    )));

Youez - 2016 - github.com/yon3zu
LinuXploit