Created
January 10, 2014 14:55
-
-
Save BFTrick/8355697 to your computer and use it in GitHub Desktop.
Get the fields from the User Analytics Ninja Forms extension
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 | |
| /* | |
| Plugin Name: Ninja Forms - Get User Analytics Fields | |
| Plugin URI: https://gist.github.com/BFTrick/8355697 | |
| Description: Get the fields from the User Analytics Ninja Forms extension | |
| Version: 1.0.0 | |
| Author: Patrick Rauland | |
| Author URI: http://www.patrickrauland.com | |
| */ | |
| function grab_ua_fields () { | |
| global $NF_User_Analytics; | |
| // Make sure the $NF_User_Analytics variable is available | |
| if ( isset( $NF_User_Analytics ) ) { | |
| // access the get_ua_fields() method of the UA class | |
| $ua_fields = $NF_User_Analytics->get_ua_fields(); | |
| // do whatever you need with the $ua_fields | |
| // ... | |
| } | |
| } | |
| add_action( 'init', 'grab_ua_fields', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment