Archives for: "December 2016"
PHP Square Bracket Errors
I built a wordpress plug-in. The plug-in is working fine in a server, but another server returned an error about '[. I compared the two servers. Their php is different. The problematic server got old version of php which is php .5.3. Then I read the php… more »
The Database Object in WordPress
You can access the database via WordPress. You can use any raw SQL too. That is quite easy. You only need to call a global object; global $wpdb; For the raw SQL, you can use query method: $wpdb->query( " UPDATE $wpdb->posts SET post_parent = 10 WHERE ID… more »
Tags: wordpress
WordPress Serialize the JSON object
Although WordPress got its own JSON API, you still have your own JSON API for your own plugin and serialize your own data. That is not a problem. WordPress library got a function to serialize any objects to JSON Format. That is very easy. You can use… more »
WordPress Finally got a REST API
I used Wordpress as the development framework for a mobile application project. Wordpress has a set of XMLPRC api for a very long time. Moreover, the mainstream in Mobile development is to use JSON as the communication format, rather than XML. JSON is… more »