Making WordPress.org


Ignore:
Timestamp:
06/01/2016 02:55:27 PM (8 years ago)
Author:
ocean90
Message:

Translate: Bring header in line with the header of make/polyglots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/class-plugin.php

    r3014 r3285  
    4141        add_filter( 'pre_handle_404', array( $this, 'short_circuit_handle_404' ) );
    4242        add_action( 'wp_default_scripts', array( $this, 'bump_script_versions' ) );
     43        add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ) );
     44        add_filter( 'body_class', array( $this, 'wporg_add_make_site_body_class' ) );
    4345
    4446        // Load the API endpoints.
     
    5153
    5254    /**
     55     * Registers a menu location for a sub-navigation.
     56     */
     57    public function after_setup_theme() {
     58        register_nav_menu( 'wporg_header_subsite_nav', 'WordPress.org Header Sub-Navigation' );
     59    }
     60
     61    /**
     62     * Adds the CSS classes from make/polyglots to the body to sync the headline icon.
     63     */
     64    function wporg_add_make_site_body_class( $classes ) {
     65        $classes[] = 'wporg-make';
     66        $classes[] = 'make-polyglots';
     67        return $classes;
     68    }
     69
     70    /**
    5371     * Registers CLI commands if WP-CLI is loaded.
    5472     */
    55     function register_cli_commands() {
     73    public function register_cli_commands() {
    5674        WP_CLI::add_command( 'wporg-translate init-locale', __NAMESPACE__ . '\CLI\Init_Locale' );
    5775    }
Note: See TracChangeset for help on using the changeset viewer.