Making WordPress.org


Ignore:
Timestamp:
09/23/2016 03:42:18 PM (9 years ago)
Author:
ocean90
Message:

Login Theme: Remove trailing whitespace, use tabs for indentation, make intro text translatable.

File:
1 edited

Legend:

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

    r2580 r4119  
    55 * @package wporg-login
    66 */
    7 
    8 
    97
    108/**
     
    1513}
    1614add_action( 'after_setup_theme', 'wporg_login_setup' );
    17 
    18 
    1915
    2016/**
     
    3127add_filter( 'body_class', 'wporg_login_body_class' );
    3228
    33 
    34 
    3529/**
    3630 * Remove the toolbar.
     
    4034}
    4135add_action( 'init', 'wporg_login_init' );
    42 
    4336
    4437/**
     
    5043add_action( 'login_init', 'wporg_login_replace_css' );
    5144
    52 
    5345/**
    5446 * Enqueue scripts and styles.
    5547 */
    5648function wporg_login_scripts() {
    57     $script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
    58     $suffix       = $script_debug ? '' : '.min';
    59  
    60     // Concatenates core scripts when possible.
    61     if ( ! $script_debug ) {
    62         $GLOBALS['concatenate_scripts'] = true;
    63     }
    64  
    65     wp_enqueue_style( 'wporg-normalize', get_template_directory_uri() . '/stylesheets/normalize.css', 3 );
    66     wp_enqueue_style( 'wporg-login', get_template_directory_uri() . '/stylesheets/login.css', array( 'login', 'dashicons', 'l10n' ), 2.3 );
    67  
    68     // No emoji support needed.
    69     remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
    70     remove_action( 'wp_print_styles', 'print_emoji_styles' );
    71  
    72     // No Jetpack styles needed.
    73     add_filter( 'jetpack_implode_frontend_css', '__return_false' );
    74  
    75     // No embeds needed.
    76     remove_action( 'wp_head','wp_oembed_add_discovery_links' );
    77     remove_action( 'wp_head', 'wp_oembed_add_host_js' );
     49    $script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
     50    $suffix       = $script_debug ? '' : '.min';
     51
     52    // Concatenates core scripts when possible.
     53    if ( ! $script_debug ) {
     54        $GLOBALS['concatenate_scripts'] = true;
     55    }
     56
     57    wp_enqueue_style( 'wporg-normalize', get_template_directory_uri() . '/stylesheets/normalize.css', 3 );
     58    wp_enqueue_style( 'wporg-login', get_template_directory_uri() . '/stylesheets/login.css', array( 'login', 'dashicons', 'l10n' ), 2.3 );
     59
     60    // No emoji support needed.
     61    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
     62    remove_action( 'wp_print_styles', 'print_emoji_styles' );
     63
     64    // No Jetpack styles needed.
     65    add_filter( 'jetpack_implode_frontend_css', '__return_false' );
     66
     67    // No embeds needed.
     68    remove_action( 'wp_head', 'wp_oembed_add_discovery_links' );
     69    remove_action( 'wp_head', 'wp_oembed_add_host_js' );
    7870}
    7971add_action( 'wp_enqueue_scripts', 'wporg_login_scripts' );
Note: See TracChangeset for help on using the changeset viewer.