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
# turn off all wsl instances such as docker-desktop | |
wsl --shutdownnotepad "$env:USERPROFILE/.wslconfig" | |
[wsl2] | |
memory=3GB # Limits VM memory in WSL 2 up to 3GB | |
processors=4 # Makes the WSL 2 VM use two virtual processors | |
#credits: https://itnext.io/wsl2-tips-limit-cpu-memory-when-using-docker-c022535faf6f |
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 | |
/** | |
* Register the exception handling callbacks for the application. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
$this->reportable(function (Throwable $e) {}); |
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 | |
/** | |
* Disabling emoji library from Wordpress. | |
*/ | |
function disable_emojis() { | |
// Let's remove a bunch of actions & filters. | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); |
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 | |
/** | |
* Enable YARPP support for Toolset's Custom Post Types | |
* | |
* @param $data array The CPT args. | |
* @param $post_type array The registered CPT list. | |
* | |
* @return array | |
*/ | |
function yarpp_support_func($data, $post_type) { |
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 | |
/** | |
* This is the method to register a custom post type adding YARPP support in it. | |
* | |
* @param $data array The original CPT args. | |
* @param $post_type string The CPT slug. | |
* | |
* @return array | |
*/ | |
function register_my_cpt() { |