archived == '1' ) { if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) return WP_CONTENT_DIR . '/blog-suspended.php'; else wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) ); } require_once( ABSPATH . WPINC . '/pluggable.php' ); //setup proper urls if ( version_compare( $wp_version, '3.0.9', '>' ) ) { $ust_admin_url = network_admin_url( 'settings.php?page=ust' ); } else { $ust_admin_url = network_admin_url( 'ms-admin.php?page=ust' ); } //process form $email_sent = $error1 = $error2 = $reason = false; if ( isset( $_POST['wp-submit'] ) && ! get_option( 'ust_email_sent' ) ) { $reason = wp_filter_nohtml_kses( stripslashes( trim( $_POST['reason'] ) ) ); if ( strlen( $reason ) < 20 ) { $error1 = '

' . __( "Please enter a valid reason.", 'ust' ) . '

'; } //check reCAPTCHA $recaptcha = get_site_option( 'ust_recaptcha' ); if ( $recaptcha['privkey'] ) { $resp = ust_recaptcha_check_answer( $recaptcha['privkey'], $_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"] ); if ( ! $resp ) { $error2 = '

' . __( "The reCAPTCHA wasn't entered correctly. Please try again.", 'ust' ) . '

'; } } if ( ! $error1 && ! $error2 ) { $admin_email = get_site_option( "admin_email" ); $user_email = get_option( 'admin_email' ); $review_url = $ust_admin_url . "&tab=splogs&bid=$blog_id"; $message_headers = "MIME-Version: 1.0\n" . "From: $user_email\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n"; $subject = sprintf( __( 'Splog Review Request: %s', 'ust' ), get_bloginfo( 'url' ) ); $message = sprintf( __( "Someone is disputing the spam status for the blog %s (%s).\nHere is their reason:\n_______________________\n\n%s\n\n_______________________\n", 'ust' ), get_bloginfo( 'name' ), get_bloginfo( 'url' ), $reason ); $message .= sprintf( __( "Review: %s\n", 'ust' ), $review_url ); wp_mail( $admin_email, $subject, $message, $message_headers ); //save that the email was sent update_option( 'ust_email_sent', '1' ); $email_sent = true; } } $auto_spammed = get_option( 'ust_auto_spammed' ); //fixes css urls to be from home site so they are not blocked function override_css_url( $url ) { return str_replace( site_url( '/' ), network_site_url( '/' ), $url ); } add_filter( 'style_loader_src', 'override_css_url' ); /** * Output the login page header. * * @param string $title Optional. WordPress Log In Page title to display in element. Default 'Log In'. * @param string $message Optional. Message to display in header. Default empty. * @param WP_Error $wp_error Optional. The error to pass. Default empty. */ function login_header( $title = 'Log In', $message = '', $wp_error = '' ) { global $error, $interim_login, $action; // Don't index any of these forms add_action( 'login_head', 'wp_no_robots' ); if ( wp_is_mobile() ) { add_action( 'login_head', 'wp_login_viewport_meta' ); } if ( empty( $wp_error ) ) { $wp_error = new WP_Error(); } ?><!DOCTYPE html> <!--[if IE 8]> <html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(IE 8) ]><!--> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>"/> <title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> site_name; } else { $login_header_url = __( 'https://wordpress.org/' ); $login_header_title = __( 'Powered by WordPress' ); } $classes = array( 'login-action-' . $action, 'wp-core-ui' ); if ( wp_is_mobile() ) { $classes[] = 'mobile'; } if ( is_rtl() ) { $classes[] = 'rtl'; } if ( $interim_login ) { $classes[] = 'interim-login'; ?>

add( 'error', $error ); unset( $error ); } if ( $wp_error->get_error_code() ) { $errors = ''; $messages = ''; foreach ( $wp_error->get_error_codes() as $code ) { $severity = $wp_error->get_error_data( $code ); foreach ( $wp_error->get_error_messages( $code ) as $error_message ) { if ( 'message' == $severity ) { $messages .= ' ' . $error_message . "
\n"; } else { $errors .= ' ' . $error_message . "
\n"; } } } if ( ! empty( $errors ) ) { /** * Filter the error messages displayed above the login form. * * @since 2.1.0 * * @param string $errors Login error message. */ echo '
' . apply_filters( 'login_errors', $errors ) . "
\n"; } if ( ! empty( $messages ) ) { /** * Filter instructional messages displayed above the login form. * * @since 2.5.0 * * @param string $messages Login messages. */ echo '

' . apply_filters( 'login_messages', $messages ) . "

\n"; } } } // End of login_header() /** * Outputs the footer for the login page. * * @param string $input_id Which input to auto-focus */ function login_footer( $input_id = '' ) { ?>

detailed reasons using the form below:', 'ust' ); ?>

'; echo $error2; echo '
'; echo '
'; } ?>