Plugin Directory


Ignore:
Timestamp:
04/28/2020 02:28:16 PM (5 years ago)
Author:
tschutter
Message:

trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codepress-admin-columns/trunk/classes/Settings/Column/UserLink.php

    r1905085r2293580 
    1515
    1616    protected function define_options() {
    17         return array(
     17        return [
    1818            'user_link_to' => 'edit_user',
    19         );
     19        ];
    2020    }
    2121
    โ€ฆโ€ฆ 
    2929                break;
    3030            case 'view_user_posts' :
    31                 $link = add_query_arg( array(
     31                $link = add_query_arg( [
    3232                    'post_type' => $this->column->get_post_type(),
    3333                    'author'    => $user_id,
    34                 ), 'edit.php' );
     34                ], 'edit.php' );
    3535
    3636                break;
    โ€ฆโ€ฆ 
    5757        $select = $this->create_element( 'select' )->set_options( $this->get_display_options() );
    5858
    59         $view = new View( array(
     59        $view = new View( [
    6060            'label'   => __( 'Link To', 'codepress-admin-columns' ),
    6161            'setting' => $select,
    62         ) );
     62        ] );
    6363
    6464        return $view;
    โ€ฆโ€ฆ 
    6666
    6767    protected function get_display_options() {
    68         $options = array(
     68        $options = [
    6969            'edit_user'       => __( 'Edit User Profile', 'codepress-admin-columns' ),
    7070            'email_user'      => __( 'User Email', 'codepress-admin-columns' ),
    7171            'view_user_posts' => __( 'View User Posts', 'codepress-admin-columns' ),
    7272            'view_author'     => __( 'View Public Author Page', 'codepress-admin-columns' ),
    73         );
     73        ];
    7474
    7575        // resort for possible translations
    7676        natcasesort( $options );
    7777
    78         $options = array_merge( array( '' => __( 'None' ) ), $options );
     78        $options = array_merge( [ '' => __( 'None' ) ], $options );
    7979
    8080        return $options;
Note: See TracChangeset for help on using the changeset viewer.