| Server IP : 38.190.208.107 / Your IP : 216.73.217.46 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.9/wp-content/themes/blocksy/inc/css/ |
Upload File : |
<?php
function blocksy_compute_box_shadow_var_for($value, $should_skip_output = true) {
if (isset($value['inherit']) && $value['inherit']) {
return 'CT_CSS_SKIP_RULE';
}
if (
! isset($value['enable'])
||
! $value['enable']
) {
return 'none';
}
if (
$value['blur'] === 0
&&
$value['spread'] === 0
&&
$value['v_offset'] === 0
&&
$value['h_offset'] === 0
) {
return $should_skip_output ? 'CT_CSS_SKIP_RULE' : 'none';
}
$color = blocksy_get_colors([
'default' => $value['color']
], [
'default' => $value['color']
]);
$box_shadow_components = [];
if (isset($value['inset']) && $value['inset']) {
$box_shadow_components[] = 'inset';
}
$box_shadow_components[] = $value['h_offset'] . 'px';
$box_shadow_components[] = $value['v_offset'] . 'px';
if (intval($value['blur']) !== 0) {
$box_shadow_components[] = $value['blur'] . 'px';
if (intval($value['spread']) !== 0) {
$box_shadow_components[] = $value['spread'] . 'px';
}
}
if (
intval($value['blur']) === 0
&&
intval($value['spread']) !== 0
) {
$box_shadow_components[] = $value['blur'] . 'px';
$box_shadow_components[] = $value['spread'] . 'px';
}
$box_shadow_components[] = $color['default'];
return implode(' ', $box_shadow_components);
}
function blocksy_box_shadow_value($args = []) {
return wp_parse_args(
$args,
[
'inherit' => false,
'blur' => 0,
'spread' => 0,
'v_offset' => 0,
'h_offset' => 0,
'inset' => false,
'enable' => true,
'color' => [
'color' => 'rgba(44,62,80,0.2)',
],
]
);
}
function blocksy_output_box_shadow($args = []) {
$args = wp_parse_args(
$args,
[
'css' => null,
'tablet_css' => null,
'mobile_css' => null,
'selector' => null,
'desktop_selector_prefix' => '',
'tablet_selector_prefix' => '',
'mobile_selector_prefix' => '',
'should_skip_output' => true,
'variableName' => 'theme-box-shadow',
'value' => null,
'important' => false,
'responsive' => false
]
);
$value = blocksy_expand_responsive_value($args['value']);
$responsive = blocksy_expand_responsive_value($args['responsive'] || true);
$shadow_value = [
'desktop' => ($responsive['desktop'] ? blocksy_compute_box_shadow_var_for(
$value['desktop'],
$args['should_skip_output']
) : 'none'),
'tablet' => ($responsive['tablet'] ? blocksy_compute_box_shadow_var_for(
$value['tablet'],
$args['should_skip_output']
) : 'none'),
'mobile' => ($responsive['mobile'] ? blocksy_compute_box_shadow_var_for(
$value['mobile'],
$args['should_skip_output']
) : 'none')
];
if (
$shadow_value['desktop'] === 'none'
&&
$shadow_value['tablet'] === 'none'
&&
$shadow_value['mobile'] === 'none'
) {
$shadow_value['desktop'] = $args['should_skip_output'] ? 'CT_CSS_SKIP_RULE' : 'none';
$shadow_value['tablet'] = $args['should_skip_output'] ? 'CT_CSS_SKIP_RULE' : 'none';
$shadow_value['mobile'] = $args['should_skip_output'] ? 'CT_CSS_SKIP_RULE' : 'none';
}
$args['value'] = $shadow_value;
if ($args['important']) {
$args['value_suffix'] = ' !important';
}
blocksy_output_css_vars($args);
}