This is exactly the same way Threads, Posts, Profile Post, Resources, Resource Updates, Resource Ratings, Media, Media Comments, Albums etc work.
If the piece of content is being added by a Moderator that has permission to Approve the piece of content, then the piece of content is added in a Visible state. This is a XF Standard that I follow for all content types in all of my addons, just like XenForo follows for all of its content types as well as its 1st party addons content types.
Example... This is the function for getting the New Article state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the article state is set to Visible.
PHP:
public function getNewArticleState(ArticleItem $article = null)
{
$visitor = \XF::visitor();
if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
{
return 'visible';
}
if (!$this->hasPermission('submitWithoutApproval'))
{
return 'moderated';
}
return 'visible';
}
Example This is the function for getting the New Thread state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the thread state is set to Visible.
PHP:
public function getNewContentState(Thread $thread = null)
{
$visitor = \XF::visitor();
if ($visitor->user_id && $visitor->hasNodePermission($this->node_id, 'approveUnapprove'))
{
return 'visible';
}
if (!$visitor->hasPermission('general', 'submitWithoutApproval'))
{
return 'moderated';
}
if ($thread)
{
return $this->moderate_replies ? 'moderated' : 'visible';
}
else
{
return $this->moderate_threads ? 'moderated' : 'visible';
}
}
Example... This is the function for getting the New Resource state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the resource state is set to Visible.
PHP:
public function getNewContentState(ResourceItem $resource = null)
{
$visitor = \XF::visitor();
if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
{
return 'visible';
}
if (!$visitor->hasPermission('general', 'submitWithoutApproval'))
{
return 'moderated';
}
if ($resource)
{
return $this->always_moderate_update ? 'moderated' : 'visible';
}
else
{
return $this->always_moderate_create ? 'moderated' : 'visible';
}
}
Example... This is the function for getting the New MMedia state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the media state is set to Visible.
PHP:
public function getNewContentState()
{
$visitor = \XF::visitor();
if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
{
return 'visible';
}
if (!$this->hasPermission('addWithoutApproval'))
{
return 'moderated';
}
return 'visible';
}
I understand they could just approve it from the approval list but that is not the point as it should still go there in the first instance.
I have no plans to deviate from XF standards. You'll have to get them to change their standards and if they do, I will gladly change mine.