WordPress has come a long way since its humble beginnings as blog software. WordPress has got through a CMS phase where custom post types were introduced. We are now seeing the software enter a platform phase. Developers are beginning to use WordPress to build SaaS services and API’s to power desktop and WordPress mobile apps. The shift from content driven CMS to data delivering pipelines over the next few years will be drastic. The WordPress Admin is currently being overhauled to take advantage of new technologies and the data driven applications model thats swept away the old website based internet. All of this is made possible by the addition of a JSON REST API. Read this companion post of a WordCamp talk, Software of[…]
You got your ionic app set up but now you need to create a process to request data from your WordPress REST API server. ionic is Angular so most of the stuff you learn can be translated to Angular development. Likewise, you can use Angular 2 code in your ionic app. We won’t go into details on Providers, if you want to learn more Google a bit and you can find some more in-depth tutorials. The ionic CLI has a generate provider command that adds the files to your app. Run the following CLI command in your app folder. Replace “api” with a name you choose to specify its data type. If you are building an app that displays posts you might[…]
The WordPress REST API is a great thing. It allows WordPress data to be broken free from PHP templates. You can consume this data with other technologies. Data can be accessed from external sources. There are a couple things you might add to the API that are not included. One is caching and the other is restricting access. WordPress REST API CACHE There is no cache out of the box. If your data isn’t updated frequently then you might want to cache the data. Someone could direct a bot to slam your API endpoints and kill your server. Caching the data will slow down database hits and the data will respond quickly. I use the WP REST API CACHE plugin. The[…]
BuddyVerified has been updated to fix an issue with settings not saving. I also had to make some changes to the placement of the badge. It is no longer attached to the avatar. The new placement is near a username. BuddyPress doesn’t have any good method to add this. There are filters for some of the text and the CSS of different themes has caused problems with badge placement. If you insist on having the badge over the avatar you can use the following function to place the badge anywhere in your templates and add your own CSS to make it work for you. bp_verified_image( $user_id ) New user profile setting to toggle the badge in member lists. You can[…]
Adding pages to an ionic app is just as easy as it is to start a new app project when you use the ionic CLI. One of the core concepts of Angular 2 and ionic is developing everything in a modular ethos. Modular ionic code will allow you to “cut and paste” app parts over and over and you can quickly build apps for clients. ionic generator CLI command creates a page and its subsequent files are placed in a folder titled the name of the page. The generate command creates an .html, .scss, and a .ts file in a root folder /pages. use a camel-casing syntax for you page name if the title is multiple words. ionic g page myPage √[…]
ionic offers a ton of features to create a mobile app. One feature is its command line interface. This CLI sets up app development environments with a few simple commands. Installing ionic You will need node installed, ionic uses NPM modules. Once node is installed open terminal on mac or command prompt on Windows. Enter the following command. This will install ionic globally and allow the usage of ionic commands. sudo npm install -g ionic Creating Starter Apps After ionic is installed, enter the following command. This will create a tabs starter app. There are a few starters available from ionic. We will go over these later. This will create a new app named myAwesomeApp. Change myAwesomeApp to the name of[…]
WordPress has had no formal REST API. There is the crude XMLRPC, but we won’t go into the gory details of the past. As part of Google Summer of Code (GSOC), Ryan McCue submitted a proposal for creating a formal JSON API to be included in WordPress core and therefore available to every WordPress.org install. For those who may not know what a REST API is; it stands for Representational State Transfer. In short, it separates client from the server. Each request from any client contains all the information necessary to service the request, and session state is held in the client. There is no “official” standard for RESTful web API’s. This is because REST is an architectural style. You can use HTML, XML or[…]
I love this. You don’t always need a lot to accomplish something.