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
// Change FORM_ID to your forms ID | |
add_filter( 'gform_submission_data_pre_process_payment_FORM_ID', 'modify_submission_data', 10, 4 ); | |
function modify_submission_data( $submission_data, $feed, $form, $entry ) { | |
$today = date_create(); | |
// I have this set to start 1 month from a date I set in a hidden field. | |
$date = rgar( $entry, '13' ); // Hidden Date Field. | |
$time = strtotime($date); | |
$final = date("Y-m-d", strtotime("+1 month", $time)); // Adds One month to date |
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
$states = array( | |
'AL'=>'Alabama', | |
'AK'=>'Alaska', | |
'AZ'=>'Arizona', | |
'AR'=>'Arkansas', | |
'CA'=>'California', | |
'CO'=>'Colorado', | |
'CT'=>'Connecticut', | |
'DE'=>'Delaware', | |
'DC'=>'District of Columbia', |
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
#!/bin/bash | |
UP=$(pgrep mysql | wc -l); | |
if [ "$UP" -ne 1 ]; | |
then | |
echo "MySQL is down."; | |
sudo service mysql start | |
else | |
echo "All is well."; | |
fi |