There are only two hard things in Computer Science: cache invalidation and naming things. — Phil Karlton
Class names should follow namespacing rules.
| TYPE | PREFIX | EXAMPLE | DESCRIPTION |
| /** | |
| * Modify excerpt read more | |
| * | |
| * @author Paul Allen | |
| */ | |
| function base_modify_read_more_link() { | |
| return '...'; | |
| } | |
| add_filter( 'excerpt_more', 'base_modify_read_more_link' ); |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
| */ | |
| $args = array( |
| [ req ] | |
| default_bits = 2048 | |
| default_keyfile = server-key.pem | |
| distinguished_name = subject | |
| req_extensions = req_ext | |
| x509_extensions = x509_ext | |
| string_mask = utf8only | |
| [ subject ] |
| @mixin vertical-align($position: relative) { | |
| position: $position; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } |
https://github.com/squizlabs/PHP_CodeSniffer
Make sure Composer in your path. If typing phpcs -h in the terminal is not a reconized command, add the following to your .bashrc or .zshrc (for Oh My ZSH).
export PATH="$PATH:$HOME/.composer/vendor/bin"
You should now be able to run the command phpcs.
| # BEGIN EXPIRES | |
| ExpiresActive On | |
| ExpiresDefault "access plus 10 days" | |
| ExpiresByType text/css "access plus 1 week" | |
| ExpiresByType text/plain "access plus 1 month" | |
| ExpiresByType image/svg+xml "access 1 month" | |
| ExpiresByType image/gif "access plus 1 month" | |
| ExpiresByType image/png "access plus 1 month" | |
| ExpiresByType image/jpeg "access plus 1 month" |
sudo nano /etc/hosts
Save with Control + O then Enter followed by Control + X