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>Canvas experiment based on tweet</h1> | |
<p>A simple experiment to generate graphs on the fly</p> | |
<p>inspired by <a href="https://twitter.com/stephdau/status/238336513170083840">https://twitter.com/stephdau/status/238336513170083840</a> | |
<form> | |
<label for="chart_values">Simply enter your values, separated by a + sign</label> | |
<input id="chart_values" name="chart_values" type="text"> | |
</form> | |
<div id="debug"></div> | |
<canvas id="chart1" width="300" height="150"></canvas> |
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 ($) { | |
/** | |
* Copyright 2012, Digital Fusion | |
* Licensed under the MIT license. | |
* http://teamdf.com/jquery-plugins/license/ | |
* | |
* @author Sam Sehnert | |
* @desc A small plugin that checks whether elements are within | |
* the user visible viewport of a web browser. |
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 | |
/** | |
* | |
* Get a potentially cached version of a WP_Query | |
* | |
* @param int $how_many Optional. How many posts to return. | |
* @return WP_Query | |
*/ | |
function get_transient_query($how_many = 10) { |
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 | |
//Don't forget to change the _1 in the hook to the ID of your form | |
add_filter('gform_validation_1', 'iso_min_sum_validate'); | |
// Most code taken from http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook | |
function iso_min_sum_validate($validation_result) { | |
// We'll base our loop on CSS class |
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
// Grabs all the .fa and tries to extract the Unicode character for the :before pseudo-class | |
// Based on http://fontawesome.io/icons/ | |
// Inspired by c.bavota https://github.com/cbavota | |
// window.getComputedStyle trickery thanks to http://stackoverflow.com/a/21709814/636709 | |
// Unicode conversion via http://stackoverflow.com/a/21014576/636709 | |
var strAll = '$font_awesome_icons = array(' + "\n"; |
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 | |
/** | |
* Created by PhpStorm. | |
* User: Michal | |
* Date: 2014-09-23 | |
* Time: 10:28 AM | |
*/ | |
require( '../../../../../wp-load.php' ); |
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 | |
/** | |
* User: Michal | |
* Date: 2014-09-23 | |
* Time: 10:34 AM | |
*/ | |
require( '../../../../wp-load.php' ); |
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 | |
function iso_add_file( $post_id, $url ) { | |
$temp_file = download_url( $url, 500 ); | |
if ( ! is_wp_error( $temp_file ) ) { | |
$file_type = wp_check_filetype( $temp_file ); | |
OlderNewer