PHP code example of lucamauri / paragraphlinks

1. Go to this page and download the library: Download lucamauri/paragraphlinks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lucamauri / paragraphlinks example snippets


   wfLoadExtension( 'ParagraphLinks' );
   

   wfLoadExtension( 'ParagraphLinks' );
   

// Enable or disable the extension globally (default: true)
$wgParagraphLinksEnabled = true;

// Namespaces where heading links are active
// Default: [0, 4, 10, 12, 14] (Main, Project, Template, Help, Category)
$wgParagraphLinksNamespaces = [
    NS_MAIN,      // 0
    NS_PROJECT,   // 4
    NS_TEMPLATE,  // 10
    NS_HELP,      // 12
    NS_CATEGORY   // 14
];

   $wgShowExceptionDetails = true;
   $wgDevelopmentWarnings = true;
   $wgShowDBErrorBacktrace = true;
   

   $wgMainCacheType = CACHE_NONE;
   $wgCacheDirectory = false;
   
bash
# Run PHPUnit tests
php tests/phpunit/phpunit.php extensions/ParagraphLinks/tests/phpunit/

# Run with HTML coverage report
php tests/phpunit/phpunit.php --coverage-html coverage extensions/ParagraphLinks/tests/phpunit/