Changeset 23730
- Timestamp:
- 03/16/2013 05:57:54 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/post-formats.js
r23449 r23730 5 5 6 6 // Post formats selection 7 $('.post-format-select a').on( 'click ', function(e){8 e.preventDefault();9 var $this = $(this),10 format = $this.data('wpFormat'); 7 $('.post-format-select a').on( 'click.post-format', function(e) { 8 var $this = $(this), editor, body, 9 format = $this.data('wp-format'), container = $('#post-body-content'); 10 11 11 $('.post-format-select a.nav-tab-active').removeClass('nav-tab-active'); 12 12 $this.addClass('nav-tab-active').blur(); 13 13 $('#post_format').val(format); 14 $('#post-body-content').attr('class', 'wp-format-' + format ); 14 15 container.get(0).className = container.get(0).className.replace( /\bwp-format-[^ ]+/, '' ); 16 container.addClass('wp-format-' + format); 17 18 if ( typeof tinymce != 'undefined' ) { 19 editor = tinymce.get('content'); 20 21 if ( editor ) { 22 body = editor.getBody(); 23 body.className = body.className.replace( /\bpost-format-[^ ]+/, '' ); 24 editor.dom.addClass( body, 'post-format-' + format ); 25 } 26 } 27 28 e.preventDefault(); 15 29 }); 16 30 -
trunk/wp-includes/class-wp-editor.php
r23123 r23730 397 397 $body_class = $editor_id; 398 398 399 if ( $post = get_post() ) 400 $body_class .= ' post-type-' . $post->post_type; 399 if ( $post = get_post() ) { 400 $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status ); 401 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { 402 $post_format = get_post_format( $post ); 403 if ( $post_format && ! is_wp_error( $post_format ) ) 404 $body_class .= ' post-format-' . sanitize_html_class( $post_format ); 405 else 406 $body_class .= ' post-format-standard'; 407 } 408 } 401 409 402 410 if ( !empty($set['tinymce']['body_class']) ) { -
trunk/wp-includes/post-template.php
r23653 r23730 1316 1316 if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) 1317 1317 $date = "<a href='$link'>$date</a>"; 1318 1318 1319 1319 $revision_date_author = sprintf( 1320 1320 '%s %s, %s %s (%s)',
Note: See TracChangeset
for help on using the changeset viewer.