Support » Plugin: Image Teleporter » Possible bug found

  • Hello,

    When using the plugin on presslabs.ro I consistently ran in to an infinite loop issue.

    I’ve fixed it locally by following the advice at http://codex.wordpress.org/Function_Reference/wp_update_post#Caution_-_Infinite_loop

    This is the patch:

    diff --git a/wp-content/plugins/image-teleporter/image-teleporter.php b/wp-content/plugins/image-teleporter/image-teleporter.php
    index cbc376a..01b87e0 100644
    --- a/wp-content/plugins/image-teleporter/image-teleporter.php
    +++ b/wp-content/plugins/image-teleporter/image-teleporter.php
    @@ -120,7 +120,9 @@ function bml_it_find_imgs ( $post_id ) {
                    $upd['ID']           = $post_id;
                    $upd['post_content'] = $content;
    
    +               remove_action('save_post', 'bml_it_find_imgs', 100000);
                    wp_update_post($upd);
    +               add_action('save_post', 'bml_it_find_imgs', 100000);
            }
    
            // Post meta


    Regards,
    Radu Ciorba

    https://wordpress.org/plugins/image-teleporter/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Possible bug found’ is closed to new replies.