Dynamically Add Signup Location to Mailchimp Embedded Form

A situation came up a franchise site that is a WordPress multisite installation, where we wanted to dynamically populate the signup location property for segmentation, set with the website URL. Following these instructions doesn’t work for this situation, though it is close.  https://kb.mailchimp.com/lists/signup-forms/determine-webpage-signup-location. We also can’t do something like this (it didn’t seem to work): […]

Continue reading...

Using PHP Lambda Functions with WordPress add_action() and add_filter() Functions

I’m a fan of anonymous functions and reusable function definitions, like PHP lambda functions in JavaScript.  I’ve used anonymous functions in WordPress development where possible, so for example: add_filter(‘widget_text’, function($html) { if( strpos($html,'<?php’) !== false ) { ob_start(); eval(‘?>’ . $html); // Close the current PHP tag…the contents we’ll get will have <?php ?> tags […]

Continue reading...

Angular Snippets for Sublime Text

If you develop AngularJS applications, sometimes you can forget the syntax for the numerous amount of services you can build.  I ran into this situation and finally figured that I would create these Angular snippets for Sublime Text to help me out.  I’ve written them to be inline and chainable, meaning you need to define your “app” […]

Continue reading...