This file contains hidden or 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
# Adds new account | |
INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES | |
(null, 'firstlastname', 'known-password-hash', 'First Last Name', '[email protected]', '', NOW(), '', 0, 'First Last Name'); | |
# Selects autogenerated ID | |
SET @autogenerated_id = LAST_INSERT_ID(); | |
# Setups new account as a WordPress admin | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES | |
(null, @autogenerated_id, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'), |
This file contains hidden or 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
# Delete all orphans user meta in WordPress | |
DELETE FROM wp_usermeta | |
WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
); | |
# Remove multisite only columns in users | |
alter table wp_users drop column spam; | |
alter table wp_users drop column deleted; |
This file contains hidden or 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: Anchor Multisite Jetpack Control | |
Description: Auto activate and disable select Jetpack modules | |
Version: 1.0 | |
Author: austinginder | |
Author URI: http://austinginder.com | |
Network: true | |
License: GPL2 | |
*/ |
This file contains hidden or 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
# Now that we have sent the text part its time to send the attachment.. | |
if ($MAIL{'ftype'} and $MAIL{'ahandle'}) | |
{ | |
print S "--$boundary1$n"; | |
print "--$boundary1$n" if $MAIL{'debug'}; | |
if ( $MAIL{'ftype'} =~ /^text/) | |
{ | |
print S "Content-Type: $MAIL{'ftype'}; charset=us-ascii; name=\"$MAIL{'aname'}\"$n"; |
This file contains hidden or 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
post_max_size = 1024M | |
upload_max_filesize = 1024M |
This file contains hidden or 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
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
# added hackery to work around Wordpress issues - Patrick Anderson ([email protected]) | |
# added rewrite for Wordpress multisite upload directory - Austin Ginder | |
# clearly this could be cleaner, but it does work | |
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
# patch Php from rack-legacy to substitute the original request so |
This file contains hidden or 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
# add to | |
functions.php | |
// This theme uses post thumbnails | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 300, 300, true ); | |
add_image_size( 'thumbnail-small', 75, 9999 ); | |
add_image_size( 'thumbnail-medium', 500, 9999 ); | |
NewerOlder