开发者 | jameskoster |
---|---|
更新时间 | 2014年9月5日 01:01 |
PHP版本: | 3.3 及以上 |
WordPress版本: | 4.0 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp-ragadjust
to the /wp-content/plugins/
directoryBy default ragajust is applied to p
tags.
Yes, you can use the wpr_elements
filter to make adjustments to the selectors.
To add a new selector:
add_filter( 'wpr_elements', 'wpr_new_selectors' ); function wpr_new_selectors( $elements ) { $elements[] .= '.textwidget'; // Adjust text widgets in addition to p return $elements; }
To remove a current selector:
add_filter( 'wpr_elements', 'wpr_remove_elements' ); function wpr_remove_elements( $elements ) { unset( $elements['0'] ); // Unset 'p'. return $elements; }
To use your own, entirely unique selectors:
add_filter( 'wpr_elements', 'wpr_custom_elements' ); function wpr_custom_elements( $elements ) { $elements = array( 'article', 'footer', ); return $elements; }
These snippets should go in your child themes functions.php file.
Yes. By default all methods will be used to fix all violations. If however you only want to fix prepositions and ignore everything else you can do so via the wpr_method
filter like so:
add_filter( 'wpr_method', 'wpr_custom_method' ); function wpr_custom_method( $method ) { $method = 'prepositions'; return $method; }
The method options are: