Skip to content

Commit d6db1fd

Browse files
author
Thai Wood
committed
Add id to table rows by using table id and row id
1 parent 69d3ffd commit d6db1fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inline-gdocs-viewer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ private function dataToHtml ($r, $options, $caption = '') {
613613

614614
$html .= "<thead>\n";
615615
foreach ( $thead as $v ) {
616-
$html .= "<tr class=\"row-$ir " . $this->evenOrOdd( $ir ) . "\">";
616+
$html .= "<tr id=\"" . esc_attr( $id ) . '-row-$ir" class="row-$ir ' . $this->evenOrOdd( $ir ) . "\">";
617617
$ir++;
618618
$ic = 1; // reset column counting
619619
foreach ( $v as $th ) {
@@ -628,7 +628,7 @@ private function dataToHtml ($r, $options, $caption = '') {
628628
if ( $tfoot ) {
629629
$html .= "<tfoot>\n";
630630
foreach ( $tfoot as $v ) {
631-
$html .= "<tr class=\"row-$ir " . $this->evenOrOdd( $ir ) . "\">";
631+
$html .= "<tr id=\"" . esc_attr( $id ) . "-row-$ir\" class=\"row-$ir " . $this->evenOrOdd( $ir ) . "\">";
632632
$ir++;
633633
$ic = 1; // reset column counting
634634
foreach ( $v as $td ) {
@@ -644,7 +644,7 @@ private function dataToHtml ($r, $options, $caption = '') {
644644

645645
$html .= "<tbody>\n";
646646
foreach ( $tbody as $v ) {
647-
$html .= "<tr class=\"row-$ir " . $this->evenOrOdd( $ir ) . "\">";
647+
$html .= "<tr id=\"" . esc_attr( $id ) . "-row-$ir\" class=\"row-$ir " . $this->evenOrOdd( $ir ) . "\">";
648648
$ir++;
649649
$ic = 1; // reset column counting
650650
foreach ( $v as $td ) {

0 commit comments

Comments
 (0)