WordPress.org

Make WordPress Core

Ticket #20716: 20716.diff

File 20716.diff, 1.2 KB (added by jeremyfelt, 8 years ago)
  • src/wp-admin/includes/file.php

     
    967967                $error_string = __('<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.');
    968968                if ( is_wp_error($error) )
    969969                        $error_string = esc_html( $error->get_error_message() );
    970                 echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
     970                $error_output = '<div id="message" class="error"><p>' . $error_string . '</p></div>';
    971971        }
    972972
    973973        $types = array();
     
    980980
    981981        $types = apply_filters('fs_ftp_connection_types', $types, $credentials, $type, $error, $context);
    982982
     983        /**
     984         * Filter decision to output the filesystem credentials form.
     985         *
     986         * @since 3.7.0
     987         *
     988         * @param bool null Default true. Set false to disable output.
     989         */
     990        if ( false === apply_filters( 'output_request_filesystem_credentials', true ) )
     991                return false;
     992
     993        // Output any existing error information.
     994        if ( isset( $error_output ) )
     995                echo $error_output;
    983996?>
    984997<script type="text/javascript">
    985998<!--