public function is_plugin_activated( $slug )
	{
		$element = $this->search_plugin( $slug );
		if ( ! $element ) {
			throw new \Exception( sprintf(
				"The %s plugin is not installed.",
				$slug
			) );
		}
		$classes = preg_split( '/\s+/', trim( $element->getAttribute( "class" ) ) );
		if ( in_array( 'active', $classes ) ) {
			return true;
		} else {
			return false;
		}
	}
public function is_plugin_activated( $slug )
	{
		$element = $this->search_plugin( $slug );
		if ( ! $element ) {
			throw new \Exception( sprintf(
				"The %s plugin is not installed.",
				$slug
			) );
		}
		$classes = preg_split( '/\s+/', trim( $element->getAttribute( "class" ) ) );
		if ( in_array( 'active', $classes ) ) {
			return true;
		} else {
			return false;
		}
	}
public function is_plugin_activated ( $ slug ) { $ element = $ this -> search_plugin ( $ slug ) ; if ( ! $ element ) { throw new \ Exception ( sprintf ( "The %s plugin is not installed." , $ slug ) ) ; } $ classes = preg_split ( '/\s+/' , trim ( $ element -> getAttribute ( "class" ) ) ) ; if ( in_array ( 'active' , $ classes ) ) { return true ; } else { return false ; } }
Check the plugin is activated.

@param string $slug The slug of the plugin.
@return bool Return true if plugin is activated.
@throws \Exception
Check the plugin is activated .