|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/nandedex/www/s.nandedexpress.com/ |
PK �D�[6��<q q class-colormag-css-classes.phpnu �[��� <?php
/**
* Adds classes to appropriate places.
*
* @package ColorMag
*
* @since ColorMag 4.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'ColorMag_Css_Classes' ) ) :
/**
* ColorMag_Css_Classes class.
*/
class ColorMag_Css_Classes {
/**
* Constructor.
*/
public function __construct() {
add_filter( 'colormag_header_class', array( $this, 'colormag_add_header_classes' ) );
}
/**
* Adds css classes into header
*
* @param array $classes list of old classes.
*
* @return array
*/
public function colormag_add_header_classes( $classes ) {
$layout = get_theme_mod( 'colormag_main_header_layout', 'layout-1' );
$width = get_theme_mod( 'colormag_main_header_width_setting', 'full-width' );
$classes[] = 'cm-' . $layout;
$layout1_style = get_theme_mod( 'colormag_main_header_layout_1_style', 'style-1' );
$layout2_style = get_theme_mod( 'colormag_main_header_layout_2_style', 'style-1' );
$layout3_style = get_theme_mod( 'colormag_main_header_layout_3_style', 'style-1' );
$layout4_style = get_theme_mod( 'colormag_main_header_layout_4_style', 'style-1' );
if ( 'layout-1' === $layout ) {
$classes[] = 'cm-' . $layout . '-' . $layout1_style;
} elseif ( 'layout-2' === $layout ) {
$classes[] = 'cm-' . $layout . '-' . $layout2_style;
} elseif ( 'layout-3' === $layout ) {
$classes[] = 'cm-' . $layout . '-' . $layout3_style;
} elseif ( 'layout-4' === $layout ) {
$classes[] = 'cm-' . $layout . '-' . $layout4_style;
}
if ('full-width' === $width && 'layout-1' === $layout ) {
$classes[] = 'cm-' . $width;
} elseif ('contained' === $width && 'layout-1' === $layout ) {
$classes[] = 'cm-' . $width;
}
return $classes;
}
}
endif;
new ColorMag_Css_Classes();
PK �D�[K��� � ! class-colormag-dynamic-filter.phpnu �[��� <?php
/**
* Filter array values.
*
* @package ColorMag
*
* @since ColorMag 4.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/*========================================== HEADER > HEADER TOP BAR ==========================================*/
if ( ! class_exists( 'ColorMag_Dynamic_Filter' ) ) :
/**
* Filter array values.
*/
class ColorMag_Dynamic_Filter {
/**
* Array of filter name and css classes.
*
* @since TBD
* @access private
* @var array $css_class_arr Filter tag and class list.
*/
private static $css_class_arr = array();
/**
* Get filter tag and class list in Array.
*
* @since 1.1.7
* @access public
*
* @return array Filter tag and class list.
*/
public static function css_class_list() {
self::$css_class_arr = array(
'colormag_header_class' => array(
'cm-header',
),
);
return apply_filters( 'colormag_css_class_list', self::$css_class_arr );
}
/**
* Filter the array according to key.
*
* @since 1.1.7
* @access public
*
* @param string $tag Filter tag.
*
* @return array Filter tag and class list.
*/
public static function filter_via_tag( $tag ) {
$css_class = self::css_class_list();
$filtered = array();
if ( isset( $css_class[ $tag ] ) ) {
$filtered = $css_class[ $tag ];
}
return $filtered;
}
}
endif;
PK �D�[6�/6�
�
class-colormag-constants.phpnu �[��� <?php
/**
* Define constants.
*
* @package ColorMag
*
* @since ColorMag 4.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'ColorMag_Constants' ) ) {
/**
* ColorMag_Constants class.
*/
class ColorMag_Constants {
/**
* Instance.
*
* @access private
* @var object Singleton instance of ColorMag_Constants class
*/
private static $instance;
/**
* Array of constants and their values.
*
* @access private
* @var array
*/
private $constants;
/**
* Singleton instance.
*
* @return ColorMag_Constants
*
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor.
*/
private function __construct() {
// TODO: reuse constant instead of calling function for each constant.
// TODO: sending constant data as constructor argument.
$this->constants = array(
/**
* Define Directory Location Constants
*/
'COLORMAG_THEME_VERSION' => wp_get_theme( get_template() )->get( 'Version' ),
'COLORMAG_PARENT_DIR' => get_template_directory(),
'COLORMAG_INCLUDES_DIR' => get_template_directory() . '/inc',
'COLORMAG_CSS_DIR' => get_template_directory() . '/assets/css',
'COLORMAG_JS_DIR' => get_template_directory() . '/assets/js',
'COLORMAG_LANGUAGES_DIR' => get_template_directory() . '/languages',
'COLORMAG_WIDGETS_DIR' => get_template_directory() . '/inc/widgets',
'COLORMAG_CUSTOMIZER_DIR' => get_template_directory() . '/inc/customizer',
'COLORMAG_ELEMENTOR_DIR' => get_template_directory() . '/inc/compatibility/elementor',
'COLORMAG_ELEMENTOR_WIDGETS_DIR' => get_template_directory() . '/inc/compatibility/elementor/widgets',
'COLORMAG_CHILD_DIR' => get_stylesheet_directory(),
/**
* Define URL Location Constants
*/
'COLORMAG_PARENT_URL' => get_template_directory_uri(),
'COLORMAG_INCLUDES_URL' => get_template_directory_uri() . '/inc',
'COLORMAG_CSS_URL' => get_template_directory_uri() . '/assets/css',
'COLORMAG_JS_URL' => get_template_directory_uri() . '/assets/js',
'COLORMAG_IMG_URL' => get_template_directory_uri() . '/assets/img',
'COLORMAG_LANGUAGES_URL' => get_template_directory_uri() . '/languages',
'COLORMAG_WIDGETS_URL' => get_template_directory_uri() . '/inc/widgets',
'COLORMAG_CUSTOMIZER_URL' => get_template_directory_uri() . '/inc/customizer',
'COLORMAG_ELEMENTOR_URL' => get_template_directory_uri() . '/inc/compatibility/elementor',
'COLORMAG_ELEMENTOR_WIDGETS_URL' => get_template_directory_uri() . '/inc/compatibilitye/lementor/widgets',
'COLORMAG_CHILD_URL' => get_stylesheet_directory_uri(),
);
foreach ( $this->constants as $name => $value ) {
$this->define_constant( $name, $value );
}
}
/**
* Define constant safely.
*
* TODO: @since.
*
* @param string $name Constant name.
* @param mixed $value Constant value.
*
* @return void
*/
public function define_constant( $name, $value ) {
if ( ! defined( $name ) ) {
define( $name, $value );
}
}
}
}
ColorMag_Constants::get_instance();
PK �D�[�D�
�
"