Esempio n. 1
0
                echo $pages->active()->children()->first()->images()->first()->url();
                ?>
" />
	        <meta property="og:image:url" content="<?php 
                echo $pages->active()->children()->first()->images()->first()->url();
                ?>
" />
	        <?php 
            } elseif ($pages->active()->children()->first()->template() === 'video') {
                ?>
	        <meta property="og:image" content="<?php 
                echo videos::thumb($pages->active()->children()->first()->video_url());
                ?>
" />
	        <meta property="og:image:url" content="<?php 
                echo videos::thumb($pages->active()->children()->first()->video_url());
                ?>
" />
	        <?php 
            }
            ?>
	 	<?php 
        }
        ?>
    <?php 
    } elseif ($category_name !== null) {
        ?>
	    <meta property="og:title" content="<?php 
        echo $site->title . ' - Category Archive - ' . $category_name;
        ?>
" />
Esempio n. 2
0
     $count++;
     switch ($mtype) {
         case 'image':
             if ($c->images()->first()) {
                 $media[] = array('type' => $mtype, 'url' => $c->images()->first()->url(), 'width' => $c->images()->first()->width(), 'height' => $c->images()->first()->height(), 'title' => $title, 'caption_title' => $caption_title, 'description' => $description);
             }
             break;
         case 'video':
             $embed = '';
             $url = $c->video_url()->value;
             if (!isset($c->video_embed()->value) || $c->video_embed()->value == '') {
                 $embed = videos::embed($url);
             } else {
                 $embed = $c->video_embed()->value;
             }
             $media[] = array('type' => $mtype, 'id' => videos::id($url), 'url' => $c->video_url()->value, 'title' => $title, 'caption_title' => $caption_title, 'description' => $description, 'embed' => $embed, 'thumb' => videos::thumb($url));
             break;
         case 'audio':
             $embed = '';
             $url = $c->audio_url()->value;
             if (!isset($c->audio_embed()->value) || $c->audio_embed()->value == '') {
                 $embed = scaudio::embed($url);
             } else {
                 $embed = $c->audio_embed()->value;
             }
             $media[] = array('type' => $mtype, 'id' => $url, 'url' => $url, 'title' => $title, 'caption_title' => $caption_title, 'description' => $description, 'embed' => $embed, 'thumb' => scaudio::thumb($url));
             break;
     }
 }
 $media['length'] = $count;
 if (!empty($media)) {