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 | |
// When running via the php built-in webserver, disable wysiwyg profiles | |
function mycustommodule_boot() { | |
if (php_sapi_name() == 'cli-server') { | |
cache_set('wysiwyg_profiles', array()); | |
} | |
} |
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 | |
// n.b. there is a better way: | |
// | |
// https://gist.github.com/greg-1-anderson/a57271f74981de32b878 | |
/** | |
* If any active input filters have wysiwyg profiles, | |
* then ask the user if they should be removed. | |
*/ |
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 | |
$self=array_shift($argv); | |
$prefix="wp_"; | |
while (count($argv) > 0) { | |
$arg = array_shift($argv); | |
if ($arg[0] == '-') { | |
switch ($arg) { | |
case "--port": |
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 php | |
<?php | |
/** | |
* This script will download and install https://github.com/pantheon-systems/wp-native-php-sessions | |
* on your Pantheon Wordpress site. | |
* | |
* Works on Macintosh / Linux. | |
* | |
* 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 | |
// Place in $HOME/.drush/drushrc.php | |
// OBSOLETE workaround for lack of SSL cert handling at fastly for updates.drupal.org. | |
// Running without ssl exposes you to man-in-the-middle attacks, so REMOVE THIS, since | |
// https support is now unofficially provided again. | |
// $command_specific['pm-download']['source'] = 'http://updates.drupal.org/release-history'; |
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 | |
// Put this in ~/.drush/policy.drush.inc | |
function policy_drush_command_alter(&$command) { | |
if (($command['command'] == 'cache-clear') && (drush_drupal_major_version() >= 8)) { | |
$command['command'] = 'cache-rebuild'; | |
$command['command-hook'] = 'cache-rebuild'; | |
$command['primary function'] = FALSE; | |
$command['arguments'] = array(); | |
drush_set_command($command); | |
} |
NewerOlder