Making WordPress.org

Changeset 12582


Ignore:
Timestamp:
05/11/2023 06:23:35 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Readme: If the Markdown library isn't loaded, don't attempt to parse it as Markdown.

This allows the class to be used outside of the plugin directory easier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php

    r12315 r12582  
    796796                static $markdown = null;
    797797
     798                // Return early if the Markdown processor isn't available.
     799                if ( ! class_exists( '\WordPressdotorg\Plugin_Directory\Markdown' ) ) {
     800                        return $text;
     801                }
     802
    798803                if ( is_null( $markdown ) ) {
    799804                        $markdown = new Markdown();
Note: See TracChangeset for help on using the changeset viewer.