1- <?php
1+ <?php declare ( strict_types=1 );
2+
23/**
34 * MslsMetaBox
45 * @author Dennis Ploetner <re@lloc.de>
@@ -82,7 +83,6 @@ public static function get_suggested_fields( $json, $args ) {
8283 *
8384 */
8485 $ my_query ->post = apply_filters ( 'msls_meta_box_suggest_post ' , $ my_query ->post );
85-
8686 if ( is_object ( $ my_query ->post ) ) {
8787 $ json ->add ( get_the_ID (), get_the_title () );
8888 }
@@ -102,9 +102,8 @@ public static function get_suggested_fields( $json, $args ) {
102102 * @return MslsMetaBox
103103 */
104104 public static function init () {
105- $ options = MslsOptions::instance ();
106- $ collection = msls_blog_collection ();
107- $ obj = new static ( $ options , $ collection );
105+ $ options = msls_options ();
106+ $ obj = new static ( $ options , msls_blog_collection () );
108107
109108 if ( ! $ options ->is_excluded () ) {
110109 add_action ( 'add_meta_boxes ' , [ $ obj , 'add ' ] );
@@ -129,7 +128,7 @@ public function add() {
129128 [
130129 $ this ,
131130 (
132- MslsOptions:: instance ()->activate_autocomplete ?
131+ msls_options ()->activate_autocomplete ?
133132 'render_input ' :
134133 'render_select '
135134 ),
@@ -139,7 +138,7 @@ public function add() {
139138 'high '
140139 );
141140
142- if ( MslsOptions:: instance ()->activate_content_import ) {
141+ if ( msls_options ()->activate_content_import ) {
143142 add_meta_box (
144143 'msls-content-import ' ,
145144 apply_filters (
@@ -252,7 +251,7 @@ public function render_select() {
252251 *
253252 * @return string
254253 */
255- public function render_options ( $ type , $ msls_id ) {
254+ public function render_options ( $ type , $ msls_id ): string {
256255 $ options = [];
257256
258257 $ my_query = new \WP_Query ( [
0 commit comments