It looks like nothing was found at this location. Maybe try one of the links below or a search?
Browse by Category
- Sem categoria (1)
/** * Green Guardians Theme Customizer * * @package GreenGuardians */ function green_guardians_customizer($wp_customize) { // Hero Section Settings $wp_customize->add_section('green_guardians_hero_section', array( 'title' => __('Hero Section', 'green-guardians'), 'priority' => 10, )); $wp_customize->add_setting('green_guardians_hero_title', array( 'default' => 'Protect Our Planet', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_hero_title', array( 'label' => __('Hero Title', 'green-guardians'), 'section' => 'green_guardians_hero_section', 'type' => 'text', )); $wp_customize->add_setting('green_guardians_hero_subtitle', array( 'default' => 'Join us in the mission to save environment and create a sustainable future for generations to come', 'sanitize_callback' => 'sanitize_textarea_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_hero_subtitle', array( 'label' => __('Hero Subtitle', 'green-guardians'), 'section' => 'green_guardians_hero_section', 'type' => 'textarea', )); // About Section Settings $wp_customize->add_section('green_guardians_about_section', array( 'title' => __('About Section', 'green-guardians'), 'priority' => 20, )); $wp_customize->add_setting('green_guardians_about_title', array( 'default' => 'About Green Guardians', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_about_title', array( 'label' => __('About Title', 'green-guardians'), 'section' => 'green_guardians_about_section', 'type' => 'text', )); $wp_customize->add_setting('green_guardians_about_content', array( 'default' => '
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable.
If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet.
', 'sanitize_callback' => 'wp_kses_post', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_about_content', array( 'label' => __('About Content', 'green-guardians'), 'section' => 'green_guardians_about_section', 'type' => 'textarea', )); // Contact Section Settings $wp_customize->add_section('green_guardians_contact_section', array( 'title' => __('Contact Information', 'green-guardians'), 'priority' => 30, )); $wp_customize->add_setting('green_guardians_address', array( 'default' => '123 Green Street, Eco City, EC 12345', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_address', array( 'label' => __('Address', 'green-guardians'), 'section' => 'green_guardians_contact_section', 'type' => 'text', )); $wp_customize->add_setting('green_guardians_phone', array( 'default' => '+1 (555) 123-4567', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_phone', array( 'label' => __('Phone', 'green-guardians'), 'section' => 'green_guardians_contact_section', 'type' => 'text', )); $wp_customize->add_setting('green_guardians_email', array( 'default' => get_option('admin_email'), 'sanitize_callback' => 'sanitize_email', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_email', array( 'label' => __('Email', 'green-guardians'), 'section' => 'green_guardians_contact_section', 'type' => 'email', )); // Social Media Settings $wp_customize->add_section('green_guardians_social_section', array( 'title' => __('Social Media', 'green-guardians'), 'priority' => 40, )); $social_platforms = array( 'facebook' => __('Facebook', 'green-guardians'), 'twitter' => __('Twitter', 'green-guardians'), 'instagram' => __('Instagram', 'green-guardians'), 'linkedin' => __('LinkedIn', 'green-guardians'), ); foreach ($social_platforms as $platform => $label) { $wp_customize->add_setting("green_guardians_{$platform}", array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', 'transport' => 'postMessage', )); $wp_customize->add_control("green_guardians_{$platform}", array( 'label' => $label, 'section' => 'green_guardians_social_section', 'type' => 'url', )); } // Footer Settings $wp_customize->add_section('green_guardians_footer_section', array( 'title' => __('Footer', 'green-guardians'), 'priority' => 50, )); $wp_customize->add_setting('green_guardians_footer_description', array( 'default' => 'Working together to protect our environment and create a sustainable future for generations to come.', 'sanitize_callback' => 'sanitize_textarea_field', 'transport' => 'postMessage', )); $wp_customize->add_control('green_guardians_footer_description', array( 'label' => __('Footer Description', 'green-guardians'), 'section' => 'green_guardians_footer_section', 'type' => 'textarea', )); // Theme Colors $wp_customize->add_section('green_guardians_colors_section', array( 'title' => __('Theme Colors', 'green-guardians'), 'priority' => 60, )); $wp_customize->add_setting('green_guardians_primary_color', array( 'default' => '#4CAF50', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'green_guardians_primary_color', array( 'label' => __('Primary Color', 'green-guardians'), 'section' => 'green_guardians_colors_section', ))); $wp_customize->add_setting('green_guardians_secondary_color', array( 'default' => '#2196F3', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'green_guardians_secondary_color', array( 'label' => __('Secondary Color', 'green-guardians'), 'section' => 'green_guardians_colors_section', ))); } add_action('customize_register', 'green_guardians_customizer'); /** * Customizer JS for live preview */ function green_guardians_customizer_live_preview() { wp_enqueue_script( 'green-guardians-customizer', get_template_directory_uri() . '/assets/js/customizer.js', array('jquery', 'customize-preview'), '1.0.0', true ); } add_action('customize_preview_init', 'green_guardians_customizer_live_preview'); /** * Generate dynamic CSS from customizer settings */ function green_guardians_customizer_css() { $primary_color = get_theme_mod('green_guardians_primary_color', '#4CAF50'); $secondary_color = get_theme_mod('green_guardians_secondary_color', '#2196F3'); $custom_css = " :root { --primary-color: {$primary_color}; --secondary-color: {$secondary_color}; } .btn-primary { background: {$primary_color} !important; } .btn-primary:hover { background: " . green_guardians_adjust_brightness($primary_color, -20) . " !important; } .service-icon { background: linear-gradient(135deg, {$primary_color}, " . green_guardians_adjust_brightness($primary_color, -20) . ") !important; } .project-category { background: {$primary_color} !important; } .member-role { color: {$primary_color} !important; } .progress-fill { background: linear-gradient(90deg, {$primary_color}, " . green_guardians_adjust_brightness($primary_color, -20) . ") !important; } "; wp_add_inline_style('green-guardians-style', $custom_css); } add_action('wp_enqueue_scripts', 'green_guardians_customizer_css'); /** * Helper function to adjust color brightness */ function green_guardians_adjust_brightness($hex_color, $percent) { $hex_color = ltrim($hex_color, '#'); $rgb = array( hexdec(substr($hex_color, 0, 2)), hexdec(substr($hex_color, 2, 2)), hexdec(substr($hex_color, 4, 2)) ); $adjusted_rgb = array(); foreach ($rgb as $value) { $adjusted_value = round($value * (100 + $percent) / 100); $adjusted_value = max(0, min(255, $adjusted_value)); $adjusted_rgb[] = $adjusted_value; } return '#' . sprintf('%02x%02x%02x', $adjusted_rgb[0], $adjusted_rgb[1], $adjusted_rgb[2]); }It looks like nothing was found at this location. Maybe try one of the links below or a search?