Renaming a key of an associative array in PHP is not a matter of magic, usually we can do it by assigning to a new key the value associated to the old key, and unsetting the old element. But things complicate slightly when we want to rename a key without causing the elements of the array to shuffle. In such a case, native PHP functions alone aren't enough. Creativity has to absolutely come into play.
Even though it has been an experience lasted only a few months, developing add-ons for SiteTree has been very pleasant. As we know, sooner or later everything draws to an end, but that isn't always bad. I write this because the last add-on left too, Multilingual Leaf, has been incorporated into SiteTree.
Today is the day. SiteTree turns into a premium plugin to all intents and purposes. As disclosed about a month ago, this change of course is the offspring of my current financial situation, but also of the will to give a future to the project.
I guess you wouldn't have expected such a drastic change of course. Me neither. I have always been of the idea that the freemium business model was the one that best suited my way of thinking, and I am still convinced of that, but sometimes needs change rapidly, and when it does happen, action has to be taken proactively.
Do you like the new icon? The slight refresh hasn't changed its meaning — something I will tell you about some other time — but it adds-up to an update that introduces in SiteTree two functionalities previously exclusive to Demux Leaf: the ability to produce a multi-page Site Tree and that of creating collections of XML sitemaps.
Developing a software is tough, but giving it a new name, it's a no less challenging task. Most of the time such a choice is nourished by an obvious reason, other times it is simply the need to give breath to an idea, to push for the change. Wonder Leaf is born exactly from said need. It's the result of a thought that finally reached full maturity: the ability to look at life in wonder isn't a privilege of a few, but an aptitude of everyone, and as such, it has to be celebrated everyday.
Pro Leaf is slowly collecting new gems, little features currently focused on improving your productivity as a SiteTree's user. This time around it's the Ghost Pages feature of SiteTree to see an uplift: Pro Leaf 1.2 makes Ghost Pages easier to spot, and faster to flag.
A new WordPress plugin has just bloomed into the Interweb, an add-on addressed to SiteTree's lovers who have based their multilingual website upon WPML. Its name is Multilingual Leaf, and it is only awaiting to be discovered.
The past November, when I launched Demux Leaf, one of the first official add-ons for SiteTree, I couldn't have predicted that only three months later I would have announced my decision of opening its source to the community, but I'm doing it, and I couldn't be more confident about my choice.
Sometimes the need arises for an array of Page objects ordered hierarchically, but all there is available is just a collection of Page objects ordered by title for example, maybe because they were previously fetched from the database through the global
$wpdbobject. On these occasions, to hierarchically reorder an array as such, we have to be creative, because WordPress isn't equipped with an utility function made up on purpose — or at least I have not dug enough to uncover one. In truth, I simply enjoyed looking for my own solution, and that's the main reason why I am here now writing about it.