$value ) { if ( property_exists( $this, $key ) ) { $this->$key = $value; } } } /** * Magic isset-er. * * @param string $key Key to check whether a value for it is set. * * @return bool True if set, false otherwise. */ public function __isset( $key ) { return isset( $this->$key ); } /** * Magic getter. * * @param string $key Key to get the value for. * * @return mixed Value for the key, or null if not set. */ public function __get( $key ) { if ( isset( $this->$key ) ) { return $this->$key; } return null; } /** * Checks whether the feature for this toggle is enabled. * * @return bool True if the feature is enabled, false otherwise. */ public function is_enabled() { return (bool) WPSEO_Options::get( $this->setting ); } }