WordPress.org

Make WordPress Core

Ticket #8590: list_transports.php

File list_transports.php, 647 bytes (added by ryan, 5 years ago)

List Transports plugin

Line 
1<?php
2/*
3Plugin Name: List HTTP Transports
4Plugin URI:
5Description: List available HTTP transports
6Author: Ryan Boren
7Version: 1.0
8Author URI: http://boren.nu/
9*/
10
11function list_transports() {
12        $transport = '';
13        if ( true === WP_Http_ExtHttp::test() )
14                $transport .= 'ExtHttp';
15        if ( true === WP_Http_Curl::test() )
16                $transport .= ' Curl';
17        if ( true === WP_Http_Streams::test() )
18                $transport .= ' Streams';
19        if ( true === WP_Http_Fopen::test() )
20                $transport .= ' Fopen';
21        if ( true === WP_Http_Fsockopen::test() )
22                $transport .= ' Fsockopen';
23
24        echo "Available transports: $transport";
25}
26
27add_action('admin_footer', 'list_transports');
28
29?>