I'm writing a plugin for my site that preserves html tags in the excerpt. I got it to work with a textfield. Where I manually put in the html tags, but I want to use checkbox's instead.
I have an array of the html tags called $excerpt_tags and a foreach loop that outputs the array list with checkbox's.
I just don't know how to set the checkbox's to my preserve html option
Here's the code for the texfield
public function lz_excerpt($lz_text) {
$get_lz_funSettings = new FunctionSettings(); $lz_values = $get_lz_funSettings->lz_funcSettings();
$raw_excerpt = $lz_text; if ( '' == $lz_text ) { //Retrieve the post content. $lz_text = get_the_content('');
//Delete all shortcode tags from the content. $lz_text = strip_shortcodes( $lz_text );
I have an array of the html tags called $excerpt_tags and a foreach loop that outputs the array list with checkbox's.
I just don't know how to set the checkbox's to my preserve html option
Here's the code for the texfield
Like I said this works, so how can I do this but with checkbox's?