Skip to content

Administration: allow optional wp_get_toggletip() $args as documented#12629

Closed
jeremyfelt wants to merge 1 commit into
WordPress:trunkfrom
jeremyfelt:fix/55343-toggle-tip-args
Closed

Administration: allow optional wp_get_toggletip() $args as documented#12629
jeremyfelt wants to merge 1 commit into
WordPress:trunkfrom
jeremyfelt:fix/55343-toggle-tip-args

Conversation

@jeremyfelt

Copy link
Copy Markdown
Member

wp_get_toggletip() has similarly documented "optional" $args as wp_get_tooltip(). This updates the function signature to match.

Trac ticket: https://core.trac.wordpress.org/ticket/55343


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

…nted

https://core.trac.wordpress.org/ticket/55343

`wp_get_toggletip()` has similarly documented "optional" `$args`
as `wp_get_tooltip()`. This updates the function signature to
match.
@jeremyfelt
jeremyfelt requested review from Copilot and joedolson and removed request for Copilot July 21, 2026 19:58
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props jeremyfelt.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@joedolson joedolson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine; but it may make more sense for me to integrate it with a different set of changes, and add you to those props.

* @return string Tooltip HTML markup, or an empty string when no content is provided.
*/
function wp_get_toggletip( $content, $args ) {
function wp_get_toggletip( $content, $args = array() ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first instinct was that this should be required for toggle tips, but in fact I don't think that it does need to be; if it's left out, it'll be a button with label 'Help' and the content passed in the first argument in the popup; all other elements will use their default args. So yes, I agree that this makes sense.

I'm going to commit a fairly large change to this very soon, however, so it may make more sense for me to just add this change to #12528

@joedolson

Copy link
Copy Markdown
Contributor

Committed this change in https://core.trac.wordpress.org/changeset/62816, and props'ed you.

Closing this.

@joedolson joedolson closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants