Categories
Package/plugin/module WordPress

Preserve Code Formatting v3.0

I’d like to announce the official release of the updated Preserve Code Formatting plugin (v3.0) for WordPress.

Preserve formatting of code for display by preventing its modification by WordPress and other plugins while retaining original whitespace and characters.

The plugin’s official homepage is located at :
coffee2code.com/wp-plugins/preserve-code-formatting/.

Recommended update. Highlights: re-implementation using custom plugin framework; full localization support; misc non-functionality documentation and formatting tweaks; renamed class; verified WP 3.0 compatibility; dropped support for versions of WP older than 2.8.

Comments welcome on this post for this version of the plugin. Comments will be closed once this release has been superseded by another.

Read comments for details of the various updates.

Read more for a detailed ChangeLog of the release.

Detailed ChangeLog

These are the detailed changes, which may or may not make sense to you depending on your familiarity with the previous features and internals of the plugin.

  • Re-implementation by extending C2C_Plugin_016, which among other things adds support for:
  • * Reset of options to default values
  • * Better sanitization of input values
  • * Offload of core/basic functionality to generic plugin framework
  • * Additional hooks for various stages/places of plugin operation
  • * Easier localization support
  • Full localization support
  • Change storing plugin instance in global variable to $c2c_preserve_code_formatting (instead of $preserve_code_formatting), to allow for external manipulation
  • Rename class from ‘PreserveCodeFormatting’ to ‘c2c_PreserveCodeFormatting’
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Note compatibility with WP 2.9+, 3.0+
  • Drop compatibility with versions of WP older than 2.8
  • Add PHPDoc documentation
  • Minor tweaks to code formatting (spacing)
  • Add package info to top of plugin file
  • Add Upgrade Notice section to readme.txt
  • Update copyright date
  • Remove trailing whitespace
  • Add .pot file

5 replies on “Preserve Code Formatting v3.0”

While it is possible to do so, the plugin does not yet facilitate preserving code outside of the fields handled by the plugin by default. A future release make this much simpler.

The plugin does not support excluding certain tags from code preservation. Any code appearing within the tags handled by the plugin (i.e. ‘code’ and ‘pre’ and any additional ones you may have specified) will have everything contained within it preserved.

Comments are closed.