ldc-espri-restauration/wp-content/plugins/ninja-forms/includes/Telemetry/MetricRepository.php
Vincent BRIDIER 3e43da409b - hide wp menus
- MAJ WP + plugins + languages
    - Add .env settings
    - Add RGPD settings
    - Hide setting menus
2021-08-05 11:33:33 +02:00

23 lines
No EOL
547 B
PHP

<?php
class NF_Telemetry_MetricRepository implements NF_Telemetry_RepositoryInterface
{
protected $option;
public function __construct( $option, $default = false, $autoload = true )
{
$this->option = $option;
$this->default = $default;
$this->autoload = $autoload;
}
public function get()
{
return absint( get_option( $this->option, $this->default ) );
}
public function save( $new_value )
{
return update_option( $this->option, $new_value, $this->autoload );
}
}