WordPress.org

Ready to get started?Download WordPress

Forums

Changing the Inline Upload Source in Post.php (9 posts)

  1. flymy
    Member
    Posted 7 years ago #

    I use the filosofo-old-style-upload plugin.

    I would like to replace the Inline Upload in Post.php (which is inside an iframe), and to display there the filosofo-old-style-upload plugin.

    Does anyone have an idea on how to change the iframe source, but with a plugin and not through the system files???

    If so, does anyone have an idea of how to call a function inside that iframe?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The iframe source URL gets passed through a filter with a hook name of "uploading_iframe_src". So you can change the source in a plugin by hooking that filter and changing the URL to whatever you want.

  3. flymy
    Member
    Posted 7 years ago #

    Doesn't work. For example :

    function remove_crap_inlnupl() {
    $uploading_iframe_src = apply_filters('uploading_iframe_src', 'http://www.yahoo.com');
    }
    
    add_filter('uploading_iframe_src', 'remove_crap_inlnupl');

    If you use this code, all you get is that post.php won't load fully :-(

    Any other idea?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    What the heck were you trying to do there? That's not how you use a filter.

    Try something more like this instead:

    function change_upload_src($src) {
    // $src is the original URL if you need it for anything
    return 'http://www.yahoo.com';
    }
    add_filter('uploading_iframe_src', 'change_upload_src');

    Read this for more information:
    http://codex.wordpress.org/Plugin_API#Filters

  5. flymy
    Member
    Posted 7 years ago #

    Now, to the harddest part :

    How do make the upload page of old-style-upload plugin, to be displayed inside the iframe???

    Using the link http://.../wp-admin/admin.php?page=filosofo-old-style-upload_he.php is not an option, because it's not really comfortable.

    Any idea please?

  6. flymy
    Member
    Posted 7 years ago #

    Bumpo!!!

  7. flymy
    Member
    Posted 7 years ago #

    Please Help Me!

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Help yourself. Why not ask the author of the plugin you're talking about for help?

    We don't do plugins here, for the most part, because we don't know them all. Sure, the more well known plugins get answers, but I've never heard of what you're talking about, and I doubt most other people who read these forums have either.

    So you're better off going and asking the plugin's author. Much better than bumping threads here, which will get you banned if you don't watch it.

  9. flymy
    Member
    Posted 7 years ago #

    Thank for your great help.

    I did talk the author of the plugin. He wanted 50 USD for his help. Due to lack of funds, obviously I came here for help.

    If you don't want/can't to help, dont bother to reply.

Topic Closed

This topic has been closed to new replies.

About this Topic