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_action( 'gform_after_submission_1', 'fwp_gf_url_adder', 10, 2 ); | |
function fwp_gf_url_adder($entry, $form){ | |
$url = rgar( $entry, '1' ); | |
$name = rgar( $entry, '2'); | |
$cat = rgar($entry, '3'); | |
$linkdata = array("link_url" => $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
add_action( 'publish_post', 'fwp_fi_update', 10, 1 ); | |
function fwp_fi_update ($post_id){ | |
if (get_post_meta( $post_id, 'enclosure', true )) { | |
$messy_data = get_post_meta( $post_id, 'enclosure', true); | |
$array_data = explode(PHP_EOL, $messy_data); | |
$img_url = $array_data[0]; | |
$img_id = fwp_fi_add_img($img_url, $post_id); |
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
.gquiz-answer-explanation { | |
margin: 20px 0; | |
padding: 10px; | |
border: 2px solid yellow; | |
border-radius: 5px; | |
transition: all .5s ease; | |
} | |
.twins { | |
width: 500px; |
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_action( 'user_register', 'explore_user_stuff', 10, 1 ); | |
function explore_user_stuff( $user_id ) { | |
write_log($_POST);//will have info if done through typical WP fashion but not if through gform | |
write_log($user_id);//has user ID no matter what | |
$user = get_user_by('id', $user_id);//get user info | |
write_log($user); | |
} | |
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
.team-row, .student-row { | |
border: 1px solid #efefef; | |
padding: 10px 0; | |
} | |
.team-browser, .student-browser { | |
display:flex; | |
} | |
.right-col-team { |
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
function writeEstimates() { | |
let ss = SpreadsheetApp.getActiveSpreadsheet(); | |
let sheets = ss.getActiveSheet(); | |
let allIds = sheets.getRange('a2:a100').getValues(); | |
var row = 2; | |
allIds.forEach((element) => { | |
//Logger.log(element[0].toFixed(0)) | |
let estimate = fetchData(element) | |
sheets.getRange("z"+row).setValue(estimate); | |
row++; |
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
function getAllFolders(){ | |
let doc = DocumentApp.getActiveDocument(); | |
let body = doc.getBody(); | |
let indexDoc = DocumentApp.getActiveDocument(); | |
let indexId = indexDoc.getId(); | |
let parentFolderId = DriveApp.getFileById(indexId).getParents().next().getId(); | |
let parentFolder = DriveApp.getFolderById(parentFolderId); | |
//Logger.log(parentFolder) | |
let textFolders = parentFolder.getFolders(); | |
while (textFolders.hasNext()) { |
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
<?php | |
$clean_folders = array_diff(scandir('sample'), array('..', '.', '.DS_Store')); | |
foreach ($clean_folders as $folder) { | |
if($folder) | |
$path = 'sample/'. $folder; | |
$sub_folders = array_diff(scandir('sample/'. $folder), array('..', '.', '.DS_Store')); | |
//var_dump($sub_folders); |
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
function generalSymEmail() { | |
const recipient = '[email protected]';//[email protected] | |
const subject = 'Spring Symposium Application' | |
const body = betterAllData(); | |
MailApp.sendEmail({ | |
to: recipient, | |
replyTo: '[email protected]', | |
name: 'Spring Student Symposium', | |
subject: subject, | |
htmlBody: body, |
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
<div class="kl_flex_columns_wrapper" style="margin-bottom: 30px;"> | |
<div class="kl_flex_column"> | |
<div class="kl_flex_columns_wrapper"> | |
<div class="kl_flex_column"><img id="1445356" style="border-radius: 10px;" src="https://middlebury.instructure.com/courses/9255/files/1445356/preview" alt="One of your favorite teachers.jpg" data-api-endpoint="https://middlebury.instructure.com/api/v1/courses/9255/files/1445356" data-api-returntype="File" /></div> | |
<div class="kl_flex_column"> | |
<h2 style="border-bottom: 1px solid #efefef;">Title</h2> | |
<h3>Date</h3> | |
</div> | |
</div> | |
</div> |