This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Customize Roles & Capabilities | |
* | |
* @package Dachis | |
* @subpackage Core Functionality | |
* @version 1.0 | |
* @author Bill Erickson <bill@billerickson.net> | |
* @copyright Copyright (c) 2011, Bill Erickson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'genesis_author_box', 'be_author_box', 10, 6 ); | |
/** | |
* Customize Author Box | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/customize-author-box | |
* | |
* @param string $output | |
* @param string $context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=$1 # <-- wordpress root directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Customize CSS for login screen | |
* | |
* @since 1.0.0 | |
* @author Jared Atchison | |
* @link http://jaredatchison.com/code/ | |
*/ | |
function ja_login_screen_css() { | |
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory() . '/css/style-login.css" />' . "\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function subl() { | |
if [[ ! -p /dev/stdin ]]; then | |
command subl > /dev/null 2>&1 | |
fi | |
command subl "$@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file adds a custom template to the AgentPress Child Theme. | |
* | |
* @author Brad Dalton | |
* @link http://wpsites.net/web-design/make-custom-page-template/ | |
* @package Agentpress | |
* @subpackage Customizations | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import csv | |
reader = csv.DictReader(open('./instapaper-export.csv', 'rb'), delimiter = ',', quotechar = '"') | |
unread = [] | |
for row in reader: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Customize the login screen text | |
* | |
* Some sites, primarily membership sites, are setup where the usernames ARE their email address. | |
* This is great, but the login screen can confuse users. So help with the confusion, we remove | |
* all references of "Username" on the login screen and replace with "Email". | |
* | |
* @since 1.0.0 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Redirect users with 'foo' role to a specific page after login | |
* | |
* @since 1.0.0 | |
*/ | |
function ja_role_login_redirect( $redirect_to, $request, $user ){ | |
//is there a user to check? | |
if ( isset( $user->roles ) && is_array( $user->roles ) ) { | |
if( in_array( 'foo', $user->roles ) ) { |
OlderNewer