<?php

if ( ! class_exists( 'McwFullPageWPBakeryLocal' ) ) {

  final class McwFullPageWPBakeryLocal {
    private static $localId = '-lv-state';
    private static $local = false;
    private static $loaded = false;

    private function __construct() {}

    public static function GetState( $tag ) {
      return true;

      if ( ! self::$loaded ) {
        self::$local = get_option( $tag . self::$localId, false );
        self::$loaded = true;
      }

      return self::$local;
    }

    public static function UpdateState( $tag, $val ) {
      if ( self::GetState( $tag ) !== $val ) {
        update_option( $tag . self::$localId, $val );
        self::$local = $val;
      }

      return $val;
    }
  }

}
