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
javascript:elms=document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()}; |
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
/* Add TypeKit Fonts */ | |
function logos_add_typekit() { | |
echo '<script type="text/javascript" src="//use.typekit.net/yourtypekitcode.js"></script> | |
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>'; | |
} | |
add_filter( 'wp_head', 'logos_add_typekit' ); |
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 infographic_embedder_add_post_meta_boxes() { | |
add_meta_box( | |
'infographic_embedder-post-class', | |
__( 'Infographic Embed', 'example' ), | |
'infographic_embedder_post_class_meta_box', | |
'post', | |
'side', | |
'default' | |
); | |
add_meta_box( |
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: Infographic Embedder | |
Plugin URI: http://pardot.com | |
Description: Takes the infographic URL and adds content to the end of posts. | |
Version: 1.0 | |
Author: Cliff Seal (Pardot) | |
Author URI: http://pardot.com | |
Author Email: [email protected] | |
License: |
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 | |
/** | |
* Your Name Global Plugin | |
* | |
* Core settings for Your Name sites. | |
* | |
* @package core_yourplugin | |
* @author Your Name <[email protected]> | |
* @link http://example.com | |
* @copyright 2014 Your Name |
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
add_filter( 'body_class', 'yourtheme_preview_color' ); | |
function yourtheme_preview_color($classes) { | |
if ( isset($_GET['color']) && !empty($_GET['color']) ) { | |
$current_theme = wp_get_theme(); | |
$queried_theme = $current_theme->stylesheet; | |
array_push( $classes, $queried_theme . '-' . $_GET['color'] ); |
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 prefix_conditional_body_class($classes) { | |
if ( get_page_template_slug(get_the_ID()) === 'mytemplate.php' ) { | |
$classes[] = 'bg-dark'; | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'prefix_conditional_body_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
if( !empty($get_recurrence_event->posts) && tribe_is_recurring_event($get_recurrence_event->posts[0]->ID) && get_post_status($get_recurrence_event->posts[0]) == 'publish' ){ | |
$nextevent = ''; | |
$now = strtotime('now'); | |
foreach ( tribe_get_recurrence_start_dates($event->ID) as $eventinstance ) { | |
$upcoming = strtotime($eventinstance); | |
if ( $now < $upcoming ) { | |
$eventinstance = explode(" ", $eventinstance); | |
$nextevent = $eventinstance[0]; | |
break; | |
} |
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 | |
/** | |
* Finds the the full filepath for /wp-load.php in a ancestor directory. | |
* | |
* Walks up the parent directory stack to locate wp-load.php. | |
* Used by files in plugins that need require() wp-load.php | |
* but that might not be stored exactly where expected. | |
* | |
* Works as long as the wp-load.php is found by traversing parent directories. | |
* |
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
/* Make Events Form Work Redux */ | |
add_filter("gform_post_data", "mb_set_post_date", 10, 3); | |
function mb_set_post_date($post_data, $form, $entry){ | |
if($form["id"] != 48) | |
return $post_data; | |
$startdate = $entry["69"]; | |
$starttime = $entry["5"]; |
OlderNewer