'; if ($is_editor) { echo ''; } else { echo '' . esc_html($shortcode) . ''; } echo ''; echo ''; } /** Load only on the three product/card admin listings and editors. */ function azlinkpro_copy_enqueue_assets($hook_suffix) { if (!in_array($hook_suffix, array('edit.php','post.php','post-new.php'), true)) { return; } $screen = function_exists('get_current_screen') ? get_current_screen() : null; if (!$screen || !in_array($screen->post_type, array('azlinkpro_table', 'azlinkpro_showcase', 'azlinkpro_proscons', 'azlinkpro_image'), true)) { return; } wp_enqueue_style('dashicons'); wp_enqueue_style('azlinkpro-shortcode-copy', plugins_url('assets/shortcode-copy.css', dirname(__DIR__) . '/azlinkpro.php'), array(), AZLINKPRO_VERSION); wp_enqueue_script('azlinkpro-shortcode-copy', plugins_url('assets/shortcode-copy.js', dirname(__DIR__) . '/azlinkpro.php'), array(), AZLINKPRO_VERSION, true); } add_action('admin_enqueue_scripts', 'azlinkpro_copy_enqueue_assets');