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 | |
/** | |
* Remove Ninja Forms' 'Add Form' button from TinyMCE | |
*/ | |
add_action( 'wp_loaded', function() { | |
if( ! class_exists( 'Ninja_Forms' ) ) { | |
return; | |
} | |
$inst = \Ninja_Forms::instance()->add_form_modal; |
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
// Requires plugin -> https://github.com/jsmreese/moment-duration-format | |
/** | |
* Format date string "dd/mm/yyyy" as QlikDate value | |
*/ | |
function formatAsQlikDate(dateString) { | |
var startDate = moment('1899-12-30'); // excel start date | |
var selectedDate = moment(dateString); | |
// get time difference in seconds |