<div dir="ltr"><div class="gmail_extra"><div class="gmail_extra">On Sun, Nov 24, 2013 at 12:05 AM, Josh Pollock <span dir="ltr"><<a href="mailto:jpollock412@gmail.com" target="_blank">jpollock412@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">A fun development:<div>
<a href="https://github.com/desandro/masonry/issues/446" target="_blank">https://github.com/desandro/masonry/issues/446</a></div><div>David DeSandro wrote a backwards compatibility shim:)</div><div><br>
</div><div>I'm not sure what to do with it as I'm no javascript expert. If anyone can give me advice or redo my patch to use this, I'd appreciate.</div></div><div class=""><div class="h5"><div class="gmail_extra">
</div></div></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Try doing something like this in the /wp-includes/script-loader.php, replacing the masonry line there:<div><br></div>
<div><div>$scripts->add( 'jquery-masonry3, "/wp-includes/js/jquery/jquery.masonry.min.js", array('jquery'), '3.1.2', 1 );</div><div>$scripts->add( 'jquery-masonry, "/wp-includes/js/jquery/masonry-v2-shim.js", array('jquery-masonry3'), '1.0', 1 );</div>
</div><div><br></div><div>Basically, this makes the "jquery-masonry" script into shim instead, with a dependency on the masonry-3 code (which you'll need to have there as well). So when you enquery-masonry, then it enqueues jquery, followed by jquery.masonry.min.js, followed by the shim code.</div>
<div><br></div><div>You'll know it works if the masonry 2 code in a theme continues to work with no changes.</div><div><br></div><div class="gmail_extra">-Otto</div><div><br></div><div><br></div></div></div>