403Webshell
Server IP : 104.21.14.103  /  Your IP : 52.15.239.254
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/inc/shortcodes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/inc/shortcodes//ux_logo.php
<?php
// [logo img=""]
function ux_logo( $atts, $content = null ){
    extract( shortcode_atts( array(
      'class' => '',
      'visibility' => '',
      'img' => '',
      'image_size' => 'original',
      'padding' => '15px',
      'title' => '',
      'hover' => '',
      'link' => '',
      'target' => '_self',
      'rel' => '',
      'height' => '50',
    ), $atts ) );

    $classes = array('ux-logo', 'has-hover', 'align-middle', 'ux_logo', 'inline-block');
	$org_img = '';

    if ( $class ) $classes[] = $class;
    if ( $visibility ) $classes[] = $visibility;

  	$height    = intval( $height );
  	$width     = 'auto';
  	$link_atts = array(
  		'target' => $target,
  		'rel'    => array( $rel ),
  	);

    if(!$img){
      $org_img = get_template_directory_uri().'/assets/img/logo.png';
      $width = ($height / 84) * 400 + (intval($padding)*2).'px';
    }

	if ( $img && ! is_numeric( $img ) ) {
		$org_img = $img;
	} elseif ( $img ) {
		$img_src = wp_get_attachment_image_src( $img, $image_size );

		if ( $img_src ) {
			$org_img    = $img_src[0];
			$org_height = $img_src[2];
			// Check if width and height is set, because svg images has no size.
			if ( $img_src[1] > 0 && $img_src[2] > 0 ) {
				$width = $img_src[1];
				$width = ( intval( $height ) / intval( $org_height ) ) * intval( $width ) + ( intval( $padding ) * 2 ) . 'px';
			} else {
				$width = 'auto';
			}
		}
	}

    // Set inner tag
    $inner_tag = $link ? 'a' : 'div';

    $content = '<div class="'.implode(' ', $classes).'" style="max-width: 100%!important; width: '.$width.'!important"><'.$inner_tag.' class="ux-logo-link block image-'.$hover.'" title="'.$title.'"' . flatsome_parse_target_rel( $link_atts ) . 'href="'.$link.'" style="padding: '.$padding.';"><img src="'.$org_img.'" title="'.$title.'" alt="'.$title.'" class="ux-logo-image block" style="height:'.$height.'px;" /></'.$inner_tag.'></div>';

    return $content;
}
add_shortcode('logo', 'ux_logo');

Youez - 2016 - github.com/yon3zu
LinuXploit