3 * Atom Publishing Protocol support for WordPress
9 * WordPress is handling an Atom Publishing Protocol request.
13 define('APP_REQUEST', true);
15 /** Set up WordPress environment */
16 require_once('./wp-load.php');
18 /** Atom Publishing Protocol Class */
19 require_once(ABSPATH . WPINC . '/atomlib.php');
22 require_once(ABSPATH . WPINC . '/class-wp-atom-server.php');
24 /** Admin Image API for metadata updating */
25 require_once(ABSPATH . '/wp-admin/includes/image.php');
27 $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
29 // Allow for a plugin to insert a different class to handle requests.
30 $wp_atom_server_class = apply_filters('wp_atom_server_class', 'wp_atom_server');
31 $wp_atom_server = new $wp_atom_server_class;
34 $wp_atom_server->handle_request();
39 * Writes logging info to a file.
43 * @deprecated Use error_log()
44 * @link http://www.php.net/manual/en/function.error-log.php
46 * @param string $label Type of logging
47 * @param string $msg Information describing logging reason.
49 function log_app( $label, $msg ) {
50 _deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
51 if ( ! empty( $GLOBALS['app_logging'] ) )
52 error_log( $label . ' - ' . $msg );