[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/wp-admin/includes/ -> post.php (summary)

WordPress Post Administration API.

File Size: 1516 lines (49 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 33 functions

  _wp_translate_postdata()
  edit_post()
  bulk_edit_posts()
  get_default_post_to_edit()
  get_default_page_to_edit()
  get_post_to_edit()
  post_exists()
  wp_write_post()
  write_post()
  add_meta()
  delete_meta()
  get_meta_keys()
  get_post_meta_by_id()
  has_meta()
  update_meta()
  _fix_attachment_links()
  _fix_attachment_links_replace_cb()
  _relocate_children()
  get_available_post_statuses()
  wp_edit_posts_query()
  get_post_mime_types()
  get_available_post_mime_types()
  wp_edit_attachments_query()
  postbox_classes()
  get_sample_permalink()
  get_sample_permalink_html()
  _wp_post_thumbnail_html()
  wp_check_post_lock()
  wp_set_post_lock()
  _admin_notice_post_locked()
  wp_create_post_autosave()
  post_preview()
  wp_tiny_mce()

Functions
Functions that are not part of a class:

_wp_translate_postdata( $update = false, $post_data = null )   X-Ref
Rename $_POST data from form names to DB post columns.

Manipulates $_POST directly.

param: bool $update Are we updating a pre-existing post?
param: post_data array Array of post data. Defaults to the contents of $_POST.
return: object|bool WP_Error on failure, true on success.

edit_post( $post_data = null )   X-Ref
Update an existing post with values provided in $_POST.

param: array $post_data Optional.
return: int Post ID.

bulk_edit_posts( $post_data = null )   X-Ref
{@internal Missing Short Description}}

Updates all bulk edited posts/pages, adding (but not removing) tags and
categories. Skips pages when they would be their own parent or child.

return: array

get_default_post_to_edit()   X-Ref
Default post information to use when populating the "Write Post" form.

return: unknown

get_default_page_to_edit()   X-Ref
{@internal Missing Short Description}}

return: unknown

get_post_to_edit( $id )   X-Ref
Get an existing post and format it for editing.

param: unknown_type $id
return: unknown

post_exists($title, $content = '', $date = '')   X-Ref
Determine if a post exists based on title, content, and date

param: string $title Post title
param: string $content Optional post content
param: string $date Optional post date
return: int Post ID if post exists, 0 otherwise.

wp_write_post()   X-Ref
Creates a new post from the "Write Post" form using $_POST information.

return: unknown

write_post()   X-Ref
Calls wp_write_post() and handles the errors.

return: unknown

add_meta( $post_ID )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $post_ID
return: unknown

delete_meta( $mid )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $mid
return: unknown

get_meta_keys()   X-Ref
Get a list of previously defined keys.

return: unknown

get_post_meta_by_id( $mid )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $mid
return: unknown

has_meta( $postid )   X-Ref
{@internal Missing Short Description}}

Some postmeta stuff.

param: unknown_type $postid
return: unknown

update_meta( $meta_id, $meta_key, $meta_value )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $meta_id
param: unknown_type $meta_key
param: unknown_type $meta_value
return: unknown

_fix_attachment_links( $post_ID )   X-Ref
Replace hrefs of attachment anchors with up-to-date permalinks.

param: unknown_type $post_ID
return: unknown

_fix_attachment_links_replace_cb($match)   X-Ref
No description

_relocate_children( $old_ID, $new_ID )   X-Ref
Move child posts to a new parent.

param: unknown_type $old_ID
param: unknown_type $new_ID
return: unknown

get_available_post_statuses($type = 'post')   X-Ref
{@internal Missing Short Description}}

param: unknown_type $type
return: unknown

wp_edit_posts_query( $q = false )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $q
return: unknown

get_post_mime_types()   X-Ref
Get default post mime types

return: array

get_available_post_mime_types($type = 'attachment')   X-Ref
{@internal Missing Short Description}}

param: unknown_type $type
return: unknown

wp_edit_attachments_query( $q = false )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $q
return: unknown

postbox_classes( $id, $page )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $id
param: unknown_type $page
return: unknown

get_sample_permalink($id, $title = null, $name = null)   X-Ref
{@internal Missing Short Description}}

param: int|object $id    Post ID or post object.
param: string $title (optional) Title
param: string $name (optional) Name
return: array With two entries of type string

get_sample_permalink_html( $id, $new_title = null, $new_slug = null )   X-Ref
sample permalink html

intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.

param: int|object $id Post ID or post object.
param: string $new_title (optional) New title  
param: string $new_slug (optional) New slug
return: string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.

_wp_post_thumbnail_html( $thumbnail_id = NULL )   X-Ref
Output HTML for the post thumbnail meta-box.

param: int $thumbnail_id ID of the attachment used for thumbnail
return: string html

wp_check_post_lock( $post_id )   X-Ref
Check to see if the post is currently being edited by another user.

param: int $post_id ID of the post to check for editing
return: bool|int False: not locked or locked by current user. Int: user ID of user with lock.

wp_set_post_lock( $post_id )   X-Ref
Mark the post as currently being edited by the current user

param: int $post_id ID of the post to being edited
return: bool Returns false if the post doesn't exist of there is no current user

_admin_notice_post_locked()   X-Ref
Outputs the notice message to say that someone else is editing this post at the moment.

return: none

wp_create_post_autosave( $post_id )   X-Ref
Creates autosave data for the specified post from $_POST data.


post_preview()   X-Ref
Save draft or manually autosave for showing preview.

return: str URL to redirect to show the preview

wp_tiny_mce( $teeny = false, $settings = false )   X-Ref
Adds the TinyMCE editor used on the Write and Edit screens.

param: bool $teeny optional Output a trimmed down version used in Press This.
param: mixed $settings optional An array that can add to or overwrite the default TinyMCE settings.



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