Skip to content

Instantly share code, notes, and snippets.

View wpmudev-sls's full-sized avatar

WPMUDEV SLS Snippets - Unofficial wpmudev-sls

View GitHub Profile
@wpmudev-sls
wpmudev-sls / ps-checkout-shortcode.php
Created August 12, 2017 14:25 — forked from panoslyrakis/ps-checkout-shortcode.php
Provides a shortcode to add the Pro Sites checkout form in any page
<?php
/*
Plugin Name: Pro Sites - Checkout Shortcode
Plugin URI: https://premium.wpmudev.org/
Description: Provides a shortcode to add the Pro Sites checkout form in any page
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / m2-protect-post-excerpt-in-archive.php
Last active August 12, 2017 14:52 — forked from panoslyrakis/m2-protect-post-excerpt-in-archive.php
[Membership 2 Pro] Hide the excerpt in the archive list
<?php
//Membership 2 Pro
add_filter( 'the_excerpt', '_wpmudev_ms_custom_content_protection', 20, 1 );
add_filter( 'the_content', '_wpmudev_ms_custom_content_protection', 20, 1 );
function _wpmudev_ms_custom_content_protection( $content ){
global $post;
if( ! $post instanceof WP_Post || ! is_archive() ){
@wpmudev-sls
wpmudev-sls / ms2-payment-notification.php
Created August 12, 2017 14:54
[Membership 2 Pro] - Adds payment notices to members that have not paid for subscriptions
<?php
/*
Plugin Name: Membership - Add payment notices
Plugin URI: https://premium.wpmudev.org/
Description: Adds payment notices to members that have not paid
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@wpmudev-sls
wpmudev-sls / wp-custom-attachments-list.php
Created August 12, 2017 14:56
[WordPress] - 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' ) ) {
@wpmudev-sls
wpmudev-sls / wpmudev-autoreload-page-content.php
Last active August 15, 2017 19:22
Custom auto page reload with js
<?php
/*
Plugin Name: Custom auto page reload
Plugin URI: https://premium.wpmudev.org/
Description: It will update the content of the page without member re-loading the page
Version: 2.0
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / ms-force-pending-status.php
Last active August 18, 2017 14:20
[Membership 2 Pro] - Forces Pending status to new subscription made from admin
<?php
/*
Plugin Name: Membership - Force Pending status
Plugin URI: https://premium.wpmudev.org/
Description: Forces Pending status to new subscription made from admin
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
@wpmudev-sls
wpmudev-sls / replace-gettext-cpt.php
Created August 18, 2017 20:40
[WordPress] - Replace gettext on CPT pages
<?php
/*
Plugin Name: Replace gettext on CPT pages
Plugin URI: https://premium.wpmudev.org/
Description: Replace gettext on CPT pages
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / show-cpt-upfront-layout.php
Last active August 21, 2017 12:16
Show Custom Post Type in Upfront Layouts list. Upfront hides 'product' CPT as it relies to ecommerce plugin, this filter will show the CPT in Upfront Layouts list if the CPT was manually created and does not rely on an ecommerce plugin
<?php
/*
Plugin Name: CPT in Upfront Layouts
Plugin URI: https://premium.wpmudev.org/
Description: Display CPT in Upfront existing layouts list
Version: 1.0
Author: Lindeni Mahlalela @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / mp-tos.php
Last active May 22, 2019 03:27
[Marketpress] Adds TOS / Terms of Service / Terms and conditions on checkout page
<?php
/*
Plugin Name: MarketPress Terms of Service
Plugin URI: https://premium.wpmudev.org/
Description: Adds Terms of Service on MarketPress checkout page
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / snippet.php
Created August 23, 2017 08:19
[Membership] - Add editors emails to get copy in auto email responses
<?php
/*
Plugin Name: [Membership] add editors in auto emails
Plugin URI: https://premium.wpmudev.org/
Description: Adds editors emails in the "Send copy to Administrator"
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/