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

The new Gutenberg editor and the future of Meta Box #2308

Closed
rilwis opened this issue Aug 9, 2017 · 1 comment
Closed

The new Gutenberg editor and the future of Meta Box #2308

rilwis opened this issue Aug 9, 2017 · 1 comment

Comments

@rilwis
Copy link
Contributor

rilwis commented Aug 9, 2017

As discussed in #952, this lists all the hooks that are used in Meta Box plugin. I hope that can help making the plugin works with Gutenberg:

  • Scripts, styles are enqueued using admin_enqueue_scripts. We do check for the current screen (via get_current_screen) to make sure scripts and styles are enqueued only for that pages. For the core plugin, it checks by post types. For extensions (term meta, user meta, settings page), it checks more for taxonomies, user profile page or settings pages.
  • We also use print_media_templates to print Underscore templates.
  • Scripts we use in the plugin includes: color picker, underscore, backbone, media scripts, tinymce (for the editor field)
  • We use init to initialize all the hooks for the plugin.
  • Meta boxes are registered using add_meta_boxes hooks.
  • Hidden meta boxes use default_hidden_meta_boxes.
  • We also hook to post_edit_form_tag to allow upload files.
  • We use save_post_{$post_type} and edit_attachment, add_attachment to save meta values for posts and attachments.
@mtias
Copy link
Member

mtias commented Aug 31, 2017

Going to close so we have a single point of reference. Would you mind adding your comment on #952 again?

@mtias mtias closed this as completed Aug 31, 2017
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

2 participants