public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/admin/functions.php
/**
 * Given a list of tags, render them for admin control.
 *
 * @since 1.0.0
 *
 * @param integer $questionID The ID of the question that we're adding/removing the tag for.
 * @param array   $tagList The list of tags to add (a list of tag objects.
 *
 * @return string The HTML for rendering the tags.
 */
Given a list of tags, render them for admin control.

@param integer $questionID The ID of the question that we're adding/removing the tag for.
@param array   $tagList The list of tags to add (a list of tag objects.

@return string The HTML for rendering the tags.
Given a list of tags render them for admin control . @param integer $questionID The ID of the question that we ' re adding / removing the tag for . @param array $tagList The list of tags to add ( a list of tag objects . @return string The HTML for rendering the tags .
function WPCW_questions_tags_render( $questionID, $tagList ) {
	$html = '<span class="wpcw_tag_list_wrapper tagchecklist">';
	if ( empty( $tagList ) ) {
		$html .= '</span>';
		return $html;
	}
	foreach ( $tagList as $tagDetails ) {
		$html .= sprintf( '<span><a data-questionid="%d" data-tagid="%d" class="ntdelbutton">X</a>&nbsp;%s</span>',
			$questionID, $tagDetails->question_tag_id, stripslashes( $tagDetails->question_tag_name )
		);
	}
	$html .= '</span>';
	return $html;
}
function WPCW_questions_tags_render ( $ questionID , $ tagList ) { $ html = '<span class="wpcw_tag_list_wrapper tagchecklist">' ; if ( empty ( $ tagList ) ) { $ html .= '</span>' ; return $ html ; } foreach ( $ tagList as $ tagDetails ) { $ html .= sprintf ( '<span><a data-questionid="%d" data-tagid="%d" class="ntdelbutton">X</a>&nbsp;%s</span>' , $ questionID , $ tagDetails -> question_tag_id , stripslashes ( $ tagDetails -> question_tag_name ) ) ; } $ html .= '</span>' ; return $ html ; }
Given a list of tags, render them for admin control.
Given a list of tags render them for admin control .
// Nothing to do, but still return wrapper for adding via AJAX. // Render list of tags