| Server IP : 77.50.203.18 / Your IP : 192.168.0.10 Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23 System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64 User : warsnews.ru ( 1001) PHP Version : 8.4.23 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/ifwar.ru/www/wp-content/plugins/clever-fox/inc/nexcraft/features/ |
Upload File : |
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
function nexcraft_slider_setting( $wp_customize ) {
$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
/*=========================================
Slider Section Panel
=========================================*/
$wp_customize->add_panel(
'nexcraft_frontpage_sections', array(
'priority' => 32,
'title' => esc_html__( 'Frontpage Sections', 'clever-fox' ),
)
);
$wp_customize->add_section(
'slider_setting', array(
'title' => esc_html__( 'Slider Section', 'clever-fox' ),
'panel' => 'nexcraft_frontpage_sections',
'priority' => 1,
)
);
//Slider Documentation Link
class cleverfox_wp_slider_Customize_Control extends WP_Customize_Control {
public $type = 'new_menu';
function render_content()
{
?>
<h3><?php esc_html_e('Section Documentation','clever-fox'); ?></h3>
<p><a href="#" target="_blank" style="background-color:#03c281; color:#fff;display: flex;align-items: center;justify-content: center;text-decoration: none; font-weight: 600;padding: 15px 10px;"><?php esc_html_e('Click Here','clever-fox');?></a></p>
<?php
}
}
// Slider Doc Link //
$wp_customize->add_setting(
'slider_doc_link' ,
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control(new cleverfox_wp_slider_Customize_Control($wp_customize,
'slider_doc_link' ,
array(
'label' => __( 'Slider Documentation Link', 'clever-fox' ),
'section' => 'slider_setting',
'type' => 'radio',
'description' => __( 'Slider Documentation Link', 'clever-fox' ),
)
) );
// slider Contents
$wp_customize->add_setting(
'slider_content_head'
,array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'nexcraft_sanitize_text',
'priority' => 4,
)
);
$wp_customize->add_control(
'slider_content_head',
array(
'type' => 'hidden',
'label' => __('Contents','clever-fox'),
'section' => 'slider_setting',
)
);
// Hide / Show
$wp_customize->add_setting(
'slider_hs'
,array(
'default' => '1',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'nexcraft_sanitize_checkbox',
'priority' => 1,
)
);
$wp_customize->add_control(
'slider_hs',
array(
'type' => 'checkbox',
'label' => __('Hide / Show','clever-fox'),
'section' => 'slider_setting',
)
);
/**
* Customizer Repeater for add service
*/
$wp_customize->add_setting( 'slider',
array(
'nexcraft_sanitize_callback' => 'repeater_nexcraft_sanitize',
'transport' => $selective_refresh,
'priority' => 8,
'default' => nexcraft_get_slider_default()
)
);
$wp_customize->add_control(
new NexCraft_Repeater( $wp_customize,
'slider',
array(
'label' => esc_html__('Slider','clever-fox'),
'section' => 'slider_setting',
'add_field_label' => esc_html__( 'Add New Slider', 'clever-fox' ),
'item_name' => esc_html__( 'Slider', 'clever-fox' ),
'customizer_repeater_image_control' => true,
'customizer_repeater_subtitle_control' => true,
'customizer_repeater_title_control' => true,
'customizer_repeater_link_control' => true,
)
)
);
//Pro feature
class NexCraft_slider__section_upgrade extends WP_Customize_Control {
public function render_content() {
$cleverfox_theme = wp_get_theme(); // gets the current theme
?>
<a class="customizer_slider_upgrade_section up-to-pro" href="https://www.nayrathemes.com/nexcraft-pro/" target="_blank" style="display: none;"><?php esc_html_e('Upgrade to Pro','clever-fox'); ?></a>
<?php }
}
$wp_customize->add_setting( 'slider_upgrade_to_pro', array(
'capability' => 'edit_theme_options',
'nexcraft_sanitize_callback' => 'wp_filter_nohtml_kses',
'priority' => 5,
));
$wp_customize->add_control(
new NexCraft_slider__section_upgrade(
$wp_customize,
'slider_upgrade_to_pro',
array(
'section' => 'slider_setting',
)
)
);
}
add_action( 'customize_register', 'nexcraft_slider_setting' );
// slider selective refresh
function nexcraft_home_slider_section_partials( $wp_customize ){
// slider title
$wp_customize->selective_refresh->add_partial( 'slider', array(
'selector' => '.slider-section .carousel-caption .firstword1, .slider-section .carousel-caption .lastword',
) );
}
add_action( 'customize_register', 'nexcraft_home_slider_section_partials' );