1- <?php
1+ <?php declare ( strict_types=1 );
2+
23/**
34 * MslsPostTag
45 *
56 * @author Dennis Ploetner <[email protected] > 6- * @since 0.9.8
77 */
88
99namespace lloc \Msls ;
@@ -29,12 +29,12 @@ public static function suggest() {
2929 filter_input ( INPUT_POST , 'blog_id ' , FILTER_SANITIZE_NUMBER_INT )
3030 );
3131
32- $ args = [
32+ $ args = array (
3333 'orderby ' => 'name ' ,
3434 'order ' => 'ASC ' ,
3535 'number ' => 10 ,
3636 'hide_empty ' => 0 ,
37- ] ;
37+ ) ;
3838
3939 if ( filter_has_var ( INPUT_POST , 's ' ) ) {
4040 $ args ['search ' ] = sanitize_text_field (
@@ -81,15 +81,15 @@ public static function suggest() {
8181 public static function init () {
8282 $ options = msls_options ();
8383 $ collection = msls_blog_collection ();
84- $ class = $ options ->activate_autocomplete ? MslsPostTag ::class : MslsPostTagClassic::class;
84+ $ class = $ options ->activate_autocomplete ? self ::class : MslsPostTagClassic::class;
8585 $ obj = new $ class ( $ options , $ collection );
8686
8787 $ taxonomy = MslsContentTypes::create ()->acl_request ();
8888 if ( '' != $ taxonomy ) {
89- add_action ( "{$ taxonomy }_add_form_fields " , [ $ obj , 'add_input ' ] );
90- add_action ( "{$ taxonomy }_edit_form_fields " , [ $ obj , 'edit_input ' ] , 10 , 2 );
91- add_action ( "edited_ {$ taxonomy }" , [ $ obj , 'set ' ] );
92- add_action ( "create_ {$ taxonomy }" , [ $ obj , 'set ' ] );
89+ add_action ( "{$ taxonomy }_add_form_fields " , array ( $ obj , 'add_input ' ) );
90+ add_action ( "{$ taxonomy }_edit_form_fields " , array ( $ obj , 'edit_input ' ) , 10 , 2 );
91+ add_action ( "edited_ {$ taxonomy }" , array ( $ obj , 'set ' ) );
92+ add_action ( "create_ {$ taxonomy }" , array ( $ obj , 'set ' ) );
9393 }
9494
9595 return $ obj ;
@@ -118,7 +118,7 @@ public function add_input( string $taxonomy ): void {
118118 * Add the input fields to the edit-screen of the taxonomies
119119 *
120120 * @param \WP_Term $tag
121- * @param string $taxonomy
121+ * @param string $taxonomy
122122 */
123123 public function edit_input ( \WP_Term $ tag , string $ taxonomy ): void {
124124 $ title_format = '<tr>
@@ -148,8 +148,8 @@ public function edit_input( \WP_Term $tag, string $taxonomy ): void {
148148 * Returns true if the blogcollection is not empty
149149 *
150150 * @param ?\WP_Term $tag
151- * @param string $title_format
152- * @param string $item_format
151+ * @param string $title_format
152+ * @param string $item_format
153153 *
154154 * @return boolean
155155 */
@@ -160,7 +160,7 @@ public function the_input( ?\WP_Term $tag, string $title_format, string $item_fo
160160 return false ;
161161 }
162162
163- $ count ++ ;
163+ ++ $ count ;
164164
165165 $ blogs = $ this ->collection ->get ();
166166 if ( $ blogs ) {
@@ -258,8 +258,9 @@ public function maybe_set_linked_term( MslsOptionsTax $mydata ) {
258258 * @return string
259259 */
260260 protected function get_select_title (): string {
261- return apply_filters ( 'msls_term_select_title ' ,
262- __ ( 'Multisite Language Switcher ' , 'multisite-language-switcher ' ) );
261+ return apply_filters (
262+ 'msls_term_select_title ' ,
263+ __ ( 'Multisite Language Switcher ' , 'multisite-language-switcher ' )
264+ );
263265 }
264-
265266}
0 commit comments