Skip to content

Instantly share code, notes, and snippets.

Michael Cannon michael-cannon

Block or report user

Report or block michael-cannon

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
@michael-cannon
michael-cannon / cbqe-learndash-lms.php
Last active Aug 29, 2015
LearnDash LMS for Custom Bulk/Quick Edit plugin
View cbqe-learndash-lms.php
<?php
/**
* LearnDash LMS for Custom Bulk/Quick Edit plugin
*
* Download and unpack this Gist into your theme folder. Then include this script itself in your theme's `functions.php` file via…
*
* require_once get_stylesheet_directory() . '/35b676bb68eee50737f3/cbqe-learndash-lms.php';
*
* In WordPress Admin > Settings > Custom Bulk/Quick, configure your fields as needed, per below. If configuration updates are needed, either manually edit them or remove the current field configuration and click Save Changes for automatic updates.
*
@michael-cannon
michael-cannon / cbqe-restrict-content-pro.php
Last active Aug 29, 2015
Restrict Content Pro for Custom Bulk/Quick Edit plugin
View cbqe-restrict-content-pro.php
<?php
/**
* Restrict Content Pro for Custom Bulk/Quick Edit plugin
*
* In WordPress Admin > Settings > Custom Bulk/Quick, configure your fields as needed, per below. If configuration updates are needed, either manually edit them or remove the current field configuration and click Save Changes for automatic updates.
*
* Paid Only? - As checkbox
* Show Excerpt? - As checkbox
* Hide from Feed? - As checkbox
* Access Level - As RCP Access Level
@michael-cannon
michael-cannon / cbqe-pilotpress.php
Last active Aug 29, 2015
Pilot Press integration for Custom Bulk/Quick Edit plugin
View cbqe-pilotpress.php
<?php
/**
* Pilot Press integration for Custom Bulk/Quick Edit plugin
*
* @author Michael Cannon <mc@aihr.us>
*/
add_filter( 'manage_post_posts_columns', 'rgp_manage_post_posts_columns' );
add_filter( 'manage_guitarlessons_posts_columns', 'rgp_manage_post_posts_columns' );
@michael-cannon
michael-cannon / aihrus_add_to_cart_item.php
Last active Aug 29, 2015
Modify the item being added to the cart during EDD Software License renewal. Why? A year ago, I offered a single, cheap unlimited license, but that's not a sustainable business model. Overtime, I raised the price and built up to 4 licensing levels. This script looks too see if a license renewal is happening and correct the pricing from unlimited…
View aihrus_add_to_cart_item.php
<?php
add_filter( 'edd_add_to_cart_item', 'aihrus_add_to_cart_item' );
function aihrus_add_to_cart_item( $item ) {
if ( empty( $_GET['edd_license_key'] ) ) {
return $item;
} else {
$license = ! empty( $_GET['edd_license_key'] ) ? sanitize_text_field( $_GET['edd_license_key'] ) : false;
if ( ! $license ) {
return $item;
}
@michael-cannon
michael-cannon / tba_register_post_type_args.php
Created Jun 26, 2014
Filter tba_register_post_type_args
View tba_register_post_type_args.php
add_filer( 'tba_register_post_type_args', 'my_tba_register_post_type_args' );
function my_tba_register_post_type_args( $args ) {
$args['exclude_from_search'] = true;
return $args;
}
@michael-cannon
michael-cannon / cbqe_page_sidebar.php
Last active Aug 29, 2015
Sidebar settings for Custom Bulk/Quick Edit Premium
View cbqe_page_sidebar.php
<?php
/**
* Plugin Name: Sidebar for Custom Bulk/Quick Edit Premium
* Plugin URI: http://aihr.us/downloads/custom-bulkquick-edit-premium-wordpress-plugin/
* Author: Michael Cannon <mc@aihr.us>
*/
if ( ! class_exists( 'Custom_Bulkquick_Edit_Settings' ) ) {
return;
View testimonials_widget_premium_form_options.php
add_filter( 'testimonials_widget_cite_html', 'my_testimonials_widget_cite_html', 10, 3 );
function my_testimonials_widget_cite_html( $cite, $testimonial, $atts ) {
if ( ! empty( $testimonial['is-nurse'] ) ) {
$cite .= ', <b>' . $testimonial['is-nurse'] . '</b>';
}
return $cite;
}
View class-redrokk-metabox-class.php
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
*
* @version 2.0
*/
@michael-cannon
michael-cannon / cbqe_menu_swapper.php
Last active Dec 25, 2015
Menu Swapper adaption for Custom Bulk/Quick Edit
View cbqe_menu_swapper.php
<?php
/**
* Menu Swapper adaption for Custom Bulk/Quick Edit Premium
*
* @author Michael Cannon <mc@aihr.us>
* @ref http://wordpress.org/plugins/menu-swapper/
* @ref http://wordpress.org/plugins/custom-bulkquick-edit/
* @ref http://aihr.us/products/custom-bulkquick-edit-premium-wordpress-plugin/
*/
@michael-cannon
michael-cannon / cbqe_post_types_ignore.php
Created Oct 15, 2013
Filter `cbqe_post_types_ignore` Customize the ignored post_types array.
View cbqe_post_types_ignore.php
<?php
add_filter( 'cbqe_post_types_ignore', 'bhc_cbqe_post_types_ignore' );
function bhc_cbqe_post_types_ignore( $post_types ) {
foreach ( $post_types as $key => $value ) {
if ( 'page' == $value )
unset( $post_types[ $key ] );
}
return $post_types;
}
You can’t perform that action at this time.