Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Duplicate ul container $this->list_options->wrapper_type on FavoriteListTypeBase -> noFavorites function #163

Open
cicoph opened this issue Mar 7, 2022 · 0 comments

Comments

@cicoph
Copy link

cicoph commented Mar 7, 2022

protected function listOpening()
	{
		$css = apply_filters('favorites/list/wrapper/css', $this->list_options->wrapper_css, $this->list_options);
		$out = '<' . $this->list_options->wrapper_type;
		$out .= ' class="favorites-list ' . $css . '" data-userid="' . $this->list_options->user_id . '" data-siteid="' . $this->list_options->site_id . '" ';
		$out .= ( $this->list_options->include_button ) ? 'data-includebuttons="true"' : 'data-includebuttons="false"';
		$out .= ( $this->list_options->include_links ) ? ' data-includelinks="true"' : ' data-includelinks="false"';
		$out .= ( $this->list_options->include_thumbnails ) ? ' data-includethumbnails="true"' : ' data-includethumbnails="false"';
		$out .= ( $this->list_options->include_excerpt ) ? ' data-includeexcerpts="true"' : ' data-includeexcerpts="false"';
		$out .= ' data-thumbnailsize="' . $this->list_options->thumbnail_size . '"';
		$out .= ' data-nofavoritestext="' . $this->list_options->no_favorites . '"';
		$out .= ' data-posttypes="' . $this->list_options->post_types . '"';
		$out .= '>';
		return $out;
	}
protected function listClosing()
	{
		return '</' . $this->list_options->wrapper_type . '>';
	}
protected function noFavorites()
	{

		if ( !empty($this->favorites) ) return;
		// $out = $this->listOpening(); This have $out = '<' . $this->list_options->wrapper_type; 
		$out = '<' . $this->list_options->wrapper_type;
		$out .= ' data-postid="0" data-nofavorites class="no-favorites">' . $this->list_options->no_favorites;
		$out .= '</' . $this->list_options->wrapper_type . '>';
		// $out .= $this->listClosing(); This have return '</' . $this->list_options->wrapper_type . '>';
		return $out;
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant