Skip to content

Instantly share code, notes, and snippets.

View stevenkword's full-sized avatar
🎯
Focusing

Steven Word stevenkword

🎯
Focusing
View GitHub Profile
<?php
/**
* Gets the current global post type if one is set
*/
function x_get_current_post_type() {
global $post, $typenow, $current_screen;
if( $post && $post->post_type )
$post_type = $post->post_type;
elseif( $typenow )
<?php
/**
* Customize Image Reloaded Class
*
* Extend WP_Customize_Image_Control allowing access to uploads made within
* the same context
*
*/
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control {
/**
<?php
/**
* Customize Image Reloaded Class
*
* Extend WP_Customize_Image_Control allowing access to uploads made within
* the same context
*
*/
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control {
/**
<?php
define( 'lift_comment_facet_version', 1 );
add_action( 'init', function() {
if ( class_exists( 'Lift_Search' ) ) {
//field name, field type
$comment_field = liftField( 'comment_count', 'uint' )
//add field to parse_request handling so it gets passed to the global WP_Query
->addRequestVars( 'comment_count' )
//set the delegate for adding the field value to the document sent to CS
<?php
/*
* Plugin Name: WP Engine GeoIP Debugger
* Version: 0.5
* Description: Debug tool for WP Engine GeoIP
* Author: WP Engine
* Author URI: http://wpengine.com
*
* This will help confirm if GeoIP is returning the correct information. Check the error log after loading the front page of the site.
*/
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=./ # <-- wordpress root directory
Post Title:
Multisite Recap for the week of {F jS (month + day)}
-----------------------------
Post Content:
<h2>Office Hours Recap</h2>
The <a href="https://make.wordpress.org/core/{Y}/{m}/{d}/multisite-agenda-for-the-week-of-{F}-{jS}/">agenda for this office hours meeting</a> included/was {(brief one-sentence description of original meeting agenda)}.