mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
REST API: Support non-Latin characters in template route regex.
Non-Latin characters are URL-encoded (e.g. `%cf%84%ce%b5%cf%83%cf%84`). Matching `%` in the route ensures templates with non-Latin titles can be properly saved. Props antonyagrios, mburridge. Fixes #57329. git-svn-id: https://develop.svn.wordpress.org/trunk@55294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Block theme.
|
||||
*/
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
echo 'PHP template for page with ID 1';
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>Small Header Template Part</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
Theme Name: Block Theme Non Latin
|
||||
Theme URI: https://wordpress.org/
|
||||
Description: Has different characters in theme directory name for testing purposes.
|
||||
Version: 0.0.1
|
||||
Text Domain: block-theme
|
||||
*/
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>(τεστ) Page Template</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>(测试) Page Template</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"version": 1,
|
||||
"settings": {
|
||||
"color": {
|
||||
"palette": [
|
||||
{
|
||||
"slug": "light",
|
||||
"name": "Light",
|
||||
"color": "#f5f7f9"
|
||||
},
|
||||
{
|
||||
"slug": "dark",
|
||||
"name": "Dark",
|
||||
"color": "#000"
|
||||
}
|
||||
],
|
||||
"gradients": [
|
||||
{
|
||||
"name": "Custom gradient",
|
||||
"gradient": "linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%)",
|
||||
"slug": "custom-gradient"
|
||||
}
|
||||
],
|
||||
"custom": false,
|
||||
"customGradient": false
|
||||
},
|
||||
"typography": {
|
||||
"fontSizes": [
|
||||
{
|
||||
"name": "Custom",
|
||||
"slug": "custom",
|
||||
"size": "100px"
|
||||
}
|
||||
],
|
||||
"customFontSize": false,
|
||||
"customLineHeight": true
|
||||
},
|
||||
"spacing": {
|
||||
"units": [
|
||||
"rem"
|
||||
],
|
||||
"customPadding": true
|
||||
},
|
||||
"blocks": {
|
||||
"core/paragraph": {
|
||||
"color": {
|
||||
"palette": [
|
||||
{
|
||||
"slug": "light",
|
||||
"name": "Light",
|
||||
"color": "#f5f7f9"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"customTemplates": [
|
||||
{
|
||||
"name": "page-τεστ",
|
||||
"title": "Homepage template"
|
||||
},
|
||||
{
|
||||
"name": "page-测试",
|
||||
"title": "Homepage template"
|
||||
}
|
||||
],
|
||||
"templateParts": [
|
||||
{
|
||||
"name": "small-header-τεστ",
|
||||
"title": "Small Header",
|
||||
"area": "header"
|
||||
},
|
||||
{
|
||||
"name": "small-header-测试",
|
||||
"title": "Small Header",
|
||||
"area": "header"
|
||||
},
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user