Skip to content

Pages moved to trash does not get cleared #191

Closed
@bonny

Description

@bonny

in class-purger.php the code
$url = str_replace( '%postname%', $url[1], $url[0] );
does not work for pages because for pages get_sample_permalink($post_id) returns array where first value contains %pagename% and not %postname%:

Array
(
    [0] => http://example.com/%pagename%/
    [1] => test__trashed
)

One solution could perhaps be something like this that I spotted in WordPress core:

$display_link = str_replace( array( '%pagename%', '%postname%' ), ... );

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions