Skip to content

Commit

Permalink
Merge pull request #1 from fpcorso/dev
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
Frank Corso authored Oct 29, 2016
2 parents 98dc97c + 71581ff commit 651a61f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion php/generate-certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function qsm_addon_certificate_generate_certificate( $quiz_results, $return_file

// Add content
$pdf->SetFont( 'Arial', '', 16);
$content = apply_filters( 'mlw_qmn_template_variable_results_page', $certificate_settings["content"], $quiz_results );
$content = apply_filters( 'qsm_addon_certificate_content_filter', $certificate_settings["content"], $quiz_results );
$content = nl2br( $content, false );
$pdf->WriteHTML( "<p align='center'>$content</p>" );

Expand All @@ -101,4 +101,5 @@ function qsm_addon_certificate_generate_certificate( $quiz_results, $return_file
}
}
}

?>
22 changes: 18 additions & 4 deletions qsm-certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* Description: Adds the ability to give certificates to quiz/survey takers
* Author: Frank Corso
* Author URI: http://quizandsurveymaster.com
* Version: 0.1.0
* Version: 1.0.0
*
* @author
* @version 0.1.0
* @version 1.0.0
*/

if ( ! defined( 'ABSPATH' ) ) exit;
Expand All @@ -29,7 +29,7 @@ class QSM_Certificate {
* @var string
* @since 0.1.0
*/
public $version = '0.1.0';
public $version = '1.0.0';

/**
* Main Construct Function
Expand Down Expand Up @@ -74,14 +74,28 @@ public function add_hooks() {
add_action( 'admin_init', 'qsm_addon_certificate_register_results_details_tabs' );
add_action( 'admin_init', 'qsm_addon_certificate_register_addon_settings_tabs' );
add_filter( 'mlw_qmn_template_variable_results_page', 'qsm_addon_certificate_variable', 1, 2 );

// Needed until the new variable system is finished
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_point_score', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_average_point', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_amount_correct', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_total_questions', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_correct_score', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_quiz_name', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_user_name', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_user_business', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_user_phone', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_user_email', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_date', 10, 2 );
add_filter( 'qsm_addon_certificate_content_filter', 'mlw_qmn_variable_date_taken', 10, 2 );
}

/**
* Checks license
*
* Checks to see if license is active and, if so, checks for updates
*
* @since 1.3.0
* @since 1.0.0
* @return void
*/
public function check_license() {
Expand Down

0 comments on commit 651a61f

Please sign in to comment.