- Timestamp:
- 04/28/2020 02:28:16 PM (5 years ago)
- File:
- 1 edited
Legend:
- Unmodified
- Added
- Removed
codepress-admin-columns/trunk/classes/Settings/Column/UserLink.php
r1905085 r2293580 15 15 16 16 protected function define_options() { 17 return array(17 return [ 18 18 'user_link_to' => 'edit_user', 19 );19 ]; 20 20 } 21 21 โฆ โฆ 29 29 break; 30 30 case 'view_user_posts' : 31 $link = add_query_arg( array(31 $link = add_query_arg( [ 32 32 'post_type' => $this->column->get_post_type(), 33 33 'author' => $user_id, 34 ), 'edit.php' );34 ], 'edit.php' ); 35 35 36 36 break; โฆ โฆ 57 57 $select = $this->create_element( 'select' )->set_options( $this->get_display_options() ); 58 58 59 $view = new View( array(59 $view = new View( [ 60 60 'label' => __( 'Link To', 'codepress-admin-columns' ), 61 61 'setting' => $select, 62 ));62 ] ); 63 63 64 64 return $view; โฆ โฆ 66 66 67 67 protected function get_display_options() { 68 $options = array(68 $options = [ 69 69 'edit_user' => __( 'Edit User Profile', 'codepress-admin-columns' ), 70 70 'email_user' => __( 'User Email', 'codepress-admin-columns' ), 71 71 'view_user_posts' => __( 'View User Posts', 'codepress-admin-columns' ), 72 72 'view_author' => __( 'View Public Author Page', 'codepress-admin-columns' ), 73 );73 ]; 74 74 75 75 // resort for possible translations 76 76 natcasesort( $options ); 77 77 78 $options = array_merge( array( '' => __( 'None' ) ), $options );78 $options = array_merge( [ '' => __( 'None' ) ], $options ); 79 79 80 80 return $options;
Note: See TracChangeset for help on using the changeset viewer.