Skip to content

Instantly share code, notes, and snippets.

View joelworsham's full-sized avatar

Joel Worsham joelworsham

View GitHub Profile
@joelworsham
joelworsham / proxyConfig.js
Created October 16, 2023 16:32
Rubrik MacOS Proxy PAC locahost -> postman mock
function FindProxyForURL(url, host) {
if (host === "localhost:3000") {
return "PROXY https://0ae9179a-3fc7-4862-ba27-c9366ed5724d.mock.pstmn.io; DIRECT";
}
return "DIRECT";
}
@joelworsham
joelworsham / ld-gb-user-grade.php
Created August 14, 2018 15:14
LearnDash Gradebook User Grade @ 1.3.6
<?php
/**
* Contains the grade for a given user.
*
* @since 1.0.0
*
* @package LearnDash_Gradebook
* @subpackage LearnDash_Gradebook/includes
*/
@joelworsham
joelworsham / gf-plugin-part.php
Created August 3, 2018 17:08
GF Plugin Exporting Spam
<?php
/**
* Class Lowry_GF_Exporting
*
* Customizes exporting entries. Specifically to include spam entries.
*
* @since {{VERSION}}
*/
// Exit if accessed directly
<?php
/**
* Modifies WP Pro Quiz so I can get the dang answers in the results.
*
* @since 0.1.0
* @package ME10
*/
// Don't load directly
if ( ! defined( 'ABSPATH' ) ) {
// Foundation for Sites Settings
// -----------------------------
//
// Table of Contents:
//
// 1. Global
// 2. Breakpoints
// 3. The Grid
// 4. Base Typography
// 5. Typography Helpers
@joelworsham
joelworsham / ld-gb-reorder-grades-filtercomponents.php
Created October 18, 2016 18:45
LearnDash Gradebook re-order grades example 2
<?php
function my_modify_gradebook_type_components( $components ) {
if ( ! $components ) {
return $components;
}
foreach ( $components as $type_id => &$component ) {
@joelworsham
joelworsham / ld-gb-reorder-grades-pregetposts.php
Created October 18, 2016 18:37
LearnDash Gradebook re-order grades example
<?php
function my_modify_gradebook_type_posts( $wp_query ) {
// Make sure it's the proper query
if ( $wp_query->is_main_query() ||
$wp_query->get('post_type') != array( 'sfwd-assignment', 'sfwd-quiz' ) ||
! $wp_query->get('tax_query')
) {
return;
<?php
add_filter( 'wlmapi_the_members', function ( $members ) {
if ( $members && isset( $members['members'] ) && isset( $members['members']['member'] ) ) {
foreach ( $members['members']['member'] as &$member ) {
$member['agent_ambassadors'] = get_user_meta( $member['id'], 'agent_ambassadors', true );
$member['lender_ambassadors'] = get_user_meta( $member['id'], 'lender_ambassadors', true );
$member['agent_ambassador_default'] = get_user_meta( $member['id'], 'agent_ambassador_default', true );
@joelworsham
joelworsham / custom-roles.php
Created March 23, 2016 16:18
Custom Roles for DZS
<?php
/**
* Plugin Name: DZS Roles
* Description: Provides custom roles for the Detroit Zoo website.
* Author: Joel Worsham
* Author URI: http://realbigmarketing.com
* Version: 1.0.1
*/
if ( ! defined( 'ABSPATH' ) ) {
@joelworsham
joelworsham / wp-gruntfile-4.2.0.js
Last active August 29, 2015 14:21
The WordPress Gruntfile
/* jshint node:true */
module.exports = function(grunt) {
var path = require('path'),
SOURCE_DIR = 'src/',
BUILD_DIR = 'build/',
mediaConfig = {},
mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
// Load tasks.
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );