| Server IP : 62.72.47.131 / Your IP : 216.73.217.34 Web Server : Apache/2.4.66 (Debian) System : Linux 975cdb959a49 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : ( 501) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/flatsome/inc/shortcodes/commons/ |
Upload File : |
<?php // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
/**
* Background image.
*
* @package Flatsome
*/
if ( ! empty( $atts['bg'] ) ) :
$output = '';
if ( ! is_numeric( $atts['bg'] ) ) {
$image_id = attachment_url_to_postid( $atts['bg'] );
$output = $image_id
? flatsome_get_attachment_image_no_srcset( $image_id, $atts['bg_size'], false, [
'class' => "bg attachment-{$atts['bg_size']} size-{$atts['bg_size']}",
] )
: sprintf( '<img src="%s" class="bg" alt="" />', esc_url( $atts['bg'] ) );
} else {
$output = flatsome_get_attachment_image_no_srcset( $atts['bg'], $atts['bg_size'], false, [
'class' => "bg attachment-{$atts['bg_size']} size-{$atts['bg_size']}",
] );
}
if ( ! empty( $output ) ) {
echo $output; // phpcs:ignore WordPress.Security.EscapeOutput
}
endif; // phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable