Skip to content

Instantly share code, notes, and snippets.

@dkotter
dkotter / config.conf
Created January 17, 2015 16:38
Emmis config
server {
# Determines the port number that nginx will listen to for this
# server configuration. 80 is the default http port.
listen 80;
# Listen for HTTPS requests as well
listen 443 ssl;
# Tells nginx what domain name should trigger this configuration. If
# you would like multiple domains or subdomains, they can be space
<?php
/**
* Handle meta boxes that are used on multiple content types.
*
*/
class CTRS_Meta_Boxes {
private $_blacklisted_post_types = array(
'ctrs-people',
<?php
function is_post_by_author( $author = '' ) {
if ( is_single() && $author ) {
if ( get_the_author() === $author ) {
return true;
} else {
return false;
}
}
<?php
/**
* Handle meta boxes that are used on multiple content types.
*
*/
class PM_Meta_Boxes {
private $_blacklisted_post_types = array(
'pm-best-of',
'pm-dentists',
@dkotter
dkotter / geocode.php
Created January 17, 2012 23:52
Geocode Custom Fields
add_action( 'save_post', 'dkk_save_latlong' );
function dkk_save_latlong( $post_id ) {
// verify if this is an auto save routine.
// If it is our form has not been submitted, so we dont want to do anything
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
return;
// Check if it is our custom post type
if ( 'community-guide' == $_POST['post_type'] ) {