1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/gechiui-gechiui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
xmlrpc.php 3.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
gechiui Отправлено 31.10.2023 10:09 fb27c55
<?php
/**
* XML-RPC protocol support for GeChiUI
*
* @package GeChiUI
*/
/**
* Whether this is an XML-RPC Request.
*
* @var bool
*/
define( 'XMLRPC_REQUEST', true );
// Discard unneeded cookies sent by some browser-embedded clients.
$_COOKIE = array();
// $HTTP_RAW_POST_DATA was deprecated in PHP 5.6 and removed in PHP 7.0.
// phpcs:disable PHPCompatibility.Variables.RemovedPredefinedGlobalVariables.http_raw_post_dataDeprecatedRemoved
if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
}
// Fix for mozBlog and other cases where '<?xml' isn't on the very first line.
if ( isset( $HTTP_RAW_POST_DATA ) ) {
$HTTP_RAW_POST_DATA = trim( $HTTP_RAW_POST_DATA );
}
// phpcs:enable
/** Include the bootstrap for setting up GeChiUI environment */
require_once __DIR__ . '/gc-load.php';
if ( isset( $_GET['rsd'] ) ) { // https://cyber.harvard.edu/blogs/gems/tech/rsd.html
header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?' . '>';
?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName>GeChiUI</engineName>
<engineLink>https://www.gechiui.com/</engineLink>
<homePageLink><?php bloginfo_rss( 'url' ); ?></homePageLink>
<apis>
<api name="GeChiUI" blogID="1" preferred="true" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ); ?>" />
<api name="Movable Type" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ); ?>" />
<api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ); ?>" />
<api name="Blogger" blogID="1" preferred="false" apiLink="<?php echo site_url( 'xmlrpc.php', 'rpc' ); ?>" />
<?php
/**
* Fires when adding APIs to the Really Simple Discovery (RSD) endpoint.
*
* @link https://cyber.harvard.edu/blogs/gems/tech/rsd.html
*
* @since 3.5.0
*/
do_action( 'xmlrpc_rsd_apis' );
?>
</apis>
</service>
</rsd>
<?php
exit;
}
require_once ABSPATH . 'gc-admin/includes/admin.php';
require_once ABSPATH . GCINC . '/class-IXR.php';
require_once ABSPATH . GCINC . '/class-gc-xmlrpc-server.php';
/**
* Posts submitted via the XML-RPC interface get that title
*
* @name post_default_title
* @var string
*/
$post_default_title = '';
/**
* Filters the class used for handling XML-RPC requests.
*
* @param string $class The name of the XML-RPC server class.
*/
$gc_xmlrpc_server_class = apply_filters( 'gc_xmlrpc_server_class', 'gc_xmlrpc_server' );
$gc_xmlrpc_server = new $gc_xmlrpc_server_class();
// Fire off the request.
$gc_xmlrpc_server->serve_request();
exit;
/**
* logIO() - Writes logging info to a file.
*
* @deprecated 3.4.0 Use error_log()
* @see error_log()
*
* @param string $io Whether input or output
* @param string $msg Information describing logging reason.
*/
function logIO( $io, $msg ) { // phpcs:ignore GeChiUI.NamingConventions.ValidFunctionName.FunctionNameInvalid
_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) {
error_log( $io . ' - ' . $msg );
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/gechiui-gechiui.git
git@api.gitlife.ru:oschina-mirror/gechiui-gechiui.git
oschina-mirror
gechiui-gechiui
gechiui-gechiui
master