Skip to content

Add title attribute to button for Request panel with extra query var #782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
964ce6b
save
crstauf Jul 3, 2023
646ed67
add translation domain
crstauf Jul 3, 2023
09969fe
Merge branch 'add-hook-type-column' into add-request-qv-title
crstauf Jul 5, 2023
3056b23
Merge branch 'develop' into add-request-qv-title
crstauf Jul 10, 2023
5e7645f
Merge branch 'develop' into add-request-qv-title
crstauf Jul 27, 2023
b72443c
Merge branch 'develop' into add-request-qv-title
crstauf Aug 2, 2023
b2dff0e
Merge branch 'develop' into add-request-qv-title
crstauf Aug 3, 2023
0c12677
Merge branch 'develop' into add-request-qv-title
crstauf Aug 9, 2023
0e0f213
Merge branch 'develop' into add-request-qv-title
crstauf Sep 11, 2023
ec5c6c8
Merge branch 'develop' into add-request-qv-title
crstauf Oct 17, 2023
1e8879e
Merge branch 'develop' into add-request-qv-title
crstauf Oct 20, 2023
18fdf41
Merge branch 'develop' into add-request-qv-title
crstauf Oct 30, 2023
9c86c0f
Merge branch 'develop' into add-request-qv-title
crstauf Nov 6, 2023
67d7865
Merge branch 'develop' into add-request-qv-title
crstauf Nov 11, 2023
0b936da
Merge branch 'develop' into add-request-qv-title
crstauf Nov 13, 2023
4d213fa
Merge branch 'develop' into add-request-qv-title
crstauf Dec 20, 2023
3ce31cb
Merge branch 'develop' into add-request-qv-title
crstauf Feb 15, 2024
59f85f8
Merge branch 'develop' into add-request-qv-title
crstauf May 25, 2024
fdb06fc
Merge branch 'develop' into add-request-qv-title
crstauf Jul 27, 2024
f22e4ca
Merge branch 'develop' into add-request-qv-title
crstauf Jul 27, 2024
e1cddef
Merge branch 'develop' into add-request-qv-title
crstauf Aug 19, 2024
5fdef95
Merge branch 'develop' into add-request-qv-title
crstauf Sep 25, 2024
fdd4717
Merge branch 'develop' into add-request-qv-title
crstauf Nov 18, 2024
c99e57b
Merge branch 'develop' into add-request-qv-title
crstauf Nov 27, 2024
bc4c4e1
Merge branch 'develop' into add-request-qv-title
crstauf Nov 29, 2024
0179ec5
Merge branch 'develop' into add-request-qv-title
crstauf Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dispatchers/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,14 @@ protected function before_output() {
* @return void
*/
protected function do_panel_menu_item( $id, array $menu ) {
if ( empty( $menu['attr-title'] ) ) {
$menu['attr-title'] = '';
}

printf(
'<li role="presentation"><button role="tab" data-qm-href="%1$s">%2$s</button>',
'<li role="presentation"><button role="tab" data-qm-href="%1$s" title="%2$s">%3$s</button>',
esc_attr( $menu['href'] ),
esc_attr( $menu['attr-title'] ),
esc_html( $menu['title'] )
);

Expand Down
9 changes: 9 additions & 0 deletions output/html/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,20 @@ public function admin_menu( array $menu ) {
/* translators: %s: Number of additional query variables */
: __( 'Request (+%s)', 'query-monitor' );

$attr_title = ( empty( $count ) )
? ''
/* translators: %s: Number of additional query variables */
: __( '+%s non-standard query variables in request. See Query Vars section.', 'query-monitor' );

$menu[ $this->collector->id() ] = $this->menu( array(
'title' => esc_html( sprintf(
$title,
number_format_i18n( $count )
) ),
'attr-title' => esc_html( sprintf(
$attr_title,
number_format_i18n( $count )
) ),
) );
return $menu;

Expand Down