Plugin Directory

Changeset 1064343


Ignore:
Timestamp:
01/10/2015 03:31:52 AM (11 years ago)
Author:
bortpress
Message:

0.4.0.2b

Addressed a major bug that could cause the gallery to fail under certain circumstances in an apparent interaction with WP TEXTURIZE

Location:
masonry-post-gallery
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • masonry-post-gallery/trunk/masonry-post-gallery.php

    r1064209 r1064343  
    307307        if(!$thumbnail)
    308308        {
    309             $output.="<script>console.log('Cactus Masonry Error: -" . self::$a['default_image_id'] . "- Image with ID={$iid} cannot be found');</script>";
     309            $output.="console.log('Cactus Masonry Error: -" . self::$a['default_image_id'] . "- Image with ID={$iid} cannot be found');";
    310310            return $output;
    311311        }
     
    313313        $link_class = "masonry_brick_a";
    314314        if(self::$a['link_custom_class'] != '') $link_class .= " " . self::$a['link_custom_class'];
    315         $link_class = "class='{$link_class}'";
    316         $lightbox_text = " data-lightbox='";
    317         if(self::$a['browse_with_lightbox'] === true) $lightbox_text .= "thispage'";
    318         else $lightbox_text .= $post->ID . "'";
    319         if(self::$a['show_lightbox_title'] === true) $lightbox_text .= " data-title='" . $tit . "'";
     315        $link_class = "class=\"{$link_class}\"";
     316        $lightbox_text = " data-lightbox=\"";
     317        if(self::$a['browse_with_lightbox'] === true) $lightbox_text .= "thispage\"";
     318        else $lightbox_text .= $post->ID . "\"";
     319        if(self::$a['show_lightbox_title'] === true) $lightbox_text .= " data-title=\"" . $tit . "\"";
    320320        //Set where each image links and handle any interference with the show_lightbox parameter
    321321        if(has_post_thumbnail())
     
    386386        if($show_databox)
    387387        {
    388             $data_text = "<div class='cactus_masonry_databox'>";
    389             if(self::$a['display_post_titles'] && strlen($tit) > 0) $data_text .= "<div class='cm_title'>{$tit}</div>";
    390             if(self::$a['display_post_excerpts'] && strlen($excerpt) > 0) $data_text .= "<div class='cm_exerpt'>{$excerpt}</div>";
     388            $data_text = "<div class=\"cactus_masonry_databox\">";
     389            if(self::$a['display_post_titles'] && strlen($tit) > 0) $data_text .= "<div class=\"cm_title\">{$tit}</div>";
     390            if(self::$a['display_post_excerpts'] && strlen($excerpt) > 0) $data_text .= "<div class=\"cm_exerpt\">{$excerpt}</div>";
    391391            $data_text .= "</div>";
    392392        }
     
    435435            //Write the JavaScript
    436436            //Start with the innerHTML of the masonry_brick DIVs
    437             $output .= "                s = \"<{$link_type} {$lightbox_text} {$link_class} style='display: block;' href='{$lnk}'><img class='masonry_brick_img size-thumbnail' src='{$thumbnail[0]}' alt='{$tit}' style='";
     437            $output .= "                s = '<{$link_type} {$lightbox_text} {$link_class} style=\"display: block;\" href=\"{$lnk}\"><img class=\"masonry_brick_img size-thumbnail\" src=\"{$thumbnail[0]}\" alt=\"{$tit}\" style=\"";
    438438            if(!($thumbnail[5] && strpos(self::$a['upscale_max_width'], '%') !== false) && (self::$a['width'] != 'auto')) $output .= "width: 100%; ";
    439439            $output .= "height: " . self::$a['height'] . "; ";     
    440440            $output .= "max-height: " . self::$a['max_height'] . "; ";
    441441            if(self::$a['crop_images']) $output .= "visibility: hidden; ";
    442             $output .= "'/>";
    443             if(self::$a['crop_images']) $output .= "<div class='cactus_masonry_cropped' style='background-image: url({$thumbnail[0]});'></div>";
     442            $output .= "\"/>";
     443            if(self::$a['crop_images']) $output .= "<div class=\"cactus_masonry_cropped\" style=\"background-image: url({$thumbnail[0]});\"></div>";
    444444            //Add the databox containing the title and excerpt
    445445            if($show_databox) $output .= $data_text;
    446             $output .= "</{$link_type}>\";";
     446            $output .= "</{$link_type}>';";
    447447            //Create DOM Element for masonry_brick DIV
    448448            $output .= "
  • masonry-post-gallery/trunk/readme.txt

    r1064209 r1064343  
    6363
    6464== Changelog ==
     65
     66= 0.4.0.2b =
     67* Fixed a bug with the console error caused by an non-existent image id set as the default image id
     68* Fixed a major bug that may cause problems due to code changes caused by wptexturize on some sites...  uh... wptexturize...
    6569
    6670= 0.4.0.1b =
     
    258262== Upgrade Notice ==
    259263
     264= 0.4.0.2b =
     265WARNING: The 0.4 updates change the #masonry_post_gallery to div.masonry_post_gallery which could affect your custom CSS.  Fixed a major bug caused by an interaction with wptexturize.
     266
    260267= 0.4.0.1b =
    261268WARNING: The 0.4 updates change the #masonry_post_gallery to div.masonry_post_gallery which could affect your custom CSS.  The latest update fixes a 404 warning for lightbox.min.map.
Note: See TracChangeset for help on using the changeset viewer.