[wp-trac] [WordPress Trac] #45151: Convert 'Sample Page', 'Hello World', and 'Privacy Policy' to block content

WordPress Trac noreply at wordpress.org
Thu Oct 25 19:26:28 UTC 2018


#45151: Convert 'Sample Page', 'Hello World', and 'Privacy Policy' to block content
-----------------------------+-----------------------
 Reporter:  danielbachhuber  |       Owner:  desrosj
     Type:  enhancement      |      Status:  reopened
 Priority:  normal           |   Milestone:  5.0
Component:  Upgrade/Install  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------

Comment (by garrett-eclipse):

 Thanks @desrosj for starting this. I wonder if we've approached this from
 the wrong direction.

 Prior to your changes the starter content they were within single
 translation functions `__()` using character returns instead of paragraph
 markup; [[BR]]
 Welcome - https://github.com/WordPress/WordPress/blob/4.9.8/wp-
 admin/includes/upgrade.php#L174 [[BR]]
 First Page - https://github.com/WordPress/WordPress/blob/4.9.8/wp-
 admin/includes/upgrade.php#L224-L232

 This contained no markup aside from links and it would be nice to leave it
 untouched for translators so they don't need to retranslate the string or
 worry about block markup.

 Instead, maybe we can introduce the block markup after the initial string
 setup, either adding a new function to wpautop to enrich the string to
 block format or as a custom function run on the string to convert to block
 type if in the Block Editor (maybe allow Classic Editor to avoid running
 it).

 This should remove any new markup from the strings and avoid any need for
 new translations as they already exist. It would also avoid translators
 breaking the markup accidentally.

 I am not versed well enough in Gutenberg but I heard there was a process
 for converting classic posts to the block editor. Maybe this process or
 the logic there-in can be used for the default content??

 If we can introduce the block markup after the string is defined we don't
 introduce new strings that contain markup which in my eyes would be a win.

 Thank you

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45151#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list