function admin_content() { echo parent::get_cell_alignment(); echo parent::get_element_margins(); ?> <label> <input class="file_url" type="text" size="36" name="meta_featured_url" value="" placeholder="<?php echo esc_attr('Enter a URL or Browse for a file.', 'cp'); ?> "/> <input class="file_url_button button-secondary" type="button" value="<?php _e('Browse', 'cp'); ?> "> </label> <?php }
$template_elements_set = array(); $page = $_GET['page']; if (isset($_POST['add_new_template'])) { if (check_admin_referer('save_template')) { if (current_user_can('coursepress_create_certificates_cap') || current_user_can('manage_options')) { $templates->add_new_template(); $message = __('Certificate Template data has been successfully saved.', 'cp'); } else { $message = __('You do not have required permissions for this action.', 'cp'); } } } if (isset($_GET['action']) && $_GET['action'] == 'edit' && (current_user_can('coursepress_update_certificates_cap') || current_user_can('manage_options'))) { $post_id = (int) $_GET['ID']; $template = new CP_Certificate_Template($post_id); $template_elements = new CP_Certificate_Template_Elements($post_id); $template_elements_set = $template_elements->get_all_set_elements(); } if (isset($_GET['action']) && $_GET['action'] == 'delete') { if (!isset($_POST['_wpnonce'])) { check_admin_referer('delete_' . $_GET['ID']); if (current_user_can('coursepress_delete_certificates_cap') || current_user_can('manage_options')) { $template = new CP_Certificate_Template((int) $_GET['ID']); $template->delete_template(); $message = __('Certificate Template has been successfully deleted.', 'cp'); } else { $message = __('You do not have required permissions for this action.', 'cp'); } } } if (isset($_GET['page_num'])) {