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 / 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 / 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
*/
@wpmudev-sls
wpmudev-sls / m2-dripped-countdown.php
Last active August 24, 2017 16:46
[Membership] - Dripped memberships countdown
<?php
/*
Plugin Name: [Membership] - Dripped memberships countdown
Plugin URI: https://premium.wpmudev.org/
Description: Adds a countdown for dripped memberships
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
@wpmudev-sls
wpmudev-sls / app-workers-weekly-hours.php
Last active September 16, 2017 18:28
[Appointments +] Set the weekly calendar time slots based on worker start hours for each day
<?php
/*
Plugin Name: [Appointments] - Workers weekly hours
Plugin URI: https://premium.wpmudev.org/
Description: Sets the weekly calendar time slots based on worker start hours for each day
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/