DEV: Add before button hook in post-menu. (#7550)

approved
#1

DEV: Add before button hook in post-menu. (#7550)

diff --git a/app/assets/javascripts/discourse/widgets/post-menu.js.es6 b/app/assets/javascripts/discourse/widgets/post-menu.js.es6
index b613806..dea4763 100644
--- a/app/assets/javascripts/discourse/widgets/post-menu.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-menu.js.es6
@@ -428,14 +428,20 @@ export default createWidget("post-menu", {
       if (builder) {
         const buttonAtts = builder(attrs, this.state, this.siteSettings);
         if (buttonAtts) {
-          const { position, beforeButton } = buttonAtts;
+          const { position, beforeButton, afterButton } = buttonAtts;
           delete buttonAtts.position;
 
           let button = this.attach(this.settings.buttonType, buttonAtts);
 
+          const content = [];
           if (beforeButton) {
-            button = h("span", [beforeButton(h), button]);
+            content.push(beforeButton(h));
           }
+          content.push(button);
+          if (afterButton) {
+            content.push(afterButton(h));
+          }
+          button = h("span", content);
 
           if (button) {
             switch (position) {
diff --git a/app/assets/stylesheets/common/printer-friendly.scss b/app/assets/stylesheets/common/printer-friendly.scss
index 38b13c2..e3ae895 100644
--- a/app/assets/stylesheets/common/printer-friendly.scss
+++ b/app/assets/stylesheets/common/printer-friendly.scss
@@ -94,10 +94,6 @@
     color: #ddd;
     font-weight: bold;
   }
-  /* hide OP Solved plugin stuff */
-  .topic-after-cooked-outlet.solved-panel {
-    display: none;
-  }
   /* localhost  - MOOT for production */
   .topic-category-outlet.show-topic-category-location,
   div.alert.alert-info.alert-emails-disabled,

GitHub sha: b9fcb2bc

Approved #2