public function register_assets($hook)
{
if ('post.php' !== $hook && 'post-new.php' !== $hook) {
return;
}
wp_enqueue_style($this->plugin_slug . '_meta_boxes_css', plugin_dir_url(__FILE__) . '../assets/css/meta-boxes.css');
wp_enqueue_script($this->plugin_slug . '_meta_boxes_js', plugin_dir_url(__FILE__) . '../assets/js/meta-boxes.js', array('jquery'), $this->version, true);
// Localize the JS file for handling frontend actions.
wp_localize_script($this->plugin_slug . '_meta_boxes_js', 'apple_news_meta_boxes', array('publish_action' => $this->publish_action));
}