Changeset 1527
- Timestamp:
- 04/30/2015 11:31:29 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r1505 r1527 87 87 add_action( 'pre_get_posts', __NAMESPACE__ . '\\pre_get_posts' ); 88 88 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\theme_scripts_styles' ); 89 add_action( 'wp_head', __NAMESPACE__ . '\\header_js' ); 89 90 add_action( 'add_meta_boxes', __NAMESPACE__ . '\\rename_comments_meta_box', 10, 2 ); 90 91 … … 103 104 add_filter( 'breadcrumb_trail_items', __NAMESPACE__ . '\\breadcrumb_trail_items', 10, 2 ); 104 105 105 add_filter( 'wp_parser_skip_duplicate_hooks', '__return_true' ); 106 add_filter( 'wp_parser_skip_duplicate_hooks', '__return_true' ); 106 107 107 108 } … … 244 245 } 245 246 247 /** 248 * Outputs JavaScript intended to appear in the head of the page. 249 */ 250 function header_js() { 251 // Output CSS to hide markup with the class 'hide-if-js'. Ensures the markup is visible if JS is not present. 252 echo "<script type=\"text/javascript\">jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' );</script>\n"; 253 } 254 246 255 function theme_scripts_styles() { 247 256 wp_enqueue_style( 'dashicons' ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/search.js
r1492 r1527 15 15 } 16 16 } 17 18 // Toggle search bar on page load (it's shown by default).19 toggle_search_bar();20 17 21 18 // Toggle search bar when icon is clicked. -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php
r1327 r1527 6 6 */ 7 7 ?> 8 <div class="search-section section clear ">8 <div class="search-section section clear <?php if ( ! is_page( 'reference' ) ) { echo 'hide-if-js'; } ?>"> 9 9 10 10 <?php if ( is_search() ) { ?>
Note: See TracChangeset
for help on using the changeset viewer.