Multiuser chat built with React and Firebase. Note that this is on the Firebase free plan, so if more than 50 users are on it things may go south.
A Pen by Brad Daily on CodePen.
| #!/usr/bin/php | |
| <?php | |
| echo PHP_EOL; | |
| echo 'Starting unit tests' . PHP_EOL; | |
| exec( 'phpunit', $test_output, $returnCode ); | |
| if ( 0 !== $returnCode ) { | |
| echo implode( PHP_EOL, $test_output ); | |
| echo PHP_EOL; |
| <?php | |
| /** | |
| * Output HTML markup for forum post list. | |
| * | |
| * @since 1.0.0 | |
| * | |
| * @param integer $post_count Post count. | |
| */ | |
| function skbp_output_forum_posts_list( $post_count = 5 ) { |
| <?php | |
| $url = esc_url( get_post_meta( $post->ID, '_project-url', true ) ); | |
| if ( ! empty( $url ) { | |
| printf( '<p>%s</p>', $url ); | |
| } | |
| ?> |
Multiuser chat built with React and Firebase. Note that this is on the Firebase free plan, so if more than 50 users are on it things may go south.
A Pen by Brad Daily on CodePen.
| <?php | |
| // Force a one column layout if the user is not logged in | |
| add_filter( 'get_theme_layout', 'my_layout_override' ); | |
| function my_layout_override( $layout ) { | |
| if ( ! is_user_logged_in() ) | |
| $layout = 'layout-one-col'; | |
| return $layout; |
| add_action( 'admin_init', 'remove_sb_options_menu', 20 ); | |
| function remove_sb_options_menu() { | |
| remove_submenu_page( 'themes.php', 'sb_admin' ); | |
| } |
| { | |
| "sublimelinter_delay": 0.5, | |
| "sublimelinter_mark_style": "fill", | |
| "jshint_options" : | |
| { | |
| "evil": true, | |
| "regexdash": true, | |
| "browser": true, | |
| "wsh": true, | |
| "trailing": true, |
| add_filter( 'sb_child_option_defaults', 'my_option_defaults' ); |
| add_filter( 'sb_option_defaults', 'my_option_defaults' ); |
| <?php | |
| // Set some new option defaults for our theme | |
| function my_option_defaults( $defaults ) { | |
| // Set some new options | |
| $defaults['option_name'] = 'value'; | |
| $defaults['option_name'] = 'value'; | |
| $defaults['option_name'] = 'value'; | |