[wp-trac] [WordPress Trac] #55691: New theme editor uses WP_SITEURL instead of WP_HOME
WordPress Trac
noreply at wordpress.org
Fri May 6 19:17:58 UTC 2022
#55691: New theme editor uses WP_SITEURL instead of WP_HOME
---------------------------+------------------------------
Reporter: saijsaij | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 5.9.3
Severity: normal | Resolution:
Keywords: | Focuses: administration
---------------------------+------------------------------
Comment (by saijsaij):
Tried some things more.
In the file wp-admin/site-editor.php on line 54 I changed the site URL to
the home URL and it works.
Old:
{{{#!php
$custom_settings = array(
'siteUrl' => site_url(),
'postsPerPage' => get_option(
'posts_per_page' ),
'styles' =>
get_block_editor_theme_styles(),
'defaultTemplateTypes' => $indexed_template_types,
'defaultTemplatePartAreas' =>
get_allowed_block_template_part_areas(),
'__experimentalBlockPatterns' =>
WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
'__experimentalBlockPatternCategories' =>
WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
);
}}}
New:
{{{#!php
$custom_settings = array(
'siteUrl' => home_url(),
'postsPerPage' => get_option(
'posts_per_page' ),
'styles' =>
get_block_editor_theme_styles(),
'defaultTemplateTypes' => $indexed_template_types,
'defaultTemplatePartAreas' =>
get_allowed_block_template_part_areas(),
'__experimentalBlockPatterns' =>
WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
'__experimentalBlockPatternCategories' =>
WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
);
}}}
And least now I can see the editor. Other side effects I didn't see right
now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55691#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list