Skip to content

Instantly share code, notes, and snippets.

View oneblackcrayon's full-sized avatar

Frederick Polk oneblackcrayon

View GitHub Profile
@oneblackcrayon
oneblackcrayon / Command-line.md
Created September 30, 2015 09:21 — forked from NickChristensen/Command-line.md
A few notes and links from the Lunch & Learn
@oneblackcrayon
oneblackcrayon / wp-config.php
Created September 26, 2015 07:27 — forked from wycks/wp-config.php
Multi Environment wp-config.php
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@oneblackcrayon
oneblackcrayon / image_optimize-wordpress.php
Created September 26, 2015 06:55 — forked from wycks/image_optimize-wordpress.php
Remove WordPress full size images from being inserted into a post + option to and add max size to to prevent users from inserting massive images.
<?php
/**
*
* This removes the ability to add the FULL image size into a post, it does not alter or delete the image
* Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size
*
* For now we have to do it this way to make the labels translatable, see trac ref below.
*
* If your theme has $content_width GLOBAL make sure and remove it
<?php
function im_setup() {
// ++++++++++++++++ REGISTER THEME OBJECTS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
// Register and enqueue Javascript
function im_js() {
// Modernizr
<?php
//FROM
//http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/
//http://webstractions.com/wordpress/remove-recent-comments-inline-styl/
//http://wpengineer.com/1438/wordpress-header/
//https://github.com/boldperspective/Whiteboard-Framework
//REMOVE ADMIN BAR
add_filter( 'show_admin_bar', '__return_false' );
<?php
/* Register custom post types on the 'init' hook. */
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 0.1.0
* @access public
<?php
/**
* Jobify functions and definitions.
*
* Sets up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter
* hooks in WordPress to change core functionality.
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development
* and http://codex.wordpress.org/Child_Themes), you can override certain
<?php
/*
* Plugin Name: Jetpack by WordPress.com
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users.
* Author: Automattic
* Version: 2.0.4
* Author URI: http://jetpack.me
* License: GPL2+
/**
* Completely nuke comments support
* Need to also also turn off comments/pingbacks at wp-admin > Settings > Discussion
* Need to also turn off comments for posts individually (Bulk Edit or DB find/replace)
*
* Adapted from: https://www.dfactory.eu/wordpress-how-to/turn-off-disable-comments/
*/
/**
_site