One solution:
1. Create anonymous-question folder under qa-plugin/.
2. Make plugin files under anonymous-question.
metadata.json
{
"name": "Anonymous Question",
"description": "Allow question by anonymous",
"version": "1.0",
"date": "2017-04-06",
"author": "PowerQA",
"author_uri": "http://www.powerqa.org",
"license": "GPLv2",
"min_q2a": "1.5"
}
qa-plugin.php
<?php
/*
Question2Answer by Gideon Greenspan and contributors
http://www.question2answer.org/
File: qa-plugin/anonymous-question/qa-plugin.php
Description: Initiates Anonymous question plugin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
/*
Plugin Name: Anonymous Question
Plugin URI:
Plugin Description: Allow question by anonymous
Plugin Version: 1.0
Plugin Date: 2017-04-06
Plugin Author: PowerQA
Plugin Author URI: http://www.powerqa.org/
Plugin License: GPLv2
Plugin Minimum Question2Answer Version: 1.5
Plugin Update Check URI:
*/
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../');
exit;
}
qa_register_plugin_overrides('qa-aq-overrides.php'); // 2017/04/07 ";" added
qa-aq-overrides.php
<?php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../');
exit;
}
function qa_user_permit_error($permitoption=null, $limitaction=null, $userlevel=null, $checkblocks=true) {
$error = qa_user_permit_error_base($permitoption, $limitaction, $userlevel, $checkblocks);
if($permitoption == 'permit_post_q' && isset($_GET['anonymous'])) {
if($error != 'limit')
$error=false;
}
return $error;
}
/*
Omit PHP closing tag to help avoid accidental output
*/
3. Add link
3.1 Example of "Admin" > "Pages" > "Add Link"
- Text of link: "Ask a Question as Anonymous"
- Position: "After tabs at top"
- Visible for: "Anybody"
- URL of link: "ask?anonymous"
3.2 If you hope to create link banner, you can use "Widget Anywhere" plugin@Scott.
You can override any default permission with this plugin. However, as spam risk increases, generally anonymous posting is not recommended.