Skip to content

Commit

Permalink
Moved the 'paternize' function to LAST (after the namespace change) t…
Browse files Browse the repository at this point in the history
…o avoid paternizing and then (incorrectly) changing the namespace when the NEW slug contains the OLD slug
  • Loading branch information
pbking committed Apr 18, 2024
1 parent 16e39a2 commit ff1b364
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/create-theme/theme-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ public static function prepare_template_for_export( $template, $slug = null ) {
$template = self::eliminate_environment_specific_content( $template );
$template = self::escape_text_in_template( $template );
$template = Theme_Media::make_template_images_local( $template );
$template = self::paternize_template( $template, $slug );

if ( $slug ) {
$template = self::replace_template_namespace( $template, $slug );
}

$template = self::paternize_template( $template, $slug );

return $template;
}

Expand Down

0 comments on commit ff1b364

Please sign in to comment.