Okay
  Public Ticket #171118
3.1.5 Update changed things in shortcode-processing.php (image with animation + retina.js support)
Closed

Comments

  • Oliver started the conversation

    Hey Nectar! So, I dutifully updated to the latest 3.1.5 version, mainly to fix that Chrome 33 bug with masonry, and get up to date. After going through and manually updating a few of the child theme files (since initially it broke a lot of things), I got stumped at the retina.js fix you gave me a while back for images with animation. 

    If you recall in this exchange, you gave me a code to enable "image_2x_url" so that I could enable @2x images for the images with animation. The shortcode-processing.php file has since been updated, and I was trying to reconcile the differences with the new code, but was unsuccessful in my attempts. The included URL shows examples of images with animation that have @2x counterparts which aren't loading for some reason. What should I change in the new code to get this functionality back? Thanks so much and I'll paste the new code below for your convenience (line 350 in shortcode-processing.php):

    //image with animation function nectar_image_with_animation($atts, $content = null) { extract(shortcode_atts(array("animation" => 'Fade In', "delay" => '0', "image_url" => '', 'alt' => '', 'img_link_target' => '_self', 'img_link' => '', 'img_link_large' => '', 'el_class' => ''), $atts)); $parsed_animation = str_replace(" ","-",$animation); (!empty($alt)) ? $alt_tag = $alt : $alt_tag = null; if(preg_match('/^\d+$/',$image_url)){ $image_src = wp_get_attachment_image_src($image_url, 'full'); $image_url = $image_src[0]; } if(!empty($img_link) || !empty($img_link_large)){ if(!empty($img_link) && empty($img_link_large)) { return ''.$alt_tag.''; } elseif(!empty($img_link_large)) { return ''.$alt_tag.''; } } else { return ''.$alt_tag.''; } } add_shortcode('image_with_animation', 'nectar_image_with_animation');

    P.S. Not sure how to properly insert code into the new Ticksy, I tried with "< code >" but it still seems to somewhat garble it (Putting spaces because otherwise it will see that and also turn it to code). If there's another way of doing it, please let me know! Thanks. =)

  •  1,069
    ThemeNectar replied

    Hey again Oliver!

    Is there anyway you could paste your login credentials again so I can get in there and try and sort this for you?

    Cheers :)

  •   Oliver replied privately
  •  1,069
    ThemeNectar replied

    Just updated the file to work correctly - can you verify it's good on your end? :)

  •   Oliver replied privately
  •  1,069
    ThemeNectar replied

    Should be good now - sorry about that! :)

  • Oliver replied

    BOOM, worked. =) Thanks so much! I copied the code snippet just in case, and also verified the time stamp of the file on my FTP that it was updated recently. Awesome work!