LLMS_Shortcode::output( array $atts = array(), string $content = '' )

Output the actual content of the shortcode This is the callback function used by add_shortcode and can also be used programmatically, used in some widgets


Description Description

$atts & $content are both filtered before being passed to get_output() output is filtered so the return of get_output() doesn’t need its own filter


Top ↑

Parameters Parameters

$atts

(array) (Optional) user submitted shortcode attributes

Default value: array()

$content

(string) (Optional) user submitted content

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.shortcode.php

	public function output( $atts = array(), $content = '' ) {

		$this->attributes = $this->set_attributes( $atts );

		if ( ! $content ) {
			$content = apply_filters( $this->get_filter( 'get_default_content' ), $this->get_default_content(), $this );
		}

		$this->content = $content;

		return apply_filters( $this->get_filter( 'output' ), $this->get_output(), $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Merge attributes in a separate method.
3.5.1 Unknown.
3.4.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.