Support » Plugin: WP-Stateless - Google Cloud Storage » Conflict with featured image from external url function

  • Resolved al2meta

    (@al2meta)


    Hi,

    I am using this Featured image from external image url function, a code from WWW Post Thumbnail by Giuseppe Mazzapica, and inserted it into my functions.php.

    When I activated WP Stateless. All those featured images that appear on my website got this error message.

    Warning: Missing argument 3 for wpCloud\StatelessMedia\Bootstrap::wp_get_attachment_image_attributes() in /home2/*****/public_html/wp-content/plugins/wp-stateless/lib/classes/class-bootstrap.php on line 439

    Can you guys help me out please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    WP-Invoice Support

    Hey,

    line $attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, NULL ); is not correct. This filter is stolen from WordPress Core. It is not bad but it is used incorrectly. This filter must get 3 arguments but not 2 ($attr, NULL). The third one is $size. See /wp-includes/media.php line 919.

    Thanks.

    I added $size and it worked!

    Thanks a bunch Anton… 🙂

    As a token of my appreciation, I’ll help you guys out by spreading the word about this plugin.

    Hello,

    Thank you!

    Have a wonderful day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with featured image from external url function’ is closed to new replies.