Skip to content

Instantly share code, notes, and snippets.

@panoslyrakis
panoslyrakis / wpmudev_cp_custom_course_lists.php
Created February 24, 2017 12:25
Custom courses list for CoursePress Pro
<?php
/**
* Plugin Name: Custom courses list for CoursePress Pro
* Version: 1.0
* Description: Provides a shortcode that outputs a custom list of courses
* Author: Panos Lyrakis (WPMU DEV)
* Author URI: http://premium.wpmudev.org
* Plugin URI: http://premium.wpmudev.org/project/coursepress/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@panoslyrakis
panoslyrakis / wpmudev-app-coupon-price-on-gcal.php
Last active March 23, 2017 07:01
Adds the coupon price of appointments in gcal description. Requires MarketPress
<?php
/**
* Plugin Name: Add coupon price of appointments in gcal
* Version: 1.2.0
* Description: Adds the coupon price of appointments in gcal description
* Author: Panos Lyrakis (WPMU DEV)
* Author URI: https://premium.wpmudev.org/profile/panoskatws
* Plugin URI: https://premium.wpmudev.org/project/appointments-plus/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@panoslyrakis
panoslyrakis / wpmudev-ms-pass-reset-refilter.php
Created March 13, 2017 19:46
Remove default filter from 'the_content' for the password reset page and add a new one to the login hook. This way the rest content of the page will not be lost.
<?php
add_action( 'wp_head', function(){
global $wp_filter, $post;
if( ! class_exists( 'MS_Model_Pages' ) || $post->post_name != MS_Model_Pages::MS_PAGE_ACCOUNT || ! isset( $_GET['action'] ) || $_GET['action'] != 'rp' ){
return;
}
// Originally uses the_content filter in MS_Controller_Frontend::user_account_manager()
// Lets unset it so it displays the login's shortcode MS_View_Shortcode_Login::to_html()
@panoslyrakis
panoslyrakis / coursepress-send-enrollment-notification-to-admin.php
Last active April 2, 2017 21:03
Send enrollment notification to admin and instructors
<?php
add_action( 'coursepress_email_sent-enrollment_confirm', function( $args, $result ){
$course_id = $args['course_id'];
$send_to = array( get_option('admin_email') );
$course_title = get_the_title( $course_id );
$course_instructors = array();
$instructors = (array) CoursePress_Data_Course::get_setting( $course_id, 'instructors', array() );
$instructors = array_filter( $instructors );
@panoslyrakis
panoslyrakis / WPMUDEV_Responsive_Images.php
Created April 4, 2017 16:51
Adds a shortcode that inserts responive images
<?php
/**
* Plugin Name: WPMUDEV Responsive Images
* Version: 1.0
* Description: Adds a shortcode that inserts responive images
* Author: Panos Lyrakis (WPMU DEV)
* Author URI: https://premium.wpmudev.org/profile/panoskatws
* Plugin URI: https://premium.wpmudev.org/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@panoslyrakis
panoslyrakis / wpmudev_mp_dripped_content_notifications.php
Created April 13, 2017 22:59
Send notification to members when dripped content available
<?php
/**
* Plugin Name: Dripped content notifications
* Version: 1.0
* Description: Send notification to members when dripped content available
* Author: Panos Lyrakis (WPMU DEV)
* Author URI: https://premium.wpmudev.org/profile/panoskatws
* Plugin URI: https://premium.wpmudev.org/project/membership/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@panoslyrakis
panoslyrakis / wpmudev_dashboard_quota.php
Created April 18, 2017 16:10
Displays allowed and used space in GB or MB
<?php
/**
* Plugin Name: WPMUDEV Dashboard Quota
* Plugin URI: https://premium.wpmudev.org/
* Description: Displays allowed and used space in GB or MB
* Version: 1.0.0
* Author: Panos Lyrakis @ WPMUDEV
* Author URI: https://premium.wpmudev.org/profile/panoskatws
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@panoslyrakis
panoslyrakis / wpmudev-cpt-mp-integration.php
Last active April 21, 2017 20:35
Sell any custom post type integrating with MarketPress. Requires MarketPress
<?php
/*
Plugin Name: CPT MarketPress integration
Plugin URI: https://premium.wpmudev.org/
Description: Sell any custom post type integrating with MarketPress. Requires MarketPress
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@panoslyrakis
panoslyrakis / ms-custom-date-rules.php
Last active April 27, 2017 07:08
Add custom date rules for Membership Pro
<?php
/*
Plugin Name: MS - Custom Date rules
Plugin URI: https://premium.wpmudev.org/
Description: Add custom date rules for Membership Pro
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@panoslyrakis
panoslyrakis / app-capacity-control.php
Created May 15, 2017 08:47
Add capacity control to services of WPMUDEV Appointments+ plugin
<?php
/*
Plugin Name: Appointments capacity control
Plugin URI: https://premium.wpmudev.org/
Description: Add capacity control to services
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/