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 bg_video_scripts() { | |
wp_enqueue_script( 'bg-backgrounds', get_stylesheet_directory_uri() . '/assets/jquery.videoBG.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'bg-backgrounds-actuator', get_stylesheet_directory_uri() . '/assets/script.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'bg_video_scripts' ); |
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: PACC Cross Post | |
Plugin URI: http://thepacc.com | |
Description: Allows subsites to cross post to the main site | |
Author: Topher | |
Version: 1.0 | |
Author URI: http://codeventure.net | |
*/ |
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
/** | |
* Swap Default TinyMCE Tags for Figure Tags on Images | |
*/ | |
function html5_insert_image( $html, $id, $caption, $title, $align ) { | |
$title = esc_attr( $title ); | |
$caption = sanitize_text_field( $caption ); | |
$id = absint( $id ); | |
$url = esc_url( wp_get_attachment_url( $id ) ); |
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
SELECT | |
SUM( | |
CASE | |
WHEN `home_school_id`= 42 THEN `away_score` | |
WHEN `away_school_id`= 42 THEN `home_score` | |
END | |
) as points_against | |
FROM | |
`games` | |
WHERE |
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
// delete featured coaches transient on coach save | |
function delete_featured_transient($post_id) { | |
// First we want to make sure that this is a real save, not simply an auto save | |
if ( !wp_is_post_revision( $post_id ) ) { | |
// now we declare our custom content type, because we only want to run this | |
// on the save of this type | |
$slug = 'coaches'; |
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
// Let's create the function to be used as a shortcode | |
function featured_coaches($atts) { | |
// My content type is for Motor Coaches, and we want to get the ones that have | |
// the Featured box checked, but not the Sold box. | |
// I'm starting out saying we want 3, and no sold | |
extract(shortcode_atts(array( | |
'num' => 3 | |
,'sold' => false |
NewerOlder