Lines:
1 to 36 of 36
<?php require_once( JETPACK__PLUGIN_DIR . 'sal/class.json-api-date.php' ); /* class Jetpack_Media */ /* function Jetpack_Media::generate_new_filename() – Generate a filename in function of the original filename of the media. */ /* function Jetpack_Media::get_time_string_from_guid() – File urls use the post (image item) date to generate a folder path. */ /* function Jetpack_Media::get_allowed_mime_types() – Return an array of allowed mime_type items used to upload a media file. */ /* function Jetpack_Media::is_file_supported_for_sideloading() – Checks that the mime type of the file is among those in a filterable list of mime types. */ /* function Jetpack_Media::remove_tmp_file() – Try to remove the temporal file from the given file array. */ /* function Jetpack_Media::save_temporary_file() – Save the given temporal file considering file type, correct location according to the original file path, etc. */ /* function Jetpack_Media::get_snapshot() – Return an object with an snapshot of a revision item. */ /* function Jetpack_Media::register_revision() – Add a new item into revision_history array. */ /* function Jetpack_Media::get_revision_history() – Return the `revision_history` of the given media. */ /* function Jetpack_Media::get_original_media() – Return the original media data */ /* function Jetpack_Media::delete_file() – */ /* function Jetpack_Media::delete_media_history_file() – Try to delete a file according to the dirname of the media attached file and the filename. */ /* function Jetpack_Media::remove_items_from_revision_history() – Remove specific items from the `revision history` array depending on the given criteria: array( ‘from’ => (int) <from>, ‘to’ => (int) <to>, ) */ /* function Jetpack_Media::limit_revision_history() – Limit the number of items of the `revision_history` array. */ /* function Jetpack_Media::clean_original_media() – Remove the original file and clean the post metadata. */ /* function Jetpack_Media::clean_revision_history() – Clean `revision_history` of the given $media_id. it means: – remove all media files tied to the `revision_history` items. */ /* function Jetpack_Media::edit_media_file() – Edit media item process: */ // hook: clean revision history when the media item is deleted /* function clean_revision_history() – */ add_action( 'delete_attachment', 'clean_revision_history' );