Version | API |
---|---|
7.3 |
20180731 |
7.4 |
20190902 |
8.0 |
20200930 |
8.1 |
20210902 |
8.2 |
20220829 |
8.3 |
20230831 |
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 | |
resolve(EngineManager::class)->extend('elasticsearch', function ($app) { | |
return new ElasticsearchEngine( | |
ElasticBuilder::create()->setHosts(config('scout.elasticsearch.hosts'))->build() | |
); | |
}); |
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 Kernel extends HttpKernel | |
{ | |
protected $middleware = [ | |
\App\Http\Middleware\TrustedProxies::class, | |
]; | |
} |
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', function() { | |
// remove the color scheme picker | |
remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); | |
// force all users to use the "Ectoplasm" color scheme | |
add_filter( 'get_user_option_admin_color', function() { | |
return 'ectoplasm'; |
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
cd ./wordpress | |
wget https://objectcache.pro/plugin/redis-cache-pro.zip?token=0000000000 | unzip | |
cp redis-cache-pro/stubs/mu-plugin.php wp-content/mu-plugins/redis-cache-pro.php | |
mv redis-cache-pro wp-content/mu-plugins | |
rm redis-cache-pro.zip | |
read -r -d '' WP_REDIS_CONFIG <<- EOM |
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 | |
namespace App\Providers; | |
use Auth; | |
use App\Support\EloquentUserProvider; | |
class AuthServiceProvider extends ServiceProvider | |
{ | |
public function boot(GateContract $gate) |
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( 'get_user_option_admin_color', function( $color_scheme ) { | |
global $_wp_admin_css_colors; | |
if ( ! isset( $_wp_admin_css_colors[ $color_scheme ] ) ) { | |
$color_scheme = 'ectoplasm'; | |
} |
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
<script> | |
(function(key) { | |
var script = document.createElement('script'); | |
script.src = 'https://static.leaddyno.com/js'; | |
script.async = true; | |
script.onload = function () { | |
LeadDyno.key = key; | |
LeadDyno.recordVisit(); | |
LeadDyno.autoWatch(); | |
}; |
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 | |
var_dump('PhpRedis: '. phpversion('redis')); | |
$redis = new RedisCluster( | |
null, | |
[ | |
'tls://127.0.0.1:7001', | |
'tls://127.0.0.1:7002', | |
], |
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 | |
// always paste as plain text | |
foreach ( array( 'tiny_mce_before_init', 'teeny_mce_before_init') as $filter ) { | |
add_filter( $filter, function( $mceInit ) { | |
$mceInit[ 'paste_text_sticky' ] = true; | |
$mceInit[ 'paste_text_sticky_default' ] = true; | |
return $mceInit; | |
}); | |
} |
NewerOlder