WordPress.org

Ready to get started?Download WordPress

Forums

Problem media_send_to_editor (11 posts)

  1. mathis@Tambour
    Member
    Posted 1 year ago #

    Hey guys !
    I actually got a problem with one of my plugins in 3.5 RC3
    This one use the following code, but it don t works anymore:
    When i send it to editor, it dont change my class in "html mod" in post page.

    function highslide_integration_send_to_editor( $html, $send_id, $attachment ) {
    
       if( isset($_POST["highslide-$send_id"]) )
    
          return str_replace('<a', '<a class="highslide"', $html);
    
       else
    
          return $html;
    }
    add_filter( 'media_send_to_editor', 'highslide_integration_send_to_editor', 66, 3 );

    Someone got an idea ?

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    Does it work without if( isset($_POST["highslide-$send_id"]) )

    To check out what $_POST returns you could serialize the array:

    return serialize ($_POST);
  3. mathis@Tambour
    Member
    Posted 1 year ago #

    Yes, it works without it.
    So there is a problem with if( isset($_POST["highslide-$send_id"]) ) ...

  4. keesiemeijer
    moderator
    Posted 1 year ago #

  5. mathis@Tambour
    Member
    Posted 1 year ago #

    Was a good idea, but not works again ! :s

  6. keesiemeijer
    moderator
    Posted 1 year ago #

    What is the plugin that uses this?

  7. mathis@Tambour
    Member
    Posted 1 year ago #

    That a Highslide plugin.
    But the owner is dead, so i have to update it by myself !

  8. keesiemeijer
    moderator
    Posted 1 year ago #

    Where can I download the plugin?

    Have you tried just returning the serialized $_POST array to see if "highslide-$send_id" is in it.

  9. mathis@Tambour
    Member
    Posted 1 year ago #

    Will try it tomorrow. ( I am frensh, so not the same hour ^^ )
    http://www.mirorii.com/fichier/32/671819/highslide-integration-rar.html

  10. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    If this plugin is in the WordPress.org plugin directory and the plugin is abandoned, I am happy to reassign it to a new owner.

    This plugin should probably work as-is with 3.5, but I have a feeling it is doing something weird that is tied to the old uploader, and that is no longer working. I need to see the code to be for certain.

  11. mathis@Tambour
    Member
    Posted 1 year ago #

    Thanks for your help.
    And yes, my websites use this plugins, so if i can, i will appropriate this plugin !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.