Plugin Author
rbaer
(@rbaer)
Thanks for reporting the problem. I was able to reproduce the behaviour. It occures as the Hide Posts plugin changes the queries and replaces the filter made by the List Last Changes plugin. Therefore the filter to get only the excluded posts gets lost and only the filter from the Hide Posts plugin is applied.
To fix this I need first understand if I use the wrong function or filter or if the behaviour of the Hide Posts plugin is wrong.
So please stay tuned.
-
This reply was modified 1 year, 5 months ago by
rbaer.
If that doesn’t work, get_option('active_plugins')
returns an array of active plugins. One could check if said plugin is active and act accordingly.
Plugin Author
rbaer
(@rbaer)
OK, I found a way to avoid the problem. Could you test the Version 1.0.2?
They’re not sorted by Last Modified. I don’t know why, though.
Either that or it’s excluding too many posts.
Also, you appear to be doing it twice.
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
How are posts being ignored in the first place?
I’ll join here. 1.0.2 broke the website. I got a critical error.
Plugin Author
rbaer
(@rbaer)
@egingell :
The filters of the Hide Posts plugin will still be active when the posts and pages are collected. Maybe this happens on your Website?
@egingell :
> How are posts being ignored in the first place?
With a custom field on the post/page with the name ‘list_last_changes_ignore’ and the value ‘true’. See ‘Exclude page or post’ in the Description.
@serpher :
Can you post the error message here? And what version of PHP is running your website on?
-
This reply was modified 1 year, 5 months ago by
rbaer.
>The filters of the Hide Posts plugin will still be active when the posts and pages are collected. Maybe this happens on your website.
Your new version is hiding posts I’m not hiding with the other plugin.
>With a custom field on the post/page with the name ‘list_last_changes_ignore’ and the value ‘true’. See ‘Exclude page or post’ in the Description.
Cool. Maybe I’ll just do that instead of use this other plugin.
>Can you post the error message here? And what version of PHP is running your website on?
In my experience, WP doesn’t give an error message other than “critical error” (paraphrased).
Oh, and I was mistaken about you doing it twice. It’s once for “posts” and once for “pages”. And since the coffee looks nearly identical, may I suggest wrapping one code block in:
foreach(array("post","page") as $v) {}
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
-
This reply was modified 1 year, 5 months ago by
egingell.
Plugin Author
rbaer
(@rbaer)
Updated to 1.0.3: includes now only the changes to read the exluded pages, but not the refactorings (especially type information) that seemed to cause some troubles.
@serpher :
I’m still interested in your PHP version to understand better what caused the error.
@egingell :
Thanks for the suggestion, but after the trouble the refactorings cause I’m now more on the defensive side with changes 🙂
I’ve been there.
PS. That plugin didn’t just break yours, it also made the columns on /wp-admin/edit.php all wonky.
https://photos.app.goo.gl/1kaqqgiVuTKN4ZdX6
Submitted for your approval.
Marked as resolved. I cant expect you to fix or work around other peoples’ bad code. Other dude needs his own thread.
@rbaer
PHP Version 7.4.33
Version 1.0.3 works fine though. Thank you!
Plugin Author
rbaer
(@rbaer)
Thanks for your feedback and your patience!