forked from da-anda/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-app.php
53 lines (43 loc) · 1.32 KB
/
wp-app.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* Atom Publishing Protocol support for WordPress
*
* @version 1.0.5-dc
*/
/**
* WordPress is handling an Atom Publishing Protocol request.
*
* @var bool
*/
define('APP_REQUEST', true);
/** Set up WordPress environment */
require_once('./wp-load.php');
/** Atom Publishing Protocol Class */
require_once(ABSPATH . WPINC . '/atomlib.php');
/** Atom Server **/
require_once(ABSPATH . WPINC . '/class-wp-atom-server.php');
/** Admin Image API for metadata updating */
require_once(ABSPATH . '/wp-admin/includes/image.php');
$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
// Allow for a plugin to insert a different class to handle requests.
$wp_atom_server_class = apply_filters('wp_atom_server_class', 'wp_atom_server');
$wp_atom_server = new $wp_atom_server_class;
// Handle the request
$wp_atom_server->handle_request();
exit;
/**
* Writes logging info to a file.
*
* @since 2.2.0
* @deprecated 3.4.0
* @deprecated Use error_log()
* @link http://www.php.net/manual/en/function.error-log.php
*
* @param string $label Type of logging
* @param string $msg Information describing logging reason.
*/
function log_app( $label, $msg ) {
_deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
if ( ! empty( $GLOBALS['app_logging'] ) )
error_log( $label . ' - ' . $msg );
}