original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: checkPageSubjectInImageAlt.
  Checks if image alt tags contain page subject
  
  @param none
  @return boolean
docstring_tokens: checkPageSubjectInImageAlt . Checks if image alt tags contain page subject