PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/public/frontend/wp-app.php

https://bitbucket.org/floppyxyz/musical
PHP | 53 lines | 16 code | 10 blank | 27 comment | 1 complexity | f9325a411fbbae3350efb5cc29a1b238 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Atom Publishing Protocol support for WordPress
  4. *
  5. * @version 1.0.5-dc
  6. */
  7. /**
  8. * WordPress is handling an Atom Publishing Protocol request.
  9. *
  10. * @var bool
  11. */
  12. define('APP_REQUEST', true);
  13. /** Set up WordPress environment */
  14. require_once('./wp-load.php');
  15. /** Atom Publishing Protocol Class */
  16. require_once(ABSPATH . WPINC . '/atomlib.php');
  17. /** Atom Server **/
  18. require_once(ABSPATH . WPINC . '/class-wp-atom-server.php');
  19. /** Admin Image API for metadata updating */
  20. require_once(ABSPATH . '/wp-admin/includes/image.php');
  21. $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
  22. // Allow for a plugin to insert a different class to handle requests.
  23. $wp_atom_server_class = apply_filters('wp_atom_server_class', 'wp_atom_server');
  24. $wp_atom_server = new $wp_atom_server_class;
  25. // Handle the request
  26. $wp_atom_server->handle_request();
  27. exit;
  28. /**
  29. * Writes logging info to a file.
  30. *
  31. * @since 2.2.0
  32. * @deprecated 3.4.0
  33. * @deprecated Use error_log()
  34. * @link http://www.php.net/manual/en/function.error-log.php
  35. *
  36. * @param string $label Type of logging
  37. * @param string $msg Information describing logging reason.
  38. */
  39. function log_app( $label, $msg ) {
  40. _deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
  41. if ( ! empty( $GLOBALS['app_logging'] ) )
  42. error_log( $label . ' - ' . $msg );
  43. }