You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But since WP 4.8.0 display_media_states passes the relevant $post as parameter.
/**
* Filters the default media display states for items in the Media list table.
*
* @since 3.2.0
* @since 4.8.0 Added the `$post` parameter.
*
* @param string[] $media_states An array of media states. Default 'Header Image',
* 'Background Image', 'Site Icon', 'Logo'.
* @param WP_Post $post The current attachment object.
*/
return apply_filters( 'display_media_states', $media_states, $post );
No need to fallback to the global. Just take the passed WP_Post and work on that
The text was updated successfully, but these errors were encountered:
JanThiel
added a commit
to JanThiel/avatar-manager
that referenced
this issue
Aug 9, 2023
Triggered by:
avatar-manager/avatar-manager.php
Lines 1140 to 1147 in eb638b0
But since WP 4.8.0
display_media_states
passes the relevant$post
as parameter.No need to fallback to the global. Just take the passed WP_Post and work on that
The text was updated successfully, but these errors were encountered: