1
1
<?php
2
- /**
3
- * MslsCustomColumn
4
- * @author Dennis Ploetner <[email protected] >
5
- * @since 0.9.8
6
- */
7
2
8
3
namespace lloc \Msls ;
9
4
10
5
/**
11
6
* Handling of existing/not existing translations in the backend listings of
12
7
* various post types
8
+ *
13
9
* @package Msls
14
10
*/
15
11
class MslsCustomColumn extends MslsMain {
@@ -30,9 +26,9 @@ public static function init() {
30
26
$ post_type = MslsPostType::instance ()->get_request ();
31
27
32
28
if ( ! empty ( $ post_type ) ) {
33
- add_filter ( "manage_ {$ post_type }_posts_columns " , [ $ obj , 'th ' ] );
34
- add_action ( "manage_ {$ post_type }_posts_custom_column " , [ $ obj , 'td ' ] , 10 , 2 );
35
- add_action ( 'trashed_post ' , [ $ obj , 'delete ' ] );
29
+ add_filter ( "manage_ {$ post_type }_posts_columns " , array ( $ obj , 'th ' ) );
30
+ add_action ( "manage_ {$ post_type }_posts_custom_column " , array ( $ obj , 'td ' ) , 10 , 2 );
31
+ add_action ( 'trashed_post ' , array ( $ obj , 'delete ' ) );
36
32
}
37
33
}
38
34
@@ -53,11 +49,11 @@ public function th( $columns ) {
53
49
foreach ( $ blogs as $ blog ) {
54
50
$ language = $ blog ->get_language ();
55
51
56
- $ icon_type= $ this ->options ->admin_display === 'label ' ? 'label ' : 'flag ' ;
52
+ $ icon_type = $ this ->options ->admin_display === 'label ' ? 'label ' : 'flag ' ;
57
53
58
- $ icon = new MslsAdminIcon ( null );
54
+ $ icon = new MslsAdminIcon ( null );
59
55
$ icon ->set_language ( $ language );
60
- $ icon ->set_icon_type ( $ icon_type );
56
+ $ icon ->set_icon_type ( $ icon_type );
61
57
62
58
if ( $ post_id = get_the_ID () ) {
63
59
$ icon ->set_id ( $ post_id );
@@ -78,7 +74,7 @@ public function th( $columns ) {
78
74
* Table body
79
75
*
80
76
* @param string $column_name
81
- * @param int $item_id
77
+ * @param int $item_id
82
78
*
83
79
* @codeCoverageIgnore
84
80
*/
@@ -113,5 +109,4 @@ public function td( $column_name, $item_id ) {
113
109
}
114
110
}
115
111
}
116
-
117
112
}
0 commit comments