Making WordPress.org


Ignore:
Timestamp:
12/19/2014 09:57:26 PM (11 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Reintroduce Explanations, with editorial flow.

  • Add explanations as an associated post type
  • Add metabox to create, unpublish, and link to edit explanation for a parsed post type
  • Add template tags: get_explanation() and get_explanation_field()
  • Re-enable display of Explanations on the frontend

props DrewAPicture.
fixes #786.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/parsed-content.php

    r942 r1057  
    7070        $ticket_label = get_post_meta( $post->ID, 'wporg_ticket_title', true );
    7171        $ticket_info  = get_post_meta( $post->ID, 'wporg_parsed_ticket_info', true );
    72         $content      = get_post_meta( $post->ID, 'wporg_parsed_content', true );
     72        $content      = $post->post_content;
    7373
    7474        if ( $ticket ) {
     
    9999                    <div class="wporg_parsed_readonly <?php echo $ticket ? 'hidden' : ''; ?>"><?php echo apply_filters( 'the_content', $content ); ?></div>
    100100                    <div class="wporg_parsed_content <?php echo $ticket ? '' : 'hidden'; ?>">
    101                         <?php wp_editor( $content, 'wporg_parsed_content_editor', array(
     101                        <?php wp_editor( $content, 'content', array(
    102102                            'media_buttons' => false,
    103103                            'tinymce'       => false,
    104104                            'quicktags'     => true,
    105105                            'textarea_rows' => 10,
    106                             'textarea_name' => 'wporg_parsed_content',
     106                            'textarea_name' => 'content',
    107107                        ) ); ?>
    108108                    </div>
     
    164164        // Only enqueue 'wporg-parsed-content' script and styles on Code Reference post type screens.
    165165        if ( in_array( get_current_screen()->id, $this->post_types ) ) {
    166             wp_enqueue_style( 'wporg-parsed-content', get_template_directory_uri() . '/stylesheets/admin.css', array(), '20140826' );
     166            wp_enqueue_style( 'wporg-admin', get_template_directory_uri() . '/stylesheets/admin.css', array(), '20140826' );
    167167            wp_enqueue_script( 'wporg-parsed-content', get_template_directory_uri() . '/js/parsed-content.js', array( 'jquery', 'utils' ), '20140826', true );
    168168
Note: See TracChangeset for help on using the changeset viewer.