Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.3k views
in Plugins by
how to load a plugin only for logged in users ?
by
reshown by
I can't find any sceditor output that is created after answering question is turned off for non-loged users.Would you tell where have you found it?
by
the editor is belongs to the answer form.So the form will not be loaded the editor won't be loaded too..
by
@teddydoors yeah it will prevent the js from loading
by
function head_script(){
if (qa_is_logged_in())
{all original codes here;}

else {
qa_html_theme_base::head_script();
}

}

This works thanks teddydoors

1 Answer

0 votes
by

You have to edit the source code of the plugin if the plugin developer does not provide you with ready-made options.

if (qa_is_logged_in())  {

Your main plugin content here;

}

by
In qa-theme ?
by
I tried this in qa-plugin but does't work
by
When you asked "In qa-theme ?", I think something is not right. You have to edit the main content of your plugin.

Typically, a plugin is a folder with two files. One of them (qa-plugin.php) is to register that plugin to Q2A system. The other one is the main value of your plugin. You need to edit that file and check out which functions may output the final results.

Sometimes a plugin is merely to override the layout, sometimes a plugin is to output a widget.
...