The Easy Upload Renamer got updated: now in Spanish, French, German, Swedish and Finnish

The Easy Upload Renamer plugin The Easy Upload Renamer Plugin for WordPress got just updated to version 2.2.0. What’s new? Support for localization, included translations in Spanish, French, German, Swedish and Finnish, and a cleaner settings screen (see screenshow below).

I’m excited about the amount of downloads my little tool has received in the past couple of years. Check out the complete list of features over at CodeCanyon!

Easy Upload Renamer settings screenshot

Tagged , , ,

Conditional activation for plugins

In this post, I present a simple way to check for things on the server before allowing a plugin to be activated.

The users are pesky. They try to do things that the programmer cannot foresee. They happily install plugins without reading the readme files or the instructions. Then they complain, they downvote, they critizice. If only there was a way to check for these things: is the user running the plugin under the correct WordPress version, or if the necessary dependendencies are installed, or if PHP was compiled with such-and-such extensions. Then we’d let the user know about all this at the plugin activation time. What if this ability was coded as an easy-to-add drop-in class, instead of bloating existing plugin code? I couldn’t find it, so I made it, and now I’m sharing it with you. Continue reading

Tagged , ,

James Shakespeare, talking about WordPress core, said in his post “The Dire State of WordPress” what I feel as well:

  • Views, controllers and data are mangled together in a way that makes even the most well-written themes hard to maintain.
  • Helper functions are inconsistent
  • There are no rules or best practices for theme development, so inheriting legacy code is a nightmare.
  • Designers and front-end developers struggle to make changes because their files are full of functional code
  • PHP developers struggle to make changes because their files are full of template code
  • It’s not optimised for speed of development or speed of operation.
  • There are about fifty ways to perform any given operation in WordPress, but determining which way is best pretty much depends who you talk to. Even the documentation is chock full of caveats about obscure scenarios in which you should and shouldn’t use certain functions

The Mangled WordPress

40 false assumptions about people’s names

Here’s a list of 40 assumptions that programmers make about people’s names, called “Falsehoods Programmers Believe About Names” by Patrick McKenzie of Kalzumeus Software. From rule 19 the British author Edwin Abbott Abbott springs to mind. Or the Finnish politician Yrjö Koskinen Yrjö-Koskinen.

Wandering Boxes: My plugin’s alert messages started moving down the page

I thought I was seeing things. When I was writing the admin page for a plugin, my notice and error boxes suddenly started moving around the page on their own. There’s an explanation for this behaviour, buried deep in the Javascript files. Continue reading

Tagged , ,

Easy Upload Renamer got updated

The Easy Upload Renamer pluginMy Easy Upload Renamer plugin got an update today: Thanks to a user request, I added the functionality to include or exclude post types from its renaming functionality. The current version is 2.1.0.

The plugin renames your media files on the fly as you upload them, making the filename match the post or page title. It also adds a some text of your choice, puts numbers, rewrites the attachment “title” attribute smartly, and it’s both extremely flexible and totally transparent to the user. Great for SEO and just for keeping things organized. Have a look here!

Tagged ,

The difference between term_id and term_taxonomy_id

The Codex says:

  • term_id is the ID of a term in the terms table
  • term_taxonomy_id is a unique ID for the term+taxonomy pair

What does this mean?

A term is a word. It can belong to a taxonomy, such as tags, categories, or a custom taxonomy. The thing is: there can be several taxonomies containing the same term.

Let’s say you have a term called “fattening“. This word has an id number. This is the term_id. It doesn’t depend on how this word is used, i.e. in which taxonomies the term appears.

Now the word “fattening” as a post tag also has a number. This is the term_taxonomy_id. It corresponds to “the post tag ‘fattening’“.

Maybe you also have a category called “fattening”. While the term_id is the same, the term_taxonomy_id for “the category ‘fattening’” is different.

Got it? Simple. Or maybe not. That’s the way it is, anyway.

If this post was helpful, please let me know in the comments!

Tagged , ,

Three unbelievable things:
1. WordPress doesn’t allow adding custom “bulk actions” to the Posts screen!
2. The developers don’t seem to think this is a priority!
3. I only found out about this now:)
Luckily, Justin Stern has a solution. It’s hackish, but might save the day.

WordPress doesn’t allow custom “bulk actions”

Tagged ,

Funny business with add_rewrite_rule() and “external” rewrites

There’s some funny business going on when you try to add a custom rewrite rule to WordPress and it gets interpreted as an “external” rule. What’s going on? Continue reading

Tagged , ,
Follow

Get every new post delivered to your Inbox.

Join 28 other followers