Skip to content

Instantly share code, notes, and snippets.

Derrick Hammer pcfreak30

Block or report user

Report or block pcfreak30

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 gist:9a6b183f033924e583003f35bbe0391f
if (!class_exists("BP_Shortcodes"))
class BP_Shortcodes
public $call;
public function __construct()
pcfreak30 / alloptions.php
Last active Dec 13, 2018 — forked from lukecav/functions.php
Fix a race condition in alloptions caching in WordPress
View alloptions.php
* Fix a race condition in alloptions caching
* See
function _wpcom_vip_maybe_clear_alloptions_cache( $option ) {
if ( ! wp_installing() ) {
$alloptions = wp_load_alloptions(); //alloptions should be cached at this point
pcfreak30 / gist:4991458ca5e58261a283fa5bc6f2535c
Created Sep 9, 2017 — forked from jchristopher/gist:9331899
Integrate SearchWP and Jetpack Infinite Scroll
View gist:4991458ca5e58261a283fa5bc6f2535c
// Jetpack infinite scroll does it's own WP_Query, so we need to hijack it at runtime
function searchwp_infinite_scroll_query_args( $query_args ) {
if( class_exists( 'SearchWPSearch' ) ) {
$query = get_search_query();
if( empty( $query ) ) {
if( isset( $_GET['query_args']['s'] ) ) {
$query = sanitize_text_field( $_GET['query_args']['s'] );
View taxonomy.php
<?php get_header(); ?>
<div id="main-content">
<div class="container">
<div id="content-area" class="clearfix">
<div id="left-area">
<h1><?php single_cat_title(); ?></h1>
<div><?php echo get_term_meta( get_queried_object()->term_id, 'location_description', true ); ?></div>
pcfreak30 / YARPP_Cache.php
Last active Dec 22, 2016
YARPP_Cache ksort Class Fix for WordPress 4.7
View YARPP_Cache.php
abstract class YARPP_Cache {
protected $core;
protected $yarpp_time = false;
public $score_override = false;
public $online_limit = false;
public $last_sql;
pcfreak30 / CMakeLists.txt
Created May 31, 2016
Google Native Client Hello Tutorial CMake CMakeLists.txt
View CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
get_filename_component(NACL_SDK_ROOT "${PARENT_DIR}/.." REALPATH)
endif ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98 -Wno-long-long -Wall -Wswitch-enum -pedantic -Werror")
pcfreak30 / index.php
Created Mar 30, 2014
Simple Login System
View index.php
require "session.php";
You can’t perform that action at this time.