Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 2 |
CRAP | n/a |
0 / 0 |
|
| wpcom_add_font_smoothing_antialiased_class | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| wpcom_enqueue_font_smoothing_antialiased_assets | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Apply the new font-smoothing styles. |
| 4 | * |
| 5 | * @package automattic/jetpack-mu-wpcom |
| 6 | */ |
| 7 | |
| 8 | use Automattic\Jetpack\Jetpack_Mu_Wpcom; |
| 9 | |
| 10 | /** |
| 11 | * Adds custom classes to the admin body classes. |
| 12 | * |
| 13 | * @param string $classes Classes for the body element. |
| 14 | * @return string |
| 15 | */ |
| 16 | function wpcom_add_font_smoothing_antialiased_class( $classes ) { |
| 17 | $classes .= ' font-smoothing-antialiased '; |
| 18 | return $classes; |
| 19 | } |
| 20 | add_filter( 'admin_body_class', 'wpcom_add_font_smoothing_antialiased_class' ); |
| 21 | |
| 22 | /** |
| 23 | * Enqueue assets |
| 24 | */ |
| 25 | function wpcom_enqueue_font_smoothing_antialiased_assets() { |
| 26 | wp_enqueue_style( |
| 27 | 'wpcom-font-smoothing-antialiased', |
| 28 | plugins_url( 'font-smoothing-antialiased.css', __FILE__ ), |
| 29 | array(), |
| 30 | Jetpack_Mu_Wpcom::PACKAGE_VERSION |
| 31 | ); |
| 32 | } |
| 33 | add_action( 'admin_enqueue_scripts', 'wpcom_enqueue_font_smoothing_antialiased_assets' ); |