NOX-ROOT-MARAZ Manager v2
PHP 8+ Secure
/
home
/
xiedrke
/
malino
/
wp-content
/
plugins
/
trendz-pro
/
modules
/
slider
/
Name
Size
Perms
Actions
📁 assets
-
0755
Chmod
|
Delete
📁 layouts
-
0755
Chmod
|
Delete
📁 metabox
-
0755
Chmod
|
Delete
📄 index.php
2,122 B
0644
Edit
|
Chmod
|
Delete
Editing: index.php
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } if( !class_exists( 'TrendzProSlider' ) ) { class TrendzProSlider { private static $_instance = null; public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } function __construct() { $this->load_modules(); $this->frontend(); } function load_modules() { include_once TRENDZ_PRO_DIR_PATH.'modules/slider/metabox/index.php'; } function frontend() { add_action( 'trendz_after_main_css', array( $this, 'enqueue_assets' ) ); add_action( 'trendz_slider', array( $this, 'load_template' ), 11 ); } function enqueue_assets() { if ( is_singular( 'page') ) { $settings = get_post_meta( get_queried_object_id(), '_trendz_slider_settings', true ); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( isset( $settings['show'] ) && isset( $settings['type']) ) { wp_enqueue_style( 'site-slider', TRENDZ_PRO_DIR_URL . 'modules/slider/assets/css/slider.css', false, TRENDZ_PRO_VERSION, 'all' ); } } } function load_template() { if ( is_singular( 'page') ) { $settings = get_post_meta( get_queried_object_id(), '_trendz_slider_settings', true ); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( isset( $settings['show'] ) && isset( $settings['type']) ) { $type = $settings['type']; $id = isset( $settings[$type] ) ? $settings[$type] : ''; echo trendz_get_template_part( 'slider', 'layouts/'.$type.'/template', '', array( 'code' => $id ) ); } } } } } TrendzProSlider::instance();
Cancel