I hereby claim:
- I am levymetal on github.
- I am levymetal (https://keybase.io/levymetal) on keybase.
- I have a public key whose fingerprint is 9B4B CA67 E4CB 4791 1894 BA66 A223 AEAA B714 64F3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| function my_wp_nav_menu( $theme_location = 'primary', $container = false, $items_wrap = "<div class='widget'><nav><ul>%3\$s</ul></nav></div>" ) { | |
| $menu = wp_nav_menu(array( | |
| 'container' => $container, | |
| 'items_wrap' => $items_wrap, | |
| 'sub_menu' => true, | |
| 'theme_location' => $theme_location, | |
| 'echo' => false | |
| )); |
| <?php | |
| /** | |
| * Allow hypenated usernames | |
| * | |
| * @wp-hook wpmu_validate_user_signup | |
| * @param array $result | |
| * @return array | |
| */ | |
| function wpse_59760_allow_hyphenated_usernames( $result ) { |
| $('.input-text.qty', 'ul.products').on('input', function() { | |
| $(this).closest('li').find('.add_to_cart_button').data('quantity', $(this).val()); | |
| }); |
| tell application "Finder" | |
| tell the front Finder window | |
| -- get the current bounds of the finder window | |
| set b to the bounds | |
| -- create a really wide window | |
| set the bounds to {item 1 of b, item 2 of b, 3000, item 4 of b} | |
| -- set window back to its original size | |
| set the bounds to b | |
| end tell | |
| end tell |
| #sub-menu ul li { | |
| display: none; | |
| } | |
| #sub-menu .menu > li > a { | |
| display: none; | |
| } | |
| #sub-menu ul .current-menu-item, | |
| #sub-menu ul .current-menu-item li, |
| <?php | |
| error_reporting( 0 ); // don't let any php errors ruin the feed | |
| $username = 'username'; | |
| $number_tweets = 4; | |
| $feed = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name={$username}&count={$number_tweets}&include_rts=1"; | |
| $cache_file = dirname(__FILE__).'/cache/'.'twitter-cache'; | |
| $modified = filemtime( $cache_file ); | |
| $now = time(); |
| <?php | |
| $ch = curl_init(); | |
| //set the endpoint url | |
| curl_setopt($ch,CURLOPT_URL, 'https://api.twitter.com/oauth2/token'); | |
| // has to be a post | |
| curl_setopt($ch,CURLOPT_POST, true); | |
| $data = array(); | |
| $data['grant_type'] = "client_credentials"; |
| <?php | |
| wp_nav_menu( array( | |
| 'menu' => 'Menu Name', | |
| 'sub_menu' => true, | |
| 'direct_parent' => true | |
| ) ); |
| <?php | |
| function my_custom_submenu() { | |
| global $post; | |
| $menu_items = wp_get_nav_menu_items('Menu'); | |
| $current_menu_id = 0; | |
| // get current top level menu item id | |
| foreach ( $menu_items as $item ) { |