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 snippet included in wp-config.php (or settings.php). | |
// Including from that location in a separate file is OK as well. | |
<?php | |
// Remove any leading "www." from the host name. | |
$redirect_host = str_replace('www.', '', $_SERVER['HTTP_HOST']); | |
$redirect_path = strtolower(rtrim($_SERVER['REQUEST_URI'])); | |
if (strlen($redirect_path) > 2) { | |
$redirect_path = rtrim($redirect_path, '/'); | |
} |
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
for site in $(terminus org:site:list --field Name <org>);do | |
if [[ ! -z $(terminus site:info --field Upstream $site | grep -o <upstream id>) ]];then | |
echo $site | |
fi | |
done |
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 | |
/** | |
* Plugin Name: ASU Divi - ET Patch, Square Featured Images for Blog Module | |
* Plugin URI: https://gist.github.com/SteveRyan-ASU/e129e2f68e1867875a0c23597ac85a06/edit | |
* Description: Recommended patch from ET to produce square featured images for blog module posts. | |
* Author: Steve Ryan, ASU Engineering | |
* Author URI: https://engineering.asu.edu | |
* Version: 0.1 | |
* | |
*/ |
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
// Substitute your own ID for the form that you want to style. | |
// Working example is here: https://faculty-resources.engineering.asu.edu/ Workshop page. | |
#gform_wrapper_1 { | |
background-color:#e0e0e0; | |
padding:2em; | |
color:#000000; | |
} |
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
<!-- wp:paragraph --> | |
<p>Donec id elit non mi porta gravida at eget metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:more --> | |
<!--more--> | |
<!-- /wp:more --> | |
<!-- wp:separator --> | |
<hr class="wp-block-separator"/> |
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
/** | |
* Given an $block object from an ACF block for gutenberg, | |
* This will return a string of CSS inline values suitable for | |
* inclusion in the block output in PHP. | |
* | |
* @param mixed $block | |
* @return $style as string | |
*/ | |
function acf_blocks_calculate_spacing($block) { |