Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages moved to trash does not get cleared #191

Closed
bonny opened this issue Mar 18, 2019 · 0 comments · Fixed by #267
Closed

Pages moved to trash does not get cleared #191

bonny opened this issue Mar 18, 2019 · 0 comments · Fixed by #267
Assignees

Comments

@bonny
Copy link

bonny commented Mar 18, 2019

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%' ), ... );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants