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 rbkCurlySwap($shortcodes,$string) { | |
foreach( $shortcodes as $key => $value ){ | |
$string = str_replace( '{{'.$key.'}}', $value, $string ); | |
} | |
return $string; | |
} |
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 wp_enqueue_media(); ?> | |
<div> | |
<label for="image_url">Image</label> | |
<input type="text" name="image_url" id="image_url" class="regular-text"> | |
<input type="button" name="upload-btn" id="upload-btn" class="button-secondary" value="Upload Image"> | |
</div> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('#upload-btn').click(function(e) { |
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 rbk_calculate_image_width_based_on_max_height( $filename, $max_height ) { | |
if( !empty($filename) ){ | |
$attributes = getimagesize( $filename ); | |
$image_width = $attributes[0]; | |
$image_height = $attributes[1]; | |
if( $image_width > $image_height ){ | |
return $image_width / $image_height * $max_height; | |
} else { |
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: Subpage List Widget | |
Description: A widget to list the subpages of a page. | |
Version: 1 | |
Author: GuRuStu.co | |
Author URI: http://gurustu.co | |
*/ | |
/** |
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 | |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); | |
/* | |
Plugin name: WPCF7 FLoating Labels | |
Author: Richard Keller | |
URI: http://richardkeller.net | |
Description: Adds floating lables to all text inputs | |
*/ |
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
<h1>Quote Request</h1> | |
<style type="text/css"> | |
body { | |
font-family: arial, helvetica, sans-serif; | |
} | |
table { | |
table-layout: fixed; | |
width: 600px; | |
border: 1px solid #eee; |
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 set_grid_borders( ){ | |
var grid = $('.brand-grid'); | |
if( grid.length ){ | |
var grid_w = grid.width(); | |
var grid_h = grid.height(); | |
var grid_items = grid.find('.item'); |
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 | |
/** | |
* Generated by the WordPress Meta Box generator | |
* at http://jeremyhixon.com/tool/wordpress-meta-box-generator/ | |
*/ | |
function slide_link_get_meta( $value ) { | |
global $post; | |
$field = get_post_meta( $post->ID, $value, true ); |
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.fn.equalize = function( ){ | |
var tallest = 0; | |
jQuery(this).each(function(){ | |
if( jQuery(this).height() > tallest ){ | |
tallest = jQuery(this).height(); | |
} | |
}); | |
if( jQuery(window).width() > 992 ){ | |
jQuery(this).css('height',tallest + 'px'); | |
} else { |