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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /wp-content/uploads/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*) http://livesite.com/wp-content/uploads/$1 [L,P] | |
</IfModule> |
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: Site Functions | |
Description: Functionality changes to WordPress, plugins, and themes instead of using functions.php. | |
Version: 0.1 | |
License: GPL | |
Author: Your Name | |
Author URI: yoururl | |
*/ |
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
add_action('admin_init', 'base_file'); | |
function base_file() { | |
$parent_post_id = 0; | |
$upload_dir = wp_upload_dir(); | |
// @new | |
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR; |
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_action( 'admin_init', 'wpmdb_tweak_profile_id_edit' ); | |
function wpmdb_tweak_profile_id_edit() { | |
$profile_mappings = array( | |
2 => 1, | |
3 => 2, | |
); | |
$wpmdb_settings = get_site_option( 'wpmdb_settings' ); |
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 | |
$sellwire_url = 'https://app.sellwire.net/api/1/'; | |
$api_params = array( | |
'license' => $license, | |
'file' => $file_id | |
); | |
$response = wp_remote_get( add_query_arg( $api_params, $sellwire_url . 'activate_license' ), $this->license_args() ); | |
if ( is_wp_error( $response ) ) { |
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/env bash | |
cd /Applications/MAMP/htdocs/dbtestingmssd/ | |
for i in {1..150} | |
do | |
wp site create --slug="test$i" | |
done |
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 | |
# Installation: | |
## Download the script to your home directory | |
# Make sure it has execute permissions (`chmod +x wp-install-core-sub-dir.sh`). | |
# Install the script in one of the folders in your PATH. (`mv wp-install-core-sub-dir.sh /usr/local/bin/wp-install-core-sub-dir`) | |
#Usage: |
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: WP Offload S3 - Relative URL Find & Replace | |
Description: Find and replace relative local URLs with S3 URLs in post content after they have been uploaded to S3 | |
Author: Delicious Brains | |
Version: 1.0 | |
Author URI: https://deliciousbrains.com/ | |
*/ | |
add_action( 'admin_init', 'wpos3rel_find_replace' ); |
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 | |
/** | |
* Class API | |
*/ | |
class API extends \WP_UnitTestCase { | |
/** | |
* @var \DeliciousBrains\Offload\AWS\API | |
*/ |
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: WP Offload S3 - Copy HiDPI Images | |
Description: Restores the functionality of copying of HiDPI (@2x) images during S3 offload of attachments. | |
Author: Delicious Brains | |
Version: 1.0 | |
Author URI: https://deliciousbrains.com/ | |
*/ | |
add_filter( 'as3cf_attachment_file_paths', 'wpos3_hipdi_add_hidpi_file_paths' ); |
OlderNewer