[theme-reviewers] Upgrading Masonry In Core

Josh Pollock jpollock412 at gmail.com
Sun Nov 24 23:50:40 UTC 2013


Otto-

That strategy worked brilliantly. David DeSandro updated the shim after my
testing found something he had over looked. I have now repatched without
modifying TwentyThirteen or TwentyFourteen, since they work fine with this
patch and someone with better JS skills should be updating their code.

Thanks for your help. Should be good to go.

-Josh


On Sun, Nov 24, 2013 at 8:49 AM, Otto <otto at ottodestruct.com> wrote:

> On Sun, Nov 24, 2013 at 12:05 AM, Josh Pollock <jpollock412 at gmail.com>wrote:
>
>> A fun development:
>> https://github.com/desandro/masonry/issues/446
>> David DeSandro wrote a backwards compatibility shim:)
>>
>> 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.
>>
>
>
> Try doing something like this in the /wp-includes/script-loader.php,
> replacing the masonry line there:
>
> $scripts->add( 'jquery-masonry3,
> "/wp-includes/js/jquery/jquery.masonry.min.js", array('jquery'), '3.1.2', 1
> );
> $scripts->add( 'jquery-masonry,
> "/wp-includes/js/jquery/masonry-v2-shim.js", array('jquery-masonry3'),
> '1.0', 1 );
>
> 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.
>
> You'll know it works if the masonry 2 code in a theme continues to work
> with no changes.
>
> -Otto
>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20131124/b8b93e29/attachment-0001.html>


More information about the theme-reviewers mailing list