Making WordPress.org

Changeset 1624


Ignore:
Timestamp:
05/25/2015 10:30:18 PM (11 years ago)
Author:
ocean90
Message:

Rosetta Theme: Responsive and other improvements.

  • Fix missing content on single posts.
  • Update archive template.
  • Update contact page template.
  • Add previous/next post navigation to single posts.
  • Make more link text translatable.

see #1049.

Location:
sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/archive.php

    r465 r1624  
    11<?php get_header(); ?>
    2         <div class="outer" id="mid-wrapper">
     2
     3        <div id="pagebody">
    34                <div class="wrapper">
    4                         <div class="section blog">
    5                                 <h3><?php _e('Blog', 'rosetta');?></h3>
     5                        <div class="col-9">
     6                                <?php the_archive_title( '<h2 class="fancy">', '</h2>' ); ?>
     7
     8                                <?php
     9                                $blog_url = home_url( '/#blog' );
     10                                if ( 'page' === get_option( 'show_on_front' ) ) {
     11                                        $blog_url = get_permalink( get_option('page_for_posts' ) );
     12                                }
     13                                ?>
     14                                <p><a href="<?php echo esc_url( $blog_url ); ?>"><?php _e( '&laquo; Back to blog', 'rosetta' ); ?></a></p>
     15
     16                                <table class="widefat" >
     17                                        <?php
     18                                        $i = 0;
     19                                        if ( have_posts() ) :
     20                                                while ( have_posts() ) : the_post();
     21                                                        $i++;
     22                                                        ?>
     23                                                        <tr <?php if ( $i % 2 ) echo ' class="alt" '; ?>>
     24                                                                <th>
     25                                                                        <?php the_date( '','<span class="date">', '</span>' ); ?>
     26                                                                </th>
     27                                                                <td>
     28                                                                        <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
     29                                                                </td>
     30                                                        </tr>
     31                                                        <?php
     32                                                endwhile;
     33                                        else :
     34                                                ?>
     35                                                <p><?php _e( 'Sorry, no posts matched your criteria.', 'rosetta' ); ?></p>
     36                                                <?php
     37                                        endif;
     38                                        ?>
     39                                </table>
     40
     41                                <nav class="posts-navigation">
     42                                        <?php posts_nav_link( ' &#8212; ', __( '&laquo; Newer Posts', 'rosetta' ), __( 'Older Posts &raquo;', 'rosetta' ) ); ?>
     43                                </nav>
    644                        </div>
    745                </div>
    846        </div>
    9         <?php if (have_posts()) : ?>
    10                 <div class="wrapper">
    11                         <div class="section">
    12                                 <h2 class="fancy"><?php printf(__('Archives for %s', 'rosetta'), get_the_time(__('F, Y', 'rosetta')));?></h2>
    13                                 <a href="/#blog"><?php _e('&laquo; Back to blog', 'rosetta');?></a>
    14                         </div>
    15                 </div>
    16                 <?php while (have_posts()) : the_post(); ?>
    17                 <div class="wrapper">
    18                 <div class="section blog">
    19                                 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    2047
    21                                 <p><small><em><?php the_time(__('F j, Y', 'rosetta')); ?>, <?php the_author_link(); ?></em></small></p>
    22 
    23                                 <?php the_content(__('Read the rest of this entry &raquo;', 'rosetta')); ?>
    24 
    25                                 <?php comments_popup_link(); ?>
    26                         <div class="navigation">
    27                                 <div class="nav-previous"><?php previous_posts_link(__('&larr; Older Posts', 'rosetta')) ?></div>
    28                                 <div class="nav-next"><?php next_posts_link(__('Newer Posts &rarr;', 'rosetta')) ?></div>
    29                         </div>
    30 
    31                 </div>
    32                 </div>
    33 
    34                 <?php endwhile; ?>
    35         <?php endif; ?>
    36 <?php get_footer(); ?>
     48<?php get_footer();
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/contact.php

    r1166 r1624  
    44*/
    55
    6 
    76function rosetta_set_sender( &$phpmailer ) {
    87        $phpmailer->Sender = $_POST['your_email'];
    98}
    109
     10get_header();
     11the_post();
    1112?>
    12 <?php get_header(); ?>
    13 <div class="wrapper">
    14         <div class="section">
    15     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
     13        <div id="headline">
     14                <div class="wrapper">
     15                        <h2><?php the_title(); ?></h2>
     16                </div>
     17        </div>
     18
     19        <div id="pagebody">
     20                <div class="wrapper">
     21                        <div class="col-9">
    1622
    1723<?php
    1824if ( ! empty( $_POST['submit'] ) ) {
    1925
    20 // Check values
    21 $error = $your_name = $blog_name = $your_email = $blog_url = $message = false;
    22 if ('' == $_POST['your_name']) {
    23         $your_name = true;
    24         $error = true;
    25 }
    26 
    27 if (!validate_email($_POST['your_email'])) {
    28         $your_email = true;
    29         $error = true;
    30 }
    31 
    32 if ('' == $_POST['message']) {
    33         $blog_description = true;
    34         $error = true;
    35 }
    36 
    37 if ('' == $_POST['subject']) {
    38         $subject = true;
    39         $error = true;
    40 }
    41 
    42 if ($error) {
    43 ?>
    44 <h3 id="return"><?php _e('Error', 'rosetta'); ?></h3>
    45 <p class="error"><?php _e('There seems to have been a problem with the information you entered. Please fix the field indicated and resubmit.', 'rosetta'); ?></p>
    46 <form id="contactme" method="post" action="/contact/#return">
    47   <table id="form">
    48 <?php if ($your_name) { ?>
    49     <tr class="error">
    50                 <td class="label"><label for="your_name"><?php _e('Your Name:', 'rosetta'); ?> </label></td>
    51                 <td><span><input name="your_name" type="text" id="your_name" value="<?php echo esc_attr( $_POST['your_name'], 1 ); ?>" /></span>
    52                 <?php _e('Let us know your name.', 'rosetta'); ?></td>
    53     </tr>
    54 <?php } else { ?>
    55     <tr>
    56         <td class="label"><label for="your_name"><?php _e('Your Name:', 'rosetta'); ?></label></td>
    57                 <td><span><input name="your_name" type="text" id="your_name" value="<?php echo esc_attr( $_POST['your_name'], 1 ); ?>" /></span></td>
    58     </tr>
    59 <?php } ?>
    60 
    61 <?php if ($your_email) { ?>
    62     <tr class="error">
    63         <td class="label"><label for="your_email"><?php _e('Your Email:', 'rosetta'); ?></label></td>
    64                 <td><span><input name="your_email" type="text" id="your_email" value="<?php echo esc_attr( $_POST['your_email'], 1 ); ?>" /></span>
    65 <?php _e('Your email address did not appear to be valid. Please check it.', 'rosetta'); ?></td>
    66     </tr>
    67 <?php } else { ?>
    68     <tr>
    69                 <td class="label"><label for="your_email"><?php _e('Your Email:', 'rosetta'); ?></label></td>
    70                 <td><span><input name="your_email" type="text" id="your_email" value="<?php echo esc_attr( $_POST['your_email'], 1 ); ?>" /></span></td>
    71     </tr>
    72 <?php } ?>
    73 
    74     <tr>
    75         <td class="label"><label for="blog_url"><?php _e('URI of your blog:', 'rosetta'); ?></label></td>
    76                 <td><span><input name="blog_url" type="text" id="blog_url" value="<?php echo esc_attr( $_POST['blog_url'], 1 ); ?>" /></span></td>
    77     </tr>
    78 <?php if ($subject) { ?>
    79     <tr class="error">
    80                 <td class="label"><label for="subject"><?php _e('What&rsquo;s this about?', 'rosetta'); ?></label></td>
    81                 <td><span><input name="subject" type="text" id="subject" value="<?php echo esc_attr( $_POST['subject'], 1 ); ?>" /></span> <?php _e('Write something!', 'rosetta'); ?></td>
    82     </tr>
    83 <?php } else { ?>
    84     <tr>
    85                 <td class="label"><label for="subject"><?php _e('What&rsquo;s this about?', 'rosetta'); ?></label></td>
    86                 <td><span><input name="subject" type="text" id="subject" value="<?php echo esc_attr( $_POST['subject'], 1 ); ?>" /></span></td>
    87     </tr>
    88 <?php } ?>
    89 
    90 <?php if ($blog_description) { ?>
    91     <tr class="error">
    92         <td class="label"><label for="message"><?php _e('Your Message:', 'rosetta'); ?></label></td>
    93                 <td><span class="message"><textarea name="message" id="message"><?php echo esc_textarea( $_POST['message'], 1 ); ?></textarea></span>
    94 <?php _e('Say something!', 'rosetta'); ?></td>
    95     </tr>
    96 <?php } else { ?>
    97     <tr>
    98         <td class="label"><label for="message"><?php _e('Your Message:', 'rosetta'); ?></label></td>
    99                 <td><span class="message"><textarea name="message" id="message"><?php echo esc_textarea( $_POST['message'], 1 ); ?></textarea></span></td>
    100     </tr>
    101 <?php } ?>
    102         <tr class="submit">
    103                 <td class="label"></td>
    104                 <td><input type="submit" name="submit" value="<?php esc_attr_e('Submit Form Again', 'rosetta'); ?>" /></td>
    105         </tr>
    106   </table>
    107 </form>
    108 
    109 <?php } else { // If all the info is good
    110 
    111 // Akismet checking
    112         $comment['user_ip']    = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
    113         $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
    114         $comment['referrer']   = $_SERVER['HTTP_REFERER'];
    115         $comment['blog']       = home_url();
    116         $comment['comment_type'] = 'contact_form';
    117         $comment['comment_author'] = '';
    118         $comment['comment_author_email'] = $_POST['your_email'];
    119         $comment['comment_author_url'] = $_POST['blog_url'];
    120         $comment['comment_content'] = stripslashes($_POST['message']);
    121         $query_string = '';
    122         foreach ( $comment as $key => $data )
    123                 $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
    124         $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
    125         if ( 'true' == $response[1] )
    126                 die();
    127 // end Akismet checking
    128 
    129 
    130 
    131 //sanitization
    132         $message_data = array();
    133         $message_data['ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
    134         $message_data['name'] = sanitize_text_field( $_POST['your_name'] );
    135         $message_data['email'] = sanitize_email( $_POST['your_email'] );
    136         $message_data['blog_url'] = esc_url_raw( $_POST['blog_url'] );
    137         $message_data['subject'] = sanitize_text_field( $_POST['subject'] );
    138         $message_data['message'] = wp_kses( stripslashes( $_POST['message'] ), array() );
    139 
    140 // Let's send an email
    141 $message = $message_data['message'] . '
     26        // Check values
     27        $error = $your_name = $blog_name = $your_email = $blog_url = $message = false;
     28        if ( '' == $_POST['your_name'] ) {
     29                $your_name = true;
     30                $error = true;
     31        }
     32
     33        if ( ! validate_email( $_POST['your_email'] ) ) {
     34                $your_email = true;
     35                $error = true;
     36        }
     37
     38        if ( '' == $_POST['message'] ) {
     39                $blog_description = true;
     40                $error = true;
     41        }
     42
     43        if ( '' == $_POST['subject'] ) {
     44                $subject = true;
     45                $error = true;
     46        }
     47
     48        if ( $error ) {
     49                ?>
     50                <h3 id="return"><?php _e( 'Error', 'rosetta' ); ?></h3>
     51                <p class="error"><?php _e( 'There seems to have been a problem with the information you entered. Please fix the field indicated and resubmit.', 'rosetta' ); ?></p>
     52                <form id="contactme" method="post" action="/contact/#return">
     53                        <table id="form">
     54
     55                                <?php if ( $your_name ) { ?>
     56                                        <tr class="error">
     57                                                <td class="label">
     58                                                        <label for="your_name"><?php _e( 'Your Name:', 'rosetta' ); ?> </label>
     59                                                </td>
     60                                                <td>
     61                                                        <span><input name="your_name" type="text" id="your_name" value="<?php echo esc_attr( $_POST['your_name'] ); ?>" /></span>
     62                                                        <?php _e( 'Let us know your name.', 'rosetta' ); ?>
     63                                                </td>
     64                                        </tr>
     65                                <?php } else { ?>
     66                                        <tr>
     67                                                <td class="label">
     68                                                        <label for="your_name"><?php _e( 'Your Name:', 'rosetta' ); ?></label>
     69                                                </td>
     70                                                <td>
     71                                                        <span><input name="your_name" type="text" id="your_name" value="<?php echo esc_attr( $_POST['your_name'] ); ?>" /></span>
     72                                                </td>
     73                                        </tr>
     74                                <?php } ?>
     75
     76                                <?php if ( $your_email ) { ?>
     77                                        <tr class="error">
     78                                                <td class="label">
     79                                                        <label for="your_email"><?php _e( 'Your Email:', 'rosetta' ); ?></label>
     80                                                </td>
     81                                                <td>
     82                                                        <span><input name="your_email" type="text" id="your_email" value="<?php echo esc_attr( $_POST['your_email'] ); ?>" /></span>
     83                                                        <?php _e( 'Your email address did not appear to be valid. Please check it.', 'rosetta' ); ?>
     84                                                </td>
     85                                        </tr>
     86                                <?php } else { ?>
     87                                        <tr>
     88                                                <td class="label">
     89                                                        <label for="your_email"><?php _e( 'Your Email:', 'rosetta' ); ?></label>
     90                                                </td>
     91                                                <td>
     92                                                        <span><input name="your_email" type="text" id="your_email" value="<?php echo esc_attr( $_POST['your_email'] ); ?>" /></span>
     93                                                </td>
     94                                        </tr>
     95                                <?php } ?>
     96
     97                                <tr>
     98                                        <td class="label">
     99                                                <label for="blog_url"><?php _e( 'URI of your blog:', 'rosetta' ); ?></label>
     100                                        </td>
     101                                        <td>
     102                                                <span><input name="blog_url" type="text" id="blog_url" value="<?php echo esc_attr( $_POST['blog_url'] ); ?>" /></span>
     103                                        </td>
     104                                </tr>
     105
     106                                <?php if ( $subject ) { ?>
     107                                        <tr class="error">
     108                                                <td class="label">
     109                                                        <label for="subject"><?php _e( 'What&rsquo;s this about?', 'rosetta' ); ?></label>
     110                                                </td>
     111                                                <td>
     112                                                        <span><input name="subject" type="text" id="subject" value="<?php echo esc_attr( $_POST['subject'] ); ?>" /></span>
     113                                                        <?php _e( 'Write something!', 'rosetta' ); ?>
     114                                                </td>
     115                                        </tr>
     116                                <?php } else { ?>
     117                                        <tr>
     118                                                <td class="label">
     119                                                        <label for="subject"><?php _e('What&rsquo;s this about?', 'rosetta'); ?></label>
     120                                                </td>
     121                                                <td>
     122                                                        <span><input name="subject" type="text" id="subject" value="<?php echo esc_attr( $_POST['subject'] ); ?>" /></span>
     123                                                </td>
     124                                        </tr>
     125                                <?php } ?>
     126
     127                                <?php if ( $blog_description ) { ?>
     128                                        <tr class="error">
     129                                                <td class="label">
     130                                                        <label for="message"><?php _e('Your Message:', 'rosetta'); ?></label>
     131                                                </td>
     132                                                <td>
     133                                                        <span class="message"><textarea name="message" id="message"><?php echo esc_textarea( $_POST['message'] ); ?></textarea></span>
     134                                                        <?php _e( 'Say something!', 'rosetta' ); ?>
     135                                                </td>
     136                                        </tr>
     137                                <?php } else { ?>
     138                                        <tr>
     139                                                <td class="label">
     140                                                        <label for="message"><?php _e( 'Your Message:', 'rosetta' ); ?></label>
     141                                                </td>
     142                                                <td>
     143                                                        <span class="message"><textarea name="message" id="message"><?php echo esc_textarea( $_POST['message'] ); ?></textarea></span>
     144                                                </td>
     145                                        </tr>
     146                                <?php } ?>
     147
     148                                <tr class="submit">
     149                                        <td class="label"></td>
     150                                        <td>
     151                                                <input type="submit" name="submit" value="<?php esc_attr_e( 'Submit Form Again', 'rosetta' ); ?>" />
     152                                        </td>
     153                                </tr>
     154                        </table>
     155                </form>
     156                <?php
     157        } else { // If all the info is good
     158
     159                // Akismet checking
     160                $comment['user_ip']              = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
     161                $comment['user_agent']           = $_SERVER['HTTP_USER_AGENT'];
     162                $comment['referrer']             = $_SERVER['HTTP_REFERER'];
     163                $comment['blog']                 = home_url();
     164                $comment['comment_type']         = 'contact_form';
     165                $comment['comment_author']       = '';
     166                $comment['comment_author_email'] = $_POST['your_email'];
     167                $comment['comment_author_url']   = $_POST['blog_url'];
     168                $comment['comment_content']      = stripslashes( $_POST['message'] );
     169                $query_string = '';
     170                foreach ( $comment as $key => $data ) {
     171                        $query_string .= $key . '=' . urlencode( stripslashes( $data ) ) . '&';
     172                }
     173                $response = akismet_http_post( $query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port );
     174                if ( 'true' == $response[1] ) {
     175                        die();
     176                }
     177
     178                // Sanitization
     179                $message_data = array();
     180                $message_data['ip']       = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
     181                $message_data['name']     = sanitize_text_field( $_POST['your_name'] );
     182                $message_data['email']    = sanitize_email( $_POST['your_email'] );
     183                $message_data['blog_url'] = esc_url_raw( $_POST['blog_url'] );
     184                $message_data['subject']  = sanitize_text_field( $_POST['subject'] );
     185                $message_data['message']  = wp_kses( stripslashes( $_POST['message'] ), array() );
     186
     187                // Let's send an email
     188                $message = $message_data['message'] . '
    142189--
    143190Name: ' . $message_data['name'] . '
     
    148195Sent From: ' . esc_url_raw( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    149196
    150 $headers = array();
    151 $headers[] = 'From: ' . $message_data['name'] . ' <' . $message_data['email'].'>';
    152 $headers[] = 'Return-Path: '. $message_data['email'];
    153 
    154 add_action('phpmailer_init', 'rosetta_set_sender');
    155 wp_mail(get_option('admin_email'), '[wordpress.org] ' . $message_data['subject'], $message, implode("\r\n", $headers));
    156 remove_action('phpmailer_init', 'rosetta_set_sender');
    157 ?>
    158 <div id="return">
    159 <h3><?php _e('Submitted!', 'rosetta'); ?></h3>
    160 <p><strong><?php _e('Thank you!', 'rosetta'); ?></strong></p>
    161 </div>
    162 <?php } ?>
    163 <?php } else { ?>
    164 
    165 <h3><?php _e('Contact', 'rosetta'); ?></h3>
    166 
    167 <?php if ( false !== strpos( get_the_content(), 'The contents of this page are filled automatically' ) ) : ?>
    168         <p><?php _e('You can contact translators and this site administrators via this form:', 'rosetta'); ?></p>
    169         <?php /* translators: feel free to add links to places, where one can get support in your language. */ ?>
    170         <p><?php _e('<strong>Please, do not post support requests here!</strong> They will probably be ignored.', 'rosetta'); ?></p>
    171 <?php else: ?>
    172         <?php the_content(); ?>
    173 <?php endif; ?>
    174 
    175 <form id="contactme" method="post" action="/contact/#return">
    176   <table id="form">
    177     <tr>
    178         <td class="label"><label for="your_name"><?php _e('Your Name:', 'rosetta'); ?></label> <?php _e('(required)', 'rosetta'); ?></td>
    179                 <td><span><input name="your_name" type="text" id="your_name" /></span></td>
    180     </tr>
    181     <tr>
    182         <td class="label"><label for="your_email"><?php _e('Your Email:', 'rosetta'); ?></label> <?php _e('(required)', 'rosetta'); ?></td>
    183                 <td><span><input name="your_email" type="text" id="your_email" /></span></td>
    184     </tr>
    185     <tr>
    186         <td class="label"><label for="blog_url"><?php _e('URI of your blog:', 'rosetta'); ?></label></td>
    187                 <td><span><input name="blog_url" type="text" id="blog_url" /></span></td>
    188     </tr>
    189     <tr>
    190         <td class="label"><label for="subject"><?php _e('What&rsquo;s this about?', 'rosetta'); ?></label> <?php _e('(required)', 'rosetta'); ?></td>
    191                 <td><span><input name="subject" type="text" id="subject" /></span></td>
    192     </tr>
    193     <tr>
    194         <td class="label"><label for="message"><?php _e('Tell us something:', 'rosetta'); ?></label> <?php _e('(required)', 'rosetta'); ?></td>
    195                 <td><span class="message"><textarea name="message" id="message"></textarea></span></td>
    196     </tr>
    197         <tr class="submit">
    198                 <td class="label"></td>
    199                 <td><input type="submit" name="submit" value="<?php esc_attr_e('Submit Contact Form', 'rosetta'); ?>" /></td>
    200         </tr>
    201   </table>
    202 </form>
     197                $headers = array();
     198                $headers[] = 'From: ' . $message_data['name'] . ' <' . $message_data['email'].'>';
     199                $headers[] = 'Return-Path: '. $message_data['email'];
     200
     201                add_action( 'phpmailer_init', 'rosetta_set_sender' );
     202                wp_mail( 'dominikschilling@gmail.com' /*get_option( 'admin_email' )*/, '[wordpress.org] ' . $message_data['subject'], $message, implode("\r\n", $headers ) );
     203                remove_action( 'phpmailer_init', 'rosetta_set_sender' );
     204                ?>
     205                <div id="return">
     206                        <h3><?php _e( 'Submitted!', 'rosetta' ); ?></h3>
     207                        <p><strong><?php _e( 'Thank you!', 'rosetta' ); ?></strong></p>
     208                </div>
     209                <?php
     210        }
     211
     212} else { // Empty $_POST['submit']
     213
     214        if ( false !== strpos( get_the_content(), 'The contents of this page are filled automatically' ) ) : ?>
     215                <p><?php _e( 'You can contact translators and this site administrators via this form:', 'rosetta'); ?></p>
     216                <?php /* translators: feel free to add links to places, where one can get support in your language. */ ?>
     217                <p><?php _e( '<strong>Please, do not post support requests here!</strong> They will probably be ignored.', 'rosetta' ); ?></p>
     218        <?php else: ?>
     219                <?php the_content(); ?>
     220        <?php endif; ?>
     221
     222        <form id="contactme" method="post" action="/contact/#return">
     223                <table id="form">
     224                        <tr>
     225                                <td class="label">
     226                                        <label for="your_name"><?php _e( 'Your Name:', 'rosetta' ); ?></label> <?php _e( '(required)', 'rosetta' ); ?>
     227                                </td>
     228                                <td>
     229                                        <span><input name="your_name" type="text" id="your_name" /></span>
     230                                </td>
     231                        </tr>
     232                        <tr>
     233                                <td class="label">
     234                                        <label for="your_email"><?php _e( 'Your Email:', 'rosetta' ); ?></label> <?php _e( '(required)', 'rosetta' ); ?>
     235                                </td>
     236                                <td>
     237                                        <span><input name="your_email" type="text" id="your_email" /></span>
     238                                </td>
     239                        </tr>
     240                        <tr>
     241                                <td class="label">
     242                                        <label for="blog_url"><?php _e( 'URI of your blog:', 'rosetta' ); ?></label>
     243                                </td>
     244                                <td>
     245                                        <span><input name="blog_url" type="text" id="blog_url" /></span>
     246                                </td>
     247                        </tr>
     248                        <tr>
     249                                <td class="label">
     250                                        <label for="subject"><?php _e( 'What&rsquo;s this about?', 'rosetta' ); ?></label> <?php _e( '(required)', 'rosetta' ); ?>
     251                                </td>
     252                                <td>
     253                                        <span><input name="subject" type="text" id="subject" /></span>
     254                                </td>
     255                        </tr>
     256                        <tr>
     257                                <td class="label">
     258                                        <label for="message"><?php _e( 'Tell us something:', 'rosetta' ); ?></label> <?php _e( '(required)', 'rosetta' ); ?>
     259                                </td>
     260                                <td>
     261                                        <span class="message"><textarea name="message" id="message"></textarea></span>
     262                                </td>
     263                        </tr>
     264                        <tr class="submit">
     265                                <td class="label"></td>
     266                                <td>
     267                                        <input type="submit" name="submit" value="<?php esc_attr_e( 'Submit Contact Form', 'rosetta' ); ?>" />
     268                                </td>
     269                        </tr>
     270                </table>
     271        </form>
    203272<?php } ?>
    204273
    205274                        </div>
    206275                </div>
    207           <?php endwhile; endif; ?>
    208276        </div>
    209277
    210         </div><!-- .section  -->
    211 </div><!-- .wrapper -->
    212 <script type="text/javascript">
    213 var your_name = document.getElementById('your_name');
    214 if (your_name) your_name.focus();
    215 </script>
    216 <?php get_footer(); ?>
     278        <script type="text/javascript">
     279                var your_name = document.getElementById( 'your_name' );
     280                if ( your_name ) { your_name.focus(); }
     281        </script>
     282<?php
     283get_footer();
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/index.php

    r1615 r1624  
    1414
    1515                                        <div class="storycontent">
    16                                                 <?php the_content('Read on for more &raquo;'); ?>
     16                                                <?php the_content( __( 'Read on for more &raquo;', 'rosetta' ) ); ?>
    1717                                        </div>
    1818
     
    2727                        <?php endif; ?>
    2828
    29                         <?php posts_nav_link(' &#8212; ', __( '&laquo; Newer Posts', 'rosetta' ), __( 'Older Posts &raquo;', 'rosetta' ) ); ?>
     29                        <nav class="posts-navigation">
     30                                <?php posts_nav_link( ' &#8212; ', __( '&laquo; Newer Posts', 'rosetta' ), __( 'Older Posts &raquo;', 'rosetta' ) ); ?>
     31                        </nav>
    3032                </div>
    3133                <div class="col-3">
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/single.php

    r1615 r1624  
    1414
    1515                                        <div class="storycontent">
    16                                                 <?php the_content( 'Read on for more &raquo;', 'rosetta' ); ?>
     16                                                <?php the_content(); ?>
    1717                                        </div>
    1818
    19                                         <?php comments_template(); ?>
    20                                 <?php endwhile;
     19                                        <?php
     20                                        // Previous/next post navigation.
     21                                        the_post_navigation( array(
     22                                                'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'rosetta' ) . '</span> ' .
     23                                                        '<span class="screen-reader-text">' . __( 'Next post:', 'rosetta' ) . '</span> ' .
     24                                                        '<span class="post-title">%title</span>',
     25                                                'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'rosetta' ) . '</span> ' .
     26                                                        '<span class="screen-reader-text">' . __( 'Previous post:', 'rosetta' ) . '</span> ' .
     27                                                        '<span class="post-title">%title</span>',
     28                                        ) );
     29
     30                                        // If comments are open or we have at least one comment, load up the comment template.
     31                                        if ( comments_open() || get_comments_number() ) {
     32                                                comments_template();
     33                                        }
     34
     35                                endwhile;
    2136                        else: ?>
    2237                                <p><?php _e( 'Sorry, no posts matched your criteria.', 'rosetta' ); ?></p>
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/style-rtl.css

    r1619 r1624  
    1111}
    1212
    13 .nextprev {
    14         margin-bottom: 2em;
    15 }
    16 
    1713.blog-categories ul li ul {
    1814        margin-bottom: 0 !important;
     
    10096h2.fancy:nth-of-type(1) {
    10197        margin-top: 0;
     98}
     99
     100.posts-navigation {
     101        text-align: center;
     102        margin: 2em 0;
    102103}
    103104
     
    349350
    350351/**
     352 * Posts Navigation
     353 */
     354.nav-links {
     355        -webkit-hyphens: auto;
     356        -moz-hyphens: auto;
     357        -ms-hyphens: auto;
     358        hyphens: auto;
     359        border-top: 1px solid #eaeaea;
     360        word-wrap: break-word;
     361}
     362
     363.post-navigation {
     364        margin: 5em auto;
     365        padding: 0;
     366}
     367
     368.post-navigation a {
     369        border-bottom: 1px solid #eaeaea;
     370        padding: 11px 0 12px;
     371        width: 100%;
     372}
     373
     374.post-navigation .meta-nav {
     375        color: #777;
     376        display: block;
     377        font-size: 13px;
     378        line-height: 2;
     379        text-transform: uppercase;
     380}
     381
     382.post-navigation a {
     383        color: #444;
     384        display: block;
     385        font-weight: 600;
     386        text-transform: none;
     387}
     388
     389.post-navigation a:hover {
     390        color: #21759b;
     391}
     392
     393.post-navigation .nav-next {
     394        text-align: left;
     395}
     396
     397/**
    351398 * Comments
    352399 */
    353400.comments-area {
     401        margin-top: 5em;
    354402        border-top: 1px solid #eaeaea;
    355403}
     
    549597}
    550598
    551 
    552599@media screen and (min-width: 620px) {
    553600        .comments-area {
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/style.css

    r1615 r1624  
    1111}
    1212
    13 .nextprev {
    14         margin-bottom: 2em;
    15 }
    16 
    1713.blog-categories ul li ul {
    1814        margin-bottom: 0 !important;
     
    10096h2.fancy:nth-of-type(1) {
    10197        margin-top: 0;
     98}
     99
     100.posts-navigation {
     101        text-align: center;
     102        margin: 2em 0;
    102103}
    103104
     
    349350
    350351/**
     352 * Posts Navigation
     353 */
     354.nav-links {
     355        -webkit-hyphens: auto;
     356        -moz-hyphens: auto;
     357        -ms-hyphens: auto;
     358        hyphens: auto;
     359        border-top: 1px solid #eaeaea;
     360        word-wrap: break-word;
     361}
     362
     363.post-navigation {
     364        margin: 5em auto;
     365        padding: 0;
     366}
     367
     368.post-navigation a {
     369        border-bottom: 1px solid #eaeaea;
     370        padding: 11px 0 12px;
     371        width: 100%;
     372}
     373
     374.post-navigation .meta-nav {
     375        color: #777;
     376        display: block;
     377        font-size: 13px;
     378        line-height: 2;
     379        text-transform: uppercase;
     380}
     381
     382.post-navigation a {
     383        color: #444;
     384        display: block;
     385        font-weight: 600;
     386        text-transform: none;
     387}
     388
     389.post-navigation a:hover {
     390        color: #21759b;
     391}
     392
     393.post-navigation .nav-next {
     394        text-align: right;
     395}
     396
     397/**
    351398 * Comments
    352399 */
    353400.comments-area {
     401        margin-top: 5em;
    354402        border-top: 1px solid #eaeaea;
    355403}
     
    549597}
    550598
    551 
    552599@media screen and (min-width: 620px) {
    553600        .comments-area {
Note: See TracChangeset for help on using the changeset viewer.