Skip to content

Commit f78d637

Browse files
committed
gpcc-field-indicators.php: Added support for "Trigger" indicator and fixed issue where not all Copy Cat mappings were accounted for.
1 parent faf96ac commit f78d637

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

experimental/gpcc-field-indicators.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
$mappings = array();
2525
foreach ( $gpcc_fields as $_mappings ) {
26-
$mappings = array_merge( $_mappings );
26+
$mappings = array_merge( $mappings, $_mappings );
2727
}
2828

2929
$spans = array();
@@ -35,6 +35,9 @@
3535
if ( $field->id == $mapping['target'] ) {
3636
$spans['target'] = '<span class="gpcc-target gw-field-indicator">GPCC: Target</span>';
3737
}
38+
if ( $field->id == $mapping['trigger'] ) {
39+
$spans['trigger'] = '<span class="gpcc-trigger gw-field-indicator">GPCC: Trigger</span>';
40+
}
3841
}
3942

4043
$search = '<\/label>|<\/legend>';
@@ -62,7 +65,7 @@ function gpcc_field_indicator_styles() {
6265
.gw-field-indicator + .gw-field-indicator {
6366
margin-left: 0.3725rem;
6467
}
65-
.gpcc-source, .gpcc-target {
68+
.gpcc-source, .gpcc-target, .gpcc-trigger {
6669
color: #274524;
6770
background-color: #edf8ec;
6871
border-color: #d7e8d5;

0 commit comments

Comments
 (0)