Skip to content

Commit

Permalink
Merge branch 'trunk' into pr-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ajotka authored Oct 31, 2024
2 parents c3ee188 + 33e7d55 commit a33d69d
Show file tree
Hide file tree
Showing 15 changed files with 6,523 additions and 4,475 deletions.
4 changes: 1 addition & 3 deletions packages/playground/data-liberation/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@
require_once __DIR__ . '/src/WP_URL.php';

require_once __DIR__ . '/src/xml-api/WP_XML_Decoder.php';
require_once __DIR__ . '/src/xml-api/WP_XML_Tag_Processor.php';
require_once __DIR__ . '/src/xml-api/WP_XML_Processor.php';
require_once __DIR__ . '/src/WP_WXR_URL_Rewrite_Processor.php';

require_once __DIR__ . '/vendor/autoload.php';


// Polyfill WordPress core functions
function _doing_it_wrong() {

function _doing_it_wrong($method, $message, $version) {
}

function __($input) {
Expand Down
1 change: 1 addition & 0 deletions packages/playground/data-liberation/phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<ruleset name="WordPressStandard">
<description>PHP 7.0 compatibility.</description>
<config name="testVersion" value="7.2"/>
<exclude-pattern>src/WXR_Importer.php</exclude-pattern>
<rule ref="PHPCompatibility">
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared"/>
</rule>
Expand Down
1 change: 0 additions & 1 deletion packages/playground/data-liberation/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<file>tests/WPBlockMarkupUrlProcessorTests.php</file>
<file>tests/URLParserWHATWGComplianceTests.php</file>
<file>tests/WPXMLProcessorTests.php</file>
<file>tests/WPXMLTagProcessorTests.php</file>
<file>tests/UrldecodeNTests.php</file>
</testsuite>
</testsuites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
class WP_WXR_URL_Rewrite_Processor {


public static function stream( $current_site_url, $new_site_url ) {
return WP_XML_Processor::stream(
public static function create_stream_processor( $current_site_url, $new_site_url ) {
return WP_XML_Processor::create_stream_processor(
function ( $processor ) use ( $current_site_url, $new_site_url ) {
if ( static::is_wxr_content_node( $processor ) ) {
$text = $processor->get_modifiable_text();
Expand Down
29 changes: 29 additions & 0 deletions packages/playground/data-liberation/src/WXR_Import_Info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* A fork of the WordPress Importer plugin (humanmade/WordPress-Importer).
* It's meant to be rewritten to use the new libraries shipped with Data Liberation:
*
* * HTML parser
* * Streaming XML parser
* * Streaming multi-request HTTP client
*
* Original plugin created by Ryan Boren, Jon Cave (@joncave), Andrew Nacin (@nacin),
* and Peter Westwood (@westi). Redux project by Ryan McCue and contributors.
*
* See https://github.com/humanmade/WordPress-Importer/blob/master/class-wxr-importer.php
*/
class WXR_Import_Info {
public $home;
public $siteurl;

public $title;

public $users = array();
public $post_count = 0;
public $media_count = 0;
public $comment_count = 0;
public $term_count = 0;

public $generator = '';
public $version;
}
Loading

0 comments on commit a33d69d

Please sign in to comment.