Skip to content

Instantly share code, notes, and snippets.

View coreymcollins's full-sized avatar

Corey M Collins coreymcollins

View GitHub Profile
@coreymcollins
coreymcollins / admin-widgets.js
Last active December 30, 2015 12:09
Share Sidebars Across a Multisite Network
jQuery(document).ready(function($){
function wds_reset_footer_transient() {
// Run our AJAX call to delete our site transient
$.ajax({
type : 'post',
dataType : 'json',
url : ajaxurl,
data : {
@coreymcollins
coreymcollins / nav.php
Created February 7, 2014 13:43
The Events Calendar Standard Pagination
<?php
/**
* List View Nav Template
* This file loads the list view navigation.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/nav.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
@coreymcollins
coreymcollins / nav.php
Created February 7, 2014 13:43
The Events Calendar Replaced Navigation
<?php
/**
* List View Nav Template
* This file loads the list view navigation.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/nav.php
*
* @package TribeEventsCalendar
* @since 3.0
* @author Modern Tribe Inc.
@coreymcollins
coreymcollins / attached-posts.css
Created March 20, 2014 15:17
Custom field for Custom Metaboxes and Fields for WordPress (https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress). This requires jQuery UI for drag & drop and sort functionality (http://jqueryui.com/download/#!version=1.10.4&components=1110111110000000000000000000000000). The post IDs are saved in an array, which can be rea…
table.cmb_metabox #posts-wrap {
background: url(../images/tiered-arrow.png) 50% 50% no-repeat;
display: inline-block;
width: 100%;
}
table.cmb_metabox .connected {
border: 1px solid #ddd;
cursor: pointer;
float: left;
<?php
/**
* Add metabox for Life at Meltwater layout
*/
$meta_boxes['wds_meltwater_attached_layout_what_to_expect'] = array(
'id' => 'what-to-expect',
'title' => __( 'What to Expect Layout', 'meltwater' ),
'object_types' => array( 'layout' ),
'context' => 'normal',
'priority' => 'low',
<?php
/**
* Display testimonials
*/
function wds_meltwater_testimonials( $type = '' ) {
// Grab the type set for this layout
$type = esc_html( get_post_meta( get_the_ID(), '_wds_meltwater_type_select', true ) );
@coreymcollins
coreymcollins / wds-javascript-style.js
Created May 19, 2016 20:37 — forked from gregrickaby/wdsjQuery.js
WDS Javascript Style
/**
* Foo Script.
*/
window.Foo_Object = {};
( function( window, $, that ) {
// Private variable.
var fooVariable = 'foo';
// Constructor.
@coreymcollins
coreymcollins / remove-version-numbers.php
Created February 13, 2018 03:19
Remove version numbers from WordPress core enqueues
function cmc_remove_wp_core_version_numbers( $src ) {
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'cmc_remove_wp_core_version_numbers', 9999 );
add_filter( 'script_loader_src', 'cmc_remove_wp_core_version_numbers', 9999 );
@coreymcollins
coreymcollins / block.js
Last active April 8, 2019 12:11
WDS Blocks Background Options
/**
* BLOCK: Default Block
*
* This block was meant to be duplicated.
* It serves as the starting point for new blocks. 😀
*/
/**
* External dependencies
*/
@coreymcollins
coreymcollins / index.js
Created March 30, 2018 20:26
WDS Blocks Default Block
/**
* BLOCK: Default Block
*
* This block was meant to be duplicated.
* It serves as the starting point for new blocks. 😀
*/
/**
* External dependencies
*/