/** * Enqueue the shortcode related admin assets */ public function admin_enqueue_scripts($hook) { /* No need to enqueue any asset if the current post type does not support wp_editor as there won't be anyway to edit the shortcode. */ if (!post_type_supports(get_post_type(), 'editor')) { return; } $content = $this->content; $props = array_merge($this->atts, compact('content')); foreach ($props as $name => $prop) { if (is_array($prop)) { $prop['name'] = $name; Youxi_Form_Field::force_enqueue($this->tag, $prop, $hook); } } }