Tag / WordPress

Let’s say you’re creating a page in the dashboard that’s tied to a new menu item – perhaps something that’s being added to the Tools menu – and you want to display some options among some other text or some other element or set of elements that you’re displaying.

It’s completely possible to use the Settings API to do exactly that, but it may also be a little heavy-handed for saving a couple a small set of options.

Luckily, WordPress has a hook that’s available that makes it pretty easy to save information like this that’s completely usable outside of the Settings API.

Out-of-the-box, the meta boxes that WordPress displays on the dashboard aren’t exactly overkill. I mean, if you’re a blogger, then I think the chances are strong that you’ll need: Publish Categories Tags Comments And¬†maybe the Excerpt feature (depending on your theme) But if you’re building a solution for someone else where that information is irrelevant,¬†wouldn’t […]

Don’t let anyone let you feel like a lower quality developer because you know or you don’t use whatever tools they use. That’s immaturity on their part. You can always learn new tools (people do it everyday both in our industry and in others).

Anyway, regardless of if you’re a one man shop, a two man shop, or a medium-to-large team, there’s no silver bullet set of tools that you can find to maximize your productivity. Instead, there’s a suite of tools available from which you can pick to build your own toolbox that’s ideal for your team.

The only caveat, in my opinion, is whatever it is that you opt to use, make sure that it doesn’t misplace good engineering practices. When your tools override good engineering, the tool is likely creating more problems – like technical debt – than it is solving.

In this series, we’re writing a TinyMCE plugin that is then wrapped in a WordPress plugin that will then allow the user to click on the button and add their own content (whatever that content may be).

In the next couple of articles, we’re going to take a look at how to do exactly that. First, we’ll start with simply connecting the result of clicking on the TinyMCE button with WordPress and then we’ll look at how to do some more advanced work.

When you’re working on building a plugin that’s adhering to the best practices of using a predefined hook and another plugin ends up breaking the usual flow of control, it can be an extremely frustrating thing.

I’m not in the business of “calling other people out” or identifying problematic plugins on this site (though I don’t mind to discussing one on one), so this post is not about a plugin that’s doing things in a way that I don’t recommend.

Instead, it’s about finding ways to find a solution when you’re faced with a similar problem.

Throughout this series, I’ve been talking through the process of how go about adding a TinyMCE button to WordPress – specifically, adding a custom button to the post editor.

Up to this point, I’ve covered a number of different things. Namely:

– Stubbing out the plugin and adding the JavaScript
– Including any dependent files that you may need in order to power your plugin
– And how to bootstrap the plugin so that it is able to be activated from within WordPress

The thing is, we haven’t actually made anything happen in the editor let alone even introduce a button into the actual editor yet. In this post, we’ll do exactly that.

Regardless of if you’re new to a small agency or team or a large corporate large, one of the best things you can do as a developer is to jump in and begin trying to fix bugs from the existing bug reports.

This helps you to become familiar with how the software is organized, how it works, any coding standards they have in place, processes for testing, deployment, and so on. There’s a lot to be gained for working on bugs. And when it comes to WordPress, the experience is no different.

Understanding WordPress and Subversion is key if you want to be able to checkout the source code, test new features, evaluate bugs, and apply patches.

Here’s how to get started doing exactly that.

Remember that when adding a button to the post editor in WordPress, a portion of the code is going to be writing a plugin for the TinyMCE editor (since that’s what the actual post editor is).

In a sense, you’re placing a plugin within a plugin. That is, you’re placing a TinyMCE plugin within a WordPress plugin.

Anyway, in an attempt to modularize the code, you’ll likely have at least a couple of files that power the plugin – one of which that will be specifically for the TinyMCE button and one of which that will be specifically for other logic that fires when the button is clicked (like displaying a modal or something like that).

If you’re interested in adding a TinyMCE button to WordPress, then this series of articles aims to do just that. In the first post of the series, I walked through some of the basic things that need to be done in order to get started with adding a custom button.

I laid out the file organization, the basic plugin structure, some of the foundational JavaScript, and started working on the hooks that are necessary for adding a custom button.

As it stands right now, the functions responsible for adding a new button aren’t actually defined within the context of a class much less hooked into the plugin itself. So in this post, we’ll take a look at exactly how to do exactly that.

Starting with WordPress?
I recommend Array Themes
Array Themes
Hosted By
Hosted By SiteGround