This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GROUP IMAGE ORIENTATION DETECTION | |
=================================================== */ | |
class PerchTemplateFilter_image_orientation_detection extends PerchTemplateFilter | |
{ | |
/* Notes... | |
You may want to do something different if the image is landscape e.g. span 2 columns in a CSS grid rather than 1 | |
- Assumes your template image has an ID of `image` | |
- e.g. `<div class="c-photo-grid__item c-photo-grid__item--<perch:content id="image" filter="image-orientation-detection" />">` | |
This would either output `c-photo-grid__item--landscape` or `c-photo-grid__item--portrait` | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<main role="main" class="glossary"> | |
<div class="group"> | |
<?php | |
// setup alphabet array for navigation | |
// make array of letters in span tags | |
$nav_arr = array( | |
'0-9' => '<span>0-9</span>' | |
); | |
for ($i = 65; $i <= 90; $i++) { | |
$nav_arr[chr($i)] = '<span>'.chr($i).'</span>'; |