Skip to content

Commit e196f09

Browse files
authored
Merge pull request #267 from rtCamp/fix/issue-191-sample-permalink
Fixed Issue-191 (Pages and CPTs were not being cleared on moving to trash)
2 parents 17547fc + 72647c9 commit e196f09

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( array('%postname%', '%pagename%'), $url[1], $url[0] );
236236
} else {
237237
$url = '';
238238
}

0 commit comments

Comments
 (0)