Jump to content

API talk:Tags

About this board

Type of <code>displayname</code>

2
77.8.4.56 (talkcontribs)

What is the type of displayname intended to be?

Usually it seems to be a string, but for the tag discussiontools the JSON object contains "displayname":false. --77.8.4.56 09:16, 6 August 2020 (UTC)

RobinHood70 (talkcontribs)

From the underlying function description the API uses: Get a short description for a tag. Checks if message key "mediawiki:tag-$tag" exists. If it does not, returns the HTML-escaped tag name. Uses the message if the message exists, provided it is not disabled. If the message is disabled, we consider the tag hidden, and return false.

And the documentation for the isDisabled() functionm says: Check whether a message does not exist, is an empty string, or is "-".

So, it should be a string in most cases, except when the message doesn't exist, is an empty string, or is "-", in which case it will return false. One of the many joys of dealing with a loosely typed language.

Reply to "Type of <code>displayname</code>"
There are no older topics