Making WordPress.org

Changeset 12287


Ignore:
Timestamp:
12/01/2022 11:50:53 AM (2 years ago)
Author:
amieiro
Message:

Translate: Add a full width option with a get parameter.

Add an experiment to test the https://translate.wordpress.org/ environment
with full width, so we can discuss it with the community.

To be able to see it with full width, you need to add the full-width=true
in the URL. E.g.:

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php

    r11920 r12287  
    99gp_enqueue_style( 'wporg-translate' );
    1010
     11/* todo: remove this code and the style-full-width.css file after the tests */
     12if ( isset( $_GET['full-width'] ) && 'true' == $_GET['full-width'] ) {
     13    wp_register_style(
     14        'wporg-translate-full-width',
     15        plugins_url( 'style-full-width.css', __FILE__ ),
     16        [ 'gp-base', 'wporg-style', 'wporg-translate' ],
     17        filemtime( __DIR__ . '/style-full-width.css' )
     18    );
     19    gp_enqueue_style( 'wporg-translate-full-width' );
     20}
     21
    1122gp_enqueue_script( 'jquery' );
    1223
     
    6273/**
    6374 * Set the document title to that of GlotPress.
    64  * 
     75 *
    6576 * @see https://github.com/GlotPress/GlotPress-WP/issues/8
    6677 */
     
    329340            elseif ( wp_http_validate_url( $reference ) ) :
    330341                ?>
    331                 <li><a target="_blank" href="<?php echo esc_url( $reference ); ?>"><?php echo esc_html( $reference ); ?></a></li>       
     342                <li><a target="_blank" href="<?php echo esc_url( $reference ); ?>"><?php echo esc_html( $reference ); ?></a></li>
    332343            <?php
    333344            else :
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-overview.php

    r11086 r12287  
    1111?>
    1212<div class="stats-table">
     13
     14<?php /* todo: remove this code and the style-full-width.css file after the tests */
     15if ( ! ( ( isset( $_GET['full-width'] ) && 'true' == $_GET['full-width'] ) ) ): ?>
    1316    <style>
    1417    .gp-content {
     
    1619    }
    1720    </style>
     21<?php endif; ?>
    1822    <table id="stats-table" class="table">
    1923        <thead>
Note: See TracChangeset for help on using the changeset viewer.