Skip to content

Commit

Permalink
Alakazam. MMS patches should move. See: wpsharks/s2member#850
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswsinc committed Jan 19, 2016
1 parent bdb4b85 commit e1bd536
Show file tree
Hide file tree
Showing 7 changed files with 390 additions and 1 deletion.
16 changes: 15 additions & 1 deletion s2member-pro/includes/classes/menu-pages.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,19 @@ public static function coupon_codes_page()

include_once dirname(dirname(__FILE__))."/menu-pages/coupon-codes.inc.php";
}

/**
* Builds the Coupon Codes page.
*
* @attaches-to `ws_plugin__s2member_before_mms_ops_page`
*
* @package s2Member\Menu_Pages
* @since 160119
*/
public static function before_mms_ops_page_hook()
{
if(c_ws_plugin__s2member_menu_pages::update_all_options())
c_ws_plugin__s2member_pro_mms_patches::mms_patches(TRUE);
}
}
}
}
1 change: 1 addition & 0 deletions s2member-pro/includes/hooks.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@
add_action('ws_plugin__s2member_after_auto_eot_system', 'c_ws_plugin__s2member_pro_reminders::remind');

add_filter('update_feedback', 'c_ws_plugin__s2member_pro_mms_patches::sync_mms_patches');
add_filter('ws_plugin__s2member_before_mms_ops_page', 'c_ws_plugin__s2member_pro_menu_pages::before_mms_ops_page_hook');
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Modified for full plugin compatiblity.
//if ( empty( $active_plugins ) || wp_installing() )
if ( empty( $active_plugins ) || ( wp_installing() && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
return $plugins;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Modified for full plugin compatiblity.
//return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
return apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup), get_defined_vars());
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Modified for full plugin compatiblity.
//wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ) );
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
case 'register' :
if ( is_multisite() ) {
$sign_up_url = network_site_url( 'wp-signup.php' );
// Multisite uses wp-signup.php
// Modified for full plugin compatiblity.
//wp_redirect( apply_filters( 'wp_signup_location', $sign_up_url ) );
//exit;
}
356 changes: 356 additions & 0 deletions s2member-pro/includes/menu-pages/mms-ops.inc.php

Large diffs are not rendered by default.

0 comments on commit e1bd536

Please sign in to comment.