Skip to content

Instantly share code, notes, and snippets.

Working hard reviewing and deploying code

Scott Kingsley Clark sc0ttkclark

Working hard reviewing and deploying code
Block or report user

Report or block sc0ttkclark

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
sc0ttkclark / .htaccess
Last active May 3, 2016
Add these lines to your .htaccess file if you can't get cPanel Let's Encrypt installation or renewal working properly (tested on SiteGround). They MUST go above any WordPress rewrites but below the "RewriteEngine On RewriteBase /" portion.
View .htaccess
# Stop processing any rewrites for /.well-known/ files
RewriteCond %{REQUEST_URI} ^/\.well-known/.*$ [NC]
RewriteRule ^ - [L]
sc0ttkclark / class-fieldmanager-readonly.php
Created Feb 18, 2016
A class you can drop-in to enable readonly text fields that can't be changed, but optionally you can set `'can_edit_capability' => 'manage_options'` to any capability you'd like to restrict editing to. If user has that capability, a basic text field will be used.
View class-fieldmanager-readonly.php
* Read only text field, optionally allows for specific users to edit
* @package Fieldmanager
class Fieldmanager_ReadOnly extends Fieldmanager_TextField {
* The capability a user must have to be able to edit normally
sc0ttkclark / sort-by-term-name.php
Created Oct 23, 2015
Example PHP of how to enable sorting by term name. `orderby=term_name` and `orderby_tax={taxonomy_name}`
View sort-by-term-name.php
* Filter EP args to add support for orderby term_name
* @param array $formatted_args
* @param array $args
function ep_add_term_name_sort_support( $formatted_args, $args ) {
// Handle meta_value / meta_value_num sort
sc0ttkclark / 0_reuse_code.js
Created Sep 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View podscast-2-demo.php
// Setup Speakers pod
$speaker = pods( 'speaker' );
// Find all Speakers
// with Lessons that are in the Series "That Series"
// or that have a Lesson "Awesome Lesson"
$params = array(
'where' => '
lessons.series.post_title = "That Series"
sc0ttkclark / pods-examples.php
Created Mar 3, 2015
Example from PodsCast 1
View pods-examples.php
// User Example
$user = pods( 'user' ); // User
$params = array(
'orderby' => 't.user_login',
'limit' => 10,
sc0ttkclark / delete-orphan-gf-entry-data.sql
Created Feb 16, 2015
Delete all GF lead data if lead has been deleted
View delete-orphan-gf-entry-data.sql
wp_rg_lead_detail AS lead_detail
wp_rg_lead AS lead ON = lead_detail.lead_id
sc0ttkclark /
Last active Jun 18, 2019 Mac integration with for diff and merge -
View Mac integration with for diff and merge

You must place both files in the ~/Library/Application Support/com.fournova.Tower2/CompareTools/ directory and chmod +x

This integration is based on the one I found for Beyond Compare's beta integration:

sc0ttkclark / gistify497541.buddypress-separate-bbpress-forums-site.php
Last active Sep 12, 2015
Code to enable having the main bbPress forums on a separate sub-site. Requires: WP Multisite, BuddyPress on main site and network-activated, bbPress on main site and sub-site
View gistify497541.buddypress-separate-bbpress-forums-site.php
* Remove and add a custom function for bbPress' BuddyPress activity filter
function custom_bbp_notifications_fix() {
sc0ttkclark / bbp-optimize.php
Last active Jun 28, 2019
bbPress Optimize -- Optimizes bbPress queries for large bbPress forums
View bbp-optimize.php
Plugin Name: bbPress Optimize
Plugin URI:
Description: Optimizes bbPress queries for large bbPress forums
Version: 1.1
Author: Scott Kingsley Clark
Author URI:
You can’t perform that action at this time.