Changeset 4924 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php
- Timestamp:
- 02/18/2017 02:27:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php
r4178 r4924 25 25 return $locations; 26 26 }, 50, 4 ); 27 28 function wporg_gp_is_index() { 29 return GP::$current_route instanceof \WordPressdotorg\GlotPress\Routes\Routes\Index; 30 } 31 32 /** 33 * Prints JavaScript helper for menu toggle. 34 */ 35 add_action( 'gp_footer', function() { 36 ?> 37 <script> 38 ( function( $ ) { 39 $( function() { 40 var $menu = $( '#site-navigation' ); 41 42 if ( $menu.length ) { 43 $menu.find( 'button' ).on( 'click', function() { 44 $menu.toggleClass( 'toggled' ); 45 } ); 46 } 47 } ); 48 } )( jQuery ); 49 </script> 50 <?php 51 } );
Note: See TracChangeset
for help on using the changeset viewer.