| @@ -131,14 +131,19 @@ | ||
| 131 | 131 | $canApplyCustomWidth, |
| 132 | 132 | $tableAlignment |
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | - $tableStyles = [ | |
| 136 | - 'border-collapse: ' . ($hasCellSpacing ? 'separate' : 'collapse'), | |
| 137 | - // Neutralize theme-level table borders. Tableberg owns its | |
| 138 | - // borders through the table/cell controls and rounded wrapper. | |
| 139 | - 'border: 0', | |
| 140 | - ]; | |
| 135 | + $tableStyles = array_merge( | |
| 136 | + // Table-wide typography, inherited by everything in the cells that | |
| 137 | + // does not set its own. | |
| 138 | + $attrs->table->typography->asStyles(), | |
| 139 | + [ | |
| 140 | + 'border-collapse: ' . ($hasCellSpacing ? 'separate' : 'collapse'), | |
| 141 | + // Neutralize theme-level table borders. Tableberg owns its | |
| 142 | + // borders through the table/cell controls and rounded wrapper. | |
| 143 | + 'border: 0', | |
| 144 | + ] | |
| 145 | + ); | |
| 141 | 146 | |
| 142 | 147 | if ($hasCellSpacing) { |
| 143 | 148 | $tableStyles[] = "border-spacing: {$cellSpacingHorizontal} {$cellSpacingVertical}"; |
| 144 | 149 | } |
| @@ -416,8 +421,17 @@ | ||
| 416 | 421 | if ($rowBackgroundColor !== '') { |
| 417 | 422 | $rowStyleParts[] = 'background-color:' . esc_attr($rowBackgroundColor); |
| 418 | 423 | } |
| 419 | 424 | |
| 425 | + // Inherited by everything in the row's cells that has no colour | |
| 426 | + // of its own. | |
| 427 | + $rowTextColor = isset($rowStyles['textColor']) && is_string($rowStyles['textColor']) | |
| 428 | + ? $rowStyles['textColor'] | |
| 429 | + : ''; | |
| 430 | + if ($rowTextColor !== '') { | |
| 431 | + $rowStyleParts[] = 'color:' . esc_attr($rowTextColor); | |
| 432 | + } | |
| 433 | + | |
| 420 | 434 | $rowBorder = isset($rowStyles['border']) && is_array($rowStyles['border']) |
| 421 | 435 | ? $rowStyles['border'] |
| 422 | 436 | : []; |
| 423 | 437 | foreach (['top', 'right', 'bottom', 'left'] as $side) { |
| @@ -647,14 +661,10 @@ | ||
| 647 | 661 | $mobileMaxWidth = max(1, (int) $mobile->maxWidth->value()); |
| 648 | 662 | $tabletStackCount = max(1, (int) $tablet->stackCount->value()); |
| 649 | 663 | $mobileStackCount = max(1, (int) $mobile->stackCount->value()); |
| 650 | 664 | |
| 651 | - // Repeating the first column in every stack row is a pro option. Only | |
| 652 | - // the licensed pro plugin turns this filter on, so the saved value is | |
| 653 | - // ignored without a valid licence. | |
| 654 | - $proActive = (bool) apply_filters('tableberg/is_pro_runtime_active', false); | |
| 655 | - $tabletRepeatFirstCol = $proActive ? $tablet->repeatFirstCol->asAttr() : ''; | |
| 656 | - $mobileRepeatFirstCol = $proActive ? $mobile->repeatFirstCol->asAttr() : ''; | |
| 665 | + $tabletRepeatFirstCol = $tablet->repeatFirstCol->asAttr(); | |
| 666 | + $mobileRepeatFirstCol = $mobile->repeatFirstCol->asAttr(); | |
| 657 | 667 | |
| 658 | 668 | return " |
| 659 | 669 | data-tableberg-responsive='true' |
| 660 | 670 | data-tableberg-rows='{$rows}' |