function remove() { if (true !== $this->_loaded) { ITError::warn('early_call:ITStorage:remove', 'ITStorage::remove() called too early. ITStorage has not fully loaded yet. You must wait until after the init action priority -10.'); return; } $options = @get_option($this->_base_option); if (true === $this->_global) { unset($options[$this->_global_index][$this->_var]); } else { if (!empty($options['themes'][$this->_theme_index]) && is_array($options['themes'][$this->_theme_index])) { unset($options['themes'][$this->_theme_index][$this->_var]); } } @update_option($this->_base_option, $options); $this->clear_cache(); $this->load(); }
public static function check_class($class, $required = true) { if (false !== $class) { if (!class_exists($class)) { if ($required) { ITError::fatal("missing_class:{$class}", 'A necessary core component of the theme is missing.'); } else { ITError::warn("missing_class:{$class}", 'A core component of the theme is missing.'); } } } }