Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
/** | |
* Converts milliseconds to formatted time or seconds. | |
* @param int [$ms] The length of the media asset in milliseconds | |
* @param bool [$seconds] Whether to return only seconds | |
* @return mixed The formatted length or total seconds of the media asset | |
*/ | |
function convertTime($ms, $seconds = false) | |
{ | |
$total_seconds = ($ms / 1000); |
/* this is the "root" in "root em." */ | |
html { | |
font-size: 62.5%; /* Now 10px = 1rem! */ | |
} | |
body { | |
font-size: 16px; /* px fallback */ | |
font-size: 1.6rem; /* default font-size for document */ | |
line-height: 1.5; /* a nice line-height */ | |
} |
<?php | |
add_filter( 'woocommerce_product_is_visible', 'prefix_show_hidden_product_crosssells', 10, 2 ); | |
function prefix_show_hidden_product_crosssells( $is_visible, $id ) { | |
if( is_cart() ) { | |
$is_visible = true; | |
} | |
return $is_visible; | |
} |
<?php | |
/** | |
* The Community Events plugin offers a "Single Geography" mode but no way | |
* to specify the default State and Country to use for venues created when | |
* it's enabled. | |
* | |
* Note: Events Calendar PRO allows specifying a default State and Country | |
* but that shouldn't be required to use Community Events! | |
*/ | |
namespace SiteName\CommunityEvents; |
@font-face { font-family: 'helvetica neue'; src: local('Segoe UI'); } | |
@font-face { font-family: 'helvetica neue'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica neue'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica neue'; font-style: italic; src: local('Segoe UI Italic'); } | |
@font-face { font-family: 'helvetica neue'; font-style: italic; font-weight:bold; src: local('Segoe UI Bold Italic'); } | |
@font-face { font-family: 'helvetica'; src: local('Segoe UI'); } | |
@font-face { font-family: 'helvetica'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica'; font-style: italic; src: local('Segoe UI Italic'); } | |
@font-face { font-family: 'helvetica'; font-style: italic; font-weight:bold; src: local('Segoe UI Bold Italic'); } | |
@font-face { font-family: 'HelveticaNeue-Light'; src: local('Segoe UI Light'); } |
<?php | |
/* | |
Important! | |
Make sure to replace {my_} with your theme's unique prefix. | |
All future functions you write should use that same prefix. | |
Example: mrwnten_parent_theme_enqueue_styles() | |
*/ | |
add_action( 'wp_enqueue_scripts', '{my_}parent_theme_enqueue_styles' ); |
.wp-block-variation-hello-world { | |
display: flex; | |
background: #6fbcac; | |
padding: 0 !important; | |
} | |
.wp-block-variation-hello-world .wp-block-group__inner-container { | |
display: flex; | |
gap: 1em; | |
} |
<?php | |
/** | |
* Plugin Name: Fix Divi Toggle Module Accessibility | |
* Description: Uses JavaScript to insert button in toggle heading, remove tabindex from container, and correctly toggle aria-expanded on toggle button trigger. ⚠ WARNING: This only works for the Toggle module and *BREAKS* the Accordion module (really, it just breaks it more than it was already broken). Therefore, you are encouraged to entirely remove the Accordion module from the site (and the ability for anyone to use it) and only use Toggle modules. | |
* Author: Mark Root-Wiley, MRW Web Design | |
* Author URI: https://MRWweb.com | |
* Version: 1.2.1 | |
*/ | |
namespace MRW\DiviAccordionAria; |
<?php $proj_events = tribe_get_events( array( | |
'posts_per_page' => 3, | |
'eventDisplay' => 'list' // only upcoming | |
), true ); ?> | |
<?php if( $proj_events->have_posts() ) : | |
?> | |
<div class="project-related__block project-related__block--events"> | |
<h3>Events</h3> | |
<ul class="bulletless-list"> | |
<?php while( $proj_events->have_posts() ) : $proj_events->the_post(); ?> |