gist export test
A Pen by Ryan Niswonger on CodePen.
<!-- From https://www.tpgi.com/subheadings-subtitles-alternative-titles-and-taglines-in-html/ --> | |
<hgroup role="group" aria-roledescription="Heading group"> | |
<p aria-roledescription="subtitle">Subtitle 1</p> | |
<h1>Title</h1> | |
<p aria-roledescription="subtitle">Subtitle 2</p> | |
</hgroup> |
add_action( 'after_setup_theme', function() { | |
// remove admin bar margin | |
add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) ); | |
} ); |
/** | |
* Restrict Customizer menu search to titles | |
* Based on: https://stackoverflow.com/questions/54155517/how-to-limit-wp-admin-to-search-only-titles | |
* Added Customizer screen detection | |
*/ | |
add_filter( | |
'posts_search', | |
function( $search, $wp_query ) { | |
global $wp_customize; | |
global $wpdb; |
<?php | |
// encode email link with rot13 | |
$encoded_email_link = str_rot13( 'mailto:' . strtolower( $email_address ) ); | |
?> | |
<script> | |
// decode rot13-encoded text | |
decodeText = text => { | |
return text.replace(/[a-z]/gi, letter => { | |
return String.fromCharCode( |
/** | |
* Change admin color scheme based on environment for a specific user | |
* Color scheme options: fresh, light, modern, blue, midnight, sunrise, ectoplasm, ocean, coffee | |
*/ | |
function change_color_scheme() { | |
$user_ids = array( 1 ); // set your user id or ids here, assuming they do not change across envs | |
$current_user_id = get_current_user_id(); | |
// configure the environment addresses and their color schemes | |
$environments = array( |
javascript:(()=>{ document.querySelectorAll('.a3s table').forEach(item=>{item.style.width="90%"; }); document.querySelectorAll('.a3s img').forEach(item=>{item.style.maxWidth="90%";item.style.height="auto"; }); })(); |
/** | |
* Gravity Forms: Filters the submit button. | |
* Replaces the <input> button with a <button> while maintaining attributes from original <input>. | |
* | |
* @param string $button Contains the <input> tag to be filtered. | |
* @param object $form Contains all the properties of the current form. | |
* | |
* @return string The filtered button. | |
* | |
* GF provides sample code for doing this under Examples at the following link but this dodn't work in my environment. |
/* | |
Add this code to the Avada Custom CSS. | |
Add the class "equal-height" to your Content Boxes Options container, not a single Content Box. | |
The editor preview will not show the change but reload the live page to see the results. | |
*/ | |
.fusion-content-boxes.equal-height { | |
display: flex; | |
align-items: stretch; | |
flex-wrap: wrap; |
A Pen by Ryan Niswonger on CodePen.
A Pen by Ryan Niswonger on CodePen.