In your command-line run the following commands:
brew doctorbrew update
| {% comment %} We assume that we have the youtube video in form of URL {% endcomment %} | |
| {% assign video_url = 'https://www.youtube.com/watch?v=ScMzIvxBSi4' %} | |
| {% assign thumbnail_url = '' %} | |
| {% comment %} First of all, we get last part of the URL that's supposedly the Youtube Video ID {% endcomment %} | |
| {% assign video_id = video_url | split: '/' | last %} | |
| {% comment %} but we need strip any extra URL params {% endcomment %} | |
| {% assign video_id = video_id | split: '?' | first %} |
In your command-line run the following commands:
brew doctorbrew update| <?php | |
| //set up pods::find parameters to limit to 5 items | |
| $param = array( | |
| 'limit' => 5, | |
| ); | |
| //create pods object | |
| $pods = pods('pod_name', $params ); | |
| //check that total values (given limit) returned is greater than zero | |
| if ( $pods->total() > 0 ) { |