Last active
March 8, 2017 15:24
-
-
Save kjohnson/62162dbc5bf8d52b1ef88bb1a641810f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $form_id = 1; | |
| // Check which version of Ninja Forms. | |
| if( ! get_option( 'ninja_forms_load_deprecated', FALSE ) ){ | |
| // Ninja Forms THREE. | |
| // Check if Ninja Forms is loaded. | |
| if( function_exists( 'Ninja_Forms' ) ){ | |
| // Output form by ID. | |
| Ninja_Forms()->display( $form_id ); | |
| } | |
| } else { | |
| // Ninja Forms v2.9.x (DEPRECATED). | |
| // Check if the Ninja Forms display function exists. | |
| if( function_exists( 'ninja_forms_display_form' ) ){ | |
| // Output the form by ID. | |
| ninja_forms_display_form( $form_id ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment