Skip to content

Instantly share code, notes, and snippets.

Edward Caissie Cais

Block or report user

Report or block Cais

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Cais
Cais / gravityview-trigger-gform_after_submission-form-20.php
Last active Feb 28, 2019 — forked from zackkatz/gravityview-trigger-gform_after_submission-form-12.php
GravityView - Trigger the `gform_after_submission` action when an entry is edited, but ONLY for Form #20.
View gravityview-trigger-gform_after_submission-form-20.php
<?php
/**
* GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that,
* but ONLY FOR FORM #20.
*
* @param array $form
* @param int $entry_id ID of the entry being updated
* @param GravityView_Edit_Entry_Render $object
*
@Cais
Cais / app.js
Created Aug 13, 2018
Codeacademy PRO Meal Maker
View app.js
// The menu object
const menu = {
_courses: {
appetizers: [],
mains: [],
desserts: [],
},
// Getters and Setters
get appetizers() {
@Cais
Cais / user-can-capabilities
Last active Oct 25, 2017
A conditional check of the post author to reference their capability in a singular template type.
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';
@Cais
Cais / wpfa-login-form.php
Last active Dec 17, 2015
WPFA Login Form
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
*
@Cais
Cais / tha-support.php
Created Feb 6, 2013
Theme Hook Alliance / Opus Primus bridge
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>
You can’t perform that action at this time.