WordPress Development Notes Notes
There is no need to translate HTML <a href="%1$s" rel="tag">%2$s</a>
.
<?php
printf(
__( '<a href="%1$s" rel="tag">%2$s</a>', 'text-domain' ),
esc_url( wpcom_vip_get_term_link( $tag->term_id, $tag->taxonomy ) ),
esc_html( $tag->name )
);
?>
sprintf
for translating variables.sprintf( __( '%1$s', 'text-domain' ), esc_html( $tag ) )
cd ~
composer create-project wp-coding-standards/wpcs --no-dev
.bash_profile
or bash replacement (.zshrc
)export PATH="$PATH:$HOME/wpcs/vendor/bin"
phpcs --config-set installed_paths ~/wpcs
phpcs --config-set default_standard WordPress-VIP