[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/ -> wp-app.php (summary)

Atom Publishing Protocol support for WordPress

Author: Original by Elias Torres <http://torrez.us/archives/2006/08/31/491/>
Author: Modified by Dougal Campbell <http://dougal.gunters.org/>
Version: 1.0.5-dc
File Size: 1626 lines (40 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 wp-load.php
 wp-admin/includes/image.php

Defines 1 class

AtomServer:: (51 methods):
  AtomServer()
  handle_request()
  get_service()
  get_categories_xml()
  create_post()
  get_post()
  put_post()
  delete_post()
  get_attachment()
  create_attachment()
  put_attachment()
  delete_attachment()
  get_file()
  put_file()
  get_entries_url()
  the_entries_url()
  get_categories_url()
  the_categories_url()
  get_attachments_url()
  the_attachments_url()
  get_service_url()
  get_entry_url()
  the_entry_url()
  get_media_url()
  the_media_url()
  set_current_entry()
  get_posts()
  get_attachments()
  get_feed()
  get_entry()
  echo_entry()
  ok()
  no_content()
  internal_error()
  bad_request()
  length_required()
  invalid_media()
  forbidden()
  not_found()
  not_allowed()
  redirect()
  client_error()
  created()
  auth_required()
  output()
  escape()
  authenticate()
  get_accepted_content_type()
  process_conditionals()
  rfc3339_str2time()
  get_publish_time()

Defines 51 functions

  log_app()
  wa_posts_where_include_drafts_filter()

Class: AtomServer  - X-Ref

WordPress AtomPub API implementation.

AtomServer()   X-Ref
PHP4 constructor - Sets up object properties.

return: AtomServer

handle_request()   X-Ref
Handle ATOMPUB request.


get_service()   X-Ref
Retrieve XML for ATOMPUB service.


get_categories_xml()   X-Ref
Retrieve categories list in XML format.


create_post()   X-Ref
Create new post.


get_post($postID)   X-Ref
Retrieve post.

param: int $postID Post ID.

put_post($postID)   X-Ref
Update post.

param: int $postID Post ID.

delete_post($postID)   X-Ref
Remove post.

param: int $postID Post ID.

get_attachment($postID = null)   X-Ref
Retrieve attachment.

param: int $postID Optional. Post ID.

create_attachment()   X-Ref
Create new attachment.


put_attachment($postID)   X-Ref
Update attachment.

param: int $postID Post ID.

delete_attachment($postID)   X-Ref
Remove attachment.

param: int $postID Post ID.

get_file($postID)   X-Ref
Retrieve attachment from post.

param: int $postID Post ID.

put_file($postID)   X-Ref
Upload file to blog and add attachment to post.

param: int $postID Post ID.

get_entries_url($page = null)   X-Ref
Retrieve entries URL.

param: int $page Page ID.
return: string

the_entries_url($page = null)   X-Ref
Display entries URL.

param: int $page Page ID.

get_categories_url($deprecated = '')   X-Ref
Retrieve categories URL.

param: mixed $deprecated Optional, not used.
return: string

the_categories_url()   X-Ref
Display category URL.


get_attachments_url($page = null)   X-Ref
Retrieve attachment URL.

param: int $page Page ID.
return: string

the_attachments_url($page = null)   X-Ref
Display attachment URL.

param: int $page Page ID.

get_service_url()   X-Ref
Retrieve service URL.

return: string

get_entry_url($postID = null)   X-Ref
Retrieve entry URL.

param: int $postID Post ID.
return: string

the_entry_url($postID = null)   X-Ref
Display entry URL.

param: int $postID Post ID.

get_media_url($postID = null)   X-Ref
Retrieve media URL.

param: int $postID Post ID.
return: string

the_media_url($postID = null)   X-Ref
Display the media URL.

param: int $postID Post ID.

set_current_entry($postID)   X-Ref
Set the current entry to post ID.

param: int $postID Post ID.

get_posts($page = 1, $post_type = 'post')   X-Ref
Display posts XML.

param: int $page Optional. Page ID.
param: string $post_type Optional, default is 'post'. Post Type.

get_attachments($page = 1, $post_type = 'attachment')   X-Ref
Display attachment XML.

param: int $page Page ID.
param: string $post_type Optional, default is 'attachment'. Post type.

get_feed($page = 1, $post_type = 'post')   X-Ref
Retrieve feed XML.

param: int $page Page ID.
param: string $post_type Optional, default is post. Post type.
return: string

get_entry($postID, $post_type = 'post')   X-Ref
Display entry XML.

param: int $postID Post ID.
param: string $post_type Optional, default is post. Post type.
return: string.

echo_entry()   X-Ref
Display post content XML.


ok()   X-Ref
Set 'OK' (200) status header.


no_content()   X-Ref
Set 'No Content' (204) status header.


internal_error($msg = 'Internal Server Error')   X-Ref
Display 'Internal Server Error' (500) status header.

param: string $msg Optional. Status string.

bad_request()   X-Ref
Set 'Bad Request' (400) status header.


length_required()   X-Ref
Set 'Length Required' (411) status header.


invalid_media()   X-Ref
Set 'Unsupported Media Type' (415) status header.


forbidden($reason='')   X-Ref
Set 'Forbidden' (403) status header.


not_found()   X-Ref
Set 'Not Found' (404) status header.


not_allowed($allow)   X-Ref
Set 'Not Allowed' (405) status header.


redirect($url)   X-Ref
Display Redirect (302) content and set status headers.


client_error($msg = 'Client Error')   X-Ref
Set 'Client Error' (400) status header.


created($post_ID, $content, $post_type = 'post')   X-Ref
Set created status headers (201).

Sets the 'content-type', 'content-location', and 'location'.


auth_required($msg)   X-Ref
Set 'Auth Required' (401) headers.

param: string $msg Status header content and HTML content.

output($xml, $ctype = 'application/atom+xml')   X-Ref
Display XML and set headers with content type.

param: string $xml Display feed content.
param: string $ctype Optional, default is 'atom+xml'. Feed content type.

escape(&$array)   X-Ref
Sanitize content for database usage.

param: array $array Sanitize array and multi-dimension array.

authenticate()   X-Ref
Access credential through various methods and perform login.

return: bool

get_accepted_content_type($types = null)   X-Ref
Retrieve accepted content types.

param: array $types Optional. Content Types.
return: string

process_conditionals()   X-Ref
Process conditionals for posts.


rfc3339_str2time($str)   X-Ref
Convert RFC3339 time string to timestamp.

param: string $str String to time.
return: bool|int false if format is incorrect.

get_publish_time($published)   X-Ref
Retrieve published time to display in XML.

param: string $published Time string.
return: string

Functions
Functions that are not part of a class:

log_app($label,$msg)   X-Ref
Writes logging info to a file.

param: string $label Type of logging
param: string $msg Information describing logging reason.

wa_posts_where_include_drafts_filter($where)   X-Ref
Filter to add more post statuses.

param: string $where SQL statement to filter.
return: string Filtered SQL statement with added post_status for where clause.



Generated: Fri Jan 8 00:19:48 2010 Cross-referenced by PHPXref 0.7