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 | |
/** | |
* Fixes issues with symlinked wordpress | |
*/ | |
if ( defined('ABSPATH') ) { | |
$fixed_abspath = str_replace( 'wordpress', 'public', ABSPATH ); | |
define('WP_CONTENT_DIR', $fixed_abspath . 'wp-content'); | |
define('WP_PLUGIN_DIR', $fixed_abspath . 'wp-content/plugins'); | |
} |
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 | |
// Enable WP_DEBUG mode | |
define( 'WP_DEBUG', true ); | |
// Enable Debug logging to the /wp-content/debug.log file | |
define( 'WP_DEBUG_LOG', true ); | |
// Disable display of errors and warnings | |
define( 'WP_DEBUG_DISPLAY', false ); |
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
#!/bin/sh | |
echo "committing as $(git config user.name) ($(git config user.email))", | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
#STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep "app/.*\.php"` | |
PROJECT_PATH=`php -r "echo dirname(dirname(realpath('$0')));"` | |
VENDOR_BIN_DIR="${PROJECT_PATH}/vendor/bin/"; |
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 | |
namespace App\Enums; | |
use App\Rules\IsValidEnum; | |
use Illuminate\Support\Str; | |
abstract class BaseEnum | |
{ | |
protected $name; | |
protected $values = array(); |
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 | |
function incrementDeep(&$array, $value) { | |
$array += $value; | |
} | |
$test['foo']['bar']['test'] = 5; | |
incrementDeep($test['foo']['bar']['test'], 5); | |
incrementDeep($test['foo']['bar']['test2'], 5); |
OlderNewer