Per Søderlind

I code for fun

Learn to code!

Here’s a list of free courses from Scrimba, in suggested order, that I recommend:

Resetting the Customizer in your WordPress Theme to a blank slate

Thanks to Weston Ruter at XWP, removing all the default WordPress customizer entries is easy using the Customizer Blank Slate plugin. The only caveat is that it must be loaded as a plugin. So what do you do if you want to use it in a theme? You add Customizer Blank Slate...

An SVG logo Custom Control for the WordPress Customizer

Another proof of concept. The custom control You create a custom control by extending the WP_Customize_Control class. I check for WP_Customizer_Control existence before adding custom control because WP_Customize_Control is loaded on customizer page only. list_svg() Create a option list with URLs to SVG files. The SVG files are defined in svg.json...

WP Gears and the Heartbeat API

Testing WP Gears and the Heartbeat API, WP Gears is at https://github.com/10up/WP-Gears. NOTE: this plugin is run continuously, triggered by 'plugins_loaded', you should use an event triggered by the user (onclick, onhover etc))

WordPress linting using Code Climate, the Swiss Army knife of code linting

  tl;dr -  Code Climate is a very easy to implement linter for PHP, JavaScript, CSS etc. [A linter] find code that doesn't correspond to certain style guidelines source: Wikipedia When I upgraded my plugins to support WordPress 4.6, I decided that I wanted to follow the WordPress Coding Standards....