Making WordPress.org

Ticket #986: 986.diff

File 986.diff, 28.7 KB (added by BrashRebel, 11 years ago)

Stab at giving credit to video producers.

  • anon-upload-template.php

    diff --git anon-upload-template.php anon-upload-template.php
    index 46c4048..af9ae0a 100755
    function anon_upload_css() { 
    2929                padding-top: 10px;
    3030        }
    3131
     32        .page-template-anon-upload-template-php #footer {
     33                position: absolute;
     34                bottom: 0;
     35                right: 0;
     36                left: 0;
     37        }
     38
     39        .video-upload {
     40                padding-bottom: 70px;
     41        }
     42
    3243        .noscript-show p {
    3344                margin: 0 !important;
    3445        }
    function anon_upload_css() { 
    4051
    4152        .video-upload-left {
    4253                max-width: 550px;
    43                 margin: 15px;
    4454        }
    4555
    4656        .video-upload-right {
    47                 margin: -25px 15px 0;
    48         }
    49         @media screen and ( min-width:941px ) {
    50                 .video-upload-right {
    51                         float: right;
    52                         width: 390px;
    53                         margin: -25px 0 25px;
    54                 }
     57                float: right;
     58                width: 390px;
     59                margin: -25px 0 25px;
    5560        }
    5661
    5762        .video-upload p {
    function anon_upload_css() { 
    102107            color: #333;
    103108            background-color: #fff;
    104109            padding: 4px;
    105             width: 98%;
     110            width: 329px;
    106111                max-width: 329px;
    107112        }
    108113
    109114        .video-upload-left ul.cats-checkboxes {
     115                margin-left: 130px;
    110116                height: 150px;
    111117                overflow: auto;
    112118        }
    function anon_upload_css() { 
    120126                border-color: #bbb;
    121127        }
    122128
    123                 .video-upload-left #wptv_honey_container {
    124                         display: none;
    125                 }
     129        .video-upload-left #wptv_honey_container {
     130                display: none;
     131        }
    126132
    127133        #video-upload-form p.last {
    128134                margin: 5px 80px 25px;
    function anon_upload_css() { 
    163169                display: inline;
    164170                width: auto;
    165171        }
     172
     173        #wptv_video_producer_username {
     174                margin: 22px 0;
     175        }
    166176        </style>
    167177        <?php
    168178}
    get_header(); 
    173183
    174184$message = '';
    175185
    176 if ( !empty($_REQUEST['error']) ) {
     186if ( !empty( $_REQUEST['error'] ) ) {
    177187        $message = (int) $_REQUEST['error'];
    178188
    179189        switch ( $message ) {
    if ( !empty($_REQUEST['error']) ) { 
    208218                case 13:
    209219                        $message = "Error: please leave the first field empty. (It helps us know you're not a spammer.)";
    210220                        break;
     221                case 14:
     222                        $message = "Error: invalid WordPress.org username given for Producer.";
     223                        break;
    211224        }
    212225        $message = '<div class="error"><p>' . $message . '</p></div>';
    213226} elseif ( !empty($_REQUEST['success']) ) {
    if ( !empty($_REQUEST['error']) ) { 
    306319                        ?>
    307320                </ul>
    308321        </div>
    309 
    310322        <p>
    311                 <label for="wptv_video_producer"><?php esc_html_e( 'Video producer' ); ?></label>
    312                 <input type="text" id="wptv_video_producer" name="wptv_video_producer" value="" />
     323                <label for="wptv_video_producer_username"><?php esc_html_e( 'Producer WordPress.org Username' ); ?></label>
     324                <input type="text" id="wptv_video_producer_username" name="wptv_video_producer_username" value="" />
    313325        </p>
    314326        <p>
    315327                <label for="wptv_speakers"><?php esc_html_e( 'Speakers' ); ?></label>
  • category-wordcamptv.php

    diff --git category-wordcamptv.php category-wordcamptv.php
    index 53bdcac..6f74079 100755
    global $wptv; 
    1616?>
    1717<div class="wptv-hero group">
    1818        <div class="container">
    19                 <div class="wptv-category-title">
    20                         <h2 class="page-title"><?php single_term_title(); ?></h2>
    21                         <div class="desc"><?php echo category_description(); ?></div>
    22                 </div>
     19
     20                <h2 class="page-title"><?php single_term_title(); ?></h2>
     21                <div class="desc"><?php echo category_description(); ?></div>
    2322
    2423                <?php if ( $featured->have_posts() ) : $featured->the_post(); ?>
    2524                        <div class="main-video">
  • front-page.php

    diff --git front-page.php front-page.php
    index 8d12777..81ea289 100755
    get_header(); ?> 
    2424                        <h3>
    2525                                <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="video-title"><?php the_title(); ?></a>
    2626                                <?php $wptv->the_event( '<strong class="video-event">', '</strong>' ); ?>
    27                         </h3>
     27                </h3>
    2828                </div><!-- .main-video -->
    2929                <?php endwhile; // $featured->have_posts ?>
    3030
  • functions.php

    diff --git functions.php functions.php
    old mode 100755
    new mode 100644
    index a33be88..86abe50
    class WordPressTV_Theme { 
    164164                global $post;
    165165
    166166                $slides_url = get_post_meta( $post->ID, '_wptv_slides_url', true );
     167                $producer_username = get_post_meta( $post->ID, '_wptv_producer_username', true );
    167168                wp_nonce_field( 'edit-video-info', 'video_info_metabox_nonce' );
    168169
    169170                ?>
    class WordPressTV_Theme { 
    172173                        <label for="wptv-slides-url">Slides URL</label>
    173174                        <input type="text" class="widefat" id="wptv-slides-url" name="_wptv_slides_url" value="<?php echo esc_url( $slides_url ); ?>" />
    174175                </p>
    175 
     176                <p>
     177                        <label for="wptv-producer-username">Video Producer WordPress.org Username</label>
     178                        <input type="text" class="widefat" id="wptv-producer-username" name="_wptv_producer_username" value="<?php echo sanitize_user( $producer_username, true ); ?>" />
     179                </p>
    176180                <?php
    177181        }
    178182
    class WordPressTV_Theme { 
    198202                } else {
    199203                        delete_post_meta( $post_id, '_wptv_slides_url' );
    200204                }
     205
     206                $producer_username = sanitize_user( $_POST['_wptv_producer_username'], true );
     207
     208                if ( $producer_username ) {
     209                        update_post_meta( $post_id, '_wptv_producer_username', $producer_username );
     210                } else {
     211                        delete_post_meta( $post_id, '_wptv_producer_username' );
     212                }
    201213        }
    202214
    203215        /**
    function wptv_enqueue_scripts() { 
    772784        wp_enqueue_style( 'wptv-ie', get_template_directory_uri() . '/ie6.css', array( 'wptv-style' ) );
    773785        wp_style_add_data( 'wptv-ie', 'conditional', 'IE 6' );
    774786
    775         wp_register_script( 'wptv-dropdowns', get_template_directory_uri() . '/js/dropdowns.js' );
    776         wp_enqueue_script( 'wptv-dropdowns', array( 'jquery' ) );
    777         wp_enqueue_script( 'jquery-ui-accordion' );
    778 
    779787        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    780788                wp_enqueue_script( 'comment-reply' );
    781789        }
    782790}
    783791add_action( 'wp_enqueue_scripts', 'wptv_enqueue_scripts' );
    784792
    785 function wptv_menu_script() {
    786         ?>
    787         <script>
    788                 jQuery(document).ready(function($) {
    789                                 $( "#menu-mobile" ).accordion( {
    790                                         collapsible: true,
    791                                         active: false
    792                                 } );
    793                 });
    794         </script>
    795 <?php
    796 }
    797 add_action( 'wp_head', 'wptv_menu_script' );
    798793/**
    799794 * Create a nicely formatted and more specific title element text for output
    800795 * in head of document, based on current view.
    function wptv_excerpt_slides( $excerpt ) { 
    846841        return $excerpt;
    847842}
    848843add_filter( 'get_the_excerpt', 'wptv_excerpt_slides' );
     844
     845/**
     846 * When given a string, returns boolean based on whether the string matches a valid w.org username
     847 *
     848 * @param $username
     849 *
     850 * @return bool
     851 */
     852function dotorg_username_exists( $username ) {
     853        $args = array(
     854                'redirection' => 0,
     855        );
     856        $url = 'https://wordpress.org/grav-redirect.php?user=' . $username;
     857        $response = wp_remote_get( $url, $args );
     858        $response = wp_remote_retrieve_headers( $response );
     859
     860        if ( validate_username( $username ) && array_key_exists( 'location', $response ) ) {
     861                $result = ( ! strpos( $response['location'], 'd=mm' ) ) ? true : false;
     862        } else {
     863                $result = false;
     864        }
     865        return $result;
     866}
     867 No newline at end of file
  • header.php

    diff --git header.php header.php
    index 64eefa8..7cbab9d 100755
    global $wptv; 
    1414
    1515<head>
    1616        <meta charset="<?php bloginfo( 'charset' ); ?>">
    17         <meta name="viewport" content="width=device-width, initial-scale=1">
    1817        <title><?php wp_title( '|', true, 'right' ); ?></title>
    1918
    2019        <link rel="alternate" type="application/rss+xml" title="<?php esc_attr_e( 'WordPress.tv RSS Feed', 'wptv' ); ?>" href="http://wordpress.tv/feed/" />
    global $wptv; 
    4140                        <div id="menu">
    4241                                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    4342                        </div>
    44                         <div id="menu-mobile">
    45                                 <span class="open">Navigation</span>
    46                                 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    47                         </div>
    4843
    4944                </div><!-- .sleeve -->
    5045        </div><!-- #header -->
  • plugins/wordpresstv-anon-upload/anon-upload.php

    diff --git plugins/wordpresstv-anon-upload/anon-upload.php plugins/wordpresstv-anon-upload/anon-upload.php
    index 18bca59..c1df414 100755
    class WPTV_Anon_Upload { 
    4747        function validate() {
    4848                $text_fields = array(
    4949                        'wptv_video_title',
    50                         'wptv_video_producer',
     50                        'wptv_video_producer_username',
    5151                        'wptv_speakers',
    5252                        'wptv_event',
    5353                        'wptv_slides_url'
    class WPTV_Anon_Upload { 
    6262                        return $this->error( 13 );
    6363                }
    6464
     65                if ( isset ( $_POST['wptv_video_producer_username'] ) && dotorg_username_exists( $_POST['wptv_video_producer_username'] ) == false ) {
     66                        return $this->error( 14 );
     67                }
     68
    6569                if ( ! is_user_logged_in() ) {
    6670                        if ( empty( $_POST['wptv_uploaded_by'] ) ) {
    6771                                return $this->error( 10 );
    class WPTV_Anon_Upload { 
    186190
    187191                if ( ! empty( $name_parts['extension'] ) ) {
    188192                        if ( ! in_array( strtolower( $name_parts['extension'] ), array(
    189                                         'avi',
    190                                         'mov',
    191                                         'qt',
    192                                         'mpeg',
    193                                         'mpg',
    194                                         'mpe',
    195                                         'mp4',
    196                                         'm4v',
    197                                         'asf',
    198                                         'asx',
    199                                         'wax',
    200                                         'wmv',
    201                                         'wmx',
    202                                         'ogv',
    203                                         '3gp',
    204                                         '3g2',
    205                                 ), true )
     193                                'avi',
     194                                'mov',
     195                                'qt',
     196                                'mpeg',
     197                                'mpg',
     198                                'mpe',
     199                                'mp4',
     200                                'm4v',
     201                                'asf',
     202                                'asx',
     203                                'wax',
     204                                'wmv',
     205                                'wmx',
     206                                'ogv',
     207                                '3gp',
     208                                '3g2',
     209                        ), true )
    206210                        ) {
    207211                                return $this->error( 2 );
    208212                        }
    class WPTV_Anon_Upload { 
    229233                // Add default cat according to the "This is a WC video" checkbox
    230234                if ( ! empty( $_posted['wptv_video_wordcamp'] ) ) {
    231235                        $anon_post['post_category'] = array( '12784353' ); // add the "WordCampTV" category
    232                 }
    233                 else {
     236                } else {
    234237                        $anon_post['post_category'] = array( '1' ); // Uncategorized
    235238                }
    236239
    class WPTV_Anon_Upload { 
    269272                        $anon_author_email = $this->sanitize_text( $_posted['wptv_email'] );
    270273                }
    271274
    272                 $video_title    = $this->sanitize_text( $_posted['wptv_video_title'] );
    273                 $video_producer = $this->sanitize_text( $_posted['wptv_video_producer'] );
    274                 $speakers       = $this->sanitize_text( $_posted['wptv_speakers'] );
    275                 $event          = $this->sanitize_text( $_posted['wptv_event'] );
    276                 $description    = $this->sanitize_text( $_posted['wptv_video_description'], false );
    277                 $language       = $this->sanitize_text( $_posted['wptv_language'] );
    278                 $slides         = $this->sanitize_text( $_posted['wptv_slides_url'] );
    279                 $ip             = $_SERVER['REMOTE_ADDR'];
     275                $video_title             = $this->sanitize_text( $_posted['wptv_video_title'] );
     276                $video_producer_username = $this->sanitize_text( $_posted['wptv_video_producer_username'] );
     277                $speakers                = $this->sanitize_text( $_posted['wptv_speakers'] );
     278                $event                   = $this->sanitize_text( $_posted['wptv_event'] );
     279                $description             = $this->sanitize_text( $_posted['wptv_video_description'], false );
     280                $language                = $this->sanitize_text( $_posted['wptv_language'] );
     281                $slides                  = $this->sanitize_text( $_posted['wptv_slides_url'] );
     282                $ip                      = $_SERVER['REMOTE_ADDR'];
    280283
    281284                $categories = '';
    282285                if ( ! empty( $_posted['post_category'] ) && is_array( $_posted['post_category'] ) ) {
    class WPTV_Anon_Upload { 
    289292                }
    290293
    291294                $post_meta = array(
    292                         'attachment_id'   => $attachment_id,
    293                         'submitted_by'    => $anon_author,
    294                         'submitted_email' => $anon_author_email,
    295                         'title'           => $video_title,
    296                         'producer'        => $video_producer,
    297                         'speakers'        => $speakers,
    298                         'event'           => $event,
    299                         'language'        => $language,
    300                         'categories'      => $categories,
    301                         'description'     => $description,
    302                         'slides'          => $slides,
    303                         'ip'              => $ip,
     295                        'attachment_id'     => $attachment_id,
     296                        'submitted_by'      => $anon_author,
     297                        'submitted_email'   => $anon_author_email,
     298                        'title'             => $video_title,
     299                        'producer_username' => $video_producer_username,
     300                        'speakers'          => $speakers,
     301                        'event'             => $event,
     302                        'language'          => $language,
     303                        'categories'        => $categories,
     304                        'description'       => $description,
     305                        'slides'            => $slides,
     306                        'ip'                => $ip,
    304307                );
    305308
    306309                $post_meta['video_guid'] = $video_data->guid;
    class WPTV_Anon_Upload { 
    327330
    328331                $attachment_post = get_post( $meta['attachment_id'] );
    329332
    330                 $embed_args = array(
     333                $embed_args            = array(
    331334                        'format'  => 'fmt_std',
    332335                        'width'   => 600,
    333336                        'context' => 'admin',
    class WPTV_Anon_Upload { 
    335338                $embed_args['blog_id'] = get_current_blog_id();
    336339                $embed_args['post_id'] = $meta['attachment_id'];
    337340
    338                 // Add slides index to meta (necessary for posts that were uploaded before the field was added)
    339                 if ( ! array_key_exists( 'slides', $meta ) ) {
    340                         $meta['slides'] = '';
     341                // Add missing indexes to meta (necessary for posts that were uploaded before the fields were added)
     342                $new_fields = array(
     343                        'slides',
     344                        'producer_username',
     345                );
     346                foreach ( $new_fields as $field ) {
     347                        if ( ! array_key_exists( $field, $meta ) ) {
     348                                $meta[$field] = '';
     349                        }
    341350                }
    342351
    343352                ?>
    class WPTV_Anon_Upload { 
    401410                                        <tr>
    402411                                                <td>
    403412                                                        <?php
    404                                                                 if ( function_exists( 'video_embed' ) ) {
    405                                                                         echo video_embed( $embed_args );
    406                                                                 }
     413                                                        if ( function_exists( 'video_embed' ) ) {
     414                                                                echo video_embed( $embed_args );
     415                                                        }
    407416                                                        ?>
    408417                                                </td>
    409418                                        </tr>
    class WPTV_Anon_Upload { 
    412421                                <div class="anon-data">
    413422                                        <div class="row">
    414423                                                <p class="label">Submitted by:<br></p>
     424
    415425                                                <p class="data">
    416                                                         <input type="text" readonly="readonly" value="<?php echo esc_attr( $meta['submitted_by'] ); ?>"/>
     426                                                        <input type="text" readonly="readonly"
     427                                                               value="<?php echo esc_attr( $meta['submitted_by'] ); ?>"/>
    417428                                                </p>
    418429                                        </div>
    419430
    420431                                        <div class="row">
    421432                                                <p class="label">Email:</p>
     433
    422434                                                <p class="data">
    423435                                                        <a href="mailto:<?php echo esc_attr( $meta['submitted_email'] ); ?>?Subject=Your%20WordPress.tv%20submission"><?php echo esc_html( $meta['submitted_email'] ); ?></a>
    424436                                                </p>
    class WPTV_Anon_Upload { 
    426438
    427439                                        <div class="row">
    428440                                                <p class="label">IP Address:</p>
     441
    429442                                                <p class="data">
    430                                                         <a href="<?php echo esc_url( add_query_arg( array( 'query' => $meta['ip'] ), 'http://en.utrace.de' ) ); ?>" target="_blank"><?php echo esc_html( $meta['ip'] ); ?></a> (opens in new tab, shows location of the IP)
     443                                                        <a href="<?php echo esc_url( add_query_arg( array( 'query' => $meta['ip'] ), 'http://en.utrace.de' ) ); ?>"
     444                                                           target="_blank"><?php echo esc_html( $meta['ip'] ); ?></a> (opens in new tab, shows
     445                                                        location of the IP)
    431446                                                </p>
    432447                                        </div>
    433448
    434449                                        <div class="row">
    435450                                                <p class="label">Title:</p>
     451
    436452                                                <p class="data">
    437453                                                        <input type="text" value="<?php echo esc_attr( $meta['title'] ); ?>"/>
    438454                                                        <a class="button-secondary anon-approve" href="#title">Approve</a>
    class WPTV_Anon_Upload { 
    441457
    442458                                        <div class="row">
    443459                                                <p class="label">Language:</p>
     460
    444461                                                <p class="data">
    445462                                                        <input type="text" value="<?php echo esc_attr( $meta['language'] ); ?>"/>
    446463                                                        <a class="button-secondary anon-approve" href="#new-tag-language">Approve</a>
    class WPTV_Anon_Upload { 
    449466
    450467                                        <div class="row">
    451468                                                <p class="label">Categories:</p>
     469
    452470                                                <p class="data" id="anon-approve-cats">
    453471                                                        <?php
    454                                                                 $cats = preg_replace( '/[^0-9,]+/', '', trim( $meta['categories'], ' ,' ) );
    455                                                                 $cats = explode( ',', $cats );
    456                                                                 foreach ( $cats as $cat ) {
    457                                                                         if ( intval( $cat ) ) {
    458                                                                                 echo '<a href="#in-category-' . $cat . '" class="anon-cat-link" title="Click to approve">Unknown?</a>, ';
    459                                                                         }
     472                                                        $cats = preg_replace( '/[^0-9,]+/', '', trim( $meta['categories'], ' ,' ) );
     473                                                        $cats = explode( ',', $cats );
     474                                                        foreach ( $cats as $cat ) {
     475                                                                if ( intval( $cat ) ) {
     476                                                                        echo '<a href="#in-category-' . $cat . '" class="anon-cat-link" title="Click to approve">Unknown?</a>, ';
    460477                                                                }
     478                                                        }
    461479                                                        ?>
    462480                                                </p>
    463481                                        </div>
    464482
    465483                                        <div class="row">
    466484                                                <p class="label">Event:</p>
     485
    467486                                                <p class="data">
    468487                                                        <input type="text" value="<?php echo esc_attr( $meta['event'] ); ?>"/>
    469488                                                        <a class="button-secondary anon-approve" href="#new-tag-event">Approve</a>
    class WPTV_Anon_Upload { 
    471490                                        </div>
    472491
    473492                                        <div class="row">
    474                                                 <p class="label">Producer:</p>
     493                                                <p class="label">Producer w.org Username:</p>
     494
    475495                                                <p class="data">
    476                                                         <input type="text" value="<?php echo esc_attr( $meta['producer'] ); ?>"/>
    477                                                         <a class="button-secondary anon-approve" href="#new-tag-producer">Approve</a>
     496                                                        <input type="text" value="<?php echo esc_attr( $meta['producer_username'] ); ?>"/>
     497                                                        <a class="button-secondary anon-approve" href="#wptv-producer-username">Approve</a>
    478498                                                </p>
    479499                                        </div>
    480500
    481501                                        <div class="row">
    482502                                                <p class="label">Speakers:</p>
     503
    483504                                                <p class="data">
    484505                                                        <input type="text" value="<?php echo esc_attr( $meta['speakers'] ); ?>"/>
    485506                                                        <a class="button-secondary anon-approve" href="#new-tag-speakers">Approve</a>
    class WPTV_Anon_Upload { 
    488509
    489510                                        <div class="row txtarea">
    490511                                                <p class="label">Description:</p>
     512
    491513                                                <p class="data">
    492514                                                        <textarea rows="10"><?php echo esc_html( $meta['description'] ); ?></textarea>
    493515                                                        <a class="button-secondary anon-approve" href="#excerpt">Approve</a>
    class WPTV_Anon_Upload { 
    496518
    497519                                        <div class="row">
    498520                                                <p class="label">Slides:</p>
     521
    499522                                                <p class="data">
    500523                                                        <input type="text" value="<?php echo esc_attr( $meta['slides'] ); ?>"/>
    501524                                                        <a class="button-secondary anon-approve" href="#wptv-slides-url">Approve</a>
    class WPTV_Anon_Upload { 
    504527
    505528                                        <div class="row">
    506529                                                <p class="label">Edit attachment:</p>
     530
    507531                                                <p class="data">
    508                                                         <a href="<?php echo esc_url( get_edit_post_link( $meta['attachment_id'] ) ); ?>" target="_blank"><?php echo esc_html( $attachment_post->post_title ); ?></a>
     532                                                        <a href="<?php echo esc_url( get_edit_post_link( $meta['attachment_id'] ) ); ?>"
     533                                                           target="_blank"><?php echo esc_html( $attachment_post->post_title ); ?></a>
    509534                                                </p>
    510535                                        </div>
    511536                                </div>
    class WPTV_Anon_Upload { 
    539564                                                if (id.indexOf('#new-tag-') != -1) {
    540565                                                        el.val(target.siblings('input[type="text"]').val());
    541566                                                        el.siblings('.tagadd').click();
    542                                                 } else if ('#title' == id  || '#wptv-slides-url' == id) {
     567                                                } else if ('#title' == id || '#wptv-producer-username' == id) {
     568                                                        el.val(target.siblings('input[type="text"]').val());
     569                                                } else if ('#title' == id || '#wptv-slides-url' == id) {
    543570                                                        el.val(target.siblings('input[type="text"]').val());
    544571                                                } else if (id == '#excerpt') {
    545572                                                        el.val(target.siblings('textarea').val());
  • sidebar-single.php

    diff --git sidebar-single.php sidebar-single.php
    index 84a2fe6..14527a9 100755
     
    8181                                                printf( '<a href="%s">Subtitle this video &rarr;</a>', esc_url( add_query_arg( 'video', $video->post_id, home_url( 'subtitle/' ) ) ) );
    8282                                        }
    8383                                }
    84                         ?>
     84
     85                        // Credit video producer with link to their w.org profile
     86                        $producer_username = get_post_meta( get_the_ID(), '_wptv_producer_username', true );
     87                        $producer_name = ( get_the_terms( get_the_ID(), 'producer' ) ) ? get_the_terms( get_the_ID(), 'producer' )[0]->name : $producer_username;
     88
     89                        if ( $producer_username ) { ?>
     90                                <h5>Producer</h5>
     91                                <div class="video-producer">
     92                                        <a href="http://profiles.wordpress.org/<?php esc_attr_e( $producer_username ); ?>"><?php esc_attr_e( $producer_name ); ?></a>
     93                                </div>
     94                        <?php } ?>
     95
    8596</div><!-- .secondary-content -->
  • style.css

    diff --git style.css style.css
    index fc417b9..7865023 100755
    Author: Automattic 
    77Author URI: http://automattic.com/
    88*/
    99
    10 /*
    11 Media breakpoints:
    12 large 940
    13 medium 620
    14 small 400
    15 */
    16 
    1710/* meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
    1811html, body, div, span, applet, object, iframe,
    1912h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    form, fieldset, address { 
    216209
    217210#header {
    218211        margin-top: 10px;
     212        height: 57px;
    219213}
    220 @media screen and ( max-width:940px ) {
    221         #header {
    222                 padding: 0 10px;
    223         }
    224 }
    225 @media screen and ( min-width:601px ) {
    226         #header {
    227                 height: 57px;
    228         }
    229 }
     214
    230215#header h1 {
    231216        padding-top: 8px;
    232217        float: left;
    233218}
    234219
    235220#header .sleeve {
    236         max-width: 942px;
     221        width: 942px;
    237222        margin: 0 auto;
    238223}
    239224
    form, fieldset, address { 
    268253        color: #000 !important;
    269254}
    270255
    271 @media screen and ( min-width:401px ) {
    272         #searchform {
    273                 float: right;
    274                 margin-left: 15px;
    275         }
     256#searchform {
     257        float: right;
     258        margin-left: 15px;
    276259}
    277260
    278261#searchform #searchbox,
    form, fieldset, address { 
    295278        width: 130px;
    296279}
    297280
    298 @media screen and ( max-width:400px ) {
    299         #searchform #searchbox,
    300         #searchform input#s {
    301                 width: 95%;
    302         }
    303 }
    304 
    305281#searchform #searchbox {
    306282        margin-top: 15px;
    307283}
    308284
    309 /* Mobile menu */
    310 @media screen and ( min-width:601px ) {
    311         #menu-mobile {
    312                 display: none;
    313         }
    314 }
    315 
    316 @media screen and ( max-width:600px ) {
    317         #menu {
    318                 display: none;
    319         }
    320         #menu-mobile {
    321                 display: inline-block;
    322         }
    323 }
    324 
    325 #menu-mobile {
    326         width: 100%;
    327         text-align: center;
    328         font-size: 1.8em;
    329         line-height: 1.6em;
    330         margin: 10px 0 0 0;
    331 }
    332 #menu-mobile .open {
    333         cursor: pointer;
    334         color: #21759b;
    335         font-weight: bold;
    336         padding: 6px 20px;
    337         border: 1px solid;
    338 }
    339 #menu-mobile .open:hover {
    340         color: #d54e21;
    341 }
    342 /* Forms */
    343 
    344285input[type=submit], button, .button {
    345286        text-decoration: none;
    346287        -moz-border-radius: 5px;
    input[type=submit]:active, button:active, .button:active { 
    415356        );
    416357}
    417358
    418 /* Intro */
    419359.intro {
    420360        font-size: 30px;
    421361        height: 64px;
    div.sharedaddy.sd-rating-enabled .sd-like .post-likes-widget, div.sharedaddy.sd- 
    14891429        display: none;
    14901430}
    14911431
    1492 /*
    14931432#content {
    14941433        width: 630px;
    14951434        float: left;
    14961435}
    1497 */
    14981436
    14991437#content .post {
    15001438        margin-bottom: 20px;
    div.sharedaddy.sd-rating-enabled .sd-like .post-likes-widget, div.sharedaddy.sd- 
    15781516}
    15791517
    15801518#commentform textarea {
    1581         width: 96%;
     1519        width: 600px;
    15821520        height: 100px;
    15831521        margin-bottom: 5px;
    15841522}
    div.sharedaddy.sd-rating-enabled .sd-like .post-likes-widget, div.sharedaddy.sd- 
    16431581        font-size: 10px;
    16441582}
    16451583
     1584#footer {
     1585        clear: both;
     1586        height: 3.5em;
     1587        margin-bottom: 15px;
     1588        color: #888;
     1589}
     1590
    16461591#footer .automattic {
     1592        width: 400px;
     1593        float: right;
     1594        text-align: right;
    16471595        font-size: 11px;
    16481596        letter-spacing: 0.2em;
    1649         padding: 13px 2px 0 0;
     1597        line-height: 3em;
     1598        padding-top: 13px;
     1599        padding-right: 2px;
    16501600        text-transform: uppercase;
    16511601        line-height: 28px;
    16521602}
    16531603
    1654 @media screen and ( max-width:920px ) {
    1655         #footer .automattic {
    1656                 width: 100%;
    1657                 clear: both;
    1658         }
    1659 }
    1660 
    1661 @media screen and ( min-width:921px ) {
    1662         #footer .automattic {
    1663                 width: 380px;
    1664                 float: right;
    1665                 text-align: right;
    1666         }
    1667 }
    1668 
    16691604.menu-footer-container {
    16701605        float: left;
    16711606        line-height: 4em;
    div.sharedaddy.sd-rating-enabled .sd-like .post-likes-widget, div.sharedaddy.sd- 
    16741609        margin-bottom: 0;
    16751610}
    16761611
    1677 @media screen and ( min-width:621px ) {
    1678         .menu-footer-container li {
    1679                 display: inline-block;
    1680         }
    1681 }
    1682 
    1683 @media screen and ( max-width:620px ) {
    1684         .dot {
    1685                 display: none;
    1686         }
     1612.menu-footer-container li {
     1613        display: inline-block;
    16871614}
    16881615
    16891616.menu-footer-container li:last-of-type .dot {
    a { 
    18631790}
    18641791
    18651792.container {
    1866         max-width: 940px;
     1793        width: 940px;
    18671794        margin: auto;
    18681795}
    18691796
    18701797.primary-content {
     1798        float: left;
     1799        width: 700px;
    18711800        margin: 0;
    18721801}
    18731802
    1874 @media screen and ( max-width:940px ) {
    1875         .primary-content {
    1876                 padding: 0 10px;
    1877         }
    1878 }
    1879 
    1880 @media screen and ( min-width:941px ) {
    1881         .primary-content {
    1882                 float: left;
    1883                 max-width: 700px;
    1884         }
    1885 }
    1886 
    18871803.secondary-content {
    1888         margin: 0 10px;
    1889 }
    1890 
    1891 @media screen and ( min-width:941px ) {
    1892         .secondary-content {
    1893                 float: right;
    1894                 width: 170px;
    1895                 margin: 0 0 50px 0;
    1896         }
     1804        float: right;
     1805        width: 170px;
     1806        margin: 0 0 50px 0;
    18971807}
    18981808
    18991809.miro {
    a { 
    19391849.nav-previous {
    19401850        float: left;
    19411851}
     1852
    19421853.primary-content #searchform {
    19431854        float: none;
    19441855        margin: 10px 0;
    body, td, p, 
    20201931}
    20211932
    20221933.page-title {
    2023         max-width: 940px;
     1934        width: 940px;
    20241935        margin: auto;
    20251936}
    20261937
    h5 { 
    21872098        background: #F0F0F0;
    21882099}
    21892100
    2190 @media screen and ( max-width:940px ) {
    2191         .wptv-hero {
    2192                 padding: 30px 10px 10px;
    2193         }
    2194 }
    2195 
    21962101.wptv-hero .main-video {
    21972102        background: #2f2f2f;
    21982103        clear: both;
    2199 }
    22002104
    2201 @media screen and ( min-width:941px ) {
    2202         .wptv-hero .main-video {
    2203                 float: left;
    2204         }
     2105        float: left;
     2106        width: 575px;
    22052107}
    22062108
    22072109.wptv-hero .main-video .video-player {
    22082110        width: 100% !important;
     2111        height: 323px !important;
    22092112        margin: 0 !important;
    22102113}
    22112114
    2212 @media screen and ( min-width:601px ) {
    2213         .wptv-hero .main-video {
    2214                 width: 575px;
    2215         }
    2216         .wptv-hero .main-video .video-player {
    2217                 height: 323px !important;
    2218         }
    2219 }
    2220 
    2221 @media screen and ( max-width:600px ) {
    2222         .wptv-hero .main-video .video-player {
    2223                 height: auto !important;
    2224         }
    2225 }
    2226 
    22272115.wptv-hero .main-video .video-player .videopress-placeholder {
    22282116        margin: 0;
    22292117        width: 100% !important;
    h5 { 
    22772165        display: none;
    22782166}
    22792167
    2280 @media screen and ( min-width:941px ) {
    2281         .wptv-hero .secondary-videos {
    2282                 float: right;
    2283                 width: 345px;
    2284         }
    2285 }
    2286 
    2287 @media screen and ( max-width:940px ) {
    2288         .wptv-hero .secondary-videos {
    2289                 display: inline-block;
    2290                 margin-top: 20px;
    2291         }
     2168.wptv-hero .secondary-videos {
     2169        float: right;
     2170        width: 345px;
    22922171}
    22932172
    22942173.wptv-hero .secondary-videos h3 {
    h5 { 
    23032182.wptv-hero .secondary-videos li {
    23042183        font-size: 13px;
    23052184
    2306         min-height: 78px;
     2185        min-height: 75px;
    23072186        position: relative;
    23082187
    23092188        margin: 0 auto 23px 0;
    23102189        padding: 0 0 0 142px;
    23112190}
    2312 @media screen and ( min-width:620px ) and ( max-width:940px ) {
    2313         .wptv-hero .secondary-videos li {
    2314                 width: 25%;
    2315                 float: left;
    2316         }
    2317 }
    23182191
    23192192.wptv-hero .secondary-videos img {
    23202193        width: 130px;
    h5 { 
    23282201        opacity: 0.8;
    23292202}
    23302203
    2331 @media screen and ( max-width:940px ) {
    2332         .wptv-category-title {
    2333                 display: inline-block;
    2334         }
    2335 }
    2336 
    23372204/* Video lists
    23382205============================================================= */
    23392206
    h5 { 
    23422209}
    23432210
    23442211.video-list li {
     2212        float: left;
     2213        min-height: 220px;
    23452214        margin-bottom: 20px;
    23462215}
    23472216
    h5 { 
    23532222.video-list li .video-thumbnail {
    23542223        display: block;
    23552224        width: 100%;
     2225        height: 100px;
    23562226
    23572227        margin: 0 0 8px 0;
    23582228
    h5 { 
    23602230        position: relative;
    23612231}
    23622232
    2363 @media screen and ( min-width:941px ) {
    2364         .video-list.four-col {
    2365                 width: 860px;
    2366         }
     2233.video-list.four-col {
     2234        width: 860px;
    23672235}
    23682236
    2369 @media screen and ( min-width:395px ) {
    2370         .video-list li {
    2371                 float: left;
    2372                 min-height: 220px;
    2373         }
    2374         .video-list.four-col li {
    2375                 width: 160px;
    2376                 margin-right: 20px;
    2377         }
     2237.video-list.four-col li {
     2238        width: 160px;
     2239        margin-right: 20px;
    23782240}
    23792241
    23802242.secondary-content .video-list .video-title {
    h5 { 
    24112273        position: relative;
    24122274}
    24132275
    2414 @media screen and ( min-width:621px ) {
    2415         .archive.video-list .video-thumbnail {
    2416                 position: absolute;
    2417                 top: 0;
    2418                 left: 0;
     2276.archive.video-list .video-thumbnail {
     2277        position: absolute;
     2278        top: 0;
     2279        left: 0;
    24192280
    2420                 width: 220px;
    2421                 height: 120px;
     2281        width: 220px;
     2282        height: 120px;
    24222283
    2423                 margin: 0 20px 0 0;
    2424         }
    2425         .archive.video-list .video-description {
    2426                 display: block;
    2427                 padding-left: 240px;
    2428         }
     2284        margin: 0 20px 0 0;
    24292285}
    24302286
    24312287.archive.video-list .video-title {
    h5 { 
    24332289        margin: 4px 0 8px;
    24342290}
    24352291
     2292.archive.video-list .video-description {
     2293        display: block;
     2294        padding-left: 240px;
     2295}
     2296
    24362297.archive.video-list .video-date {
    24372298        color: #aaa;
    24382299        display: block;
    body:not(.single) .video-info { 
    24892350}
    24902351
    24912352/* Video Player and Placeholder */
    2492 @media screen and ( min-width:941px ) {
    2493         .single .video-player {
    2494                 float: left;
    2495                 width: 940px !important;
    2496                 height: 529px !important;
    24972353
    2498                 overflow: hidden;
    2499         }
     2354.single .video-player {
     2355        float: left;
     2356        width: 940px !important;
     2357        height: 529px !important;
     2358
     2359        overflow: hidden;
    25002360}
     2361
    25012362.videopress-placeholder,
    25022363.video-player object {
    25032364        width: 100% !important;
    h3#comments { 
    26382499        margin: 3px 0 20px 0;
    26392500}
    26402501
    2641 @media screen and ( min-width:941px ) {
    2642         .category-wordcamptv .secondary-content {
    2643                 float: left;
    2644                 width: 170px;
    2645         }
     2502.category-wordcamptv .secondary-content {
     2503        float: left;
     2504        width: 170px;
     2505}
    26462506
    2647         .category-wordcamptv .primary-content {
    2648                 float: right;
    2649                 margin: 0;
    2650         }
     2507.category-wordcamptv .primary-content {
     2508        float: right;
     2509        margin: 0;
    26512510}
    26522511
    26532512/* WordCamp Individual Page
    h3#comments { 
    26572516        margin: 0 auto 13px 0
    26582517}
    26592518
    2660 /* Contact Page
    2661 ============================================================= */
    2662 
    2663 @media screen and ( max-width:400px ) {
    2664         .entry .contact-form textarea {
    2665                 width: 98%;
    2666         }
    2667 }
    2668 
    26692519/* Secondary Content
    26702520============================================================= */
    26712521
    h3#comments { 
    26962546============================================================= */
    26972547
    26982548.error404 .primary-content {
    2699         max-width: 940px;
     2549        width: 940px;
    27002550}
    27012551
    27022552.error404 h2 {
    h3#comments { 
    27322582
    27332583#footer {
    27342584        background: #F0F0F0;
    2735         color: #888;
    2736         margin: 10px 0 0 0;
    2737         padding: 10px;
    2738 }
    27392585
    2740 @media screen and ( min-width:921px ) {
    2741         #footer {
    2742                 clear: both;
    2743                 height: 3.5em;
    2744                 margin-bottom: 15px;
    2745         }
     2586        margin: 10px 0 0 0;
     2587        padding: 10px 0;
    27462588}
    27472589
    27482590#footer .dot {