1. Docs
  2. Developer Guide
  3. Miscellaneous and Snippets
  4. Open Virtual Tours in Lightbox

Open Virtual Tours in Lightbox

add_filter( 'propertyhive_single_property_actions', 'virtual_tours_in_lightbox' );
function virtual_tours_in_lightbox( $actions )
{
    $new_actions = array();
    foreach ( $actions as $action )
    {
        if ( $action['class'] == 'action-virtual-tour' )
        {
            $action['attributes']['data-fancybox'] = '';
        }

        $new_actions[] = $action;
    }

    return $new_actions;
}
Was this article helpful to you? Yes No