Skip to content

Instantly share code, notes, and snippets.

Ryan Duff ryanduff

Block or report user

Report or block ryanduff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View affwp-url-referral-var-shortcode.php
<?php
/*
Plugin Name: AffiliateWP Custom Referral URL
Plugin URI: http://affiliatewp.com
Description: Adds AffiliateWP Custom Referral URL
Version: 0.1
License: GPL
Author: AffiliateWP
*/
View gist:6285885
<?php
//USAGE
$semantics3 = biffleSemantics3::get_instance( $query );
$raw = $semantics3->get_product_search('products');
class biffleSemantics3 {
/*
Documentation
https://www.semantics3.com/docs/
View gist:6252657
<?php
function log_it( $logme ) {
$log = WP_CONTENT_DIR . '/log_it.log';
file_put_contents( $log, print_r( $logme, true ), FILE_APPEND );
}
View gist:6065923
<?php
/**
* Infinite Scroll on the Homepage
*
* Display posts until the end of time
*
* @package WordPress
* @subpackage Lossip
* @since Lossip 1.0
*/
View sb-github-downloads.php
<?php
/**
* Plugin Name: StartBox GitHub .zip Generator
* Description: Generates a .zip download for StartBox from GitHub Master.
*
* @props Konstantin Kovshenin (@kovshenin) for sharing his work used on underscores.me
*/
class SB_Download_Generator {
View gist:4661317
<?php
class Lisa_Sidebar_Markup extends SB_Sidebars {
// Activate all sidebars, override this to customize sidebar markup
function widgets_init() {
// If there aren't any sidebars, skip the rest
if ( !$this->sidebars || empty($this->sidebars) ) return;
View wc-exit-pop.js
;(function($) {
$(document).ready(function(){
var submitted = false;
// Attach our exit pop to the window closing
$(window).bind('beforeunload', function(){
if ( !submitted ) {
return exit_text; // This var is populated via wp_localize_script in woocommerce-exit-notification.php
}
@ryanduff
ryanduff / wp-custom-title-cpt-screen.php
Created Feb 7, 2012 — forked from rachelbaker/wp-custom-title-cpt-screen.php
WordPress Custom Title for Custom Post Type Screen
View wp-custom-title-cpt-screen.php
<?php
add_filter( 'enter_title_here', 'custom_editor_titles' );
function custom_editor_titles( $title ){
global $wp_post_types;
$screen = get_current_screen();
$post_type = $screen->post_type;
$labels = $wp_post_types[$post_type]->labels;
$label = strtolower( $labels->singular_name );
You can’t perform that action at this time.