Canonical: Rename wp_force_plain_ugly_permalink() to match UI terminology.

Rename `wp_force_plain_ugly_permalink()` to `wp_force_plain_post_permalink()` to match terminology used in the WordPress dashboard.

Follow up to [50132].
Props SergeyBiryukov.
Fixes #5272.



git-svn-id: https://develop.svn.wordpress.org/trunk@50282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2021-02-10 05:38:23 +00:00
parent 26b3fa70a3
commit f9b901549b
3 changed files with 33 additions and 33 deletions
+1 -1
View File
@@ -1357,7 +1357,7 @@ function get_sample_permalink( $id, $title = null, $name = null ) {
$original_date = $post->post_date;
$original_name = $post->post_name;
// Hack: get_permalink() would return ugly permalink for drafts, so we will fake that our post is published.
// Hack: get_permalink() would return plain permalink for drafts, so we will fake that our post is published.
if ( in_array( $post->post_status, array( 'draft', 'pending', 'future' ), true ) ) {
$post->post_status = 'publish';
$post->post_name = sanitize_title( $post->post_name ? $post->post_name : $post->post_title, $post->ID );