You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
479 B

<?php
class WP_Export_Oxymel extends Oxymel {
public function optional( $tag_name, $contents ) {
if ( $contents ) {
$this->$tag_name( $contents );
}
return $this;
}
public function optional_cdata( $tag_name, $contents ) {
if ( $contents ) {
$this->$tag_name->contains->cdata( $contents )->end;
}
return $this;
}
public function cdata( $text ) {
if ( !seems_utf8( $text ) ) {
$text = utf8_encode( $text );
}
return parent::cdata( $text );
}
}