Instantly share code, notes, and snippets.

View app.js
// The menu object
const menu = {
_courses: {
appetizers: [],
mains: [],
desserts: [],
},
// Getters and Setters
get appetizers() {
View user-can-capabilities
<?php
global $post; // optional
if ( user_can( $post->post_author, 'administrator' ) ) {
echo 'Administrator';
} elseif ( user_can( $post->post_author, 'editor' ) ) {
echo 'Editor';
} elseif ( user_can( $post->post_author, 'author' ) ) {
echo 'Author';
} elseif ( user_can( $post->post_author, 'contributor' ) ) {
echo 'Contributor';
View wpfa-login-form.php
<?php
/**
* WPFA Login Form
* Borrowed from the core login form and used with the shortcode 'bns_login'
* This allows for the 'bns_login' shortcode to accept all of the parameters
* of the `wp_login_form` function as the shortcode attributes.
*
* @package WPFA_Login_Form
* @since 1.0
*
View tha-support.php
<?php
/**
* Theme Hook Alliance Support
* Provide a bridge from the Theme Hook Alliance (THA) hooks to the relevant
* Opus Primus hooks.
*
* @package OpusPrimus
* @since 0.1
*
* @author Opus Primus <in.opus.primus@gmail.com>