This file contains 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
if( !function_exists('wpmu_hide_itmes') ): | |
function wpmu_hide_itmes($buttons) | |
{ | |
//do not remoe any button if its super admin or pro users | |
if(current_user_can('pro') or is_super_admin() ) return $buttons; | |
//Remove the text color selector | |
$remove = array( 'msp_shortcodes_button', 'wsalestoolbox_tc_button', 'icon' ); |
This file contains 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 | |
/* | |
This simple snippet willy disable plugin per site basis. | |
Replace 2,3,4 with acutal website ID(s) for those you want to disable this plugin | |
This snippet can also be used to disable any network activated plugin. Only thing you have to do is copy the folder and file name of plugin e.g akismet/akismet.php | |
*/ | |
add_filter('site_option_active_sitewide_plugins', 'wpmu_modify_sitewide_plugins'); | |
function wpmu_modify_sitewide_plugins($value) { | |
global $current_blog; |
This file contains 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
function hide_update_noticee_to_all_but_admin_users() | |
{ | |
if (!current_user_can('update_core')) { | |
remove_all_actions( 'admin_notices' ); | |
} | |
} | |
add_action( 'admin_head', 'hide_update_noticee_to_all_but_admin_users', 1 ); |
This file contains 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 | |
function wpmu_add_cimy_extra_fileds_in_edit_form($feilds, $object){ | |
$user_ID = get_current_user_id(); | |
$user_meta_values = get_cimyFieldValue($user_ID, false); | |
if($user_meta_values){ | |
//Unset now, we will add those later, at the end :) | |
unset($feilds['submit'], $feilds['_wpnonce'], $feilds['action']); |
This file contains 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 | |
if ( ! function_exists( 'remove_anonymous_object_filter' ) ) | |
{ | |
/** | |
* Remove an anonymous object filter. | |
* | |
* @param string $tag Hook name. | |
* @param string $class Class name | |
* @param string $method Method name |
This file contains 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 | |
function listmembers_func( $atts, $content ) { | |
if ( !defined( 'MS_PLUGIN' ) ) return $content; | |
$blogusers = get_users( 'blog_id=1&orderby=nicename&role=subscriber' ); | |
// Array of stdClass objects. | |
$returner = '<table>' ; | |
$returner .= '<tr>' ; | |
$returner .= '<th>First Name</th>'; |
This file contains 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 | |
function wpmu_bookings_export_filter_by_ps($export_data, $event, $booking, $user_data){ | |
//if export all then don't bother. | |
if(! isset( $_GET['paid'] ) ) return $export_data; | |
//check if paid event if yes then proceed other wise return. | |
if ($event->is_premium()) { | |
$payment_status = $event->user_paid($booking->user_id) ? __('Yes', Eab_EventsHub::TEXT_DOMAIN) : __('No', Eab_EventsHub::TEXT_DOMAIN); |
This file contains 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 | |
function wpmu_change_theme_on_all_subsites(){ | |
global $switched; | |
$theme_directory_slug = 'twentyfourteen'; | |
$sites = wp_get_sites( $args ); | |
if($sites){ |
This file contains 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 | |
/** | |
* Plugin Name: Membership 2 Site Limitation | |
* Version: 1.0 | |
* Description: Limit number of blogs a member can create on multisite. | |
* Author: Sajid Javed From Incsub | |
* Author URI: http://premium.wpmudev.org/ | |
*/ | |
class MS_Custom_Addon_Sitelimit { |
This file contains 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_filter( 'coursepress_unit_time_estimation_minutes_and_seconds_format', 'cp_convert_minutes_to_hours', 10, 2 ); | |
function cp_convert_minutes_to_hours( $time ) { | |
$get_minutes = explode(":", $time); | |
if($get_minutes[0] < 90) return $time; | |
$hours = round( ( $get_minutes[0] / 60 ) , 2) ; |
OlderNewer