private function checkImageTitleTags() {

        $html = $this->getPageContent();

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

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

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

        $imagesWithTitleTags = 0;
        foreach($images as $image){
            if($image->hasAttribute('title') && $image->getAttribute('title') != ''){
                //echo $image->getAttribute('title') . '<br>';
                $imagesWithTitleTags++;
            }
        }

        if($imagesWithTitleTags == $images->length){
            return true;
        }

        return false;
    }
private function checkImageTitleTags() {

        $html = $this->getPageContent();

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

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

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

        $imagesWithTitleTags = 0;
        foreach($images as $image){
            if($image->hasAttribute('title') && $image->getAttribute('title') != ''){
                //echo $image->getAttribute('title') . '<br>';
                $imagesWithTitleTags++;
            }
        }

        if($imagesWithTitleTags == $images->length){
            return true;
        }

        return false;
    }
private function checkImageTitleTags ( ) { $ html = $ this -> getPageContent ( ) ; // for newly created page if ( $ html == '' ) { return false ; } $ dom = $ this -> createDOMDocumentFromHTML ( $ html ) ; $ images = $ dom -> getElementsByTagName ( 'img' ) ; $ imagesWithTitleTags = 0 ; foreach ( $ images as $ image ) { if ( $ image -> hasAttribute ( 'title' ) && $ image -> getAttribute ( 'title' ) != '' ) { //echo $image->getAttribute('title') . '<br>'; $ imagesWithTitleTags ++ ; } } if ( $ imagesWithTitleTags == $ images -> length ) { return true ; } return false ; }
checkImageTitleTags.
Checks if images in content have title tags

@param none
@return boolean
checkImageTitleTags . Checks if images in content have title tags