function glazyClose($openedElementInfo = null) { glazyFinish($openedElementInfo); }
$pageDisplayer = PvlpPageDisplayer::getCurrentPageDisplayer(); stir('footer'); ?> </div> <?php stirring('footer', 'banner'); ?> <footer id="footer"> <div class="content"> <?php // Legals, Copyright $pageDisplayer->displayFooterLegals(); // Footer Navigation $mainNavigation = glazyBegin('nav#footerNavigation'); $pageDisplayer->displayFooterMenuContents(); glazyFinish($mainNavigation); stirring('header', 'main navigation'); ?> </div> </footer> <?php wp_footer(); stirring('footer', 'wp_footer'); ?> </div> <?php stirring('whole', 'footer'); stirred('footer'); stirDisplayRecordedTimesForHTML(); ?> </body>
function perforatedFormDisplayEntry($entryID, $entryDetails, $options, $callbacks) { $baseID = $options['baseID']; $problemIDsToMessages = $options['problemIDsToMessages']; $entryTitle = $entryDetails['title']; $entryType = $entryDetails['type']; $entryValue = !empty($entryDetails['value']) ? $entryDetails['value'] : ''; $entryInputName = "{$baseID}[{$entryID}]"; $entryTextTag = !empty($options['textTagName']) ? $options['textTagName'] : 'h5'; $entryIsRequired = !empty($entryDetails['required']); $glazyLabel = glazyBegin(array('tagName' => 'label', 'id' => $entryID, 'class' => $entryType, 'data-entry-i-d' => $entryID)); $textElement = glazyBegin(array('tagName' => $entryTextTag)); glazyElement('span.title', $entryTitle); if (isset($options['problems'][$entryID])) { foreach ($options['problems'][$entryID] as $problemID => $problemValue) { if (isset($problemIDsToMessages['types'][$entryType][$problemID])) { $problemMessage = $problemIDsToMessages['types'][$entryType][$problemID]; } else { $problemMessage = $problemIDsToMessages['base'][$problemID]; } glazyElement('span.problem', $problemMessage); } } glazyFinish($textElement); if (empty($callbacks['inputElementTypeForEntryType'])) { throw new Exception('Perforated: A input element type for entry type callback *must* be set: $callbacks["inputElementTypeForEntryType"] is empty.'); } else { $inputElementTypeForEntryTypeCallback = $callbacks['inputElementTypeForEntryType']; } $inputType = call_user_func($inputElementTypeForEntryTypeCallback, $entryType); if ($inputType === 'text' && empty($entryDetails['multipleLines']) || $inputType === 'email' || $inputType === 'url' || $inputType === 'number' || $inputType === 'checkbox') { $input = glazyBegin('input'); glazyAttribute('type', $inputType); glazyAttribute('name', $entryInputName); glazyAttributeCheck('required', $entryIsRequired); if ($inputType === 'checkbox') { glazyAttributeCheck('checked', $entryDetails['value'], 'checked'); glazyAttribute('data-on-title', $entryDetails['titleWhenOn']); glazyAttribute('data-off-title', $entryDetails['titleWhenOff']); } else { glazyAttribute('value', $entryValue); } if ($entryType === 'integer') { glazyAttribute('step', '1'); } glazyFinish($input); } elseif ($inputType === 'text' && !empty($entryDetails['multipleLines'])) { glazyElement(array('tagName' => 'textarea', 'name' => $entryInputName, 'required' => !empty($entryDetails['required']), 'cols' => 40, 'rows' => 4), $entryValue); } glazyFinish($glazyLabel); }
$classNamesArray[] = 'genre-' . $info['genreIdentifier']; // e.g. 'genre-thriller' // Begin the <div> $bookItemDiv = glazyBegin('div'); glazyAttribute('id', "bookItem-{$info['itemID']}"); // Lets you use an array of strings for class attributes. glazyAttribute('class', $classNamesArray); // Only display the attribute if variable reference $info['salesCount'] is present. glazyAttributeCheck('data-sales-count', $info['salesCount']); glazyAttributeCheck('data-sales-count', $info['salesCount_NOPE']); // Only displays the attribute, with the value 'selected', if $info['selected'] is true. glazyAttributeCheck('selected', $info['selected'], 'selected'); glazyAttributeCheck('selected-nope', $info['selected_NOPE'], 'selected'); glazyElement('h5.authorName', glazyCheckContent($info['authorName'])); glazyElement('p.description', glazyPrepareContentJoinedByLineBreaks(glazyCheckContent($info['itemDescription']))); glazyElement('p.description', glazyPrepareContentJoinedByLineBreaks(glazyCheckContent($info['itemDescription_NOPE']))); // Finish and close the </div> glazyFinish($bookItemDiv); glazyElement('h2', 'These are already escaped & < >', GLAZE_TYPE_PREGLAZED); $img = glazyBegin('img'); glazyAttribute('src', 'http://placehold.it/150x50'); $escapedText = 'Bangers & Mash'; glazyAttribute('alt', $escapedText, GLAZE_TYPE_PREGLAZED); glazyFinish($img); glazyElement('hr'); glazyElement('p', array('Updating this file by using: ', glazyPrepareElement('br'), glazyPrepareElement('code', 'php -f example-update.php'))); glazyElement('p', array('Check this file with the last version by using: ', glazyPrepareElement('br'), glazyPrepareElement('code', 'php -f example-check.php'))); glazyElement('p', array('You can download glaze.php from here: ', glazyPrepareElement(array('tagName' => 'a', 'href' => 'http://github.com/BurntCaramel/glaze'), 'github.com/BurntCaramel/glaze'))); glazyFinish($body); glazyFinish($html);
public function finishDisplayingSectionWithID($sectionID, $options = null) { $options = $this->setUpDefaultOptionsForDisplaySection($options); if (!empty($options['addContentElement'])) { glazyFinish(); } glazyFinish(); }