This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Save and restore the current network state. | |
* | |
* By using this class, you can avoid unnecessary | |
* switch_to_blog()-restore_current_blog()-switch_to_blog()-... excesses. | |
*/ | |
class NetworkState { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # -*- coding: utf-8 -*- | |
add_filter( 'mlp_redirect_url', function ( $url, array $match ) { | |
// If this is the home page, any URL is fine. | |
if ( is_home() || is_front_page() ) { | |
return $url; | |
} | |
// Prepare the HTTP language code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # -*- coding: utf-8 -*- | |
add_action( 'inpsyde_mlp_init', function () { | |
remove_action( 'inpsyde_mlp_loaded', 'mlp_feature_redirect' ); | |
} ); | |
add_action( 'mlp_and_wp_loaded', function ( Inpsyde_Property_List_Interface $plugin_data ) { | |
if ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Hide Non-public Sites | |
* Description: This is a simple add-on for the MultilingualPress plugin to hide non-public sites (i.e., languages) from translation lists such as the Language Switcher widget or the Quicklinks. | |
* Author: Inpsyde GmbH, tf | |
* Author URI: http://inpsyde.com | |
* Version: 2015-09-16 | |
* License: GPL-3.0 | |
* Network: true | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Gravity Forms capabilities. | |
*/ | |
add_filter( 'user_has_cap', | |
function( $caps ) { | |
if ( ! empty( $caps[ 'edit_pages' ] ) ) | |
// user has edit capabilities | |
foreach ( array( | |
'gravityforms_delete_entries', |