Title: Plugin interference with Barley editor plugin
Last modified: August 22, 2016

---

# Plugin interference with Barley editor plugin

 *  [gik25](https://wordpress.org/support/users/gik25/)
 * (@gik25)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/)
 * I think the problem is related to the preview feature.
    Barley is a paied plugin
   which allows the user to edit the text of a post in a visual ajaxified way.
 * The tag `[amazon template=wishlist1&asin=8850212399]` comes to be replaced by:
 *     ```
       <div class="al_found1">
        <div class="amazon_prod">
         <div class="amazon_img_container">
          <a rel="nofollow" href="http://www.amazon.it/gp/product/8850212399?ie=UTF8&linkCode=as2&camp=1634&creative=6738&tag=-&creativeASIN=8850212399"><img class="wishlist_image" src="http://i1.wp.com/ecx.images-amazon.com/images/I/61p5-mO8EzL._SL160_.jpg?w=960" width="65" height="100"></a>
         </div>
         <div class="amazon_text_container">
          <p><b><a rel="nofollow" href="http://www.amazon.it/gp/product/8850212399?ie=UTF8&linkCode=as2&camp=1634&creative=6738&tag=-&creativeASIN=8850212399">Il metodo Mystery</a></b></p>
          <div class="amazon_details">
            <p><b>Autor &nbsp;e:</b> Mystery [TEA]<br>
            <b>Voto:</b> -&nbsp;<br>
            <b>Prezzo: <span class="amazon_price">EUR 7,65&nbsp;</span></b></p>
          </div>
         </div>
        </div>
       <img src="http://www.assoc-amazon.it/e/ir?t=-&l=as2&o=29&a=8850212399" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;">
       </div><p></p>
       ```
   
 * If you need the credentials to access the real environment just let me know.
 * [https://wordpress.org/plugins/amazon-link/](https://wordpress.org/plugins/amazon-link/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [paulstuttard](https://wordpress.org/support/users/paulstuttard/)
 * (@paulstuttard)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/#post-5606050)
 * Hi,
 * Thanks for trying the plugin, at the moment there is not a lot I can do.
 * Best course of action is to approach the support staff of the paid plugin and
   see what they recommend.
 * I’ll be happy to add any minor modifications to the Amazon Link plugin they might
   suggest.
 * Cheers,
 * Paul
 *  Thread Starter [gik25](https://wordpress.org/support/users/gik25/)
 * (@gik25)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/#post-5606055)
 * Thanks,
    I’ve contacted them. But I’m still waiting for an answer..
 * You can’t access their ticketing system but you can see the pictures I sent to
   them.
 * [http://support.getbarley.com/attachments/token/tGZ0PaE0X4P76izdfNqdko7iO/?name=Immagine+5.png](http://support.getbarley.com/attachments/token/tGZ0PaE0X4P76izdfNqdko7iO/?name=Immagine+5.png)
   
   [http://support.getbarley.com/attachments/token/O5uBq9dmWoAjdsneWOeuXZZDq/?name=Immagine+6.png](http://support.getbarley.com/attachments/token/O5uBq9dmWoAjdsneWOeuXZZDq/?name=Immagine+6.png)
   [http://support.getbarley.com/attachments/token/z9wNs1dKM1s9zUTQZhbRj4hQE/?name=Immagine+4.png](http://support.getbarley.com/attachments/token/z9wNs1dKM1s9zUTQZhbRj4hQE/?name=Immagine+4.png)
 * Can I disable the preview of the shortcode so that it will stay as a shortcode
   also in the Barley editor?
 * ps: by the way, why don’t you make a paid version of your plugin with more templates
   and a visual editor maybe? I like a lot the model of making money used by the
   apps on phones: free version and a better paid version.
 *  Plugin Author [paulstuttard](https://wordpress.org/support/users/paulstuttard/)
 * (@paulstuttard)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/#post-5606239)
 * Hi,
 * Been busy over the holidays!
 * I suspect that their plugin uses the standard ‘get_the_content’ with associated
   filters to produce the preview. It is difficult for my plugin to know if it should
   or should not translate the shortcode.
 * If you feel up to it you could try hacking the plugin to see if this makes any
   difference:
 * In the file wp-content/plugins/amazon-link/amazon.php
 * Make the following change to line 149 ([Original](https://plugins.trac.wordpress.org/browser/amazon-link/tags/3.2.4/amazon.php#L145))
 *     ```
       145	         // Register filters to process the content and widget text
       146	         if ( false  ) { // change false to true - To support WP Super Cache
       147	            add_cacheaction( 'wpsc_cachedata_safety', array( $this, 'safety' ) );
       148	            add_cacheaction( 'wpsc_cachedata', array( $this, 'widget_filter' ) );
       149	         } else if ( ! is_admin() ) {
       150	            add_filter( 'the_content', array( $this, 'content_filter' ),15,1 );
       151	            add_filter( 'widget_text', array( $this, 'widget_filter' ), 16,1 );
       152	         }
       153	      }
       ```
   
 * Note the addition of the `if ( ! is_admin() )`.
 * Paul
 *  Thread Starter [gik25](https://wordpress.org/support/users/gik25/)
 * (@gik25)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/#post-5606240)
 * Thanks a lot. I’ve also opened another question if you want to have a look.
    
   Really compliment for the support!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Plugin interference with Barley editor plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amazon-link_070606.svg)
 * [Amazon Link](https://wordpress.org/plugins/amazon-link/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-link/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-link/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-link/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-link/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-link/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [gik25](https://wordpress.org/support/users/gik25/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-interference-with-barley-editor-plugin/#post-5606240)
 * Status: not resolved