Devlog

Remove all missing files with SVN

This will also take care of the “@” when you’re an iOS developer with lots of @2x and @3x files: svn st | grep ^! | awk ‘{print ” –force “$2″@”}’ | xargs svn rm

Mac OS apps for optimizing images

Nice simple apps to optimize images for web or app development, that can be used by programmers and other people who don’t know anything about image optimization… Install these 2 little apps: https://pngmini.com/ https://imageoptim.com/mac And if you want to batch proces optimization, install the CLI tool: https://github.com/JamieMason/ImageOptim-CLI Another nice app for converting SVG to PNG: […]

Titanium and localize moment.js

Titanium comes with a standard Moment.js library included. If you want to localize it, you have to require the locale you need. This needs to be done statically! So if you need a Dutch moment.js localization, you explicitly need to require it: require(“/alloy/moment/lang/nl”); You cannot require it dynamically, because the compiler needs to include it […]

Move WordPress Multisite to new URLS

Here are the steps involved when moving a WordPress Multisite installation to a new domain name. In my case I wanted to move everything (code + database) from development to production. After copying everything to the new environment, you have to change the following items: Make sure to add or update your wp-config.php file: define(‘DOMAIN_CURRENT_SITE’, […]

Show installed iOS simulators command line

xcrun simctl list

WordPress Users, Roles and Capabilities

I find the capabilities one of the most difficult to grasp concepts in WordPress development. On one hand, you have the capabilities of a custom post type and on the other hand you have the capabilities of a user or user role. And then you have the 2 other capabilities options you can set when registering a custom […]

Get custom post type by custom taxonomy on the WordPress rest api

To get custom post types and filter them by custom taxonomies, you can do the following: or filter by more than one taxonomy (this means: give me posts from taxonomy 1 OR 3 OR 6): or to exclude posts with specific taxonomies: Maybe good to know: combining categories and tags means AND, so for example […]

Custom taxonomies vs post meta data

There are many articles about the difference between custom taxonomies and post meta data. Here are some differences I experienced: There is no index on the post meta value. With the builtin WP_Query functionality, you cannot search with operators like <, >, =, >=, BETWEEN, etc. in custom taxonomies, so if your values are numbers, […]

Install Titanium continuous builds

You can download and install continuous Titanium builds at: http://builds.appcelerator.com/ And then install it with something like: appc ti sdk install –branch 6_3_X 6.3.1.v20171101154403 These builds are not supported, so I only do this when the official versions have a bug that needs to be resolved asap.

URL structure of WordPress custom post types and taxonomies

Explanation about register_taxonomy and register_post_type and how this is reflected in the URL structure. register_taxonomy( ‘my_newscat’, [‘post’], [ ‘labels’ => [‘name’ => ‘News category’], ‘public’ => true, ‘hierarchical’ => true, ‘show_admin_column’ => true, ‘rewrite’ => [ ‘slug’ => ‘newscategories’ ], ‘query_var’ => ‘newscategories’ ] ); If we didn’t specify a rewrite slug, we had to […]