List-Category-Posts
List-Category-Posts copied to clipboard
Allows using exclude ids for categorypage=yes
Would fix #355
Code Climate has analyzed commit ce479e4c and detected 1 issue on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 1 |
View more on Code Climate.
@zymeth25 I was giving this a shot, have some more uncommitted code, but I am exhausted and can't even read code anymore. I'll continue in the morning or maybe on the weekend, but yeah I'm refactoring the current_category
function a bit more.
@picandocodigo Sure, I will update the test suite so that once it passes we will know this is working.
Thanks for the comments @zymeth25! I'll finish this PR during the weekend. I definitely need to rest some more after work and code less :grimacing:. I'll probably rewrite it. Once I wrote excluded_ids
, I thought to just rewrite the entire current_category
, but at some point I realized I wasn't thinking straight and nothing made sense. But I wanted to give you a heads up. I'll use your test from the other PR. I think I was thinking of excluding IDS for all the options for categorypage
, but not sure if that makes sense? Anyway, I need to come back to this with fresh eyes. Thanks again!!
Haha, sure, take your time and don't sacrifice your rest for this 😉
So I guess it doesn't make sense to do it for categorypage=other
but could be done for yes
and all
. The simplest way that requires least changes is to:
- return a string for
[catlist categorypage=yes id=-1,-2]
('or' relationship), just comma delimited - return an array for
[catlist categorypage=all id=-1,-2]
('and' relationship) like this
[3, 4, 'exclude' => [1, 2]]
Anyway, have a nice rest!
Code Climate has analyzed commit 973c0ad7 and detected 1 issue on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 1 |
View more on Code Climate.