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 | |
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; | |
} |
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
<div id="session-1" class="session session-1 track-1" style="grid-column: track-1; grid-row: time-0800 / time-0900;"> | |
<h3 class="session_title">Talk Title</h3> | |
<span class="session_time"> | |
<span class="session_time_start">8:00</span> | |
<span class="session_time_sep"> - </span> | |
<span class="session_time_end">9:00</span> | |
</span> | |
<span class="session_track">Track: 1</span> | |
<span class="session_author"><span class="session_author_gravatar"><img src="..."></span>Mike Rofone</span> | |
</div> |
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: Clear Aligned Content Shortcode | |
Description: A way to ensure floated images in page content don't wrap. Use [clear] in editor to push following content below any aligned images. | |
Author: Mark Root-Wiley | |
Version: 1.0 | |
Author URI: https://MRWweb.com | |
Plugin URI: https://gist.githubusercontent.com/mrwweb/f627f3fe407a64293f6a99d701526b94/raw/c0e23d2f5b0252332e4f7c549a2990b4c944cfe1/mrw-clear-shortcode.php | |
USAGE: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.0/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.0/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
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: Truncate Feature a Page Widget Excerpt | |
Description: Limits excerpt to 30 words. Ends cut-off excerpts with "..." | |
Version: 1.0 | |
Author: Mark Root-Wiley | |
Author URI: https://mrwweb.com | |
*/ | |
add_filter( 'fpw_excerpt', 'wp8887975_trim_fpw_excerpt' ); | |
function wp8887975_trim_fpw_excerpt( $excerpt ) { |
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
<img src="/your-image.jpg" alt="The alt text describing that image" /> |
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: Google PDF Viewer Shortcode | |
Description: Display a PDF in the browser with Google's PDF viewer. Usage: [pdf]http://example.org/some-public-document.pdf[/pdf]. Can specify optional width and height attribrutes like this [pdf width="100" height="100"]http://example.org/a-very-tiny-document.pdf[/pdf] | |
Version: 1.0 | |
Author: Mark Root-Wiley | |
Author URI: https://mrwweb.com | |
*/ | |
/* a shortcode for embedding PDFs via Google Docs viewer */ | |
function nten_pdf_shortcode( $atts, $content = '' ) { |
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
(function($){ //create closure so we can safely use $ as alias for jQuery | |
"use strict"; | |
$(document).ready(function(){ | |
var mainMenu = $('#primary-menu').superclick({ | |
activeClass: 'sf-active', // change active class from sfHover to sf-active | |
cssArrows: false, // no arrows (but you should probably provide your own) | |
speed: 1, // "no animation" | |
onShow: function() { | |
// keep off screen momentarily |
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 | |
add_action( 'wp_head', 'mrw_highlight_empty_alt' ); | |
function mrw_highlight_empty_alt() { | |
if( is_user_logged_in() ) : ?> | |
<style> | |
[alt=""] { | |
border: 10px solid red !important; | |
} | |
</style> | |
<?php |