Changeset 1064596
- Timestamp:
- 01/10/2015 12:33:18 PM (11 years ago)
- Location:
- masonry-post-gallery
- Files:
-
- 15 added
- 2 edited
-
tags/0.4.0.3b (added)
-
tags/0.4.0.3b/cactus-masonry-options.php (added)
-
tags/0.4.0.3b/cactus-masonry.js (added)
-
tags/0.4.0.3b/close.png (added)
-
tags/0.4.0.3b/imagesloaded.pkgd.min.js (added)
-
tags/0.4.0.3b/lightbox.css (added)
-
tags/0.4.0.3b/lightbox.min.js (added)
-
tags/0.4.0.3b/loading.gif (added)
-
tags/0.4.0.3b/masonry-post-gallery.css (added)
-
tags/0.4.0.3b/masonry-post-gallery.php (added)
-
tags/0.4.0.3b/masonry.pkgd.min.js (added)
-
tags/0.4.0.3b/next.png (added)
-
tags/0.4.0.3b/prev.png (added)
-
tags/0.4.0.3b/readme.txt (added)
-
tags/0.4.0.3b/spin.min.js (added)
-
trunk/masonry-post-gallery.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
masonry-post-gallery/trunk/masonry-post-gallery.php
r1064345 r1064596 2 2 /** 3 3 * @package Cactus Masonry 4 * @version 0.4.0. 2b4 * @version 0.4.0.3b 5 5 */ 6 6 /* … … 8 8 * Plugin URI: http://cactuscomputers.com.au/masonry 9 9 * Description: A highly customizable masonry styled gallery of post thumbnails. Please refer to the <a href="http://cactuscomputers.com.au/masonry">plugin Home Page</a> for detailed instructions. 10 * Version: 0.4.0. 2b10 * Version: 0.4.0.3b 11 11 * Author: N. E - Cactus Computers 12 12 * Author URI: http://www.cactuscomputers.com.au/masonry … … 123 123 'post_category' => "", 124 124 'post_order' => "DESC", 125 'post_orderby' => "post_date",126 'gallery_align' => "center",127 'image_background_color' => "#ffffff",128 'hover_color' => "#ffffff",129 'hover_intensity' => "0.5",130 'upscale_narrow_images' => 0,131 'upscale_short_images' => 0,132 'max_upscale_quality' => "large",133 'noscript_width' => "auto",134 'noscript_height' => "auto",135 'noscript_max_width' => "none",136 'noscript_max_height' => "none",137 'upscale_max_width' => "none",138 'upscale_max_height' => "none",139 'link_location' => "post",140 'show_lightbox' => false,141 'browse_with_lightbox' => false,142 'show_lightbox_title' => false,143 'soft_gutter' => 0,144 'infinite_scroll' => true,145 'posts_per_page' => 30,146 'show_loader' => true,147 'search_start' => 0,148 'page_size' => 1000,149 'test_mode' => false,150 'default_image_id' => false,151 'show_posts' => true,152 'show_pages' => false,153 'require_javascript' => false,154 'javascript_error_message' => 'Please enable JavaScript to properly view this page.',155 'infinite_scroll_buffer' => 400,156 'display_post_titles' => false,157 'display_post_excerpts' => false,158 'custom_post_types' => "",159 'load_js' => true,160 'force_auto_width' => false,161 'crop_images' => false,162 'ajax_mode' => false,163 'link_custom_class' => ''125 'post_orderby' => "post_date", 126 'gallery_align' => "center", 127 'image_background_color' => "#ffffff", 128 'hover_color' => "#ffffff", 129 'hover_intensity' => "0.5", 130 'upscale_narrow_images' => 0, 131 'upscale_short_images' => 0, 132 'max_upscale_quality' => "large", 133 'noscript_width' => "auto", 134 'noscript_height' => "auto", 135 'noscript_max_width' => "none", 136 'noscript_max_height' => "none", 137 'upscale_max_width' => "none", 138 'upscale_max_height' => "none", 139 'link_location' => "post", 140 'show_lightbox' => false, 141 'browse_with_lightbox' => false, 142 'show_lightbox_title' => false, 143 'soft_gutter' => 0, 144 'infinite_scroll' => true, 145 'posts_per_page' => 30, 146 'show_loader' => true, 147 'search_start' => 0, 148 'page_size' => 1000, 149 'test_mode' => false, 150 'default_image_id' => false, 151 'show_posts' => true, 152 'show_pages' => false, 153 'require_javascript' => false, 154 'javascript_error_message' => 'Please enable JavaScript to properly view this page.', 155 'infinite_scroll_buffer' => 400, 156 'display_post_titles' => false, 157 'display_post_excerpts' => false, 158 'custom_post_types' => "", 159 'load_js' => true, 160 'force_auto_width' => false, 161 'crop_images' => false, 162 'ajax_mode' => false, 163 'link_custom_class' => '' 164 164 ), $atts); 165 165 … … 228 228 if(has_post_thumbnail($post->ID) || !(self::$a['default_image_id'] === false)) 229 229 { 230 if( $post_count >= self::$a['search_start'] && $post_count <self::$a['page_size']) $script_text .= self::render_post();231 $post_count++;230 if(self::$post_count >= self::$a['search_start'] && self::$post_count < self::$a['search_start']+self::$a['page_size']) $script_text .= self::render_post(); 231 self::$post_count++; 232 232 } 233 233 } … … 313 313 $link_class = "masonry_brick_a"; 314 314 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 $lightbox_text = " data-lightbox='"; 316 if(self::$a['browse_with_lightbox'] === true) 317 { 318 $lightbox_text .= "thispage'"; 319 $data_lightbox = "thispage"; 320 } 321 else 322 { 323 $lightbox_text .= $post->ID . "'"; 324 $data_lightbox = $post->ID; 325 } 326 if(self::$a['show_lightbox_title'] === true) $lightbox_text .= " data-title='" . $tit . "'"; 320 327 //Set where each image links and handle any interference with the show_lightbox parameter 321 328 if(has_post_thumbnail()) … … 382 389 self::$a['show_lightbox'] = false; 383 390 } 384 if(!(self::$a['show_lightbox'] === true)) $lightbox_text = ""; 391 if(!(self::$a['show_lightbox'] === true)) 392 { 393 $lightbox_text = ""; 394 $data_lightbox = ""; 395 } 385 396 //Sort out databox 386 397 if($show_databox) 387 398 { 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>";399 $data_text = "<div class='cactus_masonry_databox'>"; 400 if(self::$a['display_post_titles'] && strlen($tit) > 0) $data_text .= "<div class='cm_title'>{$tit}</div>"; 401 if(self::$a['display_post_excerpts'] && strlen($excerpt) > 0) $data_text .= "<div class='cm_exerpt'>{$excerpt}</div>"; 391 402 $data_text .= "</div>"; 392 403 } … … 435 446 //Write the JavaScript 436 447 //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=\"";448 $output .= " s = \"<img class='masonry_brick_img size-thumbnail' src='{$thumbnail[0]}' alt='{$tit}' style='"; 438 449 if(!($thumbnail[5] && strpos(self::$a['upscale_max_width'], '%') !== false) && (self::$a['width'] != 'auto')) $output .= "width: 100%; "; 439 450 $output .= "height: " . self::$a['height'] . "; "; 440 451 $output .= "max-height: " . self::$a['max_height'] . "; "; 441 452 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>";453 $output .= "'/>"; 454 if(self::$a['crop_images']) $output .= "<div class='cactus_masonry_cropped' style='background-image: url({$thumbnail[0]});'></div>"; 444 455 //Add the databox containing the title and excerpt 445 456 if($show_databox) $output .= $data_text; 446 $output .= "</{$link_type}>';";447 457 //Create DOM Element for masonry_brick DIV 458 $output .= "\"; 459 lk = document.createElement('{$link_type}'); 460 lk.className = '{$link_class}'; 461 lk.style.display = 'block'; 462 lk.href = \"{$lnk}\";"; 463 if($data_lightbox != "") 464 $output .= " 465 lk.setAttribute('data-lightbox', '{$data_lightbox}');"; 466 if(self::$a['show_lightbox_title'] === true) 467 $output .= " 468 lk.setAttribute('data-title', \"{$tit}\");"; 448 469 $output .= " 470 lk.innerHTML = s; 449 471 el = document.createElement('div'); 450 el.innerHTML = s;451 472 el.className = 'masonry_brick'; 452 473 el.style.opacity = '0'; 453 474 el.style.display = 'inline-block'; 454 el.style.height = '" . $norm_height . "';\n"; 475 el.style.height = '" . $norm_height . "'; 476 el.appendChild(lk);\n"; 455 477 //Set width 456 478 if($thumbnail[5] && strpos(self::$a['upscale_max_width'], '%') !== false) $output .= " el.style.width = 'auto';\n"; … … 467 489 self::$noscript_text .= " 468 490 <div class='masonry_brick' style='height: " . self::$a['noscript_height'] . "; width: " . self::$a['noscript_width'] . "; max-height: " . self::$a['noscript_max_height'] . "; max-width: " . self::$a['noscript_max_width'] . ";'> 469 <{$link_type} {$link_class}style='display: block; height: 100%; width: 100%' href='{$lnk}'>491 <{$link_type} class='{$link_class}' style='display: block; height: 100%; width: 100%' href='{$lnk}'> 470 492 <img class='masonry_brick_img' style='display: block; height: 100%; width: 100%' src='{$thumbnail[0]}' alt='{$tit}'/> 471 493 </{$link_type}> -
masonry-post-gallery/trunk/readme.txt
r1064345 r1064596 5 5 Requires at least: 3.9.1 6 6 Tested up to: 4.1 7 Stable tag: 0.4.0. 2b7 Stable tag: 0.4.0.3b 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 63 63 64 64 == Changelog == 65 66 = 0.4.0.3b = 67 * Further fixes for the wptexturize bug which should no longer interfere with other plugins 68 * Fixed an error with the page_size parameter 65 69 66 70 = 0.4.0.2b = … … 262 266 == Upgrade Notice == 263 267 268 = 0.4.0.3b = 269 WARNING: 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. 270 264 271 = 0.4.0.2b = 265 272 WARNING: 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.
Note: See TracChangeset
for help on using the changeset viewer.