Thank you for your interest in contributing to SourceHub! This document provides guidelines and information for contributors.
- Search existing issues before creating a new one
- Use clear, descriptive titles for bug reports and feature requests
- Include detailed information:
- WordPress version
- PHP version
- Plugin version
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Check existing feature requests to avoid duplicates
- Describe the use case and why the feature would be valuable
- Provide examples of how the feature would work
- Consider implementation complexity and plugin scope
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch from
main - Make your changes following our coding standards
- Test thoroughly in both hub and spoke modes
- Submit a pull request with clear description
PHP Standards:
- Follow WordPress Coding Standards
- Use proper DocBlocks for all functions and classes
- Sanitize all inputs and escape all outputs
- Use WordPress functions instead of native PHP when available
- Maintain backward compatibility when possible
JavaScript Standards:
- Follow WordPress JavaScript Coding Standards
- Use modern ES6+ syntax where appropriate
- Comment complex logic clearly
- Test in multiple browsers
CSS Standards:
- Follow WordPress CSS Coding Standards
- Use BEM methodology for class naming
- Mobile-first responsive design
- Consistent spacing and formatting
SourceHub/
├── admin/ # Admin interface files
│ ├── css/ # Admin stylesheets
│ ├── js/ # Admin JavaScript
│ └── views/ # Admin template files
├── includes/ # Core plugin classes
├── languages/ # Translation files
└── assets/ # Public assets
- Always provide migration scripts for schema changes
- Test with existing data to ensure compatibility
- Document all database changes in pull request
- Use WordPress database functions (
$wpdb, etc.)
- Validate and sanitize all inputs
- Use nonces for form submissions
- Check user capabilities before sensitive operations
- Escape all outputs to prevent XSS
- Use prepared statements for database queries
- WordPress local environment (Local by Flywheel, XAMPP, etc.)
- Two WordPress installations (hub and spoke)
- Yoast SEO plugin installed on both sites
- Debug logging enabled (
WP_DEBUG = true)
-
Hub mode functionality
- Connection creation and testing
- Content syndication
- AI rewriting (if configured)
- Smart links processing
-
Spoke mode functionality
- API key generation
- Content receiving and creation
- Yoast SEO field application
- Featured image handling
-
Cross-browser compatibility
- Chrome/Chromium
- Firefox
- Safari
- Edge
-
Responsive design
- Desktop (1920px+)
- Tablet (768px-1024px)
- Mobile (320px-767px)
- Basic syndication with various post types
- AI rewriting with different models and settings
- Smart links in content, titles, and excerpts
- Error handling with invalid connections
- Large content with multiple images and links
- Update syndication for existing posts
- Update documentation if needed
- Add/update tests for new functionality
- Update CHANGELOG.md with your changes
- Ensure all tests pass
- Check code follows standards
## Description
Brief description of changes made.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tested in hub mode
- [ ] Tested in spoke mode
- [ ] Tested with AI rewriting
- [ ] Tested smart links functionality
- [ ] Cross-browser testing completed
## Screenshots (if applicable)
Add screenshots for UI changes.
## Checklist
- [ ] Code follows WordPress coding standards
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] CHANGELOG.md updatedWe use Semantic Versioning (SemVer):
- MAJOR version for incompatible API changes
- MINOR version for backward-compatible functionality
- PATCH version for backward-compatible bug fixes
By contributing to SourceHub, you agree that your contributions will be licensed under the same GPL v2+ license as the project.
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and community support
- Code Review: All pull requests receive thorough review
All contributors will be recognized in our README and release notes. Thank you for helping make SourceHub better!
Happy Contributing! 🚀