Skip to content

Instantly share code, notes, and snippets.

@panoslyrakis
panoslyrakis / app_latest_apps_list.php
Created June 19, 2017 17:21
Adds a shortcode that lists latest appointments
<?php
/*
Plugin Name: Appointments Latest Appointments List
Plugin URI: https://premium.wpmudev.org/
Description: Adds a shortcode that lists latest appointments
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@panoslyrakis
panoslyrakis / mp-product-inventory-rest-api.php
Created June 22, 2017 09:37
Manage products inventory via REST API
<?php
/*
Plugin Name: MarketPress Manage inventory via REST
Plugin URI: https://premium.wpmudev.org/
Description: Manage products inventory via REST API
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@panoslyrakis
panoslyrakis / ms-edit-invoice-gateways.php
Last active June 28, 2017 08:54
Membership - Edit invoice gateways
<?php
/*
Plugin Name: Membership - Edit invoice gateways
Plugin URI: https://premium.wpmudev.org/
Description: Adds a new field for gateway option in billing info
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@panoslyrakis
panoslyrakis / ps-limit-plugins.php
Last active July 1, 2017 21:10
Pro Sites - Limit plugins per level
<?php
/*
Plugin Name: Pro Sites - Limit plugins per level
Plugin URI: https://premium.wpmudev.org/
Description: Allow specific number of plugins to be available per level. Requires Pro Sites plugin
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@panoslyrakis
panoslyrakis / ps-notice-by-level.php
Created July 1, 2017 14:57
Pro Sites - Notification for pro site owners
<?php
/*
Plugin Name: Pro Sites - Notification for pro site owners
Plugin URI: https://premium.wpmudev.org/
Description: Displays different notifications for users if they are logged out, logged in but don't have a pro site, logged in and have at least one pro site.
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@panoslyrakis
panoslyrakis / app-redirect-to-checkout-page.php
Created July 13, 2017 10:43
Redirect to checkout page after appointment made
<?php
//Requires App+ and MarketPress
add_action( 'wp_footer', function(){
global $post;
if( ! $post instanceof WP_Post || strpos( $post->post_content, '[app_' ) === false || ! function_exists('mp_store_page_url') ){
return;
}
@panoslyrakis
panoslyrakis / mp-hide-address-section-in-checkout.phpt
Created July 13, 2017 10:46
Hide address section in MarketPress checkout page
<?php
add_filter( 'mp_checkout/sections_array', function( $sections ){
if( isset( $sections['billing-shipping-address'] ) ){
unset( $sections['billing-shipping-address'] );
}
return $sections;
}, 10 );
@panoslyrakis
panoslyrakis / ms-default-registration-page.php
Last active November 6, 2018 17:38
Membership2 - Use default registration page
<?php
/*
Plugin Name: Membership2 - Use default registration page
Plugin URI: https://premium.wpmudev.org/
Description: Use the WordPress default registration page
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@panoslyrakis
panoslyrakis / custom-attachments-list.php
Created July 24, 2017 21:26
List images and sort them by term via ajax
<?php
/*
Plugin Name: WPMUDEV - List Attachmetns
Plugin URI: https://premium.wpmudev.org/
Description: List attachments and sort them via ajax
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@panoslyrakis
panoslyrakis / events-metabox-for-address.php
Created July 25, 2017 11:48
Add PostalAddress metabox to events. Can be used in events schema
<?php
/*
Plugin Name: WPMUDEV - Events PostalAddress
Plugin URI: https://premium.wpmudev.org/
Description: Add PostalAddress metabox to events
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/