Skip to content

Guidelines for Contribution

Mohamed Noumaan Ahamed edited this page Jan 7, 2026 · 3 revisions

Contributing to rtMedia

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.

About rtMedia

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)

Ways to Contribute

πŸ› Bug Reports

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.

πŸ’‘ Feature Requests

Suggest new features or improvements to existing functionality.

πŸ“ Documentation

Improve documentation, tutorials, and help content.
Documentation is present in form of Markdown files & Docblock comments in code.

πŸ”§ Code Contributions

Fix bugs, implement features, or improve performance of the plugin.

🌍 Translations

Help translate rtMedia into different languages for all people around the world.
You can contribute translations to rtMedia on translate.wordpress.org

πŸ§ͺ Testing

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

Development Setup

Prerequisites

  • PHP: 7.4 or higher
  • WordPress: 6.5 or higher
  • Node.js: 16+ (check .nvmrc for exact version)
  • Composer: Latest version
  • Git: Latest version

Local Environment Setup

  1. 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
  1. Install dependencies
# Install Node.js dependencies
npm install
npm install --dev
  1. 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

Coding Standards

PHP Standards

  • 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
}

JavaScript Standards

  • 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>;
};

CSS/SCSS Standards

  • Follow WordPress CSS Coding Standards
  • Use SCSS where possible
  • Use BEM methodology for custom CSS
  • Mobile-first responsive design

Translation

  • All user-facing strings must be translatable
  • Use buddypress-media as the text domain
  • Include translator comments for context
/* translators: %s: Image title */
$message = sprintf( __( 'Image "%s" uploaded successfully', 'buddypress-media' ), $title );

Development Workflow

Branch Naming

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

Commit Messages

Follow the conventional commit format:

<type>[optional scope]: <description>


[optional body]


[optional footer(s)]

Types

  • 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

Examples

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