Making WordPress.org

Changeset 10490


Ignore:
Timestamp:
12/04/2020 05:32:05 PM (5 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/compare/a9f7ae49349fbbf21ef00957061c66055c90a1a0...900848dd79b8c96af6827f2d88e3e1d5f710a608

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php

    r10486 r10490  
    624624}
    625625add_filter( 'wporg_noindex_request', 'wporg_learn_noindex' );
     626
     627/**
     628 * Fixes bug in (or at least in using) SyntaxHighlighter code shortcodes that
     629 * causes double-encoding of `>` character.
     630 *
     631 * Copied from themes/pub/wporg-developer/inc/formatting.php
     632 *
     633 * @param string $content The text being handled as code.
     634 * @return string
     635 */
     636function wporg_learn_fix_code_entity_encoding( $content ) {
     637    return str_replace( '>', '>', $content );
     638}
     639add_filter( 'syntaxhighlighter_htmlresult', 'wporg_learn_fix_code_entity_encoding', 20 );
Note: See TracChangeset for help on using the changeset viewer.