This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', () => { | |
const observer = new MutationObserver((mutationsList) => { | |
for (const mutation of mutationsList) { | |
if ( | |
mutation.type === 'attributes' && | |
mutation.attributeName === 'class' | |
) { | |
const target = mutation.target; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function acf_gallery_count($field_name, $post_id = null) { | |
$gallery = get_field($field_name, $post_id); | |
$count = is_array($gallery) ? count($gallery) : 0; | |
return $count; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[General] - Support across all elements for Bricks' components feature. | |
[General] - Support using all elements inside nested components | |
[General] - Added 'component scope' option to all elements that control/target other elements. | |
[Media Player] - New nestable element for building custom video players. | |
[Media Player Audio] - New nestable element for building custom audio players. | |
[Media Control] - New controller element for adding control buttons to the media players | |
[Media Playlist] - New controller element for adding playlist items for the media players | |
[WP Menu Query] - Added support for custom field dynamic tags from menu items inside menu loop. | |
[WP Menu Query] - New tag for changing link targets as per individual menu item settings. | |
[Slide Menu] - Added option to replace sub menus with bricks' mega menu template for top menu items. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'bricks/query/result', function ( array $result, object $query_obj ): array { | |
$element_id = 'ejmwod'; // Element ID with query loop | |
$result_count = 1; // How many results to output | |
if ( $query_obj->element_id !== $element_id ) { | |
return $result; | |
} |