<?php

include "webgradients-parsed-list.php";

global $mesmerize_webgradients;

$mesmerize_webgradients = array(
    "warm_flame",
    "night_fade",
    "spring_warmth",
    "juicy_peach",
    "young_passion",
    "lady_lips",
    "rainy_ashville",
    "frozen_dreams",
    "winter_neva",
    "dusty_grass",
    "tempting_azure",
    "heavy_rain",
    "amy_crisp",
    "mean_fruit",
    "deep_blue",
    "cloudy_knoxville",
    "malibu_beach",
    "true_sunset",
    "morpheus_den",
    "rare_wind",
    "near_moon",
    "wild_apple",
    "saint_petersburg",
    "arielles_smile",
    "everlasting_sky",
    "happy_fisher",
    "blessing",
    "sharpeye_eagle",
    "ladoga_bottom",
    "lemon_gate",
    "itmeo_branding",
    "zeus_miracle",
    "old_hat",
    "star_wine",
    "deep_blue",
    "coup_de_grace",
    "happy_acid",
    "awesome_pine",
    "new_york",
    "shy_rainbow",
    "loon_crest",
    "mixed_hopes",
    "fly_high",
    "strong_bliss",
    "fresh_milk",
    "snow_again",
    "february_ink",
    "kind_steel",
    "soft_grass",
    "grown_early",
    "sharp_blues",
    "shady_water",
    "dirty_beauty",
    "great_whale",
    "teen_notebook",
    "polite_rumors",
    "sweet_period",
    "wide_matrix",
    "soft_cherish",
    "red_salvation",
    "burning_spring",
    "night_party",
    "sky_glider",
    "heaven_peach",
    "purple_division",
    "aqua_splash",
    "above_clouds",
    "spiky_naga",
    "love_kiss",
    "sharp_glass",
    "clean_mirror",
    "premium_dark",
    "cold_evening",
    "cochiti_lake",
    "summer_games",
    "passionate_bed",
    "mountain_rock",
    "desert_hump",
    "jungle_day",
    "phoenix_start",
    "october_silence",
    "faraway_river",
    "alchemist_lab",
    "over_sun",
    "premium_white",
    "mars_party",
    "eternal_constance",
    "japan_blush",
    "smiling_rain",
    "cloudy_apple",
    "big_mango",
    "healthy_water",
    "amour_amour",
    "risky_concrete",
    "strong_stick",
    "vicious_stance",
    "palo_alto",
    "happy_memories",
    "midnight_bloom",
    "crystalline",
    "raccoon_back",
    "party_bliss",
    "confident_cloud",
    "le_cocktail",
    "river_city",
    "frozen_berry",
    "elegance",
    "child_care",
    "flying_lemon",
    "new_retrowave",
    "hidden_jaguar",
    "above_the_sky",
    "nega",
    "dense_water",
    "chemic_aqua",
    "seashore",
    "marble_wall",
    "cheerful_caramel",
    "night_sky",
    "magic_lake",
    "young_grass",
    "colorful_peach",
    "gentle_care",
    "plum_bath",
    "happy_unicorn",
    "full_metal",
    "african_field",
    "solid_stone",
    "orange_juice",
    "glass_water",
    "slick_carbon",
    "north_miracle",
    "fruit_blend",
    "millennium_pine",
    "high_flight",
    "mole_hall",
    "earl_gray",
    "space_shift",
    "forest_inei",
    "royal_garden",
    "rich_metal",
    "juicy_cake",
    "smart_indigo",
    "sand_strike",
    "norse_beauty",
    "aqua_guidance",
    "sun_veggie",
    "sea_lord",
    "black_sea",
    "grass_shampoo",
    "landing_aircraft",
    "witch_dance",
    "sleepless_night",
    "angel_care",
    "crystal_river",
    "soft_lipstick",
    "salt_mountain",
    "perfect_white",
    "fresh_oasis",
    "strict_november",
    "morning_salad",
    "deep_relief",
    "sea_strike",
    "night_call",
    "supreme_sky",
    "light_blue",
    "mind_crawl",
    "lily_meadow",
    "sugar_lollipop",
    "sweet_dessert",
    "magic_ray",
    "teen_party",
    "frozen_heat",
    "gagarin_view",
    "fabled_sunset",
    "perfect_blue",
);

add_filter("mesmerize_wp_ajax_webgradients_list", function ($result) {

    global $mesmerize_webgradients;

    foreach ($mesmerize_webgradients as $icon) {
        $title    = str_replace('_', ' ', $icon);
        $result[] = array(
            'id'       => $icon,
            'gradient' => $icon,
            "title"    => $title,
            'mime'     => "web-gradient/class",
            'sizes'    => null
        );
    }

    return $result;
});

add_filter("mesmerize_parsed_webgradients_list", function ($result) {
    global $mesmerize_parsed_webgradients;
    return array_merge($result, $mesmerize_parsed_webgradients);
});
add_filter("mesmerize_webgradients_list", function ($result) {
    global $mesmerize_webgradients;

    return array_merge($result, $mesmerize_webgradients);
});
