Support » Plugin: Slidorion » [Plugin: Slidorion] Overwriting send_to_editor causes bad behaviour

  • cameron1729


    In slidorion_uploader.js this plugin uses the same name as a function in wp-admin/js/media-upload.js (specifically send_to_editor).

    This causes issues when WordPress calls send_to_editor – this plugin’s version is called instead of WordPress’s.

    This is particularly an issue when using the “Media Library” tab in the “Add Media” dialogue (the one that you use when creating a post/page/etc). When you press the “Insert into Post” button, nothing visibly happens.

    I made a quick change to the function definition in the plugin – and I doubt this is the ‘proper’ way to resolve this issue:

    This checks if the current page is the ‘new sliderion’ page, and if it is, we use the code from the plugin, otherwise we use the code from media-upload.js. This will only work for this specific domain (I was too lazy to make it work in general because it’s probably not the right way to resolve the issue anyway).

    This plugin is overriding WordPress’s core functionality, so I think this is a pretty serious issue and needs to be resolved properly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • IvanRuisoto



    I have the same problem.

    I have used your code and i modified the condition:

    if ((new RegExp('slidorion_menu_new&edit=3')).test(window.location)) {

    Now the domain is not important. Although it’s not the best way to solve this problem I haven’t any better.




    Hi, glad my hack helped.

    Looking at your condition, I think you should remove the &edit=3 otherwise you will miss some matches.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Slidorion] Overwriting send_to_editor causes bad behaviour’ is closed to new replies.