mystickymenu
Last commit date
mystickymenu.css
12 years ago
mystickymenu.js
12 years ago
mystickymenu.php
12 years ago
readme.txt
12 years ago
screenshot-1.png
12 years ago
screenshot-2.png
12 years ago
mystickymenu.php
33 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: myStickymenu |
| 4 | Plugin URI: http://wordpress.transformnews.com/plugins/mystickymenu-simple-sticky-fixed-on-top-menu-implementation-for-twentythirteen-menu-269 |
| 5 | Description: Simple sticky (fixed on top) menu implementation for default Twentythirteen navigation menu. For other themes, if navigation class is different than .navbar change it to .your_navbar_class on the beggining of mystickymenu.js script ('.navbar') and inside mystickymenu.css. |
| 6 | Version: 1.0 |
| 7 | Author: m.r.d.a |
| 8 | License: GPLv2 or later |
| 9 | */ |
| 10 | |
| 11 | //remove default option for more link that jumps at the midle of page and its covered by menu |
| 12 | |
| 13 | function remove_more_jump_link($link) { |
| 14 | $offset = strpos($link, '#more-'); |
| 15 | if ($offset) { |
| 16 | $end = strpos($link, '"',$offset); |
| 17 | } |
| 18 | if ($end) { |
| 19 | $link = substr_replace($link, '', $offset, $end-$offset); |
| 20 | } |
| 21 | return $link; |
| 22 | } |
| 23 | add_filter('the_content_more_link', 'remove_more_jump_link'); |
| 24 | |
| 25 | function mystickymenu_script() { |
| 26 | |
| 27 | wp_enqueue_style('mystickymenu',WP_PLUGIN_URL.'/mystickymenu/mystickymenu.css', false,'1.0.0'); |
| 28 | wp_register_script('mystickymenu', WP_PLUGIN_URL. '/mystickymenu/mystickymenu.js', false,'1.0.0', true); |
| 29 | wp_enqueue_script( 'mystickymenu' ); |
| 30 | |
| 31 | } |
| 32 | add_action( 'wp_enqueue_scripts', 'mystickymenu_script' ); |
| 33 | ?> |