Skip to content

Commit ebe66ed

Browse files
committed
active and enabled
1 parent d2a6961 commit ebe66ed

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

php/class-delivery-feature.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function enqueue_assets() {
166166
* @return bool
167167
*/
168168
public function is_enabled() {
169-
return 'on' === $this->config[ $this->enable_slug ];
169+
return $this->is_active() && 'on' === $this->config[ $this->enable_slug ];
170170
}
171171

172172
/**

php/class-svg.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ public function maybe_setup_metadata( $attachment_id, $result ) {
207207
}
208208
}
209209

210+
/**
211+
* Check if component is active.
212+
*
213+
* @return bool
214+
*/
215+
public function is_active() {
216+
// It's always active if on.
217+
return 'on' === $this->config[ $this->enable_slug ];
218+
}
219+
210220
/**
211221
* Setup the component
212222
*/

0 commit comments

Comments
 (0)