Skip to content

Commit a81054a

Browse files
authored
Merge pull request #191 from arnowelzel/master
Fix #184 - use type of post and not only request
2 parents f9b79d6 + 7d9e365 commit a81054a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

includes/MslsAdminIcon.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ public function __toString() {
9090
*
9191
* @return MslsAdminIcon
9292
*/
93-
public static function create() {
93+
public static function create($type = null) {
9494
$obj = MslsContentTypes::create();
9595

96-
$type = $obj->get_request();
96+
if(!$type) {
97+
$type = $obj->get_request();
98+
}
9799
if ( $obj->is_taxonomy() ) {
98100
return new MslsAdminIconTaxonomy( $type );
99101
}

includes/MslsMetaBox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function render_select() {
183183
switch_to_blog( $blog->userblog_id );
184184

185185
$language = $blog->get_language();
186-
$icon = MslsAdminIcon::create()
186+
$icon = MslsAdminIcon::create( $type )
187187
->set_language( $language )
188188
->set_icon_type( 'flag' );
189189

0 commit comments

Comments
 (0)