Making WordPress.org

Ticket #7478: meta-7478.diff

File meta-7478.diff, 738 bytes (added by coffee2code, 14 months ago)

Diff of change to add filter to disable glossary link processing

  • includes/class-glossary-handler.php

     
    7373                        return $content;
    7474                }
    7575
     76                /**
     77                 * Determines if glossary items should be linked for the content.
     78                 *
     79                 * @param bool   $do_links Should the glossary items in the content be linked? Default true.
     80                 * @param string $content  The content being processed for glossary links.
     81                 */
     82                if ( ! (bool) apply_filters( 'wporg_glossary_do_links', true, $content ) ) {
     83                        return $content;
     84                }
     85
    7686                $regex = $this->glossary->get_item_names_regex();
    7787                if ( ! $regex ) {
    7888                        return $content;