Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 424 of 429

Helper Function For Registering JavaScript and Stylesheets with WordPress

If you wish to register WordPress JavaScript and/or stylesheet dependencies, the API provides functions that make this easy – it’s straightforward both for JavaScript and for stylesheets.

Whenever you’re doing any kind of work in which you find yourself making frequent calls to these functions, it may help to include a helper function to make it a bit easier.

Here’s an example function that I’ve used in a few of my projects:

Continue reading

Moving a git repository with git bundle

For the most part, I’ve been doing all of my development on SlideNote out of a git repository located in an arbitrary directory on my hard drive.

Recently, I needed to move several projects to another location and since I had several changes that I’d yet to commit, I wanted to move the repository while keeping all of the changes intact.

Here’s how to do it using git’s bundle command:

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑