diff --git a/.github/ISSUE_TEMPLATE/1-FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/1-FEATURE_REQUEST.md
new file mode 100644
index 000000000..b04e1c572
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1-FEATURE_REQUEST.md
@@ -0,0 +1,12 @@
+---
+name: "\U0001F195 Feature Request"
+about: "I have a suggestion for missing functionality or improvements"
+title: ''
+labels: 'i: enhancement'
+assignees: ''
+
+---
+
+# Feature Request
+
+Describe the suggested feature and how it's beneficial to Stream users.
diff --git a/.github/issue_template.md b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md
similarity index 73%
rename from .github/issue_template.md
rename to .github/ISSUE_TEMPLATE/2-BUG_REPORT.md
index 9fa1527bc..53218b3bb 100644
--- a/.github/issue_template.md
+++ b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md
@@ -1,9 +1,11 @@
-Delete the section that is not applicable:
-
-# Feature Request
-
-Describe the suggested feature and how it's beneficial to Stream users.
+---
+name: "\U0001F41B Bug Report"
+about: "Something isn't working as expected"
+title: ''
+labels: 'i: bug'
+assignees: ''
+---
# Bug Report
@@ -18,9 +20,7 @@ Describe what actually happens.
## Steps to Reproduce the Problem
1.
-
2.
-
3.
## Screenshots
diff --git a/.github/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md
similarity index 100%
rename from .github/pull_request_template.md
rename to .github/PULL_REQUEST_TEMPLATE.md
diff --git a/classes/class-alerts.php b/classes/class-alerts.php
index 17c9b4ee2..e381caef4 100644
--- a/classes/class-alerts.php
+++ b/classes/class-alerts.php
@@ -509,6 +509,7 @@ public function change_menu_link_url() {
* @return void
*/
public function display_notification_box( $post = array() ) {
+ $alert = null;
$alert_type = 'none';
if ( is_object( $post ) ) {
$alert = $this->get_alert( $post->ID );
@@ -732,6 +733,13 @@ public function get_actions() {
*/
public function save_new_alert() {
check_ajax_referer( 'save_alert', 'wp_stream_alerts_nonce' );
+
+ if ( ! current_user_can( $this->plugin->admin->settings_cap ) ) {
+ wp_die(
+ esc_html__( "You don't have sufficient privileges to do this action.", 'stream' )
+ );
+ }
+
$trigger_author = wp_stream_filter_input( INPUT_POST, 'wp_stream_trigger_author' );
$trigger_connector_and_context = wp_stream_filter_input( INPUT_POST, 'wp_stream_trigger_context' );
if ( false !== strpos( $trigger_connector_and_context, '-' ) ) {
@@ -799,6 +807,12 @@ public function save_new_alert() {
* Return HTML string of the Alert page controls.
*/
public function get_new_alert_triggers_notifications() {
+ if ( ! current_user_can( $this->plugin->admin->settings_cap ) ) {
+ wp_die(
+ esc_html__( "You don't have sufficient privileges to do this action.", 'stream' )
+ );
+ }
+
ob_start();
?>