Description
The wsf_action_pdf_orientation filter hook allows you to customize the orientation of a PDF when it is generated.
Usage
add_filter( 'wsf_action_pdf_orientation', 'my_hook_function', 10, 4 );
Parameters
Example
// Callback function for the wsf_action_pdf_orientation filter hook
function my_hook_function( $orientation, $form, $submit, $template ) {
// Only change orientation for form ID 123
if ( $form->id != 123 ) {
return $orientation;
}
// Set the orientation to landscape for form ID 123
return 'landscape';
}
// Add a callback function for the wsf_action_pdf_orientation filter hook
add_filter( 'wsf_action_pdf_orientation', 'my_hook_function', 10, 4 );
Source File
This hook can be found in:<plugin root>/ws-form-pdf.php