Skip to content

Instantly share code, notes, and snippets.

@rafaehlers
Last active September 21, 2018 17:19
Show Gist options
  • Save rafaehlers/70221058f9e21a03c99cf7f31bbbcdd3 to your computer and use it in GitHub Desktop.
Save rafaehlers/70221058f9e21a03c99cf7f31bbbcdd3 to your computer and use it in GitHub Desktop.
Modify the dimensions of the modal window for specific Nested Form fields
<?php
// List of arguments at gp-nested-forms/class-gp-nested-forms.php at line 1406
add_filter( 'gpnf_init_script_args', 'gravitywiz_modify_nested_modal_dimensions', 10, 3 );
function gravitywiz_modify_nested_modal_dimensions( $args, $field, $form ) {
if ($field['id'] == 3 && $form['id'] == 141){
$args['modalWidth'] = 500;
$args['modalHeight'] = 900;
return $args;
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment