`, and nothing * else: these strings name filters, constants and * capabilities, and are authored in the codebase rather * than supplied by a user. * @param string $label What the tip is about, used to build the trigger's * accessible name ("More about Invitation expiry"). A * bare "(i)" button announces as nothing useful when a * screen has several. * @param string $id Optional explicit popover id. * * @return void */ public static function render( string $text, string $label, string $id = '' ): void { echo self::get( $text, $label, $id ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get() escapes every part. } /** * Build an info tip and return it. * * Use when the markup has to be composed into a larger string rather than * echoed in place, as {@see SettingsRenderer} does inside a printf(). * * @since 1.4.0 * * @param string $text The explanation (see {@see self::render()}). * @param string $label What the tip is about. * @param string $id Optional explicit popover id. * * @return string Escaped markup, or an empty string when there is nothing to say. */ public static function get( string $text, string $label, string $id = '' ): string { if ( trim( $text ) === '' ) { return ''; } if ( $id === '' ) { $id = 'albert-tip-' . ( ++self::$sequence ); } return sprintf( // The popover is the trigger's *next sibling* on purpose: // admin-popover.js finds it with `nextElementSibling`, so anything // inserted between the two silently breaks the control. // Every element here is phrasing content, `` rather than the // `
` the popover used to be. That is what makes this control // legal, and so reliably rendered, inside a ``, a `

` or // a `