Making WordPress.org


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.:

File:
1 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 :
Note: See TracChangeset for help on using the changeset viewer.