Open bobbingwide opened 5 years ago
BTW: The workaround didn't work. My blocks had become wp:Step
and they included a pre tag with class wp-block-Step
.
You may just find the following code useful. https://github.com/bobbingwide/oik-clone/blob/master/admin/class-oik-clone-block-relationships.php
It contains logic to parse post_content into blocks ( using WordPress core functionality) then reform post_content from the parsed blocks.
Problem
I just used BSR to change all instances of
Verse
toStep
then ran it again to change all instances ofverse
tostep
. Then I noticed something strange. What should have been Verse blocks were now appearing as Classic, with preformatted blocks within them.Explanation
I'd accidentally changed
wp:verse
towp:step
.Expected result
All instances of the word
Verse
to be changed toStep
in post content. All instances of the wordverse
to be changed tostep
in post content.Actual result
The block type names were changed as well.
Requirement
It would be nice if there was an option to NOT change block type names. Or at least a warning.
Is this part of the Pro version?
Workaround
Run BRS again changing
wp:step
towp:verse
.PS
The irony is that I'd run BRS against my Problem Solving website. So, I can now use this Issue as a problem solving example. https://bobbingwide.com/problem-solving/oik_presentation/steps/step-13-whats-changed/
PPS I also created a problem with permalinks; by changing
verse
toStep
.