As was decided a long time ago in WordPress extract() should not be used in the case here with shortcode attributes and in general WordPress removed it usage from WordPress core for several reasons.

Then there are the times that I can’t find any reference to where a variable came from at all. It’s just suddenly being used. One way that happens is through the extract function.

Also see https://blog.josephscott.org/2009/02/05/i-dont-like-phps-extract-function/

Reasons summarized

Leave a Reply

Your email address will not be published. Required fields are marked *