Skip to content

Instantly share code, notes, and snippets.

View lynettechandler's full-sized avatar

lynettechandler

View GitHub Profile
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#3070D1">
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" content="#3070D1">
@lynettechandler
lynettechandler / lc-meta-redirect
Created November 28, 2015 19:23
HTML Meta redirect
<html><head><meta http-equiv="Refresh" content="0;url=your affiliate url here"></head><body></body></html>
@lynettechandler
lynettechandler / lc-php-redirect
Created November 28, 2015 19:21
PHP header redirect
<?php
header("Location: http://www.example.com/"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
wp_enqueue_script( 'pm-vat-admin', PM_VAT_DIR.'modules/js/admin.js', array('jquery', 'wp-color-picker'), false, true );
wp_localize_script( 'pm-vat-admin', 'pm_vat_object',
array(
'nonce' => wp_create_nonce('pm_vat_options'),
'is_admin' => is_admin(),
'plugin_name' => PM_VAT_PLUGIN_NAME
)
);
@lynettechandler
lynettechandler / Javascript_Get_Year
Last active January 3, 2016 05:59
Prints the current year in Javascript
&copy; Copyright 2005 - <script>document.write(new Date().getFullYear())</script>
@lynettechandler
lynettechandler / CopyrightYear
Created January 14, 2014 15:01
Copyright with automatically updating year.
&copy; Copyright 2005 - <?php echo date('Y'); ?>
{
"name": "example-project",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.1"
}
}
@lynettechandler
lynettechandler / 0_reuse_code.js
Created December 23, 2013 05:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lynettechandler
lynettechandler / style.css
Created October 19, 2013 16:45
Style plugin CSS fixes for different themes.
/* Genesis Serenity */
#content .post UL.snzpli-bullet LI, #content .post UL.snzpli-plus LI, #content .post UL.snzpli-check LI, #content .post UL.snzpli-ast LI, #content .post UL.snzpli-star LI, #content .post UL.snzpli-cross LI, #content .post UL.snzpli-arrow LI, #content .post UL.snzpli-alert LI, #content .post UL.snzpli-clock LI, #content .post ul.snzpli-bulb li, #content .post UL.snzpli-cancel LI, #content .post UL.snzpli-lock LI, #content .post UL.snzpli-new LI
{
list-style-type: none;
padding-left: 24px;
}
/* Genesis Serenity */
#content img, #content p img {
background: none;
padding: 0;
@lynettechandler
lynettechandler / functions.php
Last active December 24, 2015 00:39
Slideshare shortcode for self hosted WordPress
// Add slideshare shortcode
function tbm_slideshare( $atts ) {
$atts = extract( shortcode_atts(
array(
'id'=>''
),$atts ) );
// Break it up so we can get the first variable = presentation ID
$id = explode('&', $id);
return '<iframe src="http://www.slideshare.net/slideshow/embed_code/'.$id[0].'?rel=0" width="570" height="469" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;border-width:1px 1px 0;margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>';
}