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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
// Build an array that we can use for filtering our submitted data. | |
$args = array( | |
// fields is a key in our associative array that means we're looking for field values. | |
'fields' => array( | |
// 1 represents our field id and 'Kevin' represents the value we're looking to match. | |
1 => 'Kevin', | |
// If you want to filter by multiple fields, you'd add them here. | |
// 2 => 'checked' | |
), |
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
<div class="custom-message" style="display:none;"> <!-- adding display:none; will keep the element from flashing on load. --> | |
<?php _e( 'This setting will COMPLETELY remove anything Ninja Forms related upon plugin deletion. This includes SUBMISSIONS and FORMS. It cannot be undone.', 'ninja-forms' ); ?> | |
</div> | |
<div class="custom-message-buttons" style="display:none;"> <!-- the buttons div defines the bottom of the modal.--> | |
<div id="nf-admin-modal-cancel"> <!-- nf-admin-modal-cancel is the class that aligns the button to the left. --> | |
<a class="submitdelete deletion modal-close" href="#">Cancel</a> | |
</div> | |
<div id="nf-admin-modal-update"> <!-- nf-admin-modal-update is the class that aligns the button to the right. --> | |
<a class="button-primary" href="#">Continue</a> | |
</div> |
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
/** | |
* Force the cookie expiration variant time to 23 minutes | |
* | |
* @access public | |
* @since 2.9.18 | |
* @param int $exp Default expiration (1 hour) | |
* @return int | |
*/ | |
public function set_expiration_variant_time( $exp ) { | |
return 60 * 23; |
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] ); | |
} |
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 if ( ! defined( 'ABSPATH' ) ) exit; | |
/** | |
* Class for our custom action type. | |
* | |
* @package Ninja Forms | |
* @subpackage Classes/Actions | |
* @copyright Copyright (c) 2014, WPNINJAS | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @since 2.8 | |
*/ |
OlderNewer