PicoFeed\Filter\Tag::isAllowed PHP Метод

isAllowed() публичный Метод

Check if the tag is allowed and is not a pixel tracker.
public isAllowed ( string $tag, array $attributes ) : boolean
$tag string Tag name
$attributes array Attributes dictionary
Результат boolean
    public function isAllowed($tag, array $attributes)
    {
        return $this->isAllowedTag($tag) && !$this->isPixelTracker($tag, $attributes);
    }

Usage Example

 public function testAllowedTag()
 {
     $tag = new Tag();
     $this->assertTrue($tag->isAllowed('p', array('class' => 'test')));
     $this->assertTrue($tag->isAllowed('img', array('class' => 'test')));
     $this->assertFalse($tag->isAllowed('script', array('class' => 'test')));
     $this->assertFalse($tag->isAllowed('img', array('width' => '1', 'height' => '1')));
 }
All Usage Examples Of PicoFeed\Filter\Tag::isAllowed