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
/** | |
* Echo Anything onto the page. | |
* | |
* @param mixed $msg | |
*/ | |
function debug($msg) | |
{ | |
echo '<pre style="background-color: saddlebrown; padding: 2em; margin: 2em; box-sizing: border-box;">'; | |
echo '<code style="font-family: Menlo; font-weight: bold; color: mintcream; font-size: 12px;">'; | |
echo '<br>'; |
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: Theme Image widget | |
Description: Display an image from the theme directory in a widget. | |
*/ | |
// initialize the widget on install | |
add_action('widgets_init', create_function('', 'return register_widget("pm_image_upload_widget");')); | |
// extend the Widget class with the new widget |
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
// Basically really complicated looking, but very fast way to use multiple backgrounds | |
// for the flexible height areas. Applies a top no-repeat image, middle repeat-y image, | |
// and a bottom no-repeat image. You really only need to use one mixin when generating | |
// the background image stuff: ".flexible-height-background(@type, @screen)". | |
// @type should be the type of background you want. It should match the variable name | |
// for the image url within .image-vars() | |
// | |
// The screen is the media target you want: mobile, tablet, or desktop. | |
// | |
// Image filenames should be in the format: |
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 | |
/* | |
Template Name: Cover Page | |
*/ | |
?> |
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
jQuery ScrollIt Plugin |
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
// xLarge screen / wide desktop | |
@screen-xl: 1300px; | |
@screen-xl-min: @screen-xl; | |
//** Deprecated `@screen-lg-desktop` as of v3.0.1 | |
@screen-xl-desktop: @screen-xl-min; | |
// So media queries don't overlap when required, provide a maximum | |
@screen-lg-max: (@screen-xl-min - 1); | |
//== Container sizes |
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
/** | |
* User: TimAnderson | |
* Date: 12/1/15 | |
* Time: 1:25 PM | |
*/ | |
/** | |
* Test responsive screen sizes by creating a visible-[screen]-block div. Passing multiple screen sizes will return true if one of them is true. | |
* See {@link http://codepen.io/mindfullsilence/pen/BjRJvN} for example usage. | |
* @requires jQuery |
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 | |
/** | |
** A base module for [select_posttype] and [select_posttype*] | |
**/ | |
/* Shortcode handler */ | |
add_action( 'wpcf7_init', 'wpcf7_add_shortcode_select_posttype' ); | |
function wpcf7_add_shortcode_select_posttype() { |
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
if(!is_admin() && is_user_logged_in()) { | |
remove_action( 'wp_footer', 'wp_admin_bar_render'); | |
add_action( 'wp_head', 'wp_admin_bar_render', 1000 ); | |
function make_admin_bar_static() { | |
echo ' | |
<style type="text/css"> | |
html[lang] { | |
margin-top: 0px !important; | |
} |
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
Falsey values in JavaScript | |
false | |
0 | |
-0 | |
"" | |
'' | |
null | |
undefined | |
NaN |
OlderNewer