1

Was just checking the error logs on a new install of 5.4.1 and see a lot:

Got error 'PHP message: PHP Deprecated:  media_buttons_context is <strong>deprecated</strong> since version 3.5.0! Use media_buttons instead. in /var/www/susites/evozyne/htdocs/wp-includes/functions.php on line 5088', referer: https://evozyne.highgatewebworks.com/wp-admin/post.php?post=8&action=edit

I can't find any mention of this anywhere except in an old WordPress Core discussion.

Can anyone shed some light on this?

Brad

1
  • The error on this points to the general function in wp-includes that creates the error for deprecated functions. The part that can be debugged is the second address noted as "referrer". That same problem showed up on one ... only one of the many sites I work on. I did a search on the code, and the places it comes up is where plugins have added a check to override the deprecated function. Since the call seems to come from wp-admin, it seems that it would be fixed if the core is up to date. Otherwise the problem is in a functions.php file or plugin. Commented Jun 7, 2020 at 19:32

2 Answers 2

1

Try this media_buttons instead of media_buttons_context

Please refer these URL: https://developer.wordpress.org/reference/hooks/media_buttons_context/ https://developer.wordpress.org/reference/hooks/media_buttons/

0

According to the developer documentation, media_buttons_context has been deprecated since 3.5.0 in favor of media_buttons. The Warning is there to point you in the right direction to update the code to use the newer, preferred function.

I bet if you do a search of your codebase (active plugins and theme) you'll find media_buttons_context somewhere which should be updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.