ID ) ) { $current_post_id = $GLOBALS['post']->ID; } } // Ausgeschlossene Seiten als Array ermitteln (falls als String gespeichert, umwandeln). $excluded_pages = array(); if ( isset( $options['excluded_pages'] ) ) { $excluded_pages = is_array( $options['excluded_pages'] ) ? $options['excluded_pages'] : explode( ',', $options['excluded_pages'] ); } // Standard-Positionen und weitere Einstellungen. $data = array( 'shortcode' => $shortcode_active, 'widget_position' => ! empty( $options['widget_position'] ) ? $options['widget_position'] : 'unten rechts', 'menu_position' => ! empty( $options['menu_position'] ) ? $options['menu_position'] : 'rechts', 'button_colors' => ! empty( $options['button_colors'] ) ? $options['button_colors'] : array( 'accent' => '#ff0000', 'background' => '#ffffff', 'text' => '#000000' ), 'remove_branding' => isset( $options['remove_branding'] ) ? $options['remove_branding'] : 0, 'widget_theme' => ! empty( $options['widget_theme'] ) ? $options['widget_theme'] : 'modern', 'custom_icon' => ! empty( $options['custom_icon'] ) ? $options['custom_icon'] : '', 'language' => isset( $options['language'] ) ? $options['language'] : 'browser', 'excludedPages' => $excluded_pages, 'current_post_id' => $current_post_id, ); // Ausgabe des Containers mit den Einstellungen als data-Attribut (als JSON kodiert) echo '
'; } add_action( 'wp_footer', 'accesly_render_widget' ); }