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 | |
return (new PhpCsFixer\Config()) | |
->setRules(array( | |
// '@PSR12' => true, | |
// basic | |
'curly_braces_position' => array( | |
'functions_opening_brace' => 'same_line', | |
'classes_opening_brace' => 'same_line', | |
'anonymous_classes_opening_brace' => 'same_line', |
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
# Add PSReadLine | |
# https://github.com/PowerShell/PSReadLine | |
# https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/ | |
# https://docs.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.2 | |
#-------------------- | |
Import-Module PSReadLine | |
Set-PSReadLineOption -PredictionSource HistoryAndPlugin | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
Set-PSReadLineOption -EditMode Windows |
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 | |
if (!defined('ABSPATH')) return; // Exit if accessed directly. | |
// Attention | |
// You must have ACF and ACF Extended installed, you need a group made with a slug field that will be called 'custom_permalink' and select on which post-type to appear. Example: https://i.imgur.com/aTNpHoU.png | |
// For custom permalink of an archive you have to activate the option here: https://i.imgur.com/SOvcbBj.png and in the group with the field 'custom_permalink' you have to select on which archive to appear, example: https://i.imgur.com/dKLfDEJ.png | |
// Example of an archive: https://i.imgur.com/owENTRB.png if you do not complete 'custom_permalink' then the default will be the '$default_slug' variable | |
// If you do not want custom url rewrite on an archive you can comment the line 'add_filter('post_type_archive_link', [$this, 'archive_link'], 10, 2);' and line '$rules['^' . $custom_url . '/?$'] = $path;' | |
// Replace 'example' with your post-type name |
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
# ---------------------- | |
# Git Command Aliases | |
# ---------------------- | |
# Arg1 = target branch | |
function add_branch() { | |
git checkout -b $1 && git push -u origin $1 | |
} | |
alias add_branch=add_branch |