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
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
### Keybase proof | |
I hereby claim: | |
* I am topher1kenobe on github. | |
* I am topher1kenobe (https://keybase.io/topher1kenobe) on keybase. | |
* I have a public key whose fingerprint is B667 2067 B47F D1B8 AC08 7340 8314 A0AF 19F8 B110 | |
To claim this, I am signing this object: |
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 t1k_get_parent_theme_css() { | |
wp_enqueue_style( 'make-theme', get_template_directory_uri() . '/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 't1k_get_parent_theme_css' ); |
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 | |
/** | |
* This template is used to display the Checkout page when items are in the cart | |
*/ | |
global $post; ?> | |
<table id="edd_checkout_cart" <?php if ( ! edd_is_ajax_disabled() ) { echo 'class="ajaxed"'; } ?>> | |
<thead> | |
<tr class="edd_cart_header_row"> | |
<?php do_action( 'edd_checkout_table_header_first' ); ?> |
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 |
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
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
/** | |
* 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
$meta_query = [ | |
'meta_key' => 'pmp_required_levels', | |
'meta_value' => get_pmpro_subscription_ids( get_current_user_id() ), | |
'meta_compare' => 'IN', | |
'post_type' => 'li_resources', | |
]; | |
// value holds an array like this | |
Array | |
( |
OlderNewer