<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[24388] trunk: First pass at removing Post Format UI.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/24388">24388</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2013-05-30 21:33:46 +0000 (Thu, 30 May 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>First pass at removing Post Format UI.
see <a href="http://core.trac.wordpress.org/ticket/24452">#24452</a>. fixes <a href="http://core.trac.wordpress.org/ticket/24455">#24455</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadminadminheaderphp">trunk/wp-admin/admin-header.php</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
<li><a href="#trunkwpadminincludesscreenphp">trunk/wp-admin/includes/screen.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminincludespostformatsphp">trunk/wp-admin/includes/post-formats.php</a></li>
<li><a href="#trunkwpadminjspostformatsjs">trunk/wp-admin/js/post-formats.js</a></li>
<li><a href="#trunkwpadminjspostformatsminjs">trunk/wp-admin/js/post-formats.min.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/admin-ajax.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 'save-widget', 'set-post-thumbnail', 'date_format', 'time_format', 'wp-fullscreen-save-post',
</span><span class="cx"> 'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment',
</span><span class="cx"> 'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
</span><del>- 'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'show-post-format-ui',
</del><ins>+ 'send-attachment-to-editor', 'save-attachment-order', 'heartbeat',
</ins><span class="cx"> );
</span><span class="cx">
</span><span class="cx"> // Register core Ajax calls.
</span></span></pre></div>
<a id="trunkwpadminadminheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-header.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-header.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/admin-header.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -95,39 +95,6 @@
</span><span class="cx"> $post_format = 'standard';
</span><span class="cx">
</span><span class="cx"> $admin_body_class .= ' wp-format-' . $post_format;
</span><del>-
- $show_post_format_ui = false;
-
- if ( apply_filters( 'enable_post_format_ui', true, $post ) ) {
-
- // If the user has explicitly set a screen option, use it, otherwise the UI is shown
- // when the theme supports formats, or if the site has formats assigned to posts.
- $post_format_user_option = get_user_option( 'post_formats_' . $post->post_type );
- if ( false !== $post_format_user_option )
- $show_post_format_ui = (bool) $post_format_user_option;
- else
- $show_post_format_ui = current_theme_supports( 'post-formats' ) || (bool) get_terms( 'post_format', array( 'number' => 1 ) );
-
- if ( ! $show_post_format_ui ) {
- $meta = get_post_format_meta( $post->ID );
- $format_meta_keys = array(
- 'link' => array( 'linkurl' ),
- 'image' => array( 'url', 'image' ),
- 'quote' => array( 'quote_source_name', 'quote_source_url' ),
- 'video' => array( 'video_embed' ),
- 'audio' => array( 'audio_embed' ),
- );
-
- // If there's any structured post format data, enforce the UI display.
- $format_meta_keys = isset( $format_meta_keys[ get_post_format() ] ) ? $format_meta_keys[ get_post_format() ] : array();
- foreach ( $format_meta_keys as $key )
- if ( ! empty( $meta[ $key ] ) )
- $show_post_format_ui = true;
- }
- }
-
- if ( $show_post_format_ui )
- $admin_body_class .= ' wp-post-format-show-ui';
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( wp_is_mobile() )
</span></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/edit-form-advanced.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -112,6 +112,9 @@
</span><span class="cx"> add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', null, 'side', 'core' );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) )
+ add_meta_box( 'formatdiv', _x( 'Format', 'post format' ), 'post_format_meta_box', null, 'side', 'core' );
+
</ins><span class="cx"> // all taxonomies
</span><span class="cx"> foreach ( get_object_taxonomies( $post ) as $tax_name ) {
</span><span class="cx"> $taxonomy = get_taxonomy($tax_name);
</span><span class="lines">@@ -126,73 +129,6 @@
</span><span class="cx"> add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name ));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// post format
-$format_class = '';
-$post_format = '';
-$post_format_options = '';
-if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'enable_post_format_ui', true, $post ) ) {
- wp_enqueue_script( 'post-formats' );
- wp_enqueue_script( 'wp-mediaelement' );
- wp_enqueue_style( 'wp-mediaelement' );
- $post_format = get_post_format();
-
- if ( ! empty( $_REQUEST['format'] ) && in_array( $_REQUEST['format'], get_post_format_slugs() ) )
- $post_format = $_REQUEST['format'];
-
- if ( ! $post_format )
- $post_format = 'standard';
-
- $format_class = " class='wp-format-{$post_format}'";
-
- $all_post_formats = array(
- 'standard' => array (
- 'description' => __( 'Use the editor below to compose your post.' )
- ),
- 'image' => array (
- 'description' => __( 'Select or upload an image for your post.' )
- ),
- 'gallery' => array (
- 'description' => __( 'Use the Add Media button to select or upload images for your gallery.' )
- ),
- 'link' => array (
- 'description' => __( 'Add a link title and destination URL. Use the editor to compose optional text to accompany the link.' )
- ),
- 'video' => array (
- 'description' => __( 'Select or upload a video, or paste a video embed code into the box.' )
- ),
- 'audio' => array (
- 'description' => __( 'Select or upload an audio file, or paste an audio embed code into the box.' )
- ),
- 'chat' => array (
- 'description' => __( 'Copy a chat or Q&A transcript into the editor.' )
- ),
- 'status' => array (
- 'description' => __( 'Use the editor to compose a status update. What’s new?' )
- ),
- 'quote' => array (
- 'description' => __( 'Add a source name and link if you have them. Use the editor to compose the quote.' )
- ),
- 'aside' => array (
- 'description' => __( 'Use the editor to share a quick thought or side topic.' )
- )
- );
-
- foreach ( $all_post_formats as $slug => $attr ) {
- $class = '';
- if ( $post_format == $slug ) {
- $class = 'class="active"';
- $active_post_type_slug = $slug;
- }
-
- $url = add_query_arg( 'format', $slug );
-
- $post_format_options .= '<a ' . $class . ' href="' . esc_url( $url ) . '" data-description="' . $attr['description'] . '" data-wp-format="' . $slug . '" title="' . ucfirst( $slug ) . '"><div class="' . $slug . '"></div><span class="post-format-title">' . ucfirst( $slug ) . '</span></a>';
- }
-
- $current_post_format = array( 'currentPostFormat' => esc_html( $active_post_type_slug ) );
- wp_localize_script( 'post-formats', 'postFormats', $current_post_format );
-}
-
</del><span class="cx"> if ( post_type_supports($post_type, 'page-attributes') )
</span><span class="cx"> add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
</span><span class="cx">
</span><span class="lines">@@ -379,13 +315,7 @@
</span><span class="cx"> <div id="lost-connection-notice" class="error hidden">
</span><span class="cx"> <p><?php _e("You have lost your connection with the server, and saving has been disabled. This message will vanish once you've reconnected."); ?></p>
</span><span class="cx"> </div>
</span><del>-<?php if ( ! empty( $post_format_options ) ) : ?>
-<div class="wp-post-format-ui">
- <div class="post-format-options">
- <?php echo $post_format_options; ?>
- </div>
-</div>
-<?php endif; ?>
</del><ins>+
</ins><span class="cx"> <form name="post" action="post.php" method="post" id="post"<?php do_action('post_edit_form_tag'); ?>>
</span><span class="cx"> <?php wp_nonce_field($nonce_action); ?>
</span><span class="cx"> <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
</span><span class="lines">@@ -411,12 +341,8 @@
</span><span class="cx">
</span><span class="cx"> <div id="poststuff">
</span><span class="cx"> <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
</span><del>-<div id="post-body-content"<?php echo $format_class; ?>>
-<?php if ( ! empty( $all_post_formats ) ) : ?>
-<div class="wp-post-format-ui">
- <div class="post-format-change"><span class="icon <?php echo esc_attr( 'wp-format-' . $post_format ); ?>"></span> <span class="post-format-description"><?php echo $all_post_formats[$post_format]['description']; ?></span></div>
-</div>
-<?php endif; ?>
</del><ins>+<div id="post-body-content">
+
</ins><span class="cx"> <?php if ( post_type_supports($post_type, 'title') ) { ?>
</span><span class="cx"> <div id="titlediv">
</span><span class="cx"> <div id="titlewrap">
</span><span class="lines">@@ -456,10 +382,6 @@
</span><span class="cx"> echo '</div>';
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// post format fields
-if ( post_type_supports( $post_type, 'post-formats' ) && apply_filters( 'enable_post_format_ui', true, $post ) )
- require_once( './includes/post-formats.php' );
-
</del><span class="cx"> if ( post_type_supports($post_type, 'editor') ) {
</span><span class="cx"> ?>
</span><span class="cx"> <div id="postdivrich" class="postarea edit-form-section">
</span><span class="lines">@@ -467,7 +389,7 @@
</span><span class="cx"> <?php wp_editor( $post->post_content, 'content', array(
</span><span class="cx"> 'dfw' => true,
</span><span class="cx"> 'tabfocus_elements' => 'insert-media-button,save-post',
</span><del>- 'editor_height' => in_array( $post_format, array( 'status', 'aside' ) ) ? 120 : 360
</del><ins>+ 'editor_height' => 360,
</ins><span class="cx"> ) ); ?>
</span><span class="cx"> <table id="post-status-info" cellspacing="0"><tbody><tr>
</span><span class="cx"> <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
</span></span></pre></div>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/includes/ajax-actions.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -1126,23 +1126,6 @@
</span><span class="cx"> wp_die( 1 );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function wp_ajax_show_post_format_ui() {
- if ( empty( $_POST['post_type'] ) )
- wp_die( 0 );
-
- check_ajax_referer( 'show-post-format-ui_' . $_POST['post_type'], 'nonce' );
-
- if ( ! $post_type_object = get_post_type_object( $_POST['post_type'] ) )
- wp_die( 0 );
-
- if ( ! current_user_can( $post_type_object->cap->edit_posts ) )
- wp_die( -1 );
-
- update_user_option( get_current_user_id(), 'post_formats_' . $post_type_object->name, empty( $_POST['show'] ) ? 0 : 1 );
-
- wp_die( 1 );
-}
-
</del><span class="cx"> function wp_ajax_hidden_columns() {
</span><span class="cx"> check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
</span><span class="cx"> $hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : '';
</span></span></pre></div>
<a id="trunkwpadminincludespostformatsphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/includes/post-formats.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post-formats.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/includes/post-formats.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -1,163 +0,0 @@
</span><del>-<?php
-/**
- * Structured data fields for the Post Formats UI
- *
- * @package WordPress
- * @subpackage Administration
- */
-
-defined( 'ABSPATH' ) or die;
-
-global $wp_embed;
-
-$format_meta = get_post_format_meta( $post_ID );
-
-wp_nonce_field( 'show-post-format-ui_' . $post_type, 'show_post_format_ui_nonce', false );
-
-?>
-<div class="wp-post-format-ui">
- <div class="post-formats-fields">
-
- <input type="hidden" name="post_format" id="post_format" value="<?php echo esc_attr( $post_format ); ?>" />
-
- <div class="field wp-format-quote">
- <label for="wp_format_quote_source"><?php _e( 'Quote source' ); ?></label>
- <input type="text" id="wp_format_quote_source" name="_format_quote_source_name" value="<?php echo esc_attr( $format_meta['quote_source_name'] ); ?>" class="widefat" />
- </div>
-
- <div class="field wp-format-image">
- <?php if ( ! empty( $format_meta['image'] ) ) :
- $value = $format_meta['image'];
- ?>
- <div id="image-preview" class="wp-format-media-preview">
- <?php
- if ( is_numeric( $value ) ) {
- $image = wp_get_attachment_url( $value );
- printf( '<img src="%s" alt="%s" />', esc_url( $image ), get_the_title( $value ) );
- } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $value ) ) {
- echo do_shortcode( $value );
- } elseif ( ! preg_match( '#<[^>]+>#', $value ) ) {
- printf( '<img src="%s" alt="" />', esc_url( $value ) );
- } else {
- echo $value;
- }
- ?>
- </div>
- <?php endif ?>
- <div data-format="image" class="wp-format-media-holder hide-if-no-js">
- <div><h3><?php _e( 'Drop image file to upload' ); ?></h3></div>
- <a href="#" class="wp-format-media-select"
- data-choose="<?php esc_attr_e( 'Choose an Image' ); ?>"
- data-update="<?php esc_attr_e( 'Select Image' ); ?>">
- <?php _e( 'Select / Upload Image' ); ?>
- </a>
- </div>
- <div class="wp-format-image-textarea hide-if-js">
- <label for="wp_format_image"><?php
- if ( current_user_can( 'unfiltered_html' ) )
- _e( 'Image URL or HTML' );
- else
- _e( 'Image URL' );
- ?></label>
- <textarea id="wp_format_image" type="text" name="_format_image" class="widefat"><?php echo esc_textarea( $format_meta['image'] ); ?></textarea>
- </div>
- <p class="use-url-or-html hide-if-no-js">
- <span><?php
- if ( current_user_can( 'unfiltered_html' ) )
- _e( '(or <a href="#">use an image URL or HTML</a>)' );
- else
- _e( '(or <a href="#">use an image URL</a>)' );
- ?></span>
- <span style="display: none"><?php _e( '(or <a href="#">select/upload an image</a>)' ); ?></span></p>
- </div>
-
- <div class="field wp-format-link">
- <label for="wp_format_link_url"><?php _e( 'Link URL' ); ?></label>
- <input type="text" id="wp_format_link_url" name="_format_link_url" value="<?php echo esc_url( $format_meta['link_url'] ); ?>" class="widefat code" />
- </div>
-
- <div class="field wp-format-quote">
- <label for="wp_format_quote_source_url"><?php _e( 'Quote source link' ); ?></label>
- <input type="text" id="wp_format_quote_source_url" name="_format_quote_source_url" value="<?php echo esc_url( $format_meta['quote_source_url'] ); ?>" class="widefat code" />
- </div>
-
- <div class="field wp-format-image">
- <label for="wp_format_image_url"><?php _e( 'Image click-through link' ); ?></label>
- <input type="text" id="wp_format_image_url" name="_format_url" value="<?php echo esc_url( $format_meta['url'] ); ?>" class="widefat code" />
- </div>
-
- <div class="field wp-format-video">
- <?php if ( ! empty( $format_meta['video_embed'] ) ):
- $value = $format_meta['video_embed'];
- ?>
- <div id="video-preview" class="wp-format-media-preview">
- <?php
- if ( is_numeric( $value ) ) {
- $video = wp_get_attachment_url( $value );
- echo do_shortcode( sprintf( '[video src="%s"]', $video ) );
- } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $value ) ) {
- echo do_shortcode( $value );
- } elseif ( ! preg_match( '#<[^>]+>#', $value ) ) {
- if ( strstr( $value, home_url() ) )
- echo do_shortcode( sprintf( '[video src="%s"]', $value ) );
- else
- echo $wp_embed->autoembed( $value );
- } else {
- echo $value;
- }
- ?>
- </div>
- <?php endif; ?>
- <label for="wp_format_video"><?php
- if ( current_user_can( 'unfiltered_html' ) )
- _e( 'Video embed code or URL' );
- else
- _e( 'Video URL' );
- ?></label>
- <textarea id="wp_format_video" type="text" name="_format_video_embed" class="widefat"><?php echo esc_textarea( $format_meta['video_embed'] ); ?></textarea>
- <div data-format="video" class="wp-format-media-holder hide-if-no-js">
- <a href="#" class="wp-format-media-select"
- data-choose="<?php esc_attr_e( 'Choose a Video' ); ?>"
- data-update="<?php esc_attr_e( 'Select Video' ); ?>">
- <?php _e( 'Select Video From Media Library' ) ?>
- </a>
- </div>
- </div>
-
- <div class="field wp-format-audio">
- <?php if ( ! empty( $format_meta['audio_embed'] ) ):
- $value = $format_meta['audio_embed'];
- ?>
- <div id="audio-preview" class="wp-format-media-preview">
- <?php
- if ( is_numeric( $value ) ) {
- $audio = wp_get_attachment_url( $value );
- echo do_shortcode( sprintf( '[audio src="%s"]', $audio ) );
- } elseif ( preg_match( '/' . get_shortcode_regex() . '/s', $value ) ) {
- echo do_shortcode( $value );
- } elseif ( ! preg_match( '#<[^>]+>#', $value ) ) {
- if ( strstr( $value, home_url() ) )
- echo do_shortcode( sprintf( '[audio src="%s"]', $value ) );
- else
- echo $wp_embed->autoembed( $value );
- } else {
- echo $value;
- }
- ?>
- </div>
- <?php endif; ?>
- <label for="wp_format_audio"><?php
- if ( current_user_can( 'unfiltered_html' ) )
- _e( 'Audio embed code or URL' );
- else
- _e( 'Audio URL' );
- ?></label>
- <textarea id="wp_format_audio" name="_format_audio_embed" class="widefat"><?php echo esc_textarea( $format_meta['audio_embed'] ); ?></textarea>
- <div data-format="audio" class="wp-format-media-holder hide-if-no-js">
- <a href="#" class="wp-format-media-select" data-choose="<?php esc_attr_e( 'Choose Audio' ); ?>" data-update="<?php esc_attr_e( 'Select Audio' ); ?>">
- <?php _e( 'Select Audio From Media Library' ) ?>
- </a>
- </div>
- </div>
- </div>
-</div>
</del></span></pre></div>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/includes/post.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -1290,26 +1290,6 @@
</span><span class="cx"> $new_autosave['ID'] = $old_autosave->ID;
</span><span class="cx"> $new_autosave['post_author'] = $post_author;
</span><span class="cx">
</span><del>- // Auto-save revisioned meta fields.
- foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
- if ( isset( $_POST[ $meta_key ] ) && get_post_meta( $new_autosave['ID'], $meta_key, true ) != $_POST[ $meta_key ] ) {
- // Use the underlying delete_metadata and add_metadata vs delete_post_meta
- // and add_post_meta to make sure we're working with the actual revision meta.
- delete_metadata( 'post', $new_autosave['ID'], $meta_key );
-
- if ( ! empty( $_POST[ $meta_key ] ) )
- add_metadata( 'post', $new_autosave['ID'], $meta_key, $_POST[ $meta_key ] );
- }
- }
-
- // Save the post format if different
- if ( isset( $_POST['post_format'] ) && get_post_meta( $new_autosave['ID'], '_revision_post_format', true ) != $_POST['post_format'] ) {
- delete_metadata( 'post', $new_autosave['ID'], '_revision_post_format' );
-
- if ( ! empty( $_POST['post_format'] ) )
- add_metadata( 'post', $new_autosave['ID'], '_revision_post_format', $_POST['post_format'] );
- }
-
</del><span class="cx"> return wp_update_post( $new_autosave );
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludesscreenphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/screen.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/screen.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/includes/screen.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -963,36 +963,6 @@
</span><span class="cx"> echo '<label for="wp_welcome_panel-hide">';
</span><span class="cx"> echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
</span><span class="cx"> echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
</span><del>- } elseif ( 'post' == $this->base && post_type_supports( $this->post_type, 'post-formats' ) && apply_filters( 'enable_post_format_ui', true, $post ) ) {
-
- // If the user has explicitly set a screen option, use it, otherwise the UI is shown
- // when the theme supports formats, or if the site has formats assigned to posts.
- $post_format_user_option = get_user_option( 'post_formats_' . $post->post_type );
- if ( false !== $post_format_user_option )
- $show_post_format_ui = (bool) $post_format_user_option;
- else
- $show_post_format_ui = current_theme_supports( 'post-formats' ) || (bool) get_terms( 'post_format', array( 'number' => 1 ) );
-
- if ( ! $show_post_format_ui && 'auto-draft' != $post->post_status ) {
- $meta = get_post_format_meta( $post->ID );
- $format_meta_keys = array(
- 'link' => array( 'linkurl' ),
- 'image' => array( 'url', 'image' ),
- 'quote' => array( 'quote_source_name', 'quote_source_url' ),
- 'video' => array( 'video_embed' ),
- 'audio' => array( 'audio_embed' ),
- );
-
- // If there's any structured post format data, enforce the UI display.
- $format_meta_keys = isset( $format_meta_keys[ get_post_format() ] ) ? $format_meta_keys[ get_post_format() ] : array();
- foreach ( $format_meta_keys as $key )
- if ( ! empty( $meta[ $key ] ) )
- $show_post_format_ui = true;
- }
-
- echo '<label for="show_post_format_ui">';
- echo '<input type="checkbox" id="show_post_format_ui"' . checked( $show_post_format_ui, true, false ) . ' />';
- echo __( 'Post Formats' ) . "</label>\n";
</del><span class="cx"> }
</span><span class="cx"> ?>
</span><span class="cx"> <br class="clear" />
</span></span></pre></div>
<a id="trunkwpadminjspostformatsjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/post-formats.js (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post-formats.js 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/js/post-formats.js 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -1,361 +0,0 @@
</span><del>-/*globals window, $, jQuery, document, _, postFormats, tinymce, ajaxurl, wp, getUserSetting */
-
-window.wp = window.wp || {};
-
-(function ($) {
- "use strict";
-
- var mediaFrame, insertMediaButton, container, icon, formatField,
- body,
- lastMimeType,
- classRegex = /\s?\bwp-format-[^ ]+/g,
- shortHeight = 120,
- lastHeight = 360,
- initialFormat = 'standard',
- shortClass = 'short-format',
- noTitleFormats = ['status'],
- noMediaFormats = ['status', 'aside', 'image', 'audio', 'video'],
- shortContentFormats = ['status', 'aside'],
- noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery'];
-
- function imageFormatUploadProgress( uploader, file ) {
- var $bar = $( '#' + uploader.settings.drop_element + ' .media-progress-bar div' );
- $bar.width( file.percent + '%' );
- }
-
- function imageFormatUploadStart( uploader ) {
- $( '#' + uploader.settings.drop_element + ' .wp-format-media-select' ).append('<div class="media-progress-bar"><div></div></div>');
- }
-
- function imageFormatUploadError() {
- $( '.media-progress-bar', $('.wp-format-media-holder[data-format=image]') ).remove();
- }
-
- function imageFormatUploadSuccess( attachment ) {
- var $holder, $field, html = wp.media.string.image({
- size : 'full',
- align : false,
- link : 'none'
- }, attachment.attributes );
-
- $holder = $('.wp-format-media-holder[data-format=image]');
- $( '.media-progress-bar', $holder ).remove();
-
- if ( 'image' !== attachment.attributes.type )
- return;
-
- $field = $( '#wp_format_' + $holder.data( 'format' ) );
-
- // set the hidden input's value
- $field.val( html );
-
- $( '#image-preview' ).remove();
-
- $holder.parent().prepend( ['<div id="image-preview" class="wp-format-media-preview">',
- '<img src="', attachment.get('url'), '"',
- attachment.get('width') ? ' width="' + attachment.get('width') + '"' : '',
- attachment.get('height') ? ' height="' + attachment.get('height') + '"' : '',
- ' />',
- '</div>'].join( '' ) );
- }
-
- function imageFormatUploadFilesAdded( uploader, files ) {
- $.each( files, function( i, file ) {
- if ( i > 0 )
- uploader.removeFile(file);
- });
- }
-
- var uploader = {
- container: null,
- browser: null,
- dropzone: $('.wp-format-media-holder[data-format=image]'),
- success: imageFormatUploadSuccess,
- error: imageFormatUploadError,
- plupload: {
- runtimes: 'html5',
- filters: [ {title: 'Image', extensions: 'jpg,jpeg,gif,png'} ]
- },
- params: {}
- };
- uploader = new wp.Uploader( uploader );
-
- if ( uploader.supports.dragdrop ) {
- uploader.uploader.bind( 'BeforeUpload', imageFormatUploadStart );
- uploader.uploader.bind( 'UploadProgress', imageFormatUploadProgress );
- uploader.uploader.bind( 'FilesAdded', imageFormatUploadFilesAdded );
- } else {
- uploader.uploader.destroy();
- uploader = null;
- }
-
- function switchFormatClass( format ) {
- formatField.val( format );
-
- $.each( [ container, icon, body ], function(i, thing) {
- thing.prop( 'className', thing.prop( 'className' ).replace( classRegex, '' ) )
- .addClass( 'wp-format-' + format );
- });
- }
-
- function resizeContent( format, noAnimate ) {
- var height, content = $( '#content, #content_ifr' );
-
- height = content.outerHeight();
- if ( shortHeight < height ) {
- lastHeight = height;
- }
-
- if ( -1 < $.inArray( format, shortContentFormats ) ) {
- if ( ! content.hasClass( shortClass ) ) {
- content.addClass( shortClass );
- _(content).each(function (elem) {
- $(elem)[noAnimate ? 'css' : 'animate']( { height : shortHeight } );
- });
- }
- } else {
- content.removeClass( shortClass ).animate( { height : lastHeight } );
- }
- }
-
- function switchFormat(elem) {
- var editor, body, formatTo, formatFrom,
- format = elem.data( 'wp-format' ),
- titlePrompt = $( '#title-prompt-text' ),
- description = $( '.post-format-description' ),
- postTitle = $( '#title'),
- fields = $( '.post-formats-fields' ),
- tinyIcon = $( '.post-format-change span.icon' );
-
- if ( format === postFormats.currentPostFormat ) {
- return;
- }
-
- elem.addClass( 'active' ).siblings().removeClass( 'active' );
-
- // Animate the media button going away or coming back
- formatTo = -1 < $.inArray( format, noMediaFormats );
- formatFrom = -1 < $.inArray( postFormats.currentPostFormat, noMediaFormats );
- if ( formatFrom ? !formatTo : formatTo ) { // XOR
- insertMediaButton.fadeToggle( 200 ).css( 'display', 'inline-block' );
- }
- // Animate the title going away or coming back
- formatTo = -1 < $.inArray( format, noTitleFormats );
- formatFrom = -1 < $.inArray( postFormats.currentPostFormat, noTitleFormats );
- if ( formatFrom ? !formatTo : formatTo ) { // XOR
- $( '#titlewrap' ).fadeToggle( 200 );
- }
-
- // Animate the fields moving going away or coming in
- formatTo = -1 < $.inArray( format, noUIFormats );
- formatFrom = -1 < $.inArray( postFormats.currentPostFormat, noUIFormats );
- if ( formatTo && formatFrom ) { // To/from have no UI. No slide.
- switchFormatClass( format );
- fields.hide();
- } else if ( formatFrom ) { // Only destination has UI. Slide down.
- fields.hide();
- switchFormatClass( format );
- fields.slideDown( 400 );
- } else if ( formatTo ) { // Only source has UI. Slide up.
- fields.slideUp( 200, function(){
- switchFormatClass( format );
- });
- } else { // Both have UI. Slide both ways.
- fields.slideUp( 200, function(){
- switchFormatClass( format );
- fields.slideDown( 400 );
- });
- }
-
- resizeContent( format );
- postTitle.focus();
-
- if ( '' === postTitle.val() ) {
- titlePrompt.removeClass( 'screen-reader-text' );
-
- postTitle.keydown( function (e) {
- titlePrompt.addClass( 'screen-reader-text' );
- $( e.currentTarget ).unbind( e );
- } );
- }
-
- // Update description line
- description.html( elem.data( 'description' ) );
- tinyIcon
- .show()
- .prop( 'className', tinyIcon.prop( 'className' ).replace( classRegex, '' ) )
- .addClass( 'wp-format-' + format );
-
- if ( description.not( ':visible' ) ) {
- description.slideDown( 'fast' );
- }
-
- if ( typeof tinymce !== 'undefined' ) {
- editor = tinymce.get( 'content' );
-
- if ( editor ) {
- body = editor.getBody();
- body.className = body.className.replace( /\bpost-format-[^ ]+/, '' );
- editor.dom.addClass( body, 'post-format-' + format );
- }
- }
-
- // If gallery, force it to open to gallery state
- insertMediaButton.toggleClass( 'gallery', 'gallery' === format );
- postFormats.currentPostFormat = format;
- }
-
- $(function () {
- body = $( 'body' );
- container = $( '#post-body-content' );
- icon = $( '.icon32' );
- formatField = $( '#post_format' );
- insertMediaButton = $( '#insert-media-button' ).toggleClass( 'gallery', 'gallery' === postFormats.currentPostFormat );
- initialFormat = $( '.post-format-options .active' ).data( 'wp-format' );
-
- if ( -1 < $.inArray( initialFormat, shortContentFormats ) ) {
- resizeContent( initialFormat, true );
- }
-
- $( '#show_post_format_ui' ).on( 'change', function () {
- body.toggleClass( 'wp-post-format-show-ui', this.checked );
-
- // Reset the display properties of possibly hidden items.
- insertMediaButton.css( 'display', '' );
- $( '#titlewrap' ).css( 'display', '' );
-
- $.post( ajaxurl, {
- action: 'show-post-format-ui',
- post_type: $( '#post_type' ).val(),
- show: this.checked ? 1 : 0,
- nonce: $( '#show_post_format_ui_nonce' ).val()
- } );
- } );
-
- // Post formats selection
- $( '.post-format-options' ).on( 'click', 'a', function (e) {
- e.preventDefault();
- switchFormat( $( e.currentTarget ) );
- } );
-
- // Toggle select/upload and URL/HTML for images
- $( '.use-url-or-html' ).on( 'click', 'a', function(e) {
- e.preventDefault();
- $( '.wp-format-media-holder, .wp-format-image-textarea' ).toggle();
- $(this).closest( 'p' ).find( 'span' ).toggle();
- });
-
- // Media selection
- $( '.wp-format-media-select' ).click( function (e) {
- e.preventDefault();
-
- var $el = $(e.currentTarget), mediaPreview, mime = 'image', $holder, $field;
-
- $holder = $el.closest( '.wp-format-media-holder' );
- $field = $( '#wp_format_' + $holder.data( 'format' ) );
- mime = $holder.data( 'format' );
-
- // If the media frame already exists, reopen it.
- if ( mediaFrame && lastMimeType === mime ) {
- mediaFrame.open();
- return;
- }
-
- lastMimeType = mime;
-
- mediaFrame = wp.media.frames.formatMedia = wp.media( {
- button: {
- text: $el.data( 'update' )
- },
- states: [
- new wp.media.controller.Library({
- library: wp.media.query( { type: mime } ),
- title: $el.data( 'choose' ),
- displaySettings: 'image' === mime
- })
- ]
- } );
-
- mediaPreview = function (attachment) {
- var w, h, dimensions = '', url = attachment.url, mime = attachment.mime, format = attachment.type;
-
- if ( 'video' === format ) {
- if ( attachment.width ) {
- w = attachment.width;
- if ( w > 600 ) {
- w = 600;
- }
- dimensions += ' width="' + w + '"';
- }
-
- if ( attachment.height ) {
- h = attachment.height;
- if ( attachment.width && w < attachment.width ) {
- h = Math.round( ( h * w ) / attachment.width );
- }
- dimensions += ' height="' + h + '"';
- }
- }
-
- $( '#' + format + '-preview' ).remove();
- $holder.parent().prepend( '<div id="' + format + '-preview" class="wp-format-media-preview">' +
- '<' + format + dimensions + ' class="wp-' + format + '-shortcode" controls="controls" preload="none">' +
- '<source type="' + mime + '" src="' + url + '" />' +
- '</' + format + '></div>' );
- $( '.wp-' + format + '-shortcode' ).mediaelementplayer();
- };
-
- // When an image is selected, run a callback.
- mediaFrame.on( 'select', function () {
- // Grab the selected attachment.
- var w = 0, h = 0, html, attachment = mediaFrame.state().get( 'selection' ).first().toJSON();
-
- if ( 0 === attachment.mime.indexOf( 'audio' ) ) {
- $field.val( attachment.url );
- // show one preview at a time
- mediaPreview( attachment );
- } else if ( 0 === attachment.mime.indexOf( 'video' ) ) {
- attachment.src = attachment.url;
- $field.val( wp.shortcode.string( {
- tag: 'video',
- attrs: _.pick( attachment, 'src', 'width', 'height' )
- } ) );
- // show one preview at a time
- mediaPreview( attachment );
- } else {
- html = wp.media.string.image({
- size: 'full',
- align : false,
- link : 'none'
- }, attachment);
-
- // set the hidden input's value
- $field.val( html );
-
- $( '#image-preview' ).remove();
-
- if ( attachment.width ) {
- w = attachment.width > 600 ? 600 : attachment.width;
- }
-
- if ( attachment.height ) {
- h = attachment.height;
- }
-
- if ( w < attachment.width ) {
- h = Math.round( ( h * w ) / attachment.width );
- }
-
- $holder.parent().prepend( ['<div id="image-preview" class="wp-format-media-preview">',
- '<img src="', attachment.url, '"',
- w ? ' width="' + w + '"' : '',
- h ? ' height="' + h + '"' : '',
- ' />',
- '</div>'].join( '' ) );
- }
- });
-
- mediaFrame.open();
- });
- });
-}( jQuery ) );
</del></span></pre></div>
<a id="trunkwpadminjspostformatsminjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/post-formats.min.js (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post-formats.min.js 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-admin/js/post-formats.min.js 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-window.wp=window.wp||{};(function(c){var y,n,k,t,q,j,w,m=/\s?\bwp-format-[^ ]+/g,g=120,s=360,v="standard",b="short-format",e=["status"],i=["status","aside","image","audio","video"],f=["status","aside"],d=["standard","chat","status","aside","gallery"];function x(C,A){var B=c("#"+C.settings.drop_element+" .media-progress-bar div");B.width(A.percent+"%")}function a(A){c("#"+A.settings.drop_element+" .wp-format-media-select").append('<div class="media-progress-bar"><div></div></div>')}function r(){c(".media-progress-bar",c(".wp-format-media-holder[data-format=image]")).remove()}function l(D){var C,B,A=wp.media.string.image({size:"full",align:false,link:"none"},D.attributes);C=c(".wp-format-media-holde
r[data-format=image]");c(".media-progress-bar",C).remove();if("image"!==D.attributes.type){return}B=c("#wp_format_"+C.data("format"));B.val(A);c("#image-preview").remove();C.parent().prepend(['<div id="image-preview" class="wp-format-media-preview">','<img src="',D.get("url"),'"',D.get("width")?' width="'+D.get("width")+'"':"",D.get("height")?' height="'+D.get("height")+'"':""," />","</div>"].join(""))}function u(B,A){c.each(A,function(D,C){if(D>0){B.removeFile(C)}})}var p={container:null,browser:null,dropzone:c(".wp-format-media-holder[data-format=image]"),success:l,error:r,plupload:{runtimes:"html5",filters:[{title:"Image",extensions:"jpg,jpeg,gif,png"}]},params:{}};p=new wp.Uploader(p);if(p.supports.dragdrop){p.uploade
r.bind("BeforeUpload",a);p.uploader.bind("UploadProgress",x);p.uploader.bind("FilesAdded",u)}else{p.uploader.destroy();p=null}function z(A){q.val(A);c.each([k,t,j],function(C,B){B.prop("className",B.prop("className").replace(m,"")).addClass("wp-format-"+A)})}function h(D,B){var A,C=c("#content, #content_ifr");A=C.outerHeight();if(g<A){s=A}if(-1<c.inArray(D,f)){if(!C.hasClass(b)){C.addClass(b);_(C).each(function(E){c(E)[B?"css":"animate"]({height:g})})}}else{C.removeClass(b).animate({height:s})}}function o(A){var G,E,B,D,I=A.data("wp-format"),H=c("#title-prompt-text"),J=c(".post-format-description"),K=c("#title"),C=c(".post-formats-fields"),F=c(".post-format-change span.icon");if(I===postFormats.currentPostFormat){return}A.addClass("active").siblings().removeClass("active");B=-1<c.inArray(I,i);D=-1
<c.inArray(postFormats.currentPostFormat,i);if(D?!B:B){n.fadeToggle(200).css("display","inline-block")}B=-1<c.inArray(I,e);D=-1<c.inArray(postFormats.currentPostFormat,e);if(D?!B:B){c("#titlewrap").fadeToggle(200)}B=-1<c.inArray(I,d);D=-1<c.inArray(postFormats.currentPostFormat,d);if(B&&D){z(I);C.hide()}else{if(D){C.hide();z(I);C.slideDown(400)}else{if(B){C.slideUp(200,function(){z(I)})}else{C.slideUp(200,function(){z(I);C.slideDown(400)})}}}h(I);K.focus();if(""===K.val()){H.removeClass("screen-reader-text");K.keydown(function(L){H.addClass("screen-reader-text");c(L.currentTarget).unbind(L)})}J.html(A.data("description"));F.show().prop("className",F.prop("className").replace(m,"")).addClass("wp-format-"+I);if(J.not(":visible")){J.slideDown("fast")}if(typeof tinymce!=="undefined"){G=tinymce.get("content");if(G){E=
G.getBody();E.className=E.className.replace(/\bpost-format-[^ ]+/,"");G.dom.addClass(E,"post-format-"+I)}}n.toggleClass("gallery","gallery"===I);postFormats.currentPostFormat=I}c(function(){j=c("body");k=c("#post-body-content");t=c(".icon32");q=c("#post_format");n=c("#insert-media-button").toggleClass("gallery","gallery"===postFormats.currentPostFormat);v=c(".post-format-options .active").data("wp-format");if(-1<c.inArray(v,f)){h(v,true)}c("#show_post_format_ui").on("change",function(){j.toggleClass("wp-post-format-show-ui",this.checked);n.css("display","");c("#titlewrap").css("display","");c.post(ajaxurl,{action:"show-post-format-ui",post_type:c("#post_type").val(),show:this.checked?1:0,nonce:c("#show_post_format_ui_nonce").val()})});c(".
post-format-options").on("click","a",function(A){A.preventDefault();o(c(A.currentTarget))});c(".use-url-or-html").on("click","a",function(A){A.preventDefault();c(".wp-format-media-holder, .wp-format-image-textarea").toggle();c(this).closest("p").find("span").toggle()});c(".wp-format-media-select").click(function(F){F.preventDefault();var A=c(F.currentTarget),C,E="image",D,B;D=A.closest(".wp-format-media-holder");B=c("#wp_format_"+D.data("format"));E=D.data("format");if(y&&w===E){y.open();return}w=E;y=wp.media.frames.formatMedia=wp.media({button:{text:A.data("update")},states:[new wp.media.controller.Library({library:wp.media.query({type:E}),title:A.data("choose"),displaySettings:"image"===E})]});C=function(M){var G,I,J="",H=M.url,K=M.mime,L=M.type;if("video"===L){if(M.width){G=M.widt
h;if(G>600){G=600}J+=' width="'+G+'"'}if(M.height){I=M.height;if(M.width&&G<M.width){I=Math.round((I*G)/M.width)}J+=' height="'+I+'"'}}c("#"+L+"-preview").remove();D.parent().prepend('<div id="'+L+'-preview" class="wp-format-media-preview"><'+L+J+' class="wp-'+L+'-shortcode" controls="controls" preload="none"><source type="'+K+'" src="'+H+'" /></'+L+"></div>");c(".wp-"+L+"-shortcode").mediaelementplayer()};y.on("select",function(){var G=0,I=0,H,J=y.state().get("selection").first().toJSON();if(0===J.mime.indexOf("audio")){B.val(J.url);C(J)}else{if(0===J.mime.indexOf("video")){J.src=J.url;B.val(wp.shortcode.string({tag:"video",attrs:_.pick(J,"src","width","height")}));C(J)}else{H=wp.media.string.image({size:"full",a
lign:false,link:"none"},J);B.val(H);c("#image-preview").remove();if(J.width){G=J.width>600?600:J.width}if(J.height){I=J.height}if(G<J.width){I=Math.round((I*G)/J.width)}D.parent().prepend(['<div id="image-preview" class="wp-format-media-preview">','<img src="',J.url,'"',G?' width="'+G+'"':"",I?' height="'+I+'"':""," />","</div>"].join(""))}}});y.open()})})}(jQuery));
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-includes/post.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -2676,8 +2676,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> $maybe_empty = ! $post_content && ! $post_title && ! $post_excerpt && post_type_supports( $post_type, 'editor' )
</span><del>- && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' )
- && ! in_array( get_post_format( $post_ID ), array( 'audio', 'video', 'quote', 'image' ) );
</del><ins>+ && post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'excerpt' );
</ins><span class="cx">
</span><span class="cx"> if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
</span><span class="cx"> if ( $wp_error )
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (24387 => 24388)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php 2013-05-30 17:55:22 UTC (rev 24387)
+++ trunk/wp-includes/script-loader.php 2013-05-30 21:33:46 UTC (rev 24388)
</span><span class="lines">@@ -415,8 +415,6 @@
</span><span class="cx"> 'comma' => _x( ',', 'tag delimiter' ),
</span><span class="cx"> ) );
</span><span class="cx">
</span><del>- $scripts->add( 'post-formats', "/wp-admin/js/post-formats$suffix.js", array( 'media-models', 'wp-plupload' ), false, 1 );
-
</del><span class="cx"> $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
</span><span class="cx">
</span><span class="cx"> $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) );
</span></span></pre>
</div>
</div>
</body>
</html>