Jump to content

Extension:Pride

From mediawiki.org
MediaWiki extensions manual
Pride
Release status: stable
Implementation Skin
Description Automatically displays configured Pride and LGBTQIA+ related terms using repeating rainbow-coloured letters.
Author(s) ViewersVault
Latest version 1.1.0 (2026-07-29)
MediaWiki 1.46+
PHP 8.1+
  • $wgPrideWords
Licence MIT License
Download
Translate the Pride extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Pride extension automatically detects configured Pride and LGBTQIA+ related words in rendered article text and displays each letter using a repeating rainbow colour sequence.

No parser tags, templates or special wikitext are required.

Features

[edit]
  • Automatically highlights configurable Pride-related terms
  • Case-insensitive matching
  • Preserves the original capitalisation
  • Repeating six-colour rainbow sequence
  • Does not modify stored page wikitext
  • No parser functions, templates or custom tags required
  • Configurable list of highlighted terms

For example, ordinary wikitext such as:

Pride Month celebrates LGBTQIA+ communities.

is automatically displayed with configured terms such as Pride rendered in rainbow-coloured letters.

Installation

[edit]
  1. Clone or download the extension into the extensions/ directory:
cd extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Pride

Alternatively, download the latest release from GitHub and extract it into a directory named Pride.

  1. Add the following to the end of LocalSettings.php:
wfLoadExtension( 'Pride' );
  1. Visit Special:Version to confirm that Pride appears in the installed extensions list.
  2. If necessary, perform a hard refresh (Ctrl+F5) to clear cached JavaScript.

No database update is required.

Configuration

[edit]

The words highlighted by the extension can be configured in LocalSettings.php:

$wgPrideWords = [
    'Pride',
    'Pride Month',
    'LGBT',
    'LGBTQ',
    'LGBTQ+',
    'LGBTQIA+',
    'lesbian',
    'gay',
    'bisexual',
    'transgender',
    'non-binary',
    'queer',
    'intersex',
    'asexual',
    'pansexual',
    'genderfluid',
];

Matching is case-insensitive. For example, Pride, PRIDE and pride are all recognised while preserving the original capitalisation.

Technical details

[edit]

The extension loads a ResourceLoader module on normal page views. JavaScript processes rendered article content, detects configured terms and wraps each letter in colour-specific elements to create the rainbow effect.

The original page source stored in the database is never modified.

Compatibility

[edit]
MediaWiki version Support
1.46 Yes

Support and bug reports

[edit]

Bug reports and feature requests are tracked on Wikimedia Phabricator:

When reporting an issue, please include:

  • MediaWiki version
  • PHP version
  • Web browser
  • Skin in use
  • Any browser console errors
  • A minimal example demonstrating the problem

See also

[edit]
[edit]