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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Basic Page</title> | |
</head> | |
<body> | |
<p>basic</p> | |
</body> | |
</html> |
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
#!/bin/bash | |
# Useful Extensions for Visual Studio | |
# https://marketplace.visualstudio.com/items?itemName=rogalmic.bash-debug | |
# https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck | |
# THESE VALUES ARE THE ONLY ONES YOU SHOULD CHANGE | |
WWW_DIR="/Users/csaborio/WebSites2" | |
BACKUP_DIR="/Users/csaborio/backups" | |
DB_USER="root" |
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
/** | |
* add_attribute_for_script - Checks to see if a script declaration contains #asyncload or #deferload and inserts | |
* the attribute in the script declaration if it is found. Based on this: https://tinyurl.com/y2obn9os | |
* | |
* @param string $url - the URL to check to see if it contains #asyncload or #deferload | |
* | |
* @return string - the modified string if any change was required. | |
*/ | |
function add_attribute_for_script( $url ) | |
{ |
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
/** | |
* When a new user is created it goes through the user meta to find entries that | |
* have the format ["Value","Value1"] and replaces it with Value,Value1. GravityForms | |
* writes multi-select form fields this way and the ProfileBuilder Pro does not understand it, | |
* so we need to replace the entry for PBP to gather what these values are. | |
* | |
* @param int @user_id - the ID if the user that was just created | |
* | |
* @return void | |
*/ |
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
if ( UserManagement::can_current_user_access_member_page() ) { | |
// Returns a WP_Query object. | |
$unmatched_volunteers = UserManagement::get_unmatched_volunteers( true ); | |
} | |
$args = array( | |
'post_type' => 'volunteer', | |
'posts_per_page' => '10', | |
'button_label' => 'Show More Posts', | |
'button_loading_label' => 'Loading...', | |
'scroll' => 'false', |
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
$filter_array = array( | |
"id" => "participant_filter", | |
"style" => "button", | |
"button_text" => "Filter Results", | |
"filters" => array( | |
array( | |
"key" => "meta", | |
"field_type" => "radio", | |
"meta_key" => "smoker", | |
"meta_operator" => "IN", |
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
$filter_array = array( | |
"id" => "participant_filter", | |
"style" => "button", | |
"button_text" => "Filter Results", | |
"date_created" => 1)7)976446, | |
"date_modified" => 1)7)979494, |
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
public static function set_max_year_for_birth_date( $max_year, $form, $field ) { | |
return 2011; | |
$target_forms = array( 10 ); | |
$target_fields = array ( 38 ); | |
if ( in_array( $form['id'], $target_forms ) ) { | |
if ( in_array( $field->id, $target_fields ) ) { | |
$sydney_date_time_zone = new \DateTimeZone( 'Australia/Sydney' ); | |
$birth_year_18 = new \DateTime( 'now', $sydney_date_time_zone ); | |
$birth_year_18->modify('-18 years'); | |
$birth_year_18 = $birth_year_18->format('Y'); |
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
public function test_one_off_trigger_vol_police_report_five_days_prior_expiry_notify_area_coordinator() { | |
// Create the pending trigger. | |
$notifications = array( | |
'all_area_coordinators', | |
); | |
$trigger_id = $this->create_trigger_post( 'one_off', 'volunteer', '_police_report_expiry_date', 'ACTUALDATE', $notifications ); | |
// Create the area_coordinator for notification, associate user. | |
$expected_email = '[email protected]'; | |
$assigned_area_coordinator_user = $this->factory->user->create( |
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
add_filter( 'pms_submenu_page_capability', 'pmsc_allow_editors_to_view_pages', 20, 2 ); | |
function pmsc_allow_editors_to_view_pages( $capability, $menu_slug ){ | |
if( $menu_slug == 'pms-payments-page' || $menu_slug == 'pms-members-page' || $menu_slug === 'pms-reports-page' || $menu_slug === 'pms-export-page' ) | |
return 'pms_edit_capability'; | |
return $capability; | |
} | |
add_filter( 'pms_export_capability', 'pmsc_change_export_capability'); |
OlderNewer