Skip to content

Commit

Permalink
Remove backslashes from WP slug importer
Browse files Browse the repository at this point in the history
  • Loading branch information
johngodley committed Nov 10, 2018
1 parent aaac00c commit 4336e64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ private function create_for_item( $group_id, $redirect ) {
}

$new = wp_parse_url( $new, PHP_URL_PATH );
$old = rtrim( dirname( $new ), '/' ) . '/' . $redirect->meta_value;
$old = rtrim( dirname( $new ), '/' ) . '/' . rtrim( $redirect->meta_value, '/' ) . '/';
$old = str_replace( '\\', '', $old );

$data = array(
'url' => $old,
Expand Down

0 comments on commit 4336e64

Please sign in to comment.