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
| jQuery(function($) { | |
| // configure | |
| var comment_input = $( '#commentform textarea' ); | |
| var submit_button = $( '#commentform .form-submit' ); | |
| var comment_limit_chars = 1000; | |
| // stop editing here | |
| // display how many characters are left | |
| $( '<div class="comment_limit_info"><span>' + comment_limit_chars + '</span> characters left</div>' ).insertAfter( comment_input ); | |
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
| - my machine: MacBook Pro with Mac OS X Lion (currently 10.7.2) | |
| - When I connect the Yeti to any of the USB ports of my MacBook Pro, the Mute light shines red but that's all | |
| - not recognized in the "Sound" panel: http://cl.ly/1Y1O2B2j0H0f1C2K1o0z | |
| - does not appear in the "Audio Devices" panel either: http://cl.ly/3y3F0T2U4046202Z0q03 | |
| - tried all USB slots | |
| - directly plugged in, no USB hub | |
| - tried rebooting | |
| - tried different USB cable | |
| - no other devices connected to the MBP | |
| - tried with 3 different Lion Macs: the aforementioned MBP, a MacBook and a MacBook air - same symptoms everywhere |
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 | |
| /** | |
| * My Plugin | |
| * | |
| * @uses add_filter() for 'the_content': make love not content | |
| * @uses add_filter() for 'get_the_excerpt': clearly announce all excerpts | |
| */ | |
| class my_plugin | |
| { | |
| function __construct() { |
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 | |
| class TheTroublesomeButCoolWidget { | |
| public function __construct() { | |
| $this->register_scripts(); | |
| $this->register_shortcode(); | |
| $this->register_setup_hooks(); | |
| } | |
| private function register_scripts() { /* ... */ } | |
| private function register_shortcode() { /* ... */ } | |
| private function register_setup_hooks() { /* ... */ } |
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 | |
| register_activation_hook( __FILE__, 'add_last_activity_for_all_users' ); | |
| function add_last_activity_for_all_users() { | |
| global $wpdb; | |
| $sql = $wpdb->prepare( " | |
| SELECT | |
| u.ID | |
| FROM | |
| $wpdb->users AS u |
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 | |
| class A { | |
| public function foo() { | |
| echo "Hello World"; | |
| } | |
| } | |
| A::foo(); // => Hello World |
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
| </tbody> | |
| </table> |
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 | |
| /** | |
| * Get capability names array of user. | |
| * | |
| * Example output: | |
| * | |
| * Array | |
| * ( | |
| * [1] => Array | |
| * ( |
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
| <table> | |
| <thead> | |
| <tr> | |
| <th></th> | |
| <th></th> | |
| <th></th> | |
| </tr> | |
| </thead> | |
| <tbody> |
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 | |
| /** | |
| * Return array containing all capabilities that user has access to. | |
| * If he is an admin, the list will contain all available capability IDs. | |
| * | |
| * @param $user_id integer | |
| * @return array | |
| */ | |
| function dtpr_get_all_user_capabilities( $user_id ) { | |
| global $wpdb; |