Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| <?php | |
| /** | |
| * Plugin Name: Remember Me | |
| * Description: Play song from Coco when checking the Remember Me checkbox on the login screen. | |
| * Plugin URI: https://gist.github.com/westonruter/86a191a898015f26e603d6594cc282d2 | |
| * Author: Weston Ruter | |
| * Author URI: https://weston.ruter.net | |
| * Gist Plugin URI: https://gist.github.com/westonruter/86a191a898015f26e603d6594cc282d2 | |
| */ |
| <?php | |
| // Create menu section under Tools in WordPress admin | |
| add_action( 'admin_menu', 'docs_admin_menu' ); | |
| // New section under Tools | |
| function docs_admin_menu() { | |
| add_management_page( 'Docs', 'Docs', 'manage_categories', 'docs', 'content_docs_admin_menu' ); | |
| } |
| ( function( blocks, element ) { | |
| var el = element.createElement; | |
| function Stars( { stars } ) { | |
| return el( 'div', { key: 'stars' }, | |
| '★'.repeat( stars ), | |
| ( ( stars * 2 ) % 2 ) ? '½' : '' ); | |
| } | |
| blocks.registerBlockType( 'stars/stars-block', { |
| <?php | |
| $cmb->add_field( array( | |
| 'name' => __( 'Postive numbers', 'theme-domain' ), | |
| 'desc' => __( 'Numbers only', 'msft-newscenter' ), | |
| 'id' => $prefix . 'number', | |
| 'type' => 'text', | |
| 'attributes' => array( | |
| 'type' => 'number', | |
| 'pattern' => '\d*', |
| <?php | |
| /** | |
| * Get first paragraph from a WordPress post. Use inside the Loop. | |
| * | |
| * @return string | |
| */ | |
| function get_first_paragraph(){ | |
| global $post; | |
| $str = wpautop( get_the_content() ); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)