GRAYBYTE WORDPRESS FILE MANAGER8783

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/inteuuod/public_html/wp-content/plugins/announcer/includes/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/inteuuod/public_html/wp-content/plugins/announcer/includes//utilities.php
<?php

if( ! defined( 'ABSPATH' ) ) exit;

class ANCR_Utilities{

    public static function style_generator( $styles ){

        $properties = [];
        extract( $styles, EXTR_SKIP );

        if( !empty( $background_color ) ){
            if( isset( $background_image ) && !empty( $background_image ) ){
                $properties[ 'background-color' ] = $background_color;
            }else{
                $properties[ 'background' ] = $background_color;
            }
        }

        if( !empty( $font_color ) ){
            $properties[ 'color' ] = $font_color . ' !important';
        }

        if( !empty( $font_size ) ){
            $properties[ 'font-size' ] = "{$font_size}px !important";
        }

        if( isset( $border_width ) && $border_width > 0 ){
            $border_style = empty( $border_style ) ? 'solid' : $border_style;
            $border_color = empty( $border_color ) ? 'transparent' : $border_color;
            $properties[ 'border' ] = "{$border_width}px $border_style $border_color";
        }

        if( isset( $border_radius ) && $border_radius > 0 ){
            $properties[ 'border-radius' ] = "{$border_radius}px";
        }

        if( !empty( $width ) ){
            $properties[ 'min-width' ] = $width;
        }

        if( isset( $shadow ) && $shadow == 'yes' ){
            $properties[ 'box-shadow' ] = '0 2px 4px -2px rgba(0, 0, 0, 0.5)';
        }

        if( isset( $background_image ) && !empty( $background_image ) ){
            $properties[ 'background-image' ] = "url('$background_image')";
            if( isset( $background_size ) && !empty( $background_size ) ){
                $properties[ 'background-size' ] = $background_size;
            }
        }

        $props_text = '';
        foreach( $properties as $prop => $value ){
            $value = trim( str_replace( [ ';', '{', '}', '@' ], '', $value ) );
            if( empty( $value ) || strtolower( $value ) == 'px' ){
                continue;
            }
            $props_text .= "{$prop}:{$value};";
        }

        return $props_text;

    }

    public static function datetime_timestamp( $datetime, $timezone ){

        if( empty( $datetime ) ){
            return '';
        }

        try{
            $tz = new DateTimezone( $timezone );
        }catch( Exception $e ) {
            $tz = null;
        }

        try{
            $t = new DateTime( $datetime, $tz );
            return $t->getTimestamp();
        }catch( Exception $e ){
            return '';
        }

    }

    public static function build_attrs( $attrs ){

        $attrs_pair = [];
        foreach( $attrs as $name => $value ){
            $value = trim( $value );
            if( empty( $value ) ){
                continue;
            }
            $value = ( $name == 'href' ) ? esc_url( $value ) : esc_attr( $value );
            $attrs_string = esc_attr( $name ) . '="' . $value . '"';
            array_push( $attrs_pair, $attrs_string );
        }

        return implode( ' ', $attrs_pair );

    }

}

?>

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:24
inteuuod / inteuuod
0755
location-rules
--
July 10 2025 04:32:24
inteuuod / inteuuod
0755
.htaccess
0.41 KB
July 10 2025 04:32:24
inteuuod / inteuuod
0644
display.php
10.139 KB
August 23 2024 03:21:34
inteuuod / inteuuod
0644
settings.php
3.833 KB
August 23 2024 03:21:34
inteuuod / inteuuod
0644
utilities.php
3.072 KB
August 23 2024 03:21:34
inteuuod / inteuuod
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF