Ejemplo n.º 1
0
 public function testAttributeFunction()
 {
     ob_start();
     atts(array(array('dir' => 'ltr', 'lang' => 'pt_BR')));
     $actual = trim(ob_get_clean());
     $expected = 'dir="ltr" lang="pt_BR"';
     $this->assertEquals($expected, $actual, "Failed for a single attribute function. Expected: {$expected}. Got: {$actual}");
 }
Ejemplo n.º 2
0
<!DOCTYPE html>
<html>
  <body>
    <div data-url='aasd'>
      <p class="paragraph" style='background: #fff'>Hei</p>
      <p class="paragraph" style='background: #fff'>Hei</p>
      <p class="paragraph" style="background: #fff; color: #000">Hei</p>
      <p class="paragraph">Hei</p>
      <p this='att list' is='multiline'></p>
      <p <?php 
atts(array('id' => array('this', $item_here), 'has' => $complex ? 'php' : "nothing", 'and' => 'and', 'is_also' => $multiline));
?>
></p>
    </div>
  </body>
</html>
Ejemplo n.º 3
0
<!DOCTYPE html>
<html>
    <body>
        <?php 
if ($image != null) {
    ?>
            <img <?php 
    atts(array('src' => $image));
    ?>
 />
        <?php 
} else {
    ?>
            Image not found
        <?php 
}
?>
        <?php 
echo 'Some other message';
?>
    </body>
</html>
Ejemplo n.º 4
0
<div id="access">
    <div class="skip-link screen-reader-text">
        <a <?php 
atts(array('href' => "#content", 'title' => 'Skip to content'));
?>
>
        	<?php 
echo 'Skip to content';
?>
        </a>
    </div>
    <?php 
echo 'Hello, there!';
?>
</div>