11<?php
2- /**
3- * MslsCustomColumn
4- * @author Dennis Ploetner <[email protected] > 5- * @since 0.9.8
6- */
72
83namespace lloc \Msls ;
94
105/**
116 * Handling of existing/not existing translations in the backend listings of
127 * various post types
8+ *
139 * @package Msls
1410 */
1511class MslsCustomColumn extends MslsMain {
@@ -30,9 +26,9 @@ public static function init() {
3026 $ post_type = MslsPostType::instance ()->get_request ();
3127
3228 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 ' ) );
3632 }
3733 }
3834
@@ -53,11 +49,11 @@ public function th( $columns ) {
5349 foreach ( $ blogs as $ blog ) {
5450 $ language = $ blog ->get_language ();
5551
56- $ icon_type= $ this ->options ->admin_display === 'label ' ? 'label ' : 'flag ' ;
52+ $ icon_type = $ this ->options ->admin_display === 'label ' ? 'label ' : 'flag ' ;
5753
58- $ icon = new MslsAdminIcon ( null );
54+ $ icon = new MslsAdminIcon ( null );
5955 $ icon ->set_language ( $ language );
60- $ icon ->set_icon_type ( $ icon_type );
56+ $ icon ->set_icon_type ( $ icon_type );
6157
6258 if ( $ post_id = get_the_ID () ) {
6359 $ icon ->set_id ( $ post_id );
@@ -78,7 +74,7 @@ public function th( $columns ) {
7874 * Table body
7975 *
8076 * @param string $column_name
81- * @param int $item_id
77+ * @param int $item_id
8278 *
8379 * @codeCoverageIgnore
8480 */
@@ -113,5 +109,4 @@ public function td( $column_name, $item_id ) {
113109 }
114110 }
115111 }
116-
117112}
0 commit comments