album_id * * @return bool|object */ public function get_album_info( $album_id ) { $url = 'https://api.vimeo.com/albums/' . $album_id; $data = $this->fetch_remote( $url ); if ( $data && is_object( $data ) ) { return (object) array( 'title' => $data->name, 'description' => $data->description, 'username' => $data->user->name, ); } return false; } /** * Filters attribute * * @param $attrs * * @return mixed */ public function filter_attrs( $attrs ) { if ( ! empty( $attrs['videos'] ) ) { $videos = &$attrs['videos']; $videos = explode( "\n", $videos ); $videos = array_map( array( $this, 'get_video_ID' ), $videos ); } if ( ! empty( $attrs['playlist_url'] ) ) { $attrs['playlist_url'] = $this->get_album_ID( $attrs['playlist_url'] ); } return $attrs; } /** * Returns video id from URL * * @param $vimeo_url * * @return mixed */ protected function get_video_ID( $vimeo_url ) { $vimeo_url = trim( str_replace( '&', '&', $vimeo_url ) ); if ( preg_match( '#^(?: https? \: )? (?: //)? w* \.? vimeo \.com /* ([^\s]+)$#ix', $vimeo_url, $matched ) ) { return $matched[1]; } else { $video_ID = &$vimeo_url; return $video_ID; } } /** * Returns album ID from URL * * @param $vimeo_album_url * * @return mixed */ protected function get_album_ID( $vimeo_album_url ) { if ( preg_match( '#^(?: https? \: )? (?: //)? w* \.? vimeo \.com /*album/* ([^\s]+)$#ix', $vimeo_album_url, $matched ) ) { return $matched[1]; } return $vimeo_album_url; } /** * Returns playlist/album info * * @param $play_list_id * * @param int $limit * * @return array|bool */ public function get_playlist_videos_info( $play_list_id, $limit = 50 ) { return $this->get_album_videos_info( $play_list_id ); } /** * Fetches album info from Vimeo * * @param $album_id * * @return array|bool */ public function get_album_videos_info( $album_id ) { if ( empty( $album_id ) ) { return false; } $url = 'https://api.vimeo.com/albums/' . $album_id . '/videos'; $data = $this->fetch_remote( $url ); if ( $data && isset( $data->data ) && is_array( $data->data ) ) { $videos_info = array(); foreach ( $data->data as $video ) { $video_id = $this->get_video_ID( $video->link ); $videos_info[ $video_id ] = array( 'title' => $video->name, // 'description' => $video->description, 'thumbnails' => $this->prepare_thumbnails( $video->pictures->sizes ), 'duration' => (int) $video->duration, ); } return $videos_info; } return false; } /** * Prepares thumbnails * * @param $sizes * * @return bool|\stdClass */ private function prepare_thumbnails( $sizes ) { if ( empty( $sizes ) || ! is_array( $sizes ) ) { return false; } $sizes_name = array( 0 => 'default', 1 => 'small', 2 => 'medium', 3 => 'high', 4 => 'xhigh', 5 => 'standard', 6 => 'large', 7 => 'xlarge', 8 => 'huge', 9 => 'xhuge', ); $result = new stdClass(); usort( $sizes, array( $this, '_sort_by_width' ) ); $max_resolution = array_pop( $sizes ); $result->maxres = array( 'url' => $max_resolution->link, 'width' => $max_resolution->width, 'height' => $max_resolution->height, ); foreach ( $sizes as $index => $size ) { $sz_index = floor( $size->width / 100 ) - 1; if ( isset( $sizes_name[ $sz_index ] ) ) { $sz_name = &$sizes_name[ $sz_index ]; $result->$sz_name = array( 'url' => $size->link, 'width' => $size->width, 'height' => $size->height, ); } } return $result; } /** * Handy function for usort * * @param $a * @param $b * * @return bool */ private function _sort_by_width( $a, $b ) { return $a->width > $b->width; } /** * Handy function for default frame url * * @param $attrs * * @return string */ public function default_frame_url( $attrs ) { return 'https://player.vimeo.com/video/{video-id}?autoplay=0'; } /** * Handy function for video frame URL * * @param $attrs * * @return string */ public function change_video_frame_url( $attrs ) { return 'https://player.vimeo.com/video/{video-id}?autoplay=1'; } } Health Archives - Page 16 of 75 - PushAsRx Athletic Training Centers El Paso, TX
Mission Spine Injury Clinic
11860 Vista Del Sol, Ste 128
P: 915-412-6677

Health

Pain Management: What to Know After An Auto Accident

Explore effective pain management strategies for recovering from a car accident with our expert insights and tips. Introduction Numerous bodily… Read More

May 22, 2025

Histamine Intolerance: Dietary Changes That Help

Learn about histamine intolerance and its impact on your health. Discover causes, symptoms, and management strategies. Introduction After eating, how… Read More

May 19, 2025

Sauerkraut: Enhance Your Gut Health Naturally

Can incorporating sauerkraut into one's diet help promote healthy gut bacteria? Sauerkraut Sauerkraut, a fermented cabbage food, is a great… Read More

May 14, 2025

Perimenopause Explained: What to Expect

Understand perimenopause: what to expect and how to cope with the changes affecting your health and wellness. Introduction People often… Read More

May 14, 2025

Cauliflower: A Nutrient-Packed Superfood Delight

Find out how to incorporate cauliflower into your cooking. This vegetable offers numerous health benefits and flavors. Introduction In their… Read More

May 8, 2025

Migraines and Neck Pain Management Strategies to Try

Discover insightful strategies to cope with migraines and neck pain and gain a better understanding of their underlying causes. Introduction… Read More

May 2, 2025

Pigeon Toed: Treatment Options for Children and Adults

Children walking with their toes pointed in may be pigeon-toed. What are the causes, conditions associated with it, and treatments?… Read More

April 9, 2025

Tofu Benefits: Health and Culinary Uses Explained

From stir-fries to salads, tofu adds texture and nutrition to your dishes. Discover creative ways to enjoy tofu today. Introduction… Read More

April 4, 2025

Bread Crumbs: Uses and Substitutes in Recipes

When you don't have breadcrumbs or want to try something else, what are healthy substitutes for breadcrumbs that may yield… Read More

April 3, 2025

A New Approach on Gua-Sha & Chiropractic Care

Elevate your wellness with gua-sha combined with chiropractic care. Discover its benefits for improved health and relaxation. Introduction When it… Read More

April 1, 2025

Best Practices For Reproductive Health & Sexual Changes In A Clinical Approach

Delve into the clinical approach to reproductive health and how it can empower individuals with informed choices. Reproductive Health In… Read More

March 27, 2025

Pineapple Health Benefits You Need to Know

Pineapple is not just delicious; find out why this tropical fruit is great for digestion and overall health. Introduction When… Read More

March 20, 2025

Understanding Complexity Of Identity Formation In A Clinical Approach

Delve into the clinical approach of identity formation to learn how therapists can support clients in their identity journey. Introduction… Read More

March 18, 2025

Moringa: A Complete Guide to Its Uses

Learn about moringa, a superfood packed with nutrients. Discover how it can support your health and vitality. Introduction How often… Read More

March 12, 2025

Abdominal Self Massage: Relief from Constipation

For individuals struggling with constipation, a common digestive issue, could performing abdominal self-massage help bring relief? Abdominal Self Massage Constipation… Read More

March 11, 2025

Personal Injury, Trauma & Spine Rehab Specialists

Online History & Registration 🔘
Call Us Today 🔘