Administration: allow optional wp_get_toggletip() $args as documented#12629
Administration: allow optional wp_get_toggletip() $args as documented#12629jeremyfelt wants to merge 1 commit into
wp_get_toggletip() $args as documented#12629Conversation
…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.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
joedolson
left a comment
There was a problem hiding this comment.
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() ) { |
There was a problem hiding this comment.
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
|
Committed this change in https://core.trac.wordpress.org/changeset/62816, and props'ed you. Closing this. |
wp_get_toggletip()has similarly documented "optional"$argsaswp_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.