mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user