Note that did_action
only takes one input argument: the name of the action hook.
The scope of your if
sentence is also unclear.
I don’t think you want to use did_action
at all here, it doesn’t give you the number of emails.
You can try the following instead:
if ( $unread = do_shortcode( '[input-unread]' ) )
printf( "<span class="new badge">%s</span>", $unread );
or skip the expensive do_shortcode
parsing by using the shortcode callback directly:
if(
class_exists( 'IS_Inbox_Status' )
&& $unread = IS_Inbox_Status::get_instance()->get_count( 'inbox-unread' )
)
printf( "<span class="new badge">%s</span>", $unread );
Note that this is untested.