|
@@ 545-553 (lines=9) @@
|
| 542 |
|
PodsInit::$components->get_components(); |
| 543 |
|
} |
| 544 |
|
|
| 545 |
|
if ( isset( $this->components[ $component ] ) ) { |
| 546 |
|
$this->settings['components'][ $component ] = array(); |
| 547 |
|
|
| 548 |
|
$settings = version_compare( PHP_VERSION, '5.4.0', '>=' ) ? json_encode( $this->settings, JSON_UNESCAPED_UNICODE ) : json_encode( $this->settings ); |
| 549 |
|
|
| 550 |
|
update_option( 'pods_component_settings', $settings ); |
| 551 |
|
|
| 552 |
|
$activated = true; |
| 553 |
|
} |
| 554 |
|
} else { |
| 555 |
|
$activated = true; |
| 556 |
|
} |
|
@@ 571-579 (lines=9) @@
|
| 568 |
|
*/ |
| 569 |
|
public function deactivate_component( $component ) { |
| 570 |
|
|
| 571 |
|
if ( $this->is_component_active( $component ) ) { |
| 572 |
|
if ( isset( $this->components[ $component ] ) ) { |
| 573 |
|
$this->settings[ 'components' ][ $component ] = 0; |
| 574 |
|
|
| 575 |
|
$settings = version_compare( PHP_VERSION, '5.4.0', '>=' ) ? json_encode( $this->settings, JSON_UNESCAPED_UNICODE ) : json_encode( $this->settings ); |
| 576 |
|
|
| 577 |
|
update_option( 'pods_component_settings', $settings ); |
| 578 |
|
} |
| 579 |
|
} |
| 580 |
|
|
| 581 |
|
} |
| 582 |
|
|