Since: 1.0 Last Updated:
Back to Main Index

enqueue_masonry simply allows quick enquing of the masonry script in templates or widgets that need it.

Location: /core/widgets/modules/base.php


This function is used inside a widget when extending the Layers_Widget class.

<?php $this->enqueue_masonry(); ?>

You can also define settings for masonry using layers_masonry_settings[]

Here’s how we’ve used enqueue_masonry() in our post widget:

And we apply the masonry as follows. See our Widget Tutorial for more information.