X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..baca9ce86a38dc54c4574890ee2d352fd81f78b2:/wp-admin/includes/media.php diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ff77e6c0..3938943a 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -7,11 +7,11 @@ */ /** - * {@internal Missing Short Description}} + * Defines the default media upload tabs * * @since 2.5.0 * - * @return unknown + * @return array default tabs */ function media_upload_tabs() { $_default_tabs = array( @@ -25,12 +25,12 @@ function media_upload_tabs() { } /** - * {@internal Missing Short Description}} + * Adds the gallery tab back to the tabs array if post has image attachments * * @since 2.5.0 * - * @param unknown_type $tabs - * @return unknown + * @param array $tabs + * @return array $tabs with gallery if post has image attachment */ function update_gallery_tab($tabs) { global $wpdb; @@ -62,15 +62,9 @@ add_filter('media_upload_tabs', 'update_gallery_tab'); * @since 2.5.0 */ function the_media_upload_tabs() { - global $redir_tab, $is_iphone; + global $redir_tab; $tabs = media_upload_tabs(); - - if ( $is_iphone ) { - unset($tabs['type']); - $default = 'type_url'; - } else { - $default = 'type'; - } + $default = 'type'; if ( !empty($tabs) ) { echo "
" . sprintf( __( 'You are about to delete %s.' ), $filename ) . "
+ " . __( 'Continue' ) . " " . __( 'Cancel' ) . "" . join( "
\n", array_unique( (array) $field['helps'] ) ) . '
'; + $item .= "' . __('The web browser on your device cannot be used to upload files. You may be able to use the native app for your device instead.') . '
'; return; + } $upload_action_url = admin_url('async-upload.php'); $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0; @@ -1310,9 +1489,8 @@ function media_upload_form( $errors = null ) { ?>- +
@@ -1869,7 +2050,7 @@ foreach ($arc_result as $arc_row) { - + @@ -1907,20 +2088,21 @@ jQuery(function($){ } /** - * {@internal Missing Short Description}} + * Creates the form for external url * * @since 2.7.0 * - * @return unknown + * @param string $default_view + * @return string the form html */ function wp_media_insert_url_form( $default_view = 'image' ) { if ( !apply_filters( 'disable_captions', '' ) ) { $caption = '- + * | @@ -1951,7 +2133,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) { |
---|---|
- + * | @@ -1961,7 +2143,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) { |
- + |
' . __('Alt text for the image, e.g. “The Mona Lisa”') . ' |
@@ -1983,7 +2165,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) {
- + | @@ -2008,69 +2190,52 @@ function wp_media_insert_url_form( $default_view = 'image' ) { } -function _insert_into_post_button($type) { - if ( !post_type_supports(get_post_type($_GET['post_id']), 'editor') ) - return ''; - - if ( 'image' == $type ) - return ' - |
- | - - | -
- | - ' . get_submit_button( __( 'Insert into Post' ), 'button', 'insertonlybutton', false ) . ' - | -