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'; } } Athletes Archives - Page 21 of 100 - PushAsRx Athletic Training Centers El Paso, TX
Mission Spine Injury Clinic
11860 Vista Del Sol, Ste 128
P: 915-412-6677

Improving Walking Posture: EP’s Chiropractic Injury Team

For individuals with aches and pains after walking, the first thing to check is posture. How an individual holds their… Read More

May 30, 2023

Vertebral Subluxation Complex Relieved By Spinal Decompression

Introduction Misalignment of the spine can occur due to various factors, causing stress and joint shifting. The spine plays an important role… Read More

May 26, 2023

What Is Spinal Decompression Therapy?

Introduction Many people experience pain daily at some point in their lives. The causes of pain can vary from person… Read More

May 25, 2023

An Overview Of Vertebral Pain Syndrome

Introduction The human body has muscles surrounding and protecting the spine to prevent pain and disability. The spine is divided into three… Read More

May 24, 2023

Assessing Hip Flexors With MET Therapy

Introduction The hips play a crucial role in maintaining stability and mobility in the body. However, incorrect actions can lead to misalignment… Read More

May 17, 2023

Power Strength Training: EP’s Chiropractic Fitness Center

Power is the combination of strength and speed over time. Strength is how much force an individual can exert. Power… Read More

May 16, 2023

Chair & Abdominal Exercises In MET Therapy

Introduction Everyone, at some point, has some form of physical activity that helps them release the stresses of everyday factors. Whether for… Read More

May 12, 2023

Older Athletes and Maintaining Fitness: EP Chiropractic Center

Healthy aging has been linked to a lifestyle consisting of proper nutrition and exercise. However, even with a healthy lifestyle,… Read More

May 11, 2023

Biomechanical Self-Help Methods Using MET

Introduction When it comes to our muscles, many of us often don't stretch each muscle group at least two to… Read More

May 11, 2023

Gymnastics Injuries: EP Chiropractic Specialists

Gymnastics is a demanding and challenging sport. Gymnasts train to be powerful and graceful. Today's moves have become increasingly technical… Read More

May 8, 2023

Engaging The Core: EP Chiropractic Center

The body's core muscles are used for stability, balance, lifting, pushing, pulling, and movement. Engaging the core muscles means bracing… Read More

May 5, 2023

Bicep Curls: EP’s Chiropractic Fitness Center

The biceps curl is an exercise to build strength in the upper arm. Curls are a common exercise used in… Read More

April 27, 2023

Muscle Inflammation Relieved By The MET Technique

Introduction When the body sustains an injury or a virus, the immune system springs into action by sending out cytokines to the… Read More

April 24, 2023

Daily Ways To Stay Active: EP’s Chiropractic Rehabilitation Clinic

Learning how to stay active with busy lives and schedules takes practice. There are daily ways to incorporate physical movement… Read More

April 21, 2023

Softball – Baseball Injuries: EP’s Chiropractic Rehabilitation Team

Softball and baseball require running, jumping, throwing, and swinging movements. Even for the fittest athletes and weekend warriors, the body… Read More

April 17, 2023

Personal Injury, Trauma & Spine Rehab Specialists

Online History & Registration 🔘
Call Us Today 🔘