WordPress.org

Making WordPress.org

Changeset 1084


Ignore:
Timestamp:
01/05/2015 05:24:12 PM (6 years ago)
Author:
obenland
Message:

WP.org Themes: Use global header and footer.

See #745.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
3 edited

Legend:

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

    r887 r1084  
    33 * The template for displaying the footer.
    44 *
    5  * Contains the closing of the #content div and all content after
    6  *
    75 * @package wporg-themes
    86 */
    9 ?>
    107
    11 <div id="wporg-footer">
    12     <div class="wrapper">
    13         <ul>
    14             <li><a href="//wordpress.org/about/" title="An introduction to the WordPress project">About</a></li>
    15             <li><a href="//wordpress.org/news/" title="News and Updates">Blog</a></li>
    16             <li><a href="//wordpress.org/hosting/" title="Recommended web hosting providers">Hosting</a></li>
    17             <li><a href="http://jobs.wordpress.net/" title="Find or post WordPress jobs">Jobs</a></li>
    18         </ul>
    19 
    20         <ul>
    21             <li><a href="//wordpress.org/support/" title="Forums, documentation, and other resources">Support</a></li>
    22                         <li><a href="//make.wordpress.org/" title="Give back to WordPress through code, support, translation and more">Get Involved</a></li>
    23             <li><a href="//learn.wordpress.org/" title="Workshops and training materials">Learn</a></li>
    24         </ul>
    25 
    26         <ul>
    27             <li><a href="//wordpress.org/showcase/" title="Some of the best WordPress sites on the Web">Showcase</a></li>
    28             <li><a href="//wordpress.org/plugins/" title="Add extra functionality to WordPress">Plugins</a></li>
    29             <li><a href="//wordpress.org/themes/" title="Make your WordPress pretty">Themes</a></li>
    30             <li><a href="//wordpress.org/ideas/" title="Share your ideas for improving WordPress">Ideas</a></li>
    31         </ul>
    32 
    33         <ul>
    34             <li><a href="http://central.wordcamp.org/" title="Find a WordPress event near you">WordCamp</a></li>
    35             <li><a href="http://wordpress.tv/" title="Videos, tutorials, and WordCamp sessions">WordPress.TV</a></li>
    36             <li><a href="//buddypress.org/" title="A set of plugins to transform your WordPress into a social network">BuddyPress</a></li>
    37             <li><a href="//bbpress.org/" title="Fast, slick forums built on WordPress">bbPress</a></li>
    38         </ul>
    39 
    40         <ul>
    41             <li><a href="http://wordpress.com/?ref=wporg-footer" title="Hassle-free WordPress hosting">WordPress.com</a></li>
    42             <li><a href="http://ma.tt/" title="Co-founder of WordPress, an example of what WordPress can do">Matt</a></li>
    43             <li><a href="//wordpress.org/about/privacy/" title="WordPress.org Privacy Policy">Privacy</a></li>
    44             <li><a href="//wordpress.org/about/license/" title="WordPress is open source software">License / GPLv2</a></li>
    45         </ul>
    46 
    47         <ul>
    48             <li>
    49                 <iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=WordPress&show_count=false" style="width:135px; height:20px;"></iframe>
    50             </li>
    51             <li>
    52                 <iframe src="//www.facebook.com/plugins/like.php?app_id=121415197926116&amp;href=http%3A%2F%2Fwww.facebook.com%2Fwordpress&amp;send=false&amp;layout=button_count&amp;width=135&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=lucida+grande&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe>
    53             </li>
    54         </ul>
    55     </div>
    56 
    57     <h6 class="aligncenter">Code is Poetry</h6>
    58 </div>
    59 
    60 
    61 <script type="text/javascript">
    62   var _qevents = _qevents || [];
    63   (function() {
    64    var elem = document.createElement('script');
    65    elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge")
    66                + ".quantserve.com/quant.js";
    67    elem.async = true;
    68    elem.type = "text/javascript";
    69    var scpt = document.getElementsByTagName('script')[0];
    70    scpt.parentNode.insertBefore(elem, scpt);
    71   })();
    72 </script>
    73 <script type="text/javascript">_qevents.push( { qacct:"p-18-mFEk4J448M"} );</script>
    74 <noscript><img src="//pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif" style="display: none;" border="0" height="1" width="1" alt=""/></noscript>
    75 <!--  -->
    76 <script type="text/javascript" src="//gravatar.com/js/gprofiles.js"></script>
    77 
    78 <script type="text/javascript">
    79 (function($){
    80 $(document).ready(function() {
    81     $('#footer a').click(function() {
    82         if (this.href.indexOf('wordpress.org') == -1 && this.href.indexOf('http') == 0) {
    83             recordOutboundLink(this, 'Outbound Links', this.href);
    84             return false;
    85         }
    86     });
    87 });
    88 })(jQuery);
    89 </script>
    90 
    91 <?php wp_footer(); ?>
    92 </body>
    93 </html>
     8require WPORGPATH . 'footer.php';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r1034 r1084  
    110110
    111111/**
     112 * Create a nicely formatted and more specific title element text for output
     113 * in head of document, based on current view.
     114 *
     115 * @global int $paged WordPress archive pagination page count.
     116 * @global int $page  WordPress paginated post page count.
     117 *
     118 * @param string $title Default title text for current view.
     119 * @param string $sep Optional separator.
     120 * @return string The filtered title.
     121 */
     122function wporg_themes_wp_title( $title, $sep ) {
     123    global $paged, $page;
     124
     125    if ( is_feed() ) {
     126        return $title;
     127    }
     128
     129    // Add the site name.
     130    $title .= get_bloginfo( 'name', 'display' );
     131
     132    // Add the site description for the home/front page.
     133    $site_description = get_bloginfo( 'description', 'display' );
     134    if ( $site_description && ( is_home() || is_front_page() ) ) {
     135        $title = "$title $sep $site_description";
     136    }
     137
     138    // Add a page number if necessary.
     139    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
     140        $title = "$title $sep " . sprintf( __( 'Page %s', 'wporg-themes' ), max( $paged, $page ) );
     141    }
     142
     143    return $title;
     144}
     145add_filter( 'wp_title', 'wporg_themes_wp_title', 10, 2 );
     146
     147/**
    112148 * @param  object $args
    113149 * @param  string $action
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php

    r1021 r1084  
    33 * The header for our theme.
    44 *
    5  * Displays all of the <head> section and everything up till <div id="content">
    6  *
    75 * @package wporg-themes
    86 */
    9  
    10 // include 'http://wordpress.org/header.php'; // do the header change when not testing locally, all below is copy of header
    11 
    12 ?><!DOCTYPE html>
    13 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    14 <head profile="http://gmpg.org/xfn/11">
    15 <meta charset="utf-8" />
    16 <!--
    17 <meta property="fb:page_id" content="6427302910" />
    18 -->
    19 <meta name="google-site-verification" content="7VWES_-rcHBcmaQis9mSYamPfNwE03f4vyTj4pfuAw0" />
    20 <meta name="viewport" content="width=device-width, initial-scale=1">
    21 <title>WordPress &#8250; Free WordPress Themes</title>
    22 <link href="//s.w.org/wp-includes/css/dashicons.css?20140409" rel="stylesheet" type="text/css" />
    23 <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic' rel='stylesheet' type='text/css'>
    24 
    25 <link media="only screen and (max-device-width: 480px)" href="//s.w.org/style/iphone.css?1" type="text/css" rel="stylesheet" />
    26 
    27 <link rel="shortcut icon" href="//s.w.org/favicon.ico" type="image/x-icon" />
    287
    298
    30 <!--[if lte IE 8]>
    31 <style type="text/css">
    32 @import url("//s.w.org/style/ie.css?1");
    33 </style>
    34 <![endif]-->
    35 
    36 <meta name="generator" content="bbPress 1.1" />
    37 <link rel='stylesheet' id='forum-wp4-css'  href='//s.w.org/style/forum-wp4.css?ver=11' type='text/css' media='' />
    38 <link rel='stylesheet' id='style-wp4-css'  href='//s.w.org/bb-theme/plugins/style-wp4.css?ver=19' type='text/css' media='' />
    39 <!--[if IE 7]>
    40 <link rel='stylesheet' id='forum-ie7-css'  href='//s.w.org/style/forum-ie7.css?ver=7' type='text/css' media='' />
    41 <![endif]-->
    42     <link rel='stylesheet' href='https://wordpress.org/extend/themes-plugins/bb-ratings/bb-ratings.css?4' type='text/css' />
    43 <link rel="alternate" type="application/rss+xml" title="Free WordPress Themes &raquo; Recent Posts" href="https://wordpress.org/themes/rss/" />
    44 <link rel="alternate" type="application/rss+xml" title="Free WordPress Themes &raquo; Recent Topics" href="https://wordpress.org/themes/rss/topics" /><script type="text/javascript" src="//s.w.org/wp-includes/js/jquery/jquery.js?v=1.10.2"></script>
    45 <script>document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';</script>
    46 <script type="text/javascript">
    47 var toggleMenu = function(){
    48     var m = document.getElementById('wporg-header-menu'),
    49         c = m.className;
    50         m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active';
    51 }
    52 </script>
    53 <?php wp_head(); ?>
    54 </head>
    55 
    56 <body id="wordpress-org" <?php body_class(); ?>>
    57 <div id="wporg-header">
    58     <div class="wrapper">
    59         <a id="mobile-menu-button" class="" href="#" onclick="toggleMenu();"></a>
    60         <h1><a href="//wordpress.org">WordPress.org</a></h1>
    61         <div id="head-search">
    62             <form action="//wordpress.org/search/do-search.php" method="get">
    63                 <input class="text" name="search" type="text" value="" maxlength="150" placeholder="Search WordPress.org" /> <input type="submit" class="button" value="" />
    64             </form>
    65         </div>
    66         <div style="clear:both"></div>
    67 
    68 <ul id="wporg-header-menu">
    69 <li><a href='//wordpress.org/showcase/' title='See some of the sites built on WordPress.'>Showcase</a></li>
    70 <li><a href='' title='Find just the right look for your website.' class="current">Themes</a><div class="uparrow"></div></li>
    71 <li><a href='//wordpress.org/plugins/' title='Plugins can extend WordPress to do almost anything you can imagine.'>Plugins</a></li>
    72 <li><a href='//wordpress.org/mobile/' title='Take your website on the go!'>Mobile</a></li>
    73 <li><a href='//wordpress.org/support/' title='Forums, documentation, help.'>Support</a><ul class="nav-submenu"><li><a href='//wordpress.org/support/' title='Support and discussion forums.'>Forums</a></li><li><a href='//codex.wordpress.org/Main_Page' title='Documentation, tutorials, best practices.'>Documentation</a></li></ul><div class="uparrow"></div></li>
    74 <li><a href='//make.wordpress.org/' title='Contribute your knowledge.'>Get Involved</a></li>
    75 <li><a href='//wordpress.org/about/' title='About the WordPress Organization, and where we&#039;re going.'>About</a></li>
    76 <li><a href='//wordpress.org/news/' title='Come here for the latest scoop.'>Blog</a></li>
    77 <li><a href='//wordpress.org/hosting/' title='Find a home for your blog.'>Hosting</a></li>
    78 <li id="download" class="button download-button"><a href='//wordpress.org/download/' title='Get it. Got it? Good.'>Download WordPress</a></li>
    79 </ul>
    80         <div style="clear:both"></div>
    81     </div>
    82 </div>
    83 
    84 <div id="download-mobile">
    85     <div class="wrapper">
    86         <span class="download-ready">Ready to get started?</span><a class="button download-button" href="//wordpress.org/download/" title="Get it. Got it? Good.">Download WordPress</a>
    87     </div>
    88 </div>
     9$GLOBALS['pagetitle'] = wp_title( '&laquo;', false, 'right' );
     10require WPORGPATH . 'header.php';
     11?>
    8912
    9013<div id="headline">
    9114    <div class="wrapper">
    9215        <h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
    93 
    94         <p class="login">
    95     Welcome, <a href='//profiles.wordpress.org/otto42'>Samuel Wood (Otto)</a>    | <a href="https://wordpress.org/themes/bb-admin/">Admin</a>   | <a href="https://wordpress.org/themes/bb-login.php?action=logout">Log Out</a></p>
    96 
    9716    </div>
    9817</div>
Note: See TracChangeset for help on using the changeset viewer.