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_action('admin_init', 'wpmudev_delete_recent_plugins_list'); | |
| function wpmudev_delete_recent_plugins_list(){ | |
| delete_option('recently_activated'); | |
| } |
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 | |
| function wpmu_display_membership_expiry_date($atts){ | |
| $returner = ''; | |
| $args = shortcode_atts( array('user_id' => '', | |
| 'membership' => '' | |
| ), $atts); | |
| extract($args); |
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 | |
| // custom die handler | |
| function wpmu_get_custom_die_handler() { | |
| return 'wpmu_custom_css_on_wp_die'; | |
| } | |
| // hook the function | |
| add_filter('wp_die_handler', 'wpmu_get_custom_die_handler' ); | |
| // custom login for theme |
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_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) ; |
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 | |
| /** | |
| * 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 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 | |
| function wpmu_change_theme_on_all_subsites(){ | |
| global $switched; | |
| $theme_directory_slug = 'twentyfourteen'; | |
| $sites = wp_get_sites( $args ); | |
| if($sites){ |
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 | |
| 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 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 | |
| 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 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 | |
| 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 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 | |
| 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']); |