This file contains 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
this.collection = new fieldTypeCollection( [ | |
{ | |
id: 'textbox', | |
nicename: 'Textbox', | |
alias: [ 'input' ], | |
parentType: '', | |
settingGroups: new fieldTypeSettingGroupCollection( [ | |
{ | |
name: '', | |
display: true, |
This file contains 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
jQuery( document ).ready( function( $ ) { | |
/** | |
* JS goes here | |
*/ | |
} ); |
This file contains 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
$args = array( | |
'post_type' => 'attachment', | |
'meta_query' => array( | |
array( | |
'key' => 'ninja_forms_field_id', | |
'value' => $field_id, | |
'type' => 'numeric', | |
'compare' => '=' | |
), | |
array( |
This file contains 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 | |
/* | |
* | |
* This class handles all the update-related stuff for extensions, including adding a license section to the license tab. | |
* It accepts two args: Product Name and Version. | |
* | |
* @param $product_name string | |
* @param $version string | |
* @since 2.2.47 | |
* @return void |
This file contains 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
function test_product() { | |
$NF_Extension_Updater = new NF_Extension_Updater( 'Test Product', '1.0' ); | |
} | |
add_action( 'admin_init', 'test_product' ); |
This file contains 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
function ninja_forms_remove_csv_values( $value_array, $sub_id_array ) { | |
foreach( $value_array as $x => $value ) { | |
unset( $value_array[$x][0] ); | |
unset( $value_array[$x][1] ); | |
} | |
array_values( $value_array ); | |
return $value_array; | |
} | |
add_filter( 'ninja_forms_export_subs_value_array', 'ninja_forms_remove_csv_values', 15, 2 ); |
This file contains 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
// Create a new object for custom validation of a custom field. | |
var mySubmitController = Marionette.Object.extend( { | |
initialize: function() { | |
this.listenTo( Backbone.Radio.channel( 'field-4', 'change:field', this.nameChange ) ); | |
}, | |
nameChange: function( el, model ) { | |
// Split your model value | |
var value = model.get( 'value' ); |
This file contains 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
/** | |
* Work around for Require, Radio, and WordPress. | |
* | |
* Returns the WordPress-loaded version of Backbone for use with things that need it and use Require. | |
* | |
* @since 3.0 | |
* @return Object Backbone Object | |
*/ | |
define( function() { | |
return Backbone; |
This file contains 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
/** | |
* Work around for Require, Radio, and WordPress. | |
* | |
* Returns the WordPress-loaded version of Underscore for use with things that need it and use Require. | |
* | |
* @since 3.0 | |
* @return Object Underscore Object | |
*/ | |
define( function() { | |
return _; |
This file contains 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 | |
function nf_test_exclude_plugins( $plugins ) { | |
if ( !defined( 'DOING_AJAX' ) || !DOING_AJAX || !isset( $_REQUEST['action'] ) || ( 'nf_output_field_settings_html' != $_REQUEST['action'] && 'ninja_forms_new_field' != $_REQUEST['action'] ) ) return $plugins; | |
foreach( $plugins as $key => $plugin ) { | |
if ( false !== strpos( $plugin, 'ninja-forms' ) ) continue; | |
unset( $plugins[$key] ); | |
} |