MCPcopy Create free account
hub / github.com/EqualifyEverything/equalify / the_integration_status_badge

Function the_integration_status_badge

models/view_components.php:93–116  ·  view source on GitHub ↗

* The Integration Status Badge */

(
    $integration_status
    )

Source from the content-addressed store, hash-verified

91 * The Integration Status Badge
92 */
93function the_integration_status_badge(
94 $integration_status
95 ){
96
97 // Set badge doesn't include 'planned'
98 // 'cuz the button says that.
99 if($integration_status == 'Disabled'){
100 $badge_class = 'bg-secondary';
101 $badge_text = 'Disabled';
102 echo '
103 <span class="badge '.$badge_class.'">'
104 .$badge_text.'<span class="visually-hidden">
105 Integration Status</span></span>';
106 }elseif($integration_status == 'Active'){
107 $badge_class = 'bg-success';
108 $badge_text = 'Active';
109 echo '<span class="badge '.$badge_class.'">'
110 .$badge_text.'<span class="visually-hidden">
111 Integration Status</span></span>';
112 }else{
113 return false;
114 }
115
116}
117
118/**
119 * The Integration Activation Button

Callers 1

integrations.phpFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected