alilotfi1389
Forum Replies Created
-
Forum: Plugins
In reply to: [LearnPress - WordPress LMS Plugin] Add custom fields to certificatei want create 2 or 3 field from user in sql database to certification learnpress i use this under code but this code are fault
please help me for add 3 field from user such as postalcode and address and fathername
in certification for one curessfunction shorman_function() {
return ‘test test’;
}
add_shortcode(‘shorman’, ‘shorman_function’);add_filter( ‘certificates/fields’, function($fields) {
$fields[] = array(
‘name’ => ‘pedar’,
‘icon’ => ‘dashicons-smiley’,
‘title’ => __( ‘??? ???’, ‘learnpress-certificates’ )
);
return $fields;
});function lporderid_function() {
return ‘test’;
}
add_shortcode(‘lporderid’, ‘lporderid_function’);/* Adds new shortcode option to cert editor */
add_filter( ‘certificates/fields’, function($fields) {
$fields[] = array(
‘name’ => ‘shortcode’,
‘icon’ => ‘dashicons-smiley’,
‘title’ => __( ‘?????’, ‘learnpress-certificates’ )
);
if (class_exists(‘LP_Certificate_Layer’)) {class LP_Certificate_Shortcode_Layer extends LP_Certificate_Layer {
public function apply( $data ) {
$this->options[‘text’] = do_shortcode(‘[lporderid course_id=”‘ . $data[‘course_id’] . ‘]’);
//$this->options[‘text’] = do_shortcode(‘[shorman course_id=”‘ . $data[‘course_id’] . ‘]’);
}}
}
return $fields;
});`Forum: Plugins
In reply to: [LearnPress - WordPress LMS Plugin] Add custom fields to certificatei want create 2 or 3 field from user in sql database to certification learnpress
i use this under code but this code are fault
please help me for add 3 field from user such as postalcode and address and fathername
in certification for one curess/* EWS Change - Custom Shortcode */ function shorman_function() { return 'test test'; } add_shortcode('shorman', 'shorman_function'); /* Adds new shortcode option to cert editor */ add_filter( 'certificates/fields', function($fields) { $fields[] = array( 'name' => 'pedar', 'icon' => 'dashicons-smiley', 'title' => __( '??? ???', 'learnpress-certificates' ) ); return $fields; }); /* EWS Change - Custom Shortcode */ function lporderid_function() { return 'test'; } add_shortcode('lporderid', 'lporderid_function'); /* Adds new shortcode option to cert editor */ add_filter( 'certificates/fields', function($fields) { $fields[] = array( 'name' => 'shortcode', 'icon' => 'dashicons-smiley', 'title' => __( '?????', 'learnpress-certificates' ) ); if (class_exists('LP_Certificate_Layer')) { class LP_Certificate_Shortcode_Layer extends LP_Certificate_Layer { public function apply( $data ) { $this->options['text'] = do_shortcode('[lporderid course_id="' . $data['course_id'] . ']'); //$this->options['text'] = do_shortcode('[shorman course_id="' . $data['course_id'] . ']'); } } } return $fields; });