mercredi 28 septembre 2016

How can i re-write these arrays, and vars?

I have a dropdown with three values "Divi,Extra,theme3" User selects a value, and that value is tied into this hook, which passes it on to another program. What i have below may work, however i would like to try a different way to re-write it using all the info below.

if($vars["params"]["customfields"]["theme"] === "divi") { $contentid = "4a661d4vtym88go44cwo444c0";
} else if($vars["params"]["customfields"]["theme"] === "extra") { $contentid = "cdnjaxaosao0cwko8ww08skgc"; } else if($vars["params"]["customfields"]["theme"] === "theme3") { $contentid = "2jspn9z2tkw0gcgg0wccks0c0"; } else { return; }

Aucun commentaire:

Enregistrer un commentaire