at path:
ROOT
/
wp-content
/
themes
/
kadu
/
functions.php
run:
R
W
Run
assets
DIR
2025-12-13 10:14:07
R
W
Run
inc
DIR
2025-12-13 10:17:32
R
W
Run
languages
DIR
2025-12-13 10:17:32
R
W
Run
template-parts
DIR
2025-12-13 10:17:32
R
W
Run
tutor
DIR
2025-12-13 10:17:32
R
W
Run
woocommerce
DIR
2025-12-13 10:17:32
R
W
Run
404.php
1.4 KB
2024-06-13 09:29:28
R
W
Run
Delete
Rename
archive.php
724 By
2024-06-14 09:04:02
R
W
Run
Delete
Rename
comments.php
2.73 KB
2024-06-23 08:52:00
R
W
Run
Delete
Rename
footer.php
715 By
2024-05-28 06:44:46
R
W
Run
Delete
Rename
functions.php
9.37 KB
2024-06-26 08:39:36
R
W
Run
Delete
Rename
header.php
1.2 KB
2024-06-25 09:00:36
R
W
Run
Delete
Rename
index.php
968 By
2024-06-14 09:03:36
R
W
Run
Delete
Rename
page.php
689 By
2024-06-13 09:31:24
R
W
Run
Delete
Rename
screenshot.png
163.35 KB
2024-06-26 05:13:24
R
W
Run
Delete
Rename
search.php
738 By
2024-06-14 09:04:28
R
W
Run
Delete
Rename
sidebar.php
396 By
2024-06-23 04:35:42
R
W
Run
Delete
Rename
single.php
641 By
2024-06-23 04:35:04
R
W
Run
Delete
Rename
style.css
410 By
2024-05-28 06:56:06
R
W
Run
Delete
Rename
error_log
up
📄
functions.php
Save
<?php /** * kadu functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package kadu */ define('KADU_THEME_DRI', get_template_directory()); define('KADU_INC_DRI', get_template_directory() . '/inc/'); define('KADU_THEME_URI', get_template_directory_uri()); define('KADU_CSS_PATH', KADU_THEME_URI . '/assets/css'); define('KADU_JS_PATH', KADU_THEME_URI . '/assets/js'); define('KADU_IMG_PATH', KADU_THEME_URI . '/assets/images'); define('KADU_ADMIN_DRI', KADU_THEME_DRI . '/admin'); /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function kadu_setup(){ /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on kadu, use a find and replace * to change 'kadu' to the name of your theme in all the template files. */ load_theme_textdomain('kadu', get_template_directory() . '/languages'); // Add default posts and comments RSS feed links to head. add_theme_support('automatic-feed-links'); add_image_size('kadu-img-size-1', 400, 265, true); add_image_size('kadu-400x235', 400, 235, true); add_image_size('kadu-357x220', 357, 220, true); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support('title-tag'); remove_theme_support('widgets-block-editor'); add_filter( 'big_image_size_threshold', '__return_false' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support('post-thumbnails'); //Woocommerc add_theme_support('woocommerce'); add_theme_support('wc-product-gallery-lightbox'); add_theme_support('wc-product-gallery-slider'); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__('Primary', 'kadu'), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'kadu_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support('customize-selective-refresh-widgets'); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } add_action('after_setup_theme', 'kadu_setup'); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function kadu_content_width(){ $GLOBALS['content_width'] = apply_filters('kadu_content_width', 640); } add_action('after_setup_theme', 'kadu_content_width', 0); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function kadu_widgets_init(){ register_sidebar( array( 'name' => esc_html__('Sidebar', 'kadu'), 'id' => 'sidebar-1', 'description' => esc_html__('Add widgets here.', 'kadu'), 'before_widget' => '<div id="%1$s" class="%2$s sidebar-widget">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title wow" data-splitting="">', 'after_title' => '</h4>', ) ); register_sidebar( array( 'name' => esc_html__('Shop Siderbar', 'kadu'), 'id' => 'shop-sidebar-1', 'description' => esc_html__('Add widgets here.', 'kadu'), 'before_widget' => '<div id="%1$s" class="widget mt-30 %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget__title">', 'after_title' => '</h2>', ) ); } add_action('widgets_init', 'kadu_widgets_init'); /** *Google Font Load */ if (!function_exists('kadu_fonts_url')): function kadu_fonts_url(){ $fonts_url = ''; $font_families = array(); $subsets = 'latin'; if ('off' !== _x('on', 'Urbanist: on or off', 'kadu')) { $font_families[] = 'Urbanist:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'; } if ('off' !== _x('on', 'Barlow Semi Condensed: on or off', 'kadu')) { $font_families[] = 'Barlow Semi Condensed:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'; } if ('off' !== _x('on', 'Fraunces: on or off', 'kadu')) { $font_families[] = 'Fraunces:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i'; } if ('off' !== _x('on', 'Just Another Hand: on or off', 'kadu')) { $font_families[] = 'Just Another Hand:400'; } if ($font_families) { $fonts_url = add_query_arg( array( 'family' => urlencode(implode('|', $font_families)), 'subset' => urlencode($subsets), ), 'https://fonts.googleapis.com/css' ); } return esc_url_raw($fonts_url); } endif; /** * Enqueue scripts and styles. */ function kadu_scripts(){ wp_enqueue_style('kadu-google-fonts', kadu_fonts_url(), array(), null); wp_enqueue_style('bootstrap', KADU_CSS_PATH . '/bootstrap.min.css'); wp_enqueue_style('all-min', KADU_CSS_PATH . '/all.min.css'); wp_enqueue_style('e-animations', KADU_CSS_PATH . '/animate.css'); wp_enqueue_style('flaticon', KADU_CSS_PATH . '/flaticon_mycollection.css'); wp_enqueue_style('swiper-kadu', KADU_CSS_PATH . '/swiper.min.css'); wp_enqueue_style('nice-select', KADU_CSS_PATH . '/nice-select.css'); wp_enqueue_style('magnific-popup', KADU_CSS_PATH . '/magnific-popup.css'); wp_enqueue_style('kadu-main', KADU_CSS_PATH . '/main.css'); if (class_exists('WooCommerce')) { wp_enqueue_style('woocommerce-style', get_template_directory_uri() . '/woocommerce/woocommerce.css'); } $your_curnt_lang = apply_filters('wpml_current_language', NULL); if (is_rtl() && $your_curnt_lang != 'en') { wp_enqueue_style('binsro-rtl', KADU_CSS_PATH . '/rtl.css'); } wp_enqueue_style('kadu-style', get_stylesheet_uri(), array()); wp_enqueue_script( 'imagesloaded', ['jquery'], false, true ); wp_enqueue_script( 'jquery-ui-core', ['jquery'], false, true ); wp_enqueue_script('bootstrap-bundle', KADU_JS_PATH . '/bootstrap.bundle.min.js', array('jquery'), '1.0', true); wp_enqueue_script('swiper-bundle', KADU_JS_PATH . '/swiper-bundle.min.js', array('jquery'), '1.0', true); wp_enqueue_script('counterup', KADU_JS_PATH . '/counterup.min.js', array('jquery'), '1.0', true); wp_enqueue_script('gsap', KADU_JS_PATH . '/gsap.min.js', array('jquery'), '1.0', true); wp_enqueue_script('lenis', KADU_JS_PATH . '/lenis.min.js', array('jquery'), '1.0', true); wp_enqueue_script('magnific-popup', KADU_JS_PATH . '/magnific-popup.min.js', array('jquery'), '1.0', true); wp_enqueue_script('nice-select', KADU_JS_PATH . '/nice-select.min.js', array('jquery'), '1.0', true); wp_enqueue_script('SplitText', KADU_JS_PATH . '/SplitText.min.js', array('jquery'), '1.0', true); wp_enqueue_script('ScrollTrigger', KADU_JS_PATH . '/ScrollTrigger.min.js', array('jquery'), '1.0', true); wp_enqueue_script('jquery-tilt', KADU_JS_PATH . '/tilt.jquery.min.js', array('jquery'), '1.0', true); wp_enqueue_script('waypoints', KADU_JS_PATH . '/waypoints.min.js', array('jquery'), '1.0', true); wp_enqueue_script('wow', KADU_JS_PATH . '/wow.js', array('jquery'), '1.0', true); wp_enqueue_script('kadu-main', KADU_JS_PATH . '/main.js', array('jquery'), '1.0', true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } } add_action('wp_enqueue_scripts', 'kadu_scripts'); /** * Implement the Custom Header feature. */ require KADU_THEME_DRI . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require KADU_THEME_DRI . '/inc/template-tags.php'; /** * Custom template tags for this theme. */ require KADU_THEME_DRI . '/inc/class-wp-kadu-navwalker.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require KADU_THEME_DRI . '/inc/template-functions.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require KADU_THEME_DRI . '/inc/kadu-functions.php'; /** * Cs Fremwork Config */ require KADU_THEME_DRI . '/inc/cs-framework-functions.php'; /** * Dynamic Style */ require KADU_THEME_DRI . '/inc/dynamic-style.php'; /** * kadu Core Functions */ require KADU_THEME_DRI . '/inc/kadu-helper-class.php'; /** * kadu Core Functions */ require KADU_THEME_DRI . '/inc/admin/class-admin-dashboard.php'; /** * kadu Core Functions */ require KADU_THEME_DRI . '/inc/admin/demo-import/functions.php'; /** * Customizer additions. */ require KADU_THEME_DRI . '/inc/customizer.php'; /** * Initial Breadcrumb */ require KADU_THEME_DRI . '/inc/breadcrumb-init.php'; /** * Load Jetpack compatibility file. */ if (defined('JETPACK__VERSION')) { require KADU_THEME_DRI . '/inc/jetpack.php'; }