Making WordPress.org


Ignore:
Timestamp:
03/28/2023 05:38:32 AM (3 years ago)
Author:
dd32
Message:

Markdown Importers: Jetpack's jetpack_require_lib() helper method no longer exists. Use direct file references.

See #6411.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/inc/class-importer.php

    r10833 r12504  
    420420                        return $markdown_source;
    421421                }
    422                 if ( ! function_exists( 'jetpack_require_lib' ) ) {
    423                         return new WP_Error( 'missing-jetpack-require-lib', 'jetpack_require_lib() is missing on system.' );
     422
     423                if ( ! class_exists( 'WPCom_GHF_Markdown_Parser' ) && defined( 'JETPACK__PLUGIN_DIR' ) ) {
     424                        include JETPACK__PLUGIN_DIR . '/_inc/lib/markdown.php';
     425                }
     426                if ( ! class_exists( 'WPCom_GHF_Markdown_Parser' ) ) {
     427                        return new WP_Error( 'missing-jetpack-markdown', 'Jetpack Markdown is missing on system.' );
    424428                }
    425429
     
    479483
    480484                // Transform to HTML and save the post
    481                 jetpack_require_lib( 'markdown' );
    482485                $parser = new WPCom_GHF_Markdown_Parser();
    483486                $parser->preserve_shortcodes = false;
Note: See TracChangeset for help on using the changeset viewer.