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 | |
| /** | |
| * UnderStrap functions and definitions | |
| * | |
| * @package UnderStrap | |
| */ | |
| // Exit if accessed directly. | |
| defined( 'ABSPATH' ) || exit; |
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
| #intro .intro-inner { | |
| padding: 30px; | |
| } | |
| #main .entry-content p { | |
| font-size: 1.5rem; | |
| } | |
| .intro-special { | |
| padding: 70px; |
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); |