Making WordPress.org


Ignore:
Timestamp:
04/01/2017 02:00:51 PM (6 years ago)
Author:
ocean90
Message:

Rosetta: Allow locale managers to view site stats.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/site/class-locale-main.php

    r4108 r5230  
    108108                } )
    109109        );
     110        $options->add_filter_option(
     111            ( new Filter\Option() )
     112                ->set_name( 'stats_options' )
     113                ->set_callback( function( $options ) {
     114                    $options['roles'] = [
     115                        'administrator',
     116                        'editor',
     117                        'author',
     118                        Role\Locale_Manager::get_name(),
     119                    ];
     120                    return $options;
     121                } )
     122                ->set_num_args( 1 )
     123        );
     124
    110125        $options->setup();
    111126    }
Note: See TracChangeset for help on using the changeset viewer.