Tag Archive for 'plugins'

K2 Style Switcher – 1.1.2

Version 1.1.2 of the K2 Style Switcher plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • Added ‘languages‘ folder for l10n files
  • Added German translation (de_DE), many thanks to Julian Manzel
  • Confirmed compatibility against WordPress 2.8.5

As usual, if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.

K2 Style Switcher – 1.1.1

Version 1.1.1 of the K2 Style Switcher plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • Added code to allow the current style to specified as a URL parameter called ‘k2ss_target_style
  • Added code to allow the default style for a page or post to be specified using a custom field called ‘k2ss_default_style

As usual, if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.

Plugin Localisation Resources

Whilst working on some updates to my WordPress plugins recently I have discovered some excellent resources covering the subject of making plugins translatable:

  • The I18n for WordPress Developers page in the WordPress Codex covers all the basics and should get you started.
  • John Godley (aka. Urban Giraffe) covers the topic in more detail, including the finer points of translating plurals, and the use of printf() instead of _e(). He also provides a companion article that approaches localisation from the point of view of the person doing the translation, something that is often overlooked.
  • Finally Austin Matzko (Pressed Words) provides a succinct summary of internationalisation, including a look at Poedit, a cross platform editor for the translation files.

There is really no reason not to translate your WordPress plugins and themes, it requires minimal effort and can vastly improve the experience for users who’s first language is not the same as yours.

K2 Style Switcher – 1.1.0

Version 1.1.0 of the K2 Style Switcher plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • Encapsulated plugin functionality in a class
  • Consolidated plugin options into an array stored in a single option
  • Cleaned up code to match WordPress Coding Standards
  • Re-wrote admin panel code to use the new options mechanism introduced in WordPress 2.7
  • Made all plugin messages translatable
  • Added footer message to plugin admin panel stating the name of the plugin, the current version and the author’s name
  • Re-wrote plugin activation hook to attempt to pull in existing options from current and previous versions of the plugin as well as removing redundant options
  • Added call to load the plugin l10n / i18n text domain
  • Removed plugin deactivation code to stop configuration options being removed when plugin is deactivated
  • Added uninstall script to ensure that configuration options are removed when plugin is deleted
  • Added plugin widget in a class based on the WP_Widget class introduced in WordPress 2.8
  • Added option to hide specific elements of WordPress & K2 standard footers
  • Prevented styles that are always selected (base styles) from being added to the list of switch-able styles
  • Took out custom WPMU checks. Detection of K2 styles directory and URL is now based on K2 options
  • Added a message to the K2 options page explaining how styles are layered
  • Added code to make sure that the plugin is not loaded if K2 is not active

As usual,  if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.

NB: When the plugin is updated it will attempt to keep your previous configuration options and delete any stray options created by previous versions. To ensure that the update process works properly please do not deactivate the plugin prior to updating it. The WordPress plugin update functionality takes care of everything for you.

Stopping Content Leeches

I noticed recently that I was getting pingbacks from a site called AllAboutWordpress.com every time I published an update post for one of my plugins. It turns out that this is a site that re-publishes content from blogs, seemingly without permission. I have never been contacted to ask permission to republish my content, so I view this as content theft.

Luckily there is a nice plugin called AntiLeech by Owen Winkler that allows you to detect and blacklist content thieves, either by IP address or browser user agent. If a client that is crawling your feed matches the blacklist then you can either choose for them to receive some auto-generated Lorem ipsum text or a customised message. I chose a custom message, informing the (innocent) visitor to the infringing site that the content they were trying to view has been taken from my site without permission. There are links back to the original article permalink on my site to try and provide the potential reader with a good experience, and the content they were actually interested in.

Content theft is never a good thing for an author, hopefully AntiLeech will help to turn the tables.

Last Modified Footer – 1.1.0

Version 1.1.0 of the Last Modified Footer plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • Encapsulated plugin functionality in a class
  • Consolidated plugin options into an array stored in a single option
  • Removed duplicated code from the plugin
  • Cleaned up code to match the WordPress Coding Standards
  • Re-wrote admin panel code to use the new options mechanism introduced in WordPress 2.7
  • Improved the translatability of messages by allowing manipulation of the position of non-translatable elements in messages
  • Migrated from boolean options to named string options for better forward compatibility
  • Added a footer message to plugin admin panel stating the name of the plugin, the current version and the author’s name
  • Re-wrote plugin activation hook to attempt to pull in existing options from current and previous versions of the plugin as well as removing redundant options
  • Added a call to load the plugin l10n / i18n text domain
  • Removed plugin deactivation code and hook to stop configuration options being removed when plugin is deactivated (as opposed to uninstalled)
  • Added an uninstall script to ensure that configuration options are removed from the database if the plugin is deleted (from the Manage Plugins menu)
  • Encapsulated the plugin widget functionality in a class based on the WP_Widget class introduced in WordPress 2.8
  • Re-wrote the widget and admin panel code to conform with the WP_Widget class requirements

As usual,  if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.

NB: When the plugin is updated it will attempt to keep your previous configuration options and delete any stray options created by previous versions. To ensure that the update process works properly please do not deactivate the plugin prior to updating it. The WordPress plugin update functionality takes care of everything for you.

Last Modified Footer – Upcoming Changes

Version 1.0.2 of the Last Modified Footer plugin was released yesterday. This is the last version of the plugin that will be compatible with WordPress versions prior to 2.8. The next update will convert the plugin’s widget to use the WP_Widget class introduced as part of the WordPress 2.8 release. This simplifies the widget code and makes it multi-instance capable.

Last Modified Footer – 1.0.2

Version 1.0.2 of the Last Modified Footer plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • Made message templates completely customizable via the admin panel
  • Tidied the admin panel up and added per-field contextual help (hidden by default)
  • Fixed bug that to ensure that only published posts are used for the ‘Site Last Modified’ date (props: DavyB)
  • The ‘changelog.txt’ file has been merged back in to main readme file to conform to the new WordPress readme standard.

As usual,  if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.

Changing User Nice Name

After reading about Donncha’s experiences with the Limit Login Attempts plugin I decided it would be a good idea to implement it on my blog. It’s extremely simple to set up, but I couldn’t work out how to solve the security warning the plugin generated telling me that my ‘user_nicename’ was the same as my username.

It turns out that ‘user_nicename’ parameter is used to construct a permalink to an Author Archive. By default it is set to your username, allowing an attacker to obtain a valid username from the Post Author permalink that is commonly included in themes. Luckily the problem can be easily resolved through a simple database modification:

  1. Fire up phpMyAdmin.
  2. Select your WordPress database from the menu on the left.
  3. Select the ‘wp_users table’, and then click the ‘Browse’ tab.
  4. Locate the row that has your username in the user_login column. Click the Edit button (the pencil icon) on that row.
  5. Enter the desired URL version of your name into the user_nicename field, e.g. ‘firstname-lastname’.
  6. Click “Go” to save your changes.

To check that the process has worked, visit ‘http://yourblogurl/author/firstname-lastname/’, replacing ‘firstname-lastname’ with whatever you picked in step 5; you should now see your Author Archive page. On checking the Limit Login Attempts options page, you should see that the security warning has disappeared. Props to WordPress Hacks for the solution.

Last Modified Footer – 1.0.1

Version 1.0.1 of the Last Modified Footer plugin has been committed to the WordPress plugin repository. This version contains the following enhancements:

  • A widget has been added to the plugin, this can be customised through the Widgets admin menu.
  • Plugin readme file has been updated, changelog.txt has been added.

As usual,  if you’ve got the plugin installed then WordPress should display the fact that an update is available on the plugins menu within 12 hours. The plugin can be manually downloaded from the WordPress repository if you don’t want to wait.




Copyright © 2007-2009 Hugh Johnson

Site last updated Fri 6th Nov, 2009 @ 17:29