mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Posts, Post Types: Improve sanitisation of templates' post types.
Prevents post type templates ignoring post types due to invalid characters. Each entry in the `Template Post Type` comment is run through `sanitize_key()` to match the sanitisation used by `register_post_type()`. Fixes #38766. git-svn-id: https://develop.svn.wordpress.org/trunk@39236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: No Trailing Period
|
||||
Template Post Type: period, full-stop
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Tilde in Post Type.
|
||||
Template Post Type: period, full~stop
|
||||
|
||||
This template should be applied to the `period` post type and ignored by the `full-stop` post type.
|
||||
*/
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Trailing Comma,
|
||||
Template Post Type: period, full-stop,
|
||||
*/
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Trailing Period.
|
||||
Template Post Type: period, full-stop.
|
||||
*/
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Trailing Period, White Space.
|
||||
Template Post Type: period, full-stop.
|
||||
*/
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Trailing White Space, Period.
|
||||
Template Post Type: period, full-stop .
|
||||
*/
|
||||
Reference in New Issue
Block a user