WordPress.org

Making WordPress.org

Changeset 2279


Ignore:
Timestamp:
01/12/2016 05:22:50 PM (4 years ago)
Author:
ocean90
Message:

Translate: Add the no-js class to the list of body classes.

See #1352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/public_html/gp-templates-new/helper-functions.php

    r2118 r2279  
    22wp_register_style( 'wporg-translate', 'https://wordpress.org/translate/gp-templates-new/style.css', array( 'base' ), '20151123' );
    33gp_enqueue_style( 'wporg-translate' );
     4
     5/**
     6 * Adds custom classes to the array of body classes.
     7 *
     8 * @param array $classes An array of body classes.
     9 * @return array Filtered body classes.
     10 */
     11function wporg_gp_template_body_classes( $classes ) {
     12    $classes[] = 'no-js';
     13    return $classes;
     14}
     15add_filter( 'body_class', 'wporg_gp_template_body_classes' );
    416
    517add_action( 'gp_tmpl_load_locations', function( $locations, $template, $args, $template_path ) {
Note: See TracChangeset for help on using the changeset viewer.