[wp-meta] [Making WordPress.org] #7478: Add option to deactivate glossary on pages
Making WordPress.org
noreply at wordpress.org
Wed Apr 10 21:03:17 UTC 2024
#7478: Add option to deactivate glossary on pages
-----------------------------+---------------------
Reporter: benniledl | Owner: (none)
Type: feature request | Status: new
Priority: lowest | Milestone:
Component: General | Resolution:
Keywords: 2nd-opinion |
-----------------------------+---------------------
Changes (by coffee2code):
* priority: normal => lowest
* type: defect (bug) => feature request
* component: Make (Get Involved) / P2 => General
Comment:
Since wp.org does not need such functionality at the moment, we're not
going to build out a UI to handle this use-case.
However, as you suggested and preferred, I can add a filter
('`wporg_glossary_do_links`') to `Glossary_Handler::glossary_links()` that
will allow you to create custom code to selectively disable the
functionality.
See the commit for details, but the hook will take two arguments: a
boolean to indicate if glossary terms should be linked, and the content
that is being processed. Your code will have to determine the context and
then the logic for disabling the glossary linking (e.g. for all pages, or
using a custom field on pages where it should be disabled, etc).
Note that this filter would be an all or nothing for glossary term linking
of a given content; it won't help with selectively linking or not linking
a subset of glossary terms.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7478#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list