at path:
ROOT
/
wp-content
/
plugins
/
kadu-plugin
/
inc
/
kadu-plugin-helper.php
run:
R
W
Run
custom-widget
DIR
2025-12-13 10:18:27
R
W
Run
options
DIR
2025-12-13 10:18:27
R
W
Run
post-type
DIR
2025-12-13 10:18:27
R
W
Run
class-template.php
1.35 KB
2024-10-16 22:18:55
R
W
Run
Delete
Rename
csf-custom-icon.php
6 KB
2024-10-16 22:18:55
R
W
Run
Delete
Rename
helper.php
10.68 KB
2024-10-16 22:18:55
R
W
Run
Delete
Rename
kadu-icon.php
1.02 KB
2024-10-16 22:18:55
R
W
Run
Delete
Rename
kadu-plugin-helper.php
3.08 KB
2024-10-16 22:18:55
R
W
Run
Delete
Rename
error_log
up
📄
kadu-plugin-helper.php
Save
<?php /** * kadu Theme Helper Class * * * @class Kadu_Plugin_Helper * @version 1.0 * @category Class * @author Raziul */ if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'Kadu_Plugin_Helper' ) ) { class Kadu_Plugin_Helper { /** * Get Header Template Type * * @return [type] [return description] */ public static function get_header_types() { $header = ['' => esc_html__( 'Default', 'kadu-plugin' ) ]; $headers = get_posts( [ 'posts_per_page' => - 1, 'post_type' => 'kadu_template', 'orderby' => 'name', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'kadu_template_type', 'value' => 'tf_header_key', 'compare' => '=' ) ) ] ); foreach ($headers as $value) { $header[$value->ID] = $value->post_title; } return $header; } /** * Get Footer Template Type * * @return [type] [return description] */ public static function get_footer_types() { $footer = ['' => esc_html__( 'Default', 'kadu-plugin' ) ]; $footers = get_posts( [ 'posts_per_page' => - 1, 'post_type' => 'kadu_template', 'orderby' => 'name', 'order' => 'ASC', 'meta_query' => array( array( 'key' => 'kadu_template_type', 'value' => 'tf_footer_key', 'compare' => '=' ) ) ] ); foreach ($footers as $value) { $footer[$value->ID] = $value->post_title; } return $footer; } /** * Render Header * * @param [type] $header_style [$header_style description] * * @return [type] [return description] */ public static function kadu_render_header($header_style){ $elementor_instance = Elementor\Plugin::instance(); return $elementor_instance->frontend->get_builder_content_for_display( $header_style ); } /** * Render Footer * * @param [type] $footer_style [$footer_style description] * * @return [type] [return description] */ public static function kadu_render_footer($footer_style){ $elementor_instance = Elementor\Plugin::instance(); return $elementor_instance->frontend->get_builder_content_for_display( $footer_style ); } /** * Category Proce * * @return [type] [return description] */ public static function kadu_blog_category(){ $terms = get_terms( array( 'taxonomy' => 'category', 'hide_empty' => true ) ); $cat_list = []; foreach($terms as $post) { $cat_list[$post->slug] = [$post->name]; } return $cat_list; } public static function kadu_portfolio_category(){ $terms = get_terms( array( 'taxonomy' => 'portfolio_cat', 'hide_empty' => true, ) ); $cat_list = []; foreach($terms as $post) { $cat_list[$post->slug] = [$post->name]; } return $cat_list; } } // Instantiate theme new Kadu_Plugin_Helper(); }