Making WordPress.org


Ignore:
Timestamp:
05/24/2015 08:06:47 PM (10 years ago)
Author:
ocean90
Message:

Rosetta Theme: Responsive and other improvements.

  • Add template for 404 error.
  • Add template for front page which was previously the index template.
  • Update index template to support static front page and page for posts.
  • Update comments template to use wp_list_comments() and comment_form().
  • Update styling of blog posts.

see #1049.

File:
1 edited

Legend:

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

    r1559 r1615  
    11<?php
    22
     3/**
     4 * Set the content width based on the theme's design and stylesheet.
     5 */
     6if ( ! isset( $content_width ) ) {
     7    $content_width = 692;
     8}
     9
     10/**
     11 * Sets up theme defaults and registers support for various WordPress features.
     12 */
    313function rosetta_after_setup_theme() {
    414    add_theme_support( 'automatic-feed-links' );
     15
     16    add_theme_support( 'html5', array(
     17        'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
     18    ) );
    519
    620    add_theme_support( 'custom-header', array(
     
    3044add_action( 'admin_footer-nav-menus.php', 'rosetta_admin_footer_nav_menus' );
    3145
    32 function release_row( $release, $alt_class=false, $first_of_branch_class=false, $reset = false) {
    33     static $even = true;
    34     static $last_branch='';
    35 
    36     if ($reset) {
    37         $even = true;
    38         $last_branch = '';
    39         return;
    40     }
    41     $classes = array();
    42     if (!$even && $alt_class) {
    43         $classes[] = $alt_class;
    44     }
    45     $even = !$even;
    46     if ($release['branch'] != $last_branch && $first_of_branch_class) {
    47         $classes[] = $first_of_branch_class;
    48     }
    49     $last_branch = $release['branch'];
    50     $classes_str = implode(' ', $classes);
    51     print "<tr class='$classes_str'>";
    52     print "\t<td>".$release['version']."</td>";
    53     print "\t<td>".date_i18n(__('Y-M-d', 'rosetta'), $release['builton'])."</td>";
    54     print "\t<td><a href='".$release['zip_url']."'>zip</a> <small>(<a href='".$release['zip_url'].".md5'>md5</a>)</small></td>";
    55     print "\t<td><a href='".$release['targz_url']."'>tar.gz</a> <small>(<a href='".$release['targz_url'].".md5'>md5</a>)</small></td>";
    56     print "</tr>";
    57 
     46function rosetta_body_class( $classes ) {
     47    $classes[] = 'wporg-responsive';
     48    $classes[] = 'wporg-international';
     49    return $classes;
    5850}
     51add_filter( 'body_class', 'rosetta_body_class' );
    5952
    6053function is_locale_css() {
     
    7366}
    7467add_filter( 'no_orphans', 'rosetta_orphan_control' );
     68
     69/**
     70 * Custom template tags for this theme.
     71 */
     72require get_template_directory() . '/inc/template-tags.php';
Note: See TracChangeset for help on using the changeset viewer.