/** * Renders the "Delete" button. * * @access private * @since 8.4 * * @param cnTemplate $template */ function cnTemplateDeleteButton($template) { $form = new cnFormObjects(); if ($template->isCustom() === TRUE && $template->isLegacy() === TRUE) { $url = $form->tokenURL('admin.php?cn-action=delete_template&type=' . $template->getType() . '&template=' . $template->getSlug(), 'delete_' . $template->getSlug()); ?> <a class="button button-warning" href="<?php echo esc_url($url); ?> " title="Delete '<?php echo esc_attr($template->getName()); ?> '" onclick="return confirm('You are about to delete this template \'<?php echo esc_attr($template->getName()); ?> \'\n \'Cancel\' to stop, \'OK\' to delete.');"> <?php _e('Delete', 'connections'); ?> </a> <?php } }