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-cli/inc/class-markdown-import.php

    r11951 r12504  
    228228            return $markdown_source;
    229229        }
    230         if ( ! function_exists( 'jetpack_require_lib' ) ) {
    231             return new WP_Error( 'missing-jetpack-require-lib', 'jetpack_require_lib() is missing on system.' );
     230
     231        if ( ! class_exists( 'WPCom_GHF_Markdown_Parser' ) && defined( 'JETPACK__PLUGIN_DIR' ) ) {
     232            include JETPACK__PLUGIN_DIR . '/_inc/lib/markdown.php';
     233        }
     234        if ( ! class_exists( 'WPCom_GHF_Markdown_Parser' ) ) {
     235            return new WP_Error( 'missing-jetpack-markdown', 'Jetpack Markdown is missing on system.' );
    232236        }
    233237
     
    253257
    254258        // Transform to HTML and save the post
    255         jetpack_require_lib( 'markdown' );
    256259        $parser = new \WPCom_GHF_Markdown_Parser;
    257260        $html = $parser->transform( $markdown );
Note: See TracChangeset for help on using the changeset viewer.