preview ) && is_object( \Elementor\Plugin::$instance->preview ) && \Elementor\Plugin::$instance->preview->is_preview_mode(); if ( $rooster_consent_elementor || is_customize_preview() ) { return; } $heading = trim( (string) ( $attributes['heading'] ?? '' ) ) ?: __( 'Cookies', 'ai-eshop-optimizer' ); $text = trim( (string) ( $attributes['text'] ?? '' ) ) ?: __( 'We use cookies for the shop to work and, with your consent, to understand how it is used and to show relevant offers.', 'ai-eshop-optimizer' ); $policy = get_privacy_policy_url(); $position = in_array( $attributes['position'] ?? 'bottom', [ 'bottom', 'bottom-left', 'center' ], true ) ? $attributes['position'] : 'bottom'; $choices = ! empty( $attributes['showChoices'] ); $corner = 'end' === ( $attributes['buttonCorner'] ?? 'start' ) ? ' rooster-fab--end' : ''; $wrapper = get_block_wrapper_attributes( [ 'class' => 'rooster-consent rooster-consent--' . $position, 'role' => 'dialog', 'aria-modal' => 'false', 'aria-labelledby' => 'rooster-consent-title', 'data-wp-interactive' => 'rooster/consent', 'data-wp-context' => wp_json_encode( [ 'choices' => [ 'functional' => true, 'analytics' => false, 'marketing' => false ], 'open' => false ] ), 'data-wp-bind--hidden' => 'state.decided', 'data-wp-class--is-open' => 'context.open', ] ); $html = '
\n"; $html .= "\t" . '\n"; $html .= "\t" . '\n
\n"; $html .= '\n"; AIEO_Engine_Blocks::out( $html );