Skip to content

Instantly share code, notes, and snippets.

@slimndap
Created September 2, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slimndap/4947b2143a1d828d1761 to your computer and use it in GitHub Desktop.
Save slimndap/4947b2143a1d828d1761 to your computer and use it in GitHub Desktop.
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