Changeset 3285 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/class-plugin.php
- Timestamp:
- 06/01/2016 02:55:27 PM (9 years ago)
- 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 41 41 add_filter( 'pre_handle_404', array( $this, 'short_circuit_handle_404' ) ); 42 42 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' ) ); 43 45 44 46 // Load the API endpoints. … … 51 53 52 54 /** 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 /** 53 71 * Registers CLI commands if WP-CLI is loaded. 54 72 */ 55 function register_cli_commands() {73 public function register_cli_commands() { 56 74 WP_CLI::add_command( 'wporg-translate init-locale', __NAMESPACE__ . '\CLI\Init_Locale' ); 57 75 }
Note: See TracChangeset
for help on using the changeset viewer.