Making WordPress.org


Ignore:
Timestamp:
12/28/2015 12:38:09 PM (9 years ago)
Author:
ocean90
Message:

Rosetta Roles: Display slugs of projects because project names are not unique.

Also decode entities in project names because the data is exported to JavaScript.

Fixes #1499.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/rosetta-roles.php

    r2197 r2228  
    194194    public function enqueue_styles() {
    195195        $suffix = is_rtl() ? '-rtl' : '';
    196         wp_enqueue_style( 'rosetta-roles', plugins_url( "/css/rosetta-roles$suffix.css", __FILE__ ), array(), '2' );
     196        wp_enqueue_style( 'rosetta-roles', plugins_url( "/css/rosetta-roles$suffix.css", __FILE__ ), array(), '3' );
    197197    }
    198198
     
    214214                    />
    215215                    {{data.name}}
     216                    <span class="project-slug">({{data.slug}})</span>
    216217                </label>
    217218            <# } else { #>
    218219                <label>
    219220                    <input type="radio" class="input-radio" checked="checked" /> {{data.name}}
     221                    <span class="project-slug">({{data.slug}})</span>
    220222                </label>
    221223            <# } #>
     
    772774        $projects = array();
    773775        foreach ( $_projects as $project ) {
     776            $project->name = html_entity_decode( $project->name, ENT_QUOTES, 'UTF-8' );
    774777            $projects[ $project->id ] = $project;
    775778        }
Note: See TracChangeset for help on using the changeset viewer.