Cowboy Jason Stanley performing a riding trick at the Round-Up, Pendleton, Oregon flickr photo by UW Digital Collections shared with no copyright restriction (Flickr Commons) I’ve been doing quite a bit more with the WordPress Rest API lately. There’s plenty of documentation and tutorials out there but most of it still feels a bit scattered to me so I’m going to stick a few of the basics here and add a few things that have come up repeatedly that aren’t quite as basic. There’s an attempt here to move upwards in complexity with the examples but to keep them as clean as possible. This will deal entirely with getting the data. I haven’t done much with using the API to write or modify data. Get the Info There are many ways to get data depending on your library of choice or if you’re using vanilla JS. I’ve played with fetch and Axios on the lighter side and jQuery, Vue, and Angular (v1) on the heavier/more involved side of things. I’ll use jQuery in this version because it’s fairly popular but here’s a Vue example. The example below does a basic jQuery ajax call for the JSON associated with blog information. See the Pen simple jquery get of WP JSON for the site by Tom (@twwoodward) on CodePen. The URL Structure/Accessing […]
As part of some thoughts on building out a series of reflective views for student portfolio blogs, I thought seeing your WordPress posts in the TimelineJS view might be a useful way to look back over your progress. I intend to wrap this into a custom spreadsheet template and/or a plugin1 but figured I’d sketch out how it works so far in case anyone was interested. The WP Rest API makes it pretty easy to write the data via Google Script. I just want to cut out chunks of the data and put it in the right fields. The following script does that and writes it to a page named “wp.” 1 Or maybe just a page where you throw in a blog URL and get a bunch of alternate view/data options.
Judge rules emoji are proof of intent One piece of evidence used against the defendants was an emoji-filled text message they sent to Dahan, which mentioned the house and included the emoji chain “?.” Animating the Virtual DOM by sdrasner some really slick stuff in this Many pet rabbits will die in Second Life on Saturday | Rock, Paper, Shotgun Virtual rabbits across Second Life [official site] will fall asleep on Saturday then never wake up, now that the their digital food supply has been shut down by a legal battle. The player-made and player-sold Ozimals brand of digirabbits are virtual pets that players breed and care for in the sandbox MMO, and even need to feed by buying DRM-protected virtual food. But they rely on servers. Waypoint reported earlier today that the seller of Ozimals and the Pufflings virtuabirds has received a legal threat he says he cannot afford to fight, so they’ve shut down. By Saturday, rabbits will run out of food and enter hibernation. Arctic stronghold of world’s seeds flooded after permafrost melts | Environment | The Guardian It was designed as an impregnable deep-freeze to protect the world’s most precious seeds from any global disaster and ensure humanity’s food supply forever. But the Global Seed Vault, buried in a mountain deep inside the Arctic circle, has been […]
The theta software sucks but the camera is decent #theta360 – Spherical Image – RICOH THETA At one point you could mount a Ricoh Theta camera on a Mac like so . . . Mass Storage: Press Wireless and Shutter. While continuing to hold these buttons, plug THETA into computer with USB cable. Camera will be powered off. via this It appears this no longer works on Macs running an updated OS. I never found one that worked . . . but supposedly it does on older version. I tried a number of things on various machines here but even diskutil list in terminal wasn’t seeing the Ricoh. Molly even went to great lengths to call and talk to a person on a phone but he was less than no help. There seems to be a pretty basic assumption that you only want to take video in the camera and upload it via their app. Much like the GoPro, it’s hard to tell what’s going on in the Ricoh via the device itself. It tells you it’s on, wi-fi is up etc. but storage remaining and a few other things that might matter are not apparent. Get Your Video & Cleanse the Camera To get the content to your phone and remove it from the camera, you’ll need to go […]
Photoshop decided it was smarter than me and would override my decisions about exporting a PNG layer with transparencies. It’d clip it and mess up my careful alignment. You can see someone else suffering from this on the Adobe forums. This could not stand. If you don’t want to see the setup for the issue and just want the answer . . . take the paint brush set the opacity to 0 and make a slash across the top prior to export.
itsnotmythrowaway1 comments on Senior Arizona Lawmaker: Teachers Should Expect To Work Second Jobs And Have Lower Salary Expectations Worse yet, many of those charters are deliberately manipulating the enrollment process to ensure they do not have to educate poor and underprivileged students. How does a “public” school do this? Let me give you an example. Many charter schools do not offer bus service. This means parents are required to drive their children to school in order to go to these charter schools. I sat in a meeting at one of these charter schools where the powers-that-be within the school were concerned that “bad” students and english language learning students (read: hispanic students) might still come to the school because they could bicycle or walk to school. The solution? The school set up a policy where students cannot walk or cycle to school, and they removed all bicycle parking. They did it under the claim that they were interested in student safety, and that riding or walking to school was un-safe. If you can’t drive your child to the school (because you’re working or otherwise occupied), your child can’t go to that school. In the Dark – Futility Closet “This paper was undertaken in an attempt to shed light on some very mysterious problems. I fear I have done little more […]
The Judah Will Project (now with new URL!) has continued to grow as Ryan has been putting in serious work on the research and writing side of things. I have no choice but to step up my game and it’s been an interesting learning experience as it’s the first time I’ve tried anything sophisticated with WP providing the writing/data side of things while presenting that information somewhere else entirely. Headless? So here’s a recap of changes since the last update. More Obvious I talked to Jim about the project a few days ago. It became clear to me that it wasn’t obvious that the names in the will transcription were clickable prior to actually clicking on one. I fixed that with a simple dashed underline. This was one of those times where I was trying to keep the visual elements minimal but ended up going too far. I also threw in a modal popup for initial directions to make things more obvious. I just used this simple modal jquery plugin. It immediately drove me crazy by popping up all the time. So I looked around and found a solution to set cookies which I’d never done before. I also used a modal for the ever-growing family tree. When you have 12 kids in a generation, things get pretty wide. Permanent […]
I had a quick question today about formatting an interview. That led to some quick experimentation in Code Pen and some simple uses of pseudo class selectors.1 When I first looked at the transcript I started to assign a class to each paragraph. That would work but was tedious. Given we were switching speakers at every paragraph I could be clever/lazy. nth-of-type will let me select odd and even elements. You can also be far fancier (every 5th etc.) but even/odd was all I needed. Given how pleasant that was, I figured I’d try a few more. This CSS lets me grab the first letter (and the colon) of the paragraphs and make them a bit like a drop cap.2 I wondered if I could use the selectors in combination to alternately style the first letters drop caps. Turns out you can. Anyway a fun 10 minutes or so that might be of interest to other wanderers out there. See the Pen demo for clare – fancy version by Tom (@twwoodward) on CodePen. 1 Disregard my neapolitan-ice-cream-inspired color scheme. 2 I had to look up the word for ‘big letters in medieval manuscripts’ and didn’t actually read/follow the tips for drop caps at the URL linked here . . .