Markdown

Plugin Description

Allows markdown to be converted to HTML markup

This Markdown plugin allows for administrators to enable markdown to be used in various places and converted to HTML markup on output.

Settings are available for:

  1. Posts.
  2. Pages.
  3. Comments.
  4. Custom Post Types set to public.
  5. A [markdown] shortcode is also available; for best results, place the opening and closing [markdown] shortcode tags on separate lines.

Uses Parsedown and Parsedown Extra.

This plugin is multisite compatible; settings need to be configured for each site.

Installation

  • Download the latest release of the plugin from GitHub.
  • Upload the entire zip file using the Plugins upload function in your ClassicPress admin panel.
  • Activate the plugin.
  • Configure relevant settings via the configuration page in the admin control panel (azurecurve menu).

Frequently Asked Questions

Can I translate this plugin?

Yes, the .pot file is in the plugins languages folder; if you do translate this plugin, please sent the .po and .mo files to [email protected] for inclusion in the next version (full credit will be given).

Is this plugin compatible with both WordPress and ClassicPress?

This plugin is developed for ClassicPress, but will likely work on WordPress.

Changelog

  • Fixed the [markdown] shortcode discarding its own html_entity_decode()/trim()/do_shortcode() work and running Parsedown against the original, unprocessed content instead – nested shortcodes inside a [markdown]…[/markdown] block are now actually expanded before conversion.
  • Fixed a broken language-file path (missing path separator) that meant translations never loaded correctly – this was a regression of a bug already fixed once before in 1.1.1.
  • Fixed a fatal error on multisite uninstall caused by calling the non-existent get_current_site_id() instead of get_current_blog_id(); also renamed the uninstall helper function from a copy-pasted azrcrv_cob_ prefix to azrcrv_m_, and removed pointless delete_site_option() calls for options that were never stored network-wide.
  • Fixed every custom post type’s “Enable markdown in…” checkbox label pointing at the Pages checkbox instead of its own (a copy-paste leftover), so clicking the label toggled the wrong setting; checkbox IDs also no longer use square brackets, which aren’t valid in an HTML id attribute.
  • Fixed an inefficient plugin_action_links hook so it no longer runs for every plugin on the Plugins list page (now registered against this plugin’s own plugin_action_links_{$basename} hook).
  • Fixed admin CSS/JS being unconditionally loaded on every user’s profile.php/edit-user.php page site-wide, regardless of which page was actually being viewed – a leftover condition with no matching functionality in this plugin.
  • Fixed a PHP warning on a fresh install where the shared azurecurve plugin-menu option hadn’t been populated yet (missing is_array() guard before looping over it) on the Other Plugins tab.
  • Fixed the Instructions tab’s description of shortcode handling, which said shortcodes in post content “will be removed” when the actual (correct) behaviour is that they’re expanded via do_shortcode() before markdown conversion runs.
  • Fixed the Settings tab’s custom-post-type form action posting to a bare relative “admin-post.php” instead of the full admin-post.php URL.
  • Removed a redundant, always-false exclusion check when listing custom post types (get_post_types() was already called with ‘_builtin’ => false, which excludes posts/pages/revisions on its own).
  • Removed a mismatched accepted-arguments count on the ‘the_content’ filter registration (declared 2, but the callback only takes 1 and ‘the_content’ never passes a second argument).
  • Replaced placeholder/mismatched cache-busting version numbers on registered admin styles/scripts with the plugin’s actual version number.
  • Documentation: clarified that output from other plugins’ shortcodes (such as Get GitHub File’s [github-file]) needs its wrapping element to carry markdown=”1″ for ParsedownExtra to parse the markdown inside it – see the Instructions tab.
  • Upgrade UpdateClient.
  • Update azurecurve plugins list.
  • Replace jquery with vanilla js.
  • Upgrade Parsedown library.
  • Upgrade Parsedown Extra library.
  • Update supported PHP version.
  • Update plugin header and readme yet again for compatibility with ClassicPress Directory v2.
  • Fix bug with unset options.
  • Update plugin header and readme for compatibility with ClassicPress Directory v2.
  • Fix bug with display of plugin banner image.
  • Refactor code to use namespace, improve security and improve maintainability.
  • Update language file.
  • Update Update Manager to version 2.5.0.
  • Add option to allow markdown in comments.
  • Add option to allow markdown in public custom post types.
  • Update readme file for compatibility with ClassicPress Directory.
  • Update readme files.
  • Update language template.
  • Fix bug with azurecurve menu.
  • Update azurecurve menu.
  • Update readme files.
  • Add uninstall.
  • Update azurecurve menu and logo.
  • Fix plugin action link to use admin_url() function.
  • Rewrite option handling so defaults not stored in database on plugin initialisation.
  • Add plugin icon and banner.
  • Update azurecurve plugin menu.
  • Amend to only load css when shortcode on page.
  • Fix bug with setting of default options.
  • Fix bug with plugin menu.
  • Update plugin menu css.
  • Rewrite default option creation function to resolve several bugs.
  • Upgrade azurecurve plugin to store available plugins in options.
  • Update Update Manager class to v2.0.0.
  • Update azurecurve menu icon with compressed image.
  • Added options to enable markdown in post and page content; option for shortcode needs to be reconfigured after upgrade.
  • Rewrite how markdown shortcode is handled.
  • Fix bug with shortcodes setting being ignored.
  • Add azurecurve icon to plugins action link.
  • Fix bug with incorrect language load text domain.
  • Add integration with Update Manager for automatic updates.
  • Add load_plugin_textdomain to handle translations.
  • Initial release.

Other Notes

About azurecurve

azurecurve was one of the first plugin developers to start developing for ClassicPress; all plugins are available from azurecurve Development and are integrated with the Update Manager plugin for fully integrated, no hassle, updates.

The plugins available from azurecurve are: