Skip to content

Method

Get an attribute.

get_attribute( string $key )

public

Parameters

$key string
The attribute key.

Return

string|bool The attribute value or false if it doesn't exist.

Source

public function get_attribute( $key ) {
    if ( isset( $this->attributes[ $key ] ) ) {
        return $this->attributes[ $key ];
    }
    return false;
}

Changelog

VersionDescription
7.0 Introduced.