芝麻web文件管理V1.00
50,
'vertical' => 50,
);
if ( ! empty( get_post_meta( $popup_id, 'popup_animation', true ) ) ) {
$popup_options['animation'] = get_post_meta( $popup_id, 'popup_animation', true );
}
if ( ! empty( get_post_meta( $popup_id, 'popup_width', true ) ) ) {
$popup_options['width'] = (int) get_post_meta( $popup_id, 'popup_width', true );
}
if ( ! empty( get_post_meta( $popup_id, 'load_duration', true ) ) ) {
$popup_options['load_duration'] = (int) get_post_meta( $popup_id, 'load_duration', true );
}
if ( ! empty( get_post_meta( $popup_id, 'disable_popup_period', true ) ) ) {
$popup_options['popup_period'] = get_post_meta( $popup_id, 'disable_popup_period', true );
}
}
$return = false;
if ( ! empty( $_COOKIE[ 'porto_modal_disable_period_onload_' . $popup_id ] ) ) {
if ( isset( $popup_options['popup_period'] ) && $popup_options['popup_period'] == $_COOKIE[ 'porto_modal_disable_period_onload_' . $popup_id ] ) {
$return = true;
} else {
setcookie('porto_modal_disable_period_onload_' . $popup_id , '', time()-3600 );
}
}
if ( ! $return ) {
$style = '';
if ( empty( $popup_options['builder'] ) ) {
$style .= 'width: calc(100% - ' . ( empty( $porto_settings['grid-gutter-width'] ) ? '30' : (int) $porto_settings['grid-gutter-width'] ) . 'px); max-width: ' . (int) $popup_options['width'] . 'px; ';
if ( is_rtl() ) {
$left = 'right';
$right = 'left';
} else {
$left = 'left';
$right = 'right';
}
if ( 50 === (int) $popup_options['horizontal'] ) {
if ( 50 === (int) $popup_options['vertical'] ) {
$style .= 'left: 50%;top: 50%;transform: translate(-50%, -50%);';
} else {
$style .= 'left: 50%;transform: translateX(-50%);';
}
} elseif ( 50 > (int) $popup_options['horizontal'] ) {
$style .= $left . ':' . $popup_options['horizontal'] . '%;';
} else {
$style .= $right . ':' . ( 100 - $popup_options['horizontal'] ) . '%;';
}
if ( 50 === (int) $popup_options['vertical'] ) {
if ( 50 !== (int) $popup_options['horizontal'] ) {
$style .= 'top: 50%;transform: translateY(-50%);';
}
} elseif ( 50 > (int) $popup_options['vertical'] ) {
$style .= 'top:' . $popup_options['vertical'] . '%;';
} else {
$style .= 'bottom:' . ( 100 - $popup_options['vertical'] ) . '%;';
}
}
$html = '';
$html .= '';
echo porto_filter_output( $html );
}
}
}
}
if ( ! isset( $porto_footer_escaped ) && empty( $porto_block_template ) ) {
wp_footer();
echo "