Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add this to the functions.php of your theme to set the dimensions of your popup to 1000 x 600 pixels and disable the popup for screens below a width of 480 pixels.
<?php
/**
* Sets the dimensions of the tickets lightbox to 1000 x 600 pixels and
* disables the lightbox for screens below a width of 480 pixels.
*
* @param array $args The default settings for the tickets lightbox.
* @return array The new settings.
*/
function wpt_customize_tickets_lightbox($args) {
$args['width'] = 1000;
$args['height'] = 600;
$args['disable_width'] = 480;
return $args;
}
add_filter('wpt/frontend/thickbox/args', 'wpt_customize_tickets_lightbox');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment