WordPress.org

Making WordPress.org

Changeset 2324


Ignore:
Timestamp:
01/19/16 17:20:35 (2 years ago)
Author:
stephdau
Message:

WordPress.org SSO: using fmtime() to define CSS version passed in URL, so designers like mapk can see their changes without having to modify hardcoded values every time.

See #1524

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

Legend:

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

    r2320 r2324  
    4646 */ 
    4747function wporg_login_replace_css() { 
     48    $css_file = '/stylesheets/login.css';  
    4849    wp_deregister_style( 'login' ); 
    49     wp_register_style( 'login', get_stylesheet_directory_uri() . '/stylesheets/login.css', array( 'buttons', 'dashicons', 'open-sans' ), '20160119' ); 
     50    wp_register_style( 'login', get_stylesheet_directory_uri() . $css_file, array( 'buttons', 'dashicons', 'open-sans' ), filemtime( __DIR__ . $css_file ) ); 
    5051} 
    5152add_action( 'login_init', 'wporg_login_replace_css' ); 
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/header.php

    r2320 r2324  
    66 */ 
    77 
    8 //global $pagetitle, $wporg_global_header_options; 
    9 //$pagetitle = wp_title( '', false ); 
     8$normalize_css = '/stylesheets/normalize.css'; 
     9wp_enqueue_style( 'normalize', get_template_directory_uri() . $normalize_css, array(), filemtime( __DIR__ . $normalize_css ) ); 
    1010 
    11 wp_enqueue_style( 'normalize', get_template_directory_uri() . '/stylesheets/normalize.css', array(), '20160119' ); 
    12 wp_enqueue_style( 'custom-login', get_template_directory_uri() . '/stylesheets/login.css', array(), '20160119' ); 
     11$login_css = '/stylesheets/login.css'; 
     12wp_enqueue_style( 'custom-login', get_template_directory_uri() . $login_css, array(), filemtime( __DIR__ . $login_css ) ); 
    1313?> 
    1414<!doctype html> 
     
    1717<meta charset="utf-8"> 
    1818<meta http-equiv="x-ua-compatible" content="ie=edge"> 
    19 <title>WordPress.org OAuth Login</title> 
     19<title><?php _e( 'WordPress.org Login' ); ?></title> 
    2020<meta name="description" content=""> 
    2121<meta name="viewport" content="width=device-width, initial-scale=1"> 
     
    2727<div class="wrapper"> 
    2828    <div class="login"> 
    29         <h1><a href="https://wordpress.org/" title="WordPress.org" tabindex="-1">WordPress.org Login</a></h1> 
     29        <h1><a href="https://wordpress.org/" title="WordPress.org" tabindex="-1"><?php _e( 'WordPress.org Login' ); ?></a></h1> 
Note: See TracChangeset for help on using the changeset viewer.