Key Changes in Version 3.0:
1. New Category Parser Class (AlphaBuildCategoryParser)
- Parses category strings with conditional operators
- Supports all the operators you specified
- Handles both single and dual category operations
2. Supported Conditional Operators:
- OR/UNION:
live-baritone OR draft-baritone – Returns posts in either category
- AND:
live-baritone AND nearly-ready – Returns posts in both categories
- XOR:
live-baritone XOR live-tenor – Returns posts in first category but not second (A minus B)
- NOT:
NOT live-baritone – Returns posts not in the specified category
- NOR:
live-baritone NOR draft-baritone – Returns posts in neither category
- NAND:
live-baritone NAND draft-baritone – Returns posts in either category but not both
- LEFT JOIN:
live-baritone LEFT JOIN draft-baritone – Posts from first category excluding those in second
- RIGHT JOIN:
live-baritone RIGHT JOIN draft-baritone – Posts from second category excluding those in first
3. Usage Examples:
// Union of two categories
[alphabuild category_name="live-baritone OR draft-baritone"]
// Intersection of two categories
[alphabuild category_name="live-baritone AND nearly-ready"]
// Exclude a category
[alphabuild category_name="live-baritone XOR live-tenor"]
// Posts not in category
[alphabuild category_name="NOT live-baritone"]
4. Backward Compatibility:
- Single category names still work:
[alphabuild category_name="live-baritone"]
- All existing parameters remain functional
- Version 2.0 shortcodes will continue to work
5. Implementation Details:
- Case-insensitive operator parsing
- Proper escaping and sanitization
- Efficient post filtering using WordPress query methods
- Maintains alphabetical grouping after conditional filtering
The plugin now handles all the logical operations you specified, allowing complex category filtering while maintaining the original alphabetical navigation interface. Each conditional operator performs the exact set operations you described in your specifications.