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
<?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
#!/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
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 | |
/** | |
* 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 - oEmbed Library Addon | |
*/ | |
/** | |
* OEmbed in Library | |
* https://wordpress.org/plugins/oembed-in-library/ | |
*/ | |
function wpos3_oembed_lib_init() { |
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: Ninja Forms File Uploads Directory Tweak | |
* Plugin URI: http://polevaultweb.com | |
* Description: Tweaks plugin | |
* Version: 1.0 | |
* Author: polevaultweb | |
* Author URI: http://polevaultweb.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 | |
add_filter( 'igp_image_filename', 'my_igp_image_filename', 10, 4 ); | |
function my_igp_image_filename( $file_name, $file, $post_name, $postid ) { | |
$file_name_parts = explode( '.', $file_name ); | |
$ext = array_pop( $file_name_parts ); | |
$file_name = 'my-prefix-' . implode( '.', $file_name_parts ) . '-'. date( 'Y-m-d' ) . '.' . $ext; | |
return $file_name; |
OlderNewer