A new year. Let’s see if I can get back into the habit of posting here. Mostly for my own amusement, as my visitor count can probably be done on one hand.
Fixed one of my WordPress plugins today – the AmazoLinkenator. It automatically adds Amazon affiliate links to any Amazon site link on a WordPress site. A German user said it didn’t work with URLs that have ‘umlauts’ – those German characters that have those double-dots above characters.
The code extracts URLs from a text string into an array, then works on those URL items in the array to add the affiliate link. The regex (pattern-matching code) didn’t find a URL with a umlaut, so a lot of asking the googles found a better regex pattern that works with URLs with umlauts.
I’m putting it here for my own reference, along with where I found it.
http://stackoverflow.com/questions/38414371/replace-all-urls-in-text-to-clickable-links-in-php
@(http(s)?://)?(([a-zA-Z])([-\w]+\.)+([^\s\.]+[^\s]*)+[^,.\s])@’
It seems to work OK, so updated the plugin.
Got home last week from an extended trip to see grandkids (and their families). Went to Utah first the week before Christmas, and spent a few days there, watching them open their presents early. (The back of the Highlander was stuffed with boxes full of presents…there was just enough room for two suitcases.)
Then off to Roseville, CA to visit the other daughter and her family. She is expecting (any day now), and we hoped that we would be there for the birth. Had a great Christmas with their two children, but no new kids. We finally had to leave last Thursday, so we would avoid the big snowstorms on the way back into WA. Travelling was good on all three legs of the trip, due to my close watch on forecasted weather. There were bad storms on my non-travel days, so was nice not to drive through snow or blizzards, or worry about road closures.
While in CA, I worked on a couple of new WordPress plugin, and also on the MissionaryLetters.com site.
Nice visits, but always good to be back on home turf.