Skip to content

Instantly share code, notes, and snippets.

@3mw-support
3mw-support / Heading-Shortcode.txt
Last active April 15, 2019 11:12
Heading Shortcode
Using the shortcode like this...
[h2]
<h2>Heading Text Here</h2>
<img src="http://placehold.it/400x300">
[/h2]
Would output this....
@3mw-support
3mw-support / Smooth Auto-Scroll Webpage for Screen Capture Videos & Gifs
Created December 20, 2018 18:47
Use this gist if you want to record smooth-scrolling screen capture videos and/or gifs.
javascript:(function(n,t){t['true']=n;var i=function(n,t,i){var r=n.style;r.webkitTransition=r.transition=i+'s';r.webkitTransitionTimingFunction=r.TransitionTimingFunction='ease-in-out';r.webkitTransform=r.Transform='translate3d(0, '+-t+'px, 0)'};var r=function(){var n=[].slice.call(arguments);var t=n.shift(),i=n.shift(),r=n;setTimeout(function(){i.apply(null,r)},t*1e3)};var e=function(n,t,i,e){r(t,o,i,e)};var a=document.getElementsByTagName('body')[0];var o=i.bind(null,a);var s=e.bind(null,a);var l=function(n){var t='Enter delay (in seconds), distance to scroll (in pixels) and the scroll duration (in seconds).\n\nRun the script a second time with options 0 0 0 to reset the page.\n\nExample:\n\n1 800 5';if(n){t=n+'\n\n'+t}var i=prompt(t);if(i===null){return}if(/\d{1,} \d{1,} \d{1,}/.test(i)){return i.split(' ')}return l('Woops. Input invalid: '+i)};var u=function(){var n=l();if(n){s.apply(null,n)}};u()})({},function(){return this}());
@3mw-support
3mw-support / stat_counter_snippet
Created June 14, 2016 16:08
Number/statistic counter code
<span class="timer"></span>
<hr/>
<span id="help">From: 50 - To: 2500 / Over 5000 Milli-Seconds</span>
.timer{width:200px; margin:20px auto;text-align:center;display:block;font-size:20px}
#help{width:500px; margin:20px auto;text-align:center;display:block;font-size:14px}
(function($) {
$.fn.countTo = function(options) {
// merge the default plugin settings with the custom options
[
{
"key": "group_57066554c9959",
"title": "Site Options",
"fields": [
{
"key": "field_570666d4163cb",
"label": "Logo",
"name": "logo",
"type": "image",
@3mw-support
3mw-support / MIME_Types_Plugin_ACF.php
Last active September 12, 2016 20:01
This filter is required to make the MIME Types plugin work with ACF content fields
/* This functions.php filter is required to make the MIME Types plugin work with ACF content fields */
+add_filter ('acf_the_content', 'mimetypes_to_icons', 15);
@3mw-support
3mw-support / WordPress_Core_Styles.css
Last active March 17, 2021 14:11
WordPress Core CSS
/* ---------------------------- Begin WordPress Core ---------------------------- */
img {
max-width: 100%;
height: auto;
}
.alignnone {
margin: 5px 20px 20px 0;
}
@3mw-support
3mw-support / Footer Logo
Last active February 15, 2023 12:25
3MW Footer Logo