Plugin Directory

Changeset 1612158


Ignore:
Timestamp:
03/10/2017 08:23:43 PM (9 years ago)
Author:
thrivehive
Message:

youtube shortcode changes

Location:
thrivehive/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • thrivehive/trunk/controllers/snippets.php

    r1580543 r1612158  
    167167                break;
    168168            case "th_youtube":
    169                 $html = th_display_youtube($atts);
     169                $html = th_display_youtube($atts, false);
    170170                break;
    171171            case "th_pdf":
  • thrivehive/trunk/lib/snippet_display.php

    r1580634 r1612158  
    172172}
    173173
    174 function th_display_youtube($atts){
    175     wp_print_scripts('thrivehive-youtube');
    176     wp_print_scripts('thrivehive-youtube-iframes');
    177     wp_print_scripts('youtube-api');
     174function th_display_youtube($atts, $printScripts=true){
     175    if ($printScripts) {
     176      wp_print_scripts('thrivehive-youtube');
     177      wp_print_scripts('thrivehive-youtube-iframes');
     178      wp_print_scripts('youtube-api');
     179    }
    178180
    179181    if(isset($atts['id'])){
  • thrivehive/trunk/readme.txt

    r1580543 r1612158  
    3535
    3636== Changelog ==
     37* V 1.129 Modifying Youtube shortcode to selectively load scripts depending on website editor version
    3738* V 1.128 Extracting shortcode rendering logic and adding an endpoint to utilize it
    3839* V 1.127 Adding set meta value capability for posts
  • thrivehive/trunk/thrivehive.php

    r1580650 r1612158  
    55   *Plugin URI: http://thrivehive.com
    66   *Description: A plugin to include ThriveHive's tracking code
    7    *Version: 1.128.2
     7   *Version: 1.129
    88   *Author: ThriveHive
    99   *Author URI: http://thrivehive.com
     
    3030        thrivehive_create_forms_db($update);
    3131        thrivehive_create_snippets_db($update);
    32    
     32
    3333}}
    3434
     
    592592function suppress_title( $title, $id = null ) {
    593593
    594     $meta = get_post_meta($id, "th_show_title", true); 
     594    $meta = get_post_meta($id, "th_show_title", true);
    595595    if($meta == "hide"){
    596         return "";     
     596        return "";
    597597    }
    598598    else{
     
    14761476
    14771477            if(filter_var($use_fontawesome, FILTER_VALIDATE_BOOLEAN)){
    1478                 $this->render_fontawesome_icons($facebook, $twitter, $linkedin, $yelp, $googleplus, 
     1478                $this->render_fontawesome_icons($facebook, $twitter, $linkedin, $yelp, $googleplus,
    14791479                                        $instagram,$youtube, $houzz, $angieslist, $pinterest,
    14801480                                        $foursquare, $tripadvisor);
     
    15821582    }
    15831583
    1584     public function render_fontawesome_icons($facebook, $twitter, $linkedin, $yelp, $googleplus, 
     1584    public function render_fontawesome_icons($facebook, $twitter, $linkedin, $yelp, $googleplus,
    15851585                                            $instagram,$youtube, $houzz, $angieslist, $pinterest,
    15861586                                            $foursquare, $tripadvisor){
     
    16041604            }
    16051605        }
    1606         if($yelp){         
     1606        if($yelp){
    16071607            if (strpos($yelp, 'http') === 0) {
    16081608                echo "<a target='_blank' href='$yelp' style='margin-left: 10px' title='Yelp'><i class='fa th-social-icon fa-yelp'></i></a>";
Note: See TracChangeset for help on using the changeset viewer.