New Plugin: Add Descendants As Submenu Items

When I created the navigation menu at the top of my site using the menu feature in WordPress (Appearance → Menus), I didn’t want to have to maintain anything but the top-level menu items. When I released a new plugin and created a page for it, I didn’t want to have to go into my menu UI and add it there too. So instead I wrote this plugin.

Add Descendants As Submenu Items adds a checkbox to each menu item that is of a hierarchical post type (i.e. pages). Checking this box will automatically display all descendants as submenu items on the front end of your site. You can see it in action at the top of my site — I only configured the top level menu items and everything that shows up when you hover over them has been added by my plugin rather than manually by me.

For more details and to download the plugin, check out the plugin’s homepage.

Regenerate Thumbnails v2.1.0 (and v2.1.1) Released

I’ve released a major update to my popular Regenerate Thumbnails plugin. From the changelog:

  • Thanks to a lot of jQuery help from Boris Schapira, a failed image regeneration will no longer stop the whole process.
  • The results of each image regeneration is now outputted. You can easily see which images were successfully regenerated and which failed. Was inspired by a concept by Boris.
  • There is now a button on the regeneration page that will allow you to abort resizing images for any reason. Based on code by Boris.
  • You can now regenerate single images from the Media page. The link to do so will show up in the actions list when you hover over the row.
  • You can now bulk regenerate multiple from the Media page. Check the boxes and then select “Regenerate Thumbnails” form the “Bulk Actions” dropdown. WordPress 3.1+ only.
  • The total time that the regeneration process took is now displayed in the final status message.
  • jQuery UI Progressbar version upgraded.

As you can see, lots of great new stuff. I hope you all enjoy it. 🙂

SyntaxHighlighter v3.1.0 Released, Features Old Style Script Option

Not everyone was happy with the new highlighting package featured in SyntaxHighlighter v3.0.0 and using old versions of plugins is a bad idea (you miss out on features, bug fixes, etc.) so I’ve added the ability to toggle between v2 and v3 of Alex G’s SyntaxHighlighting package. I’ve also fixed a few bugs that were discovered post-release (such as HTML entities being broken in the Visual editor).

Everyone, including those who downgraded to v2.x of my plugin, should upgrade to v3.1.0 of my plugin.

One thing to note by the way: I would stay far, far away from TinyMCE (the Visual editor/tab) when blogging about code. It has the nasty little habit of attempting to “clean up” your code (namely HTML) for you and in the process with mess up your code. If you’re writing code, what are you doing using a WYSIWYG editor anyway? 😉

SyntaxHighlighter Evolved v3.0.0: What’s New

I finally found some time to work on my SyntaxHighlighter Evolved plugin and upgrade it use the latest version of Alex Gorbatchev’s highlighter.

What’s New

  • The new version of Alex G.’s script makes it easier to select and copy code. You can just drag your mouse to highlight and you will no longer get line numbers or you can double-click the code to highlight it all (in plain text to avoid getting the colors). Click off of the code to get it to go back to the colorized version.
  • You can specify a range of line numbers to highlight. Instead of having to do highlight="5,6,7,8,9,10,14" you can now just do highlight="5-10,14".
  • BuddyPress support.
  • A few new custom brushes (Clojure and the R language) and a Ukrainian translation.

Upgrade or download it now! 🙂

New Plugin: Enable oEmbed Discovery

For security reasons, the UI to enable oEmbed’s discovery ability was removed from WordPress today. It’d be too easy for a novice to accidentally embed some bad HTML into their blog if they posted the URL to a malicious website.

However if you know what you’re doing, feel free to install my Enable oEmbed Discovery plugin which will re-enable the feature. 🙂

Plugin Release: YOURLS: Short URL Widget

I threw together a widget for my blog that displays the short URL to a post or page and since multiple expressed interest in using it on their own site, I’ve decided to release it. My YOURLS: Short URL Widget plugin will add a widget (Appearance -> Widgets) that will only show up on individual posts or pages and will output content of your choosing, including the short URL to that item as generated by the YOURLS: WordPress to Twitter plugin which is required for my widget to do anything.

SyntaxHighlighter Evolved v2.3.0

I’ve released a new version of my SyntaxHighlighter Evolved plugin. It’s not a recode of the plugin, however it is a major overhaul of the plugin. It features an update to the highlighting package (with new languages and parameters) and other various things. Here’s the full changelog:

Version 2.3.0

Major overhaul, mainly to extend flexibility so that this plugin could be used on WordPress.com without actual code modification (only actions/filters are used instead to modify it).

  • Updated SyntaxHighlighter package to v2.1.364. Highlights of the changelog include:
    • ColdFusion brush (aliases: coldfusion, cf)
    • Erlang brush (aliases: erl, erlang)
    • Objective-C brush (aliases: objc, obj-c)
    • Eclipse theme
    • padlinenumbers parameter. Set it to false for no line number padding, true for automatic padding, or an integer (number) for forced padding.
    • rb alias for Ruby
  • Commenters can now use this plugin to post code.
  • Plugin’s shortcodes now work inside of the text widget again. Requires WordPress 2.9+ though.
  • Overhaul of the TinyMCE plugin that assists in keeping your code sound when switching editor views. Thanks to Andrew Ozz!
  • This plugin’s stylesheets are now dynamically loaded. If they aren’t needed, they aren’t loaded.
  • Lots of sanitization of shortcode attributes. Invalid keys/values are no longer used.
  • Chinese translation thanks to Hinker Liu. Will need updating for v2.3.0.
  • New filter to control what shortcodes are registered. Used by WordPress.com to trim down the number of them.
  • Saving of user’s settings is now done using register_setting() instead of manually handing $_POST. Yay!
  • By default, a post meta is used to mark posts as being encoded using the 2.x encoding format. This is bad for a site like WordPress.com. You can use the new syntaxhighlighter_pre_getcodeformat filter to return 1 or 2 (based on say post_modified). See SyntaxHighlighter:get_code_format() for more details. Don’t forget to remove_action( 'save_post', array(&$SyntaxHighlighter, 'mark_as_encoded'), 10, 2 ); to stop the post meta from being added.
  • New syntaxhighlighter_precode filter to modify raw code before it’s highlighted.
  • New syntaxhighlighter_democode filter to modify example code on the settings page.