| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Put in functions.php | |
| function short_title($limit) { | |
| global $post; | |
| $title = get_the_title($post->ID); | |
| if(strlen($title) > $limit) { | |
| $title = substr($title, 0, $limit) . '...'; | |
| } | |
| echo $title; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .fluid-bg { | |
| background:yellow url('img/400x150.jpg') no-repeat 50% 0; | |
| background-size:100% auto; | |
| height:0; | |
| padding-top:37.5%; /* `150/400 × 100` */ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .video-container { | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| padding-top: 30px; | |
| height: 0; | |
| overflow: hidden; | |
| iframe { | |
| position: absolute; | |
| top: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Plugin Name: Jetpack by WordPress.com | |
| * Plugin URI: http://wordpress.org/extend/plugins/jetpack/ | |
| * Description: Bring the power of the WordPress.com cloud to your self-hosted WordPress. Jetpack enables you to connect your blog to a WordPress.com account to use the powerful features normally only available to WordPress.com users. | |
| * Author: Automattic | |
| * Version: 2.0.4 | |
| * Author URI: http://jetpack.me | |
| * License: GPL2+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
| $('[placeholder]').focus(function() { | |
| var input = $(this); | |
| if (input.val() == input.attr('placeholder')) { | |
| input.val(''); | |
| input.removeClass('placeholder'); | |
| } | |
| }).blur(function() { | |
| var input = $(this); |
NewerOlder