[ Index ]

WordPress Cross Reference

title

Body

[close]

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

WordPress Administration Media API.

File Size: 2708 lines (91 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 1 file
 wp-admin/includes/image-edit.php

Defines 47 functions

  media_upload_tabs()
  update_gallery_tab()
  the_media_upload_tabs()
  get_image_send_to_editor()
  image_add_caption()
  _cleanup_image_add_caption()
  media_send_to_editor()
  media_handle_upload()
  media_handle_sideload()
  wp_iframe()
  media_buttons()
  get_upload_iframe_src()
  media_upload_form_handler()
  wp_media_upload_handler()
  media_sideload_image()
  media_upload_gallery()
  media_upload_library()
  image_align_input_fields()
  image_size_input_fields()
  image_link_input_fields()
  wp_caption_input_textarea()
  image_attachment_fields_to_edit()
  media_single_attachment_fields_to_edit()
  media_post_single_attachment_fields_to_edit()
  image_attachment_fields_to_save()
  image_media_send_to_editor()
  get_attachment_fields_to_edit()
  get_media_items()
  get_media_item()
  get_compat_media_markup()
  media_upload_header()
  media_upload_form()
  media_upload_type_form()
  media_upload_type_url_form()
  media_upload_gallery_form()
  media_upload_library_form()
  wp_media_insert_url_form()
  media_upload_flash_bypass()
  media_upload_html_bypass()
  media_upload_text_after()
  media_upload_max_image_resize()
  multisite_over_quota_message()
  edit_form_image_editor()
  attachment_submitbox_metadata()
  wp_add_id3_tag_data()
  wp_read_video_metadata()
  wp_read_audio_metadata()

Functions
Functions that are not part of a class:

media_upload_tabs()   X-Ref
Defines the default media upload tabs

return: array default tabs

update_gallery_tab($tabs)   X-Ref
Adds the gallery tab back to the tabs array if post has image attachments

param: array $tabs
return: array $tabs with gallery if post has image attachment

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


get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '')   X-Ref
{@internal Missing Short Description}}

param: integer $id image attachment id
param: string $caption image caption
param: string $alt image alt attribute
param: string $title image title attribute
param: string $align image css alignment property
param: string $url image src url
param: string|bool $rel image rel attribute
param: string $size image size (thumbnail, medium, large, full or added  with add_image_size() )
return: string the html to insert into editor

image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' )   X-Ref
Adds image shortcode with caption to editor

param: string $html
param: integer $id
param: string $caption image caption
param: string $alt image alt attribute
param: string $title image title attribute
param: string $align image css alignment property
param: string $url image src url
param: string $size image size (thumbnail, medium, large, full or added with add_image_size() )
return: string

_cleanup_image_add_caption( $matches )   X-Ref
Private preg_replace callback used in image_add_caption()


media_send_to_editor($html)   X-Ref
Adds image html to editor

param: string $html

media_handle_upload($file_id, $post_id, $post_data = array()   X-Ref
This handles the file upload POST itself, creating the attachment post.

param: string $file_id Index into the {@link $_FILES} array of the upload
param: int $post_id The post ID the media is associated with
param: array $post_data allows you to overwrite some of the attachment
param: array $overrides allows you to override the {@link wp_handle_upload()} behavior
return: int the ID of the attachment

media_handle_sideload($file_array, $post_id, $desc = null, $post_data = array()   X-Ref
This handles a sideloaded file in the same way as an uploaded file is handled by {@link media_handle_upload()}

param: array $file_array Array similar to a {@link $_FILES} upload array
param: int $post_id The post ID the media is associated with
param: string $desc Description of the sideloaded file
param: array $post_data allows you to overwrite some of the attachment
return: int|object The ID of the attachment or a WP_Error on failure

wp_iframe($content_func )   X-Ref
Adds the iframe to display content for the media upload page

param: array $content_func

media_buttons($editor_id = 'content')   X-Ref
Adds the media button to the editor

param: string $editor_id

get_upload_iframe_src( $type = null, $post_id = null, $tab = null )   X-Ref
No description

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

return: mixed void|object WP_Error on failure

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

return: mixed

media_sideload_image($file, $post_id, $desc = null)   X-Ref
Download an image from the specified URL and attach it to a post.

param: string $file The URL of the image to download
param: int $post_id The post ID the media is to be associated with
param: string $desc Optional. Description of the image
return: string|WP_Error Populated HTML img tag on success

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

return: unknown

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

return: unknown

image_align_input_fields( $post, $checked = '' )   X-Ref
Retrieve HTML for the image alignment radio buttons with the specified one checked.

param: object $post
param: string $checked
return: string

image_size_input_fields( $post, $check = '' )   X-Ref
Retrieve HTML for the size radio buttons with the specified one checked.

param: object $post
param: bool|string $check
return: array

image_link_input_fields($post, $url_type = '')   X-Ref
Retrieve HTML for the Link URL buttons with the default link type as specified.

param: object $post
param: string $url_type
return: string

wp_caption_input_textarea($edit_post)   X-Ref
No description

image_attachment_fields_to_edit($form_fields, $post)   X-Ref
{@internal Missing Short Description}}

param: array $form_fields
param: object $post
return: array

media_single_attachment_fields_to_edit( $form_fields, $post )   X-Ref
{@internal Missing Short Description}}

param: array $form_fields
param: object $post {@internal $post not used}}
return: array

media_post_single_attachment_fields_to_edit( $form_fields, $post )   X-Ref
{@internal Missing Short Description}}

param: array $form_fields
param: object $post {@internal $post not used}}
return: array

image_attachment_fields_to_save( $post, $attachment )   X-Ref
Filters input from media_upload_form_handler() and assigns a default
post_title from the file name if none supplied.

Illustrates the use of the attachment_fields_to_save filter
which can be used to add default values to any field before saving to DB.

param: object $post
param: array $attachment {@internal $attachment not used}}
return: array

image_media_send_to_editor($html, $attachment_id, $attachment)   X-Ref
{@internal Missing Short Description}}

param: string $html
param: integer $attachment_id
param: array $attachment
return: array

get_attachment_fields_to_edit($post, $errors = null)   X-Ref
{@internal Missing Short Description}}

param: object $post
param: array $errors
return: array

get_media_items( $post_id, $errors )   X-Ref
Retrieve HTML for media items of post gallery.

The HTML markup retrieved will be created for the progress of SWF Upload
component. Will also create link for showing and hiding the form to modify
the image attachment.

param: int $post_id Optional. Post ID.
param: array $errors Errors for attachment, if any.
return: string

get_media_item( $attachment_id, $args = null )   X-Ref
Retrieve HTML form for modifying the image attachment.

param: int $attachment_id Attachment ID for modification.
param: string|array $args Optional. Override defaults.
return: string HTML form for attachment.

get_compat_media_markup( $attachment_id, $args = null )   X-Ref
No description

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


media_upload_form( $errors = null )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $errors

media_upload_type_form($type = 'file', $errors = null, $id = null)   X-Ref
{@internal Missing Short Description}}

param: string $type
param: object $errors
param: integer $id

media_upload_type_url_form($type = null, $errors = null, $id = null)   X-Ref
{@internal Missing Short Description}}

param: string $type
param: object $errors
param: integer $id

media_upload_gallery_form($errors)   X-Ref
Adds gallery form to upload iframe

param: array $errors

media_upload_library_form($errors)   X-Ref
{@internal Missing Short Description}}

param: array $errors

wp_media_insert_url_form( $default_view = 'image' )   X-Ref
Creates the form for external url

param: string $default_view
return: string the form html

media_upload_flash_bypass()   X-Ref
Displays the multi-file uploader message.


media_upload_html_bypass()   X-Ref
Displays the browser's built-in uploader message.


media_upload_text_after()   X-Ref
Used to display a "After a file has been uploaded..." help message.


media_upload_max_image_resize()   X-Ref
Displays the checkbox to scale images.


multisite_over_quota_message()   X-Ref
Displays the out of storage quota message in Multisite.


edit_form_image_editor( $post )   X-Ref
Displays the image and editor in the post editor


attachment_submitbox_metadata()   X-Ref
Displays non-editable attachment metadata in the publish metabox


wp_add_id3_tag_data( &$metadata, $data )   X-Ref
Parse ID3v2, ID3v1, and getID3 comments to extract usable data

param: array $metadata An existing array with data
param: array $data Data supplied by ID3 tags

wp_read_video_metadata( $file )   X-Ref
Retrieve metadata from a video file's ID3 tags

param: string $file Path to file.
return: array|boolean Returns array of metadata, if found.

wp_read_audio_metadata( $file )   X-Ref
Retrieve metadata from a audio file's ID3 tags

param: string $file Path to file.
return: array|boolean Returns array of metadata, if found.



Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu