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 | |
add_action( 'admin_init' , function() { | |
add_filter( 'user_has_cap', function( $allcaps ) { | |
$allcaps['delete_plugins'] = false; | |
$allcaps['edit_plugins'] = false; | |
return $allcaps; | |
}); | |
} ); |
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 | |
if ( ! isset( $argv[1] ) ) { | |
print( 'Please provide a base directory.' . PHP_EOL ); | |
exit( 1 ); | |
} | |
if ( ! isset( $argv[2] ) ) { | |
print( 'Please provide the plugin to activate.' . PHP_EOL ); | |
exit( 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
--- | |
sites: | |
# The wordpress-default configuration provides a default installation of the | |
# latest version of WordPress. | |
wordpress-default: | |
repo: https://github.com/Varying-Vagrant-Vagrants/vvv-wordpress-default.git | |
hosts: | |
- local.wordpress.test | |
- local.wordpress-home.test |
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
version: "2" | |
services: | |
mariadb: | |
image: wodby/mariadb:10.1-2.0.0 | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: wordpress | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress |
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 | |
$config = [ | |
'pools' => [ | |
// Default/fallback controller. | |
'General' => [ | |
'method' => 'Redis', | |
'config' => [ | |
'scheme' => 'tcp', | |
'host' => 'redis-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
(function (l, h) { | |
if ( typeof h.replaceState === 'undefined' ) { | |
return; | |
} | |
if (!/[?&]utm_/ig.test(l.href)) { | |
return; | |
} |
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 | |
/** | |
* wp_register_script wrapper with local fallback | |
* | |
* @param $handle | |
* @param $src | |
* @param $js_test JavaScript code to test for availability of object | |
* @param bool|false $local_src Load source file if test fails | |
* @param array $deps |