/wp-login.php file ' . (($wp_login_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null; else if (!$wp_login_written) /* Otherwise, we need to report that /wp-login.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-login.php file could NOT be patched. Patch NOT written.', true) : null; else if (!$wp_login_patched) /* Otherwise, we need to report that /wp-login.php could NOT be updated. Wrong WordPress® version? */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-login.php file could NOT be patched. Unverifiable.', true) : null; } else /* Otherwise, we need to report that /wp-login.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-login.php file could NOT be patched. File NOT writable.', true) : null; /**/ $load_file = ABSPATH . WPINC . "/load.php"; $load_section = "/([\r\n\t\s ]+)(if( *?)\(( *?)empty( *?)\(( *?)\\\$active_plugins( *?)\)( *?)\|\|( *?)defined( *?)\(( *?)['\"]WP_INSTALLING['\"]( *?)\)( *?)\))/"; $load_replace = "\n\n\t// Modified for full plugin compatiblity.\n\t//if ( empty( \$active_plugins ) || defined( 'WP_INSTALLING' ) )\n\tif ( empty( \$active_plugins ) || ( defined( 'WP_INSTALLING' ) && !preg_match(\"/\/wp-activate\.php/\", \$_SERVER[\"REQUEST_URI\"]) ) )"; /**/ if (file_exists ($load_file) && ($load = file_get_contents ($load_file)) && is_writable ($load_file)) { if ((($load_written = file_put_contents ($load_file, preg_replace ($load_section, $load_replace, $load, 1, $load_patched))) && $load_patched) || ($load_patched_already = $load_patched = strpos ($load, $load_replace))) ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/load.php file ' . (($load_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null; else if (!$load_written) /* Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/load.php file could NOT be patched. Patch NOT written.', true) : null; else if (!$load_patched) /* Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Wrong WordPress® version? */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/load.php file could NOT be patched. Unverifiable.', true) : null; } else /* Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/load.php file could NOT be patched. File NOT writable.', true) : null; /**/ $user_new_file = ABSPATH . "wp-admin/user-new.php"; $user_new_section = "/([\r\n\t\s ]+)(wpmu_signup_user( *?)\(( *?)\\\$new_user_login,( *?)\\\$_REQUEST\[( *?)'email'( *?)\],( *?)array( *?)\(( *?)'add_to_blog'( *?)\=\>( *?)\\\$wpdb->blogid,( *?)'new_role'( *?)\=\>( *?)\\\$_REQUEST\[( *?)'role'( *?)\]( *?)\)( *?)\);)/"; $user_new_replace = "\n\t\t\t// Modified for full plugin compatiblity.\n\t\t\t//wpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) );\n\t\t\twpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) ) );"; /**/ if (file_exists ($user_new_file) && ($user_new = file_get_contents ($user_new_file)) && is_writable ($user_new_file)) { if ((($user_new_written = file_put_contents ($user_new_file, preg_replace ($user_new_section, $user_new_replace, $user_new, 1, $user_new_patched))) && $user_new_patched) || ($user_new_patched_already = $user_new_patched = strpos ($user_new, $user_new_replace))) ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-admin/user-new.php file ' . (($user_new_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null; else if (!$user_new_written) /* Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-admin/user-new.php file could NOT be patched. Patch NOT written.', true) : null; else if (!$user_new_patched) /* Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Wrong WordPress® version? */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-admin/user-new.php file could NOT be patched. Unverifiable.', true) : null; } else /* Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-admin/user-new.php file could NOT be patched. File NOT writable.', true) : null; /**/ $ms_functions_file = ABSPATH . "wp-includes/ms-functions.php"; $ms_functions_section = "/([\r\n\t\s ]+)(return new WP_Error( *?)\(( *?)'user_already_exists'( *?),( *?)__( *?)\(( *?)'That username is already activated.'( *?)\),( *?)\\\$signup( *?)\);)/"; $ms_functions_replace = "\n\t\t\t// Modified for full plugin compatiblity.\n\t\t\t//return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), \$signup);\n\t\t\treturn apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), \$signup), get_defined_vars());"; /**/ if (file_exists ($ms_functions_file) && ($ms_functions = file_get_contents ($ms_functions_file)) && is_writable ($ms_functions_file)) { if ((($ms_functions_written = file_put_contents ($ms_functions_file, preg_replace ($ms_functions_section, $ms_functions_replace, $ms_functions, 1, $ms_functions_patched))) && $ms_functions_patched) || ($ms_functions_patched_already = $ms_functions_patched = strpos ($ms_functions, $ms_functions_replace))) ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/ms-functions.php file ' . (($ms_functions_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null; else if (!$ms_functions_written) /* Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/ms-functions.php file could NOT be patched. Patch NOT written.', true) : null; else if (!$ms_functions_patched) /* Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Wrong WordPress® version? */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/ms-functions.php file could NOT be patched. Unverifiable.', true) : null; } else /* Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error. */ ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your /wp-includes/ms-functions.php file could NOT be patched. File NOT writable.', true) : null; /**/ $ran_mms_patches = true; /* Flag indicating this routine was indeed processed. */ /**/ do_action ("ws_plugin__s2member_during_mms_patches_after", get_defined_vars ()); } /**/ do_action ("ws_plugin__s2member_after_mms_patches", get_defined_vars ()); /**/ return !empty ($ran_mms_patches) ? $ran_mms_patches : false; } } } ?>