100, 'width' => 100, 'flex-height' => true, 'flex-width' => true, ) ); register_nav_menus( array( 'primary' => esc_html__( 'Hauptmenü', 'binary-log-pro' ) ) ); } add_action( 'after_setup_theme', 'binary_log_pro_setup' ); // 2. DYNAMISCHE FARBEN & HEADER-DARK-LOGIK function binary_log_pro_dynamic_css() { $theme = get_theme_mod( 'binary_color_scheme', 'blue' ); // Definition der Themes $colors = array( 'green' => array( 'primary' => '#7ca65c', 'bg' => '#f4f7f2', 'header_bg' => 'rgba(255,255,255,0.8)', 'text' => '#1a1a1a', 'shell_bg' => '#f0f0f0' ), 'blue' => array( 'primary' => '#0070f3', 'bg' => '#f0f5ff', 'header_bg' => 'rgba(255,255,255,0.8)', 'text' => '#1a1a1a', 'shell_bg' => '#f0f0f0' ), 'dark' => array( 'primary' => '#00ff41', 'bg' => '#0a0a0a', 'header_bg' => 'rgba(15,15,15,0.95)', 'text' => '#e0e0e0', 'shell_bg' => '#1a1a1a' ) ); $c = $colors[$theme]; echo ""; } add_action( 'wp_head', 'binary_log_pro_dynamic_css' ); // 3. SCRIPTS function binary_log_pro_scripts() { wp_enqueue_style( 'binary-log-pro-style', get_stylesheet_uri(), array(), '1.0.0' ); } add_action( 'wp_enqueue_scripts', 'binary_log_pro_scripts' ); // 4. CUSTOMIZER function binary_log_pro_customize_register( $wp_customize ) { // SEKTION: LIZENZ $wp_customize->add_section( 'binary_license_section', array( 'title' => 'Binary Lizenzierung', 'priority' => 10 ) ); $wp_customize->add_setting( 'binary_license_key', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'binary_license_key', array( 'label' => 'Lizenzschlüssel', 'section' => 'binary_license_section' ) ); // --- FREIE EINSTELLUNGEN --- $wp_customize->add_section( 'binary_general_settings', array( 'title' => 'Design & Footer', 'priority' => 35 ) ); $wp_customize->add_setting( 'binary_color_scheme', array( 'default' => 'blue', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'binary_color_scheme', array( 'label' => 'Farbschema', 'section' => 'binary_general_settings', 'type' => 'select', 'choices' => array( 'blue' => 'Cyber Blue (Standard)', 'green' => 'Terminal Green', 'dark' => 'Matrix Dark' ) ) ); $wp_customize->add_setting( 'binary_custom_copyright', array( 'default' => 'Dominique Blake-Hofer', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'binary_custom_copyright', array( 'label' => 'Copyright Name', 'section' => 'binary_general_settings' ) ); // --- PRO EINSTELLUNGEN --- if ( ! empty( get_theme_mod( 'binary_license_key' ) ) ) { $wp_customize->add_section( 'binary_pro_options', array( 'title' => 'Binary Pro Features', 'priority' => 40 ) ); $wp_customize->add_setting( 'binary_shell_text', array( 'default' => 'ROOT@BLAKE-HOFER:~#', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'binary_shell_text', array( 'label' => 'Shell-Text', 'section' => 'binary_pro_options' ) ); $wp_customize->add_setting( 'binary_hide_status', array( 'default' => false, 'sanitize_callback' => 'binary_sanitize_checkbox' ) ); $wp_customize->add_control( 'binary_hide_status', array( 'label' => 'System-Status ausblenden', 'section' => 'binary_pro_options', 'type' => 'checkbox' ) ); $wp_customize->add_setting( 'binary_hide_branding', array( 'default' => false, 'sanitize_callback' => 'binary_sanitize_checkbox' ) ); $wp_customize->add_control( 'binary_hide_branding', array( 'label' => 'Entwickler-Link ausblenden', 'section' => 'binary_pro_options', 'type' => 'checkbox' ) ); } } add_action( 'customize_register', 'binary_log_pro_customize_register' ); function binary_sanitize_checkbox( $checked ) { return ( ( isset( $checked ) && true === $checked ) ? true : false ); }