Plugin Directory

Changeset 1261456


Ignore:
Timestamp:
10/08/2015 04:55:56 AM (10 years ago)
Author:
jamie3d
Message:

You can now filter the video URLs and permalinks with fve_youtube_iframe_url, fve_youtube_permalink, etc.

Location:
fluid-video-embeds
Files:
20 added
3 edited

Legend:

Unmodified
Added
Removed
  • fluid-video-embeds/trunk/fluid-video-embeds.php

    r1259468 r1261456  
    55Description: Makes your YouTube and Vimeo auto-embeds fluid/full width.
    66Author: jamie3d
    7 Version: 1.2.8
     7Version: 1.2.9
    88Author URI: http://jamie3d.com
    99Text Domain: fluid-video-embeds
     
    419419
    420420                    $iframe_url = '//www.youtube.com/embed/' . $this->meta['id'] . '?wmode=transparent&modestbranding=1&autohide=1&showinfo=0&rel=0';
     421                    $iframe_url = apply_filters( 'fve_youtube_iframe_url', $iframe_url, $this->meta );
    421422                    $permalink = '//www.youtube.com/watch?v=' . $this->meta['id'];
     423                    $permalink = apply_filters( 'fve_youtube_permalink', $permalink, $this->meta );
    422424                    $thumbnail = isset( $this->meta['full_image'] ) ? $this->meta['full_image'] : '';
    423425                    break;
     
    426428
    427429                    $iframe_url = '//player.vimeo.com/video/' . $this->meta['id'] . '?portrait=0&byline=0&title=0';
     430                    $iframe_url = apply_filters( 'fve_vimeo_iframe_url', $iframe_url, $this->meta );
    428431                    $permalink = '//vimeo.com/' . $this->meta['id'];
     432                    $permalink = apply_filters( 'fve_vimeo_permalink', $permalink, $this->meta );
    429433                    $thumbnail = isset( $this->meta['full_image'] ) ? $this->meta['full_image'] : '';
    430434                    break;
  • fluid-video-embeds/trunk/lib/constants.php

    r1259468 r1261456  
    77
    88// The current version of this plugin
    9 if( !defined( 'FLUID_VIDEO_EMBEDS_VERSION' ) ) define( 'FLUID_VIDEO_EMBEDS_VERSION', '1.2.8' );
     9if( !defined( 'FLUID_VIDEO_EMBEDS_VERSION' ) ) define( 'FLUID_VIDEO_EMBEDS_VERSION', '1.2.9' );
    1010
    1111// The cache prefix
  • fluid-video-embeds/trunk/readme.txt

    r1259468 r1261456  
    2929
    3030    <?php echo do_shortcode('[fve]http://youtu.be/oHg5SJYRHA0[/fve]'); ?>
     31
     32You can filter the YouTube and or Vimeo URLs like this if you want to customize them (like explicitly specifying the https scheme):
     33
     34    // Filter the iframe URL for Vimeo
     35    add_filter( 'fve_vimeo_iframe_url', 'fve_vimeo_iframe_url', 10, 2 );
     36    function fve_vimeo_iframe_url( $vimeo_iframe_url, $video_meta ) {
     37      return 'https://player.vimeo.com/video/' . $video_meta['id'] . '?portrait=0&byline=0&title=0';
     38    }
     39
     40Check the source to see all of the filters by searching for `apply_filters(`
     41
    3142
    3243= How It Works =
     
    6374
    6475== Changelog ==
     76= 1.2.9 =
     77* You can now filter the video URLs and permalinks with `fve_youtube_iframe_url`, `fve_youtube_permalink`, etc.
     78
    6579= 1.2.8 =
    6680* Updating translation text domain
     
    119133
    120134== Upgrade Notice ==
     135= 1.2.9 =
     136* Adds filters for the YouTube and Vimeo URLs
     137
    121138= 1.2.8 =
    122139* Updating translations for es_ES and pt_BR
Note: See TracChangeset for help on using the changeset viewer.