Skip to content

Commit 4b8a129

Browse files
committed
Fix: pages and CPTs are not cleared on moving to trash
1 parent 2265fc5 commit 4b8a129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

admin/class-purger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private function _purge_by_options( $post_id, $blog_id, $_purge_page, $_purge_ar
232232
$url = get_sample_permalink( $post_id );
233233

234234
if ( ! empty( $url[0] ) && ! empty( $url[1] ) ) {
235-
$url = str_replace( '%postname%', $url[1], $url[0] );
235+
$url = str_replace( ['%postname%', '%pagename%'], $url[1], $url[0] );
236236
} else {
237237
$url = '';
238238
}

0 commit comments

Comments
 (0)