public function checkPageSubjectInImageAltTags() {

        $html = $this->getPageContent();

        // for newly created page
        if ($html == '') {
            return false;
        }

        $dom = $this->createDOMDocumentFromHTML($html);

        $images = $dom->getElementsByTagName('img');

        foreach($images as $image){
            if($image->hasAttribute('alt') && $image->getAttribute('alt') != ''){
                if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $image->getAttribute('alt'))) {
                    return true;
                }
            }
        }

        return false;
    }
public function checkPageSubjectInImageAltTags() {

        $html = $this->getPageContent();

        // for newly created page
        if ($html == '') {
            return false;
        }

        $dom = $this->createDOMDocumentFromHTML($html);

        $images = $dom->getElementsByTagName('img');

        foreach($images as $image){
            if($image->hasAttribute('alt') && $image->getAttribute('alt') != ''){
                if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $image->getAttribute('alt'))) {
                    return true;
                }
            }
        }

        return false;
    }
public function checkPageSubjectInImageAltTags ( ) { $ html = $ this -> getPageContent ( ) ; // for newly created page if ( $ html == '' ) { return false ; } $ dom = $ this -> createDOMDocumentFromHTML ( $ html ) ; $ images = $ dom -> getElementsByTagName ( 'img' ) ; foreach ( $ images as $ image ) { if ( $ image -> hasAttribute ( 'alt' ) && $ image -> getAttribute ( 'alt' ) != '' ) { if ( preg_match ( '/' . preg_quote ( $ this -> owner -> SEOPageSubject , '/' ) . '/i' , $ image -> getAttribute ( 'alt' ) ) ) { return true ; } } } return false ; }
checkPageSubjectInImageAlt.
Checks if image alt tags contain page subject

@param none
@return boolean
checkPageSubjectInImageAlt . Checks if image alt tags contain page subject