Making WordPress.org

Opened 2 months ago

Closed 10 days ago

#7478 closed feature request (invalid)

Add option to deactivate glossary on pages

Reported by: benniledl's profile benniledl Owned by:
Milestone: Priority: lowest
Component: General Keywords: 2nd-opinion
Cc:

Description

Hey, I am using the glossary plugin and I would like to only use the glossaries on posts.
I would love to either have a settings page and allow to turn of the glossaries on pages or even better have a filter in Glossary_Handler::glossary_links that allows to not do glossaries on the content.

Attachments (1)

meta-7478.diff (738 bytes) - added by coffee2code 10 days ago.
Diff of change to add filter to disable glossary link processing

Download all attachments as: .zip

Change History (3)

#1 @coffee2code
10 days ago

  • Component changed from Make (Get Involved) / P2 to General
  • Priority changed from normal to lowest
  • Type changed from defect (bug) to feature request

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.

@coffee2code
10 days ago

Diff of change to add filter to disable glossary link processing

#2 @coffee2code
10 days ago

  • Resolution set to invalid
  • Status changed from new to closed

Actually, I didn't realize this is released as an actual plugin and not just one made available through meta.svn. And since it is technically under the Automattic name, I'll defer to them to decide on the suitability of the request and to implement the change.

As such, I'm closing this ticket as invalid, especially since the request isn't related to a w.org need or issue. Please submit a request through the plugin's support forum, though I see there is a similar request from over a year ago.

I've attached a .diff of the change I proposed. I had in mind a target user of someone who pulled the plugin code from meta.svn, so it requires custom code to be of much use and lacks a UI for the non-dev user. Feel free to link back to this ticket.

Note: See TracTickets for help on using tickets.