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

Identifying Exercise Burnout: Signs & Solutions

Individuals who engage in a regular fitness regimen can begin to lose interest and motivation. Can knowing the signs of… Read More

October 4, 2023

Jumping Rope: The Ultimate Guide to Improve Health & Fitness

Individuals trying to get and stay in shape can find it difficult to get a regular workout. Can jumping rope… Read More

September 26, 2023

Treating Painful Lumbar Degenerative Disorders: Overview & Tips

How can spinal decompression reduce pain while restoring spinal flexibility in many individuals with lumbar degenerative disorders? Introduction As we… Read More

September 22, 2023

Nonsurgical Spinal Decompression: A Comprehensive Look at Clinical Trials for Pain Relief

Can healthcare professionals help individuals with spinal pain by incorporating non-surgical spinal decompression to restore mobility? Introduction Many individuals don’t… Read More

September 21, 2023

Clavicle Fractures: How to Identify and Treat Them

For individuals with a broken collarbone, can conservative treatment help in the rehabilitation process? Broken Collarbone Broken collarbones are very… Read More

September 12, 2023

Tennis Weight Training

Tennis requires strength, power, and endurance. Can combining tennis weight training into a player's fitness regimen that is broken up… Read More

September 7, 2023

Q/Quadriceps Angle Knee Injuries In Women Athletes

The Q or quadriceps angle is a measurement of pelvic width that is believed to contribute to the risk of… Read More

August 24, 2023

Throwing Sports Strength Training

Can weight and strength training increase speed and power in athletes that participate in throwing sports? Throwing Sports Top-throwing athletes… Read More

August 17, 2023

Calisthenics Resistance Training

Can adding calisthenics resistance training to a fitness routine provide health benefits like flexibility, balance, and coordination? Calisthenics Resistance Training… Read More

August 15, 2023

Golfing Wrist Injuries

Golfing wrist injuries are common with treatment requiring 1-3 months of rest and immobilization and if tears are present surgery.… Read More

August 7, 2023

Joint Manipulation Health Benefits

Individuals at work, school, etc, perform all kinds of repetitive physical tasks that put their bodies through a great deal… Read More

August 3, 2023

Advanced Oscillation Protocols For Spinal Decompression

In many individuals with spinal issues, how does spinal decompression compared with traditional care restore muscle strength? Introduction Many people… Read More

August 2, 2023

Hiking Training Tips and Preparation

Hiking is a form of exercise accessible to a wide range of physical abilities, which makes it a great outdoor… Read More

August 1, 2023

Vertical Jump Increase and Improvement

For athletes, the vertical jump is a skill that can be increased and improved with proper training. To improve jumping… Read More

July 27, 2023

Facet Syndrome Protocols For Spinal Decompression

In many people with facet joint syndrome, how does spinal decompression compare to traditional spinal surgery alleviate low back pain?… Read More

July 21, 2023

Personal Injury, Trauma & Spine Rehab Specialists

Online History & Registration 🔘
Call Us Today 🔘