Upgrade to 3.6.0
This commit is contained in:
@@ -99,6 +99,18 @@ class Blocks extends Items
|
||||
return $blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a given block type exists in the collection
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param string $type
|
||||
* @return bool
|
||||
*/
|
||||
public function hasType(string $type): bool
|
||||
{
|
||||
return $this->filterBy('type', $type)->count() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse and sanitize various block formats
|
||||
*
|
||||
|
Reference in New Issue
Block a user