Element ID
/wp-admin/post.php?post=553&action=edit
Author ID
/wp-admin/user-edit.php?user_id=2
Add a filter
add_filter( 'generate_hook_element_display', function( $display, $element_id ) {
$author_id = get_post_field( 'post_author', get_the_ID() );
if ( 553 === $element_id && '2' == $author_id ) {
$display = true;
}
return $display;
} );
I added the above code to the Code Snippets plugin, but it did not work.
Is there something wrong with the above code?