Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Table_Student_Certificates::get_actions_html( int $certificate_id )

Get HTML for buttons in the actions cell of the table.

Parameters Parameters


(int) (Required) WP Post ID of the llms_my_certificate

Top ↑

Return Return


Top ↑

Source Source

File: includes/admin/reporting/tables/llms.table.certificates.php

	private function get_actions_html( $certificate_id ) {
		<a class="llms-button-secondary small" href="<?php echo esc_url( get_permalink( $certificate_id ) ); ?>" target="_blank">
			<?php _e( 'View', 'lifterlms' ); ?>
			<i class="fa fa-external-link" aria-hidden="true"></i>
		<?php if ( get_edit_post_link( $certificate_id ) ) : ?>
		<a class="llms-button-secondary small" href="<?php echo esc_url( get_edit_post_link( $certificate_id ) ); ?>">
			<?php _e( 'Edit', 'lifterlms' ); ?>
			<i class="fa fa-pencil" aria-hidden="true"></i>
		<?php endif; ?>
		<form action="" method="POST" style="display:inline;">

			<button type="submit" class="llms-button-secondary small" name="llms_generate_cert">
				<?php _e( 'Download', 'lifterlms' ); ?>
				<i class="fa fa-cloud-download" aria-hidden="true"></i>

			<button type="submit" class="llms-button-danger small" id="llms_delete_cert" name="llms_delete_cert">
				<?php _e( 'Delete', 'lifterlms' ); ?>
				<i class="fa fa-trash" aria-hidden="true"></i>

			<input type="hidden" name="certificate_id" value="<?php echo absint( $certificate_id ); ?>">
			<?php wp_nonce_field( 'llms-cert-actions', '_llms_cert_actions_nonce' ); ?>


		<script>document.getElementById( 'llms_delete_cert' ).onclick = function( e ) {
			return window.confirm( '<?php esc_attr_e( 'Are you sure you want to delete this certificate? This action cannot be undone!', 'lifterlms' ); ?>' );
		return ob_get_clean();

Top ↑

Changelog Changelog

Version Description
6.0.0 Show a button to edit earned certificates.
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.