Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since WP version 5.8.0 allowed_block_types is deprecated #154

Closed
martienvlent opened this issue Jul 24, 2021 · 0 comments
Closed

Since WP version 5.8.0 allowed_block_types is deprecated #154

martienvlent opened this issue Jul 24, 2021 · 0 comments

Comments

@martienvlent
Copy link

Used in classes/class-custom-post-type.php. Should be changed to allowed_block_types_all.

This returns context instead of post as second parameter. Therefore the function on line 497 should be changed to:

public function vp_lists_allowed_block_types( $allowed_block_types, $context ) {

   if ( 'vp_lists' !== $context->post->post_type ) {
        return $allowed_block_types;
    }

    return array( 'visual-portfolio/saved-editor' );
}
@nk-o nk-o closed this as completed in a667730 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant