-
Notifications
You must be signed in to change notification settings - Fork 120
Guidelines for Contribution
Thank you for your interest in contributing to rtMedia! This document provides guidelines and information for contributors to help maintain a healthy and collaborative development environment.
rtMedia is the only complete media solution for WordPress, BuddyPress and bbPress, and is WordPress.com VIP compatible.
Built with a mobile-first approach, it works on mobile/tablet devices (like iPhone/iPad, Android)
Help us improve by reporting bugs with detailed information about the issue.
Please try to provide as much information as you can so the bug can be reproduced, and consequently fixed easily.
Suggest new features or improvements to existing functionality.
Improve documentation, tutorials, and help content.
Documentation is present in form of Markdown files & Docblock comments in code.
Fix bugs, implement features, or improve performance of the plugin.
Help translate rtMedia into different languages for all people around the world.
You can contribute translations to rtMedia on translate.wordpress.org
Test new features and provide feedback on beta releases.
Note
For all code related contributions, we recommend you to create an accompanying issue on GitHub first
- PHP: 7.4 or higher
- WordPress: 6.5 or higher
-
Node.js: 16+ (check
.nvmrcfor exact version) - Composer: Latest version
- Git: Latest version
- WordPress Setup
- Set up a local WordPress environment
- The plugin code should be present in
wp-content/plugins/ - Clone the repository:
git clone https://github.com/rtCamp/rtmedia.git buddypress-media
cd buddypress-media- Activate the plugin
- Install dependencies
# Install Node.js dependencies
npm install
npm install --dev- Development Scripts
# Start development server
npx grunt watch
# Build for development
npx grunt
# Build for production
npx grunt build
# Generate translation files
wp i18n make-pot . languages/buddpress-media.pot- Follow WordPress Coding Standards
- Use WordPress VIP Go standards
- PHPDoc comments for all functions and classes
- Use type hints where possible (PHP 7.4+)
/**
* Example function with proper documentation.
*
* @since n.e.x.t
* @param string $param1 Description of parameter.
* @param int $param2 Description of parameter.
* @return bool Description of return value.
*
*/
public function example_function( string $param1, int $param2 ): bool {
// Implementation
}- Follow WordPress JavaScript Coding Standards
- Use ESLint configuration provided
- Prefer functional components in React
- Use TypeScript-style JSDoc comments
/**
* Example React component.
*
* @param {Object} props - Component props.
* @param {string} props.title - The title to display.
* @return {JSX.Element} The component JSX.
*/
const ExampleComponent = ( { title } ) => {
return <h1>{ title }</h1>;
};- Follow WordPress CSS Coding Standards
- Use SCSS where possible
- Use BEM methodology for custom CSS
- Mobile-first responsive design
- All user-facing strings must be translatable
- Use
buddypress-mediaas the text domain - Include translator comments for context
/* translators: %s: Image title */
$message = sprintf( __( 'Image "%s" uploaded successfully', 'buddypress-media' ), $title );This repository has two important branches:
-
master- Contains stable code that is part of current public release -
develop- The latest development iteration of the plugin lives here with new features & fixes
For naming your branches, you can follow the below convention
-
feature/description- New features -
fix/description- Bug fixes -
hotfix/description- Critical fixes -
docs/description- Documentation updates
Important
When you are raising a PR to the rtMedia repository, please open it against the develop branch instead of master
Follow the conventional commit format:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
-
feat: New feature -
fix: Bug fix -
docs: Documentation changes -
style: Code style changes -
refactor: Code refactoring -
perf: Performance improvements -
test: Test changes -
chore: Build/tool changes
feat(media): add 4k media support
fix(video): resolve timeout issues
docs(readme): update installation guide
style(php): fix indentation
refactor(api): improve error handling
perf(media): optimize thumbnail generation
test(unit): add media migration tests
chore(deps): update action-scheduler