Ticket #10330: xmlrpc.php.diff
| File xmlrpc.php.diff, 794 bytes (added by josephscott, 3 years ago) |
|---|
-
xmlrpc.php
57 57 // Turn off all warnings and errors. 58 58 // error_reporting(0); 59 59 60 // Redirect to HTTPS if FORCE_SSL_ADMIN or FORCE_SSL_LOGIN is true 61 $secure = false; 62 if ( is_ssl( ) || force_ssl_admin( ) || force_ssl_login( ) ) 63 $secure = true; 64 65 if ( $secure && !is_ssl( ) ) { 66 if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { 67 wp_redirect( preg_replace( '|^http://|', 'https://', $_SERVER['REQUEST_URI'] ) ); 68 exit( ); 69 } else { 70 wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 71 exit( ); 72 } 73 } 74 60 75 /** 61 76 * Posts submitted via the xmlrpc interface get that title 62 77 * @name post_default_title
